WDTV Tools

July 11, 2009

eiri r189 Released / Added Support for Command Remapping and Other Remote Controls

Filed under: eiri — Tags: , , , , , — Elmar Weber @ 03:32

A new version of eiri – the Extended IR Interface for the Western Digital TV HD (WDTV) – has been released. eiri allows you to use other remotes with the WDTV, to remap keys from the WDTV remote to new key sequences and to execute shell scripts with the remote. For example you can remap a key on your remote to change the movie language with just one key press instead of doing it complicated via the options menu. Furthermore eiri enables you to send commands to the WDTV from the command line or remotely via network.

This version introduces some new features and fixes a bug in the command line interface:

  • added support to remap IR commands
  • added support to map commands from other remotes to WDTV commands
  • added support to execute shell commands triggered by an IR code
  • fixed: some sleep intervals did not work with the command line client

To adapt the configuration of eiri simply modify the file eiri.conf.txt on your USB stick. It already contains some example configurations to get you started. A detailed documentation will follow. A tip, to get the IR codes for a new remote you can connect via telnet to eiri and see all IR codes: telnet >wdtv IP< 14247

The new application image is available for download at http://sourceforge.net/projects/wdtvtools/files/eiri/eiri-r189-wdtv.zip/download. As always, to use it simply extract all files to your boot USB stick.

All eiri files can be found at http://sourceforge.net/project/showfiles.php?group_id=261153&package_id=325092.

eiri is part of the WDTV Tools project. For more tools and information take a look at the WDTV Tools homepage: http://wdtv.elmarweber.org.

June 4, 2009

Preview Release of eiri: A Command Line and Network Interface to the Infrared Port

Filed under: eiri — Tags: , , , , , , — Elmar Weber @ 01:03

I had some time to finish the IR adapter I’ve been working on. A preview release of eiri (extended infrared interface) is available at http://sourceforge.net/project/downloading.php?group_id=261153&filename=eiri-r128-wdtv.zip.

eiri is an improved alternative to irset. It allows you to send IR commands to the WDTV GUI from the command line, thus enabling third party applications like web pages or SSH to control the WDTV GUI. Compared to irset it fixes some bugs, namely the 100% CPU utilization and it supported repeated keys (so you can hold down UP/DOWN and it is executed again without the need to press it again). Furthermore it adds a network mode that can be used to control the WDTV from a remote device over the network. The rest of this article first describes the command line interface and then the network mode.

The command line program is called irsend or eiric and can be used to send an arbitrary sequence of commands where a command can be one of POWER, HOME, UP, LEFT, ENTER, RIGHT, DOWN, BACK, STOP, OPTION, REWIND, PLAY, PAUSE, FORWARD, PREVIOUS, NEXT, SEARCH, EJECT or a number larger than 0 that is interpreted as a wait in milliseconds. For example

# irsend UP 1000 ENTER

will emulate an UP command from the remote, then wait 1000 milliseconds (1 second) and finally send the ENTER command. It is the same as when you press the UP and ENTER keys consecutive on the remote with a delay of one second. More complex combinations are possible but always remember to put a wait between two commands because the WDTV GUI won’t be able to process most commands if they are executed without delay.

A second feature of the preview release of eiri is the network mode. the eiri daemon (eirid) starts a TCP server on port 14247 that listens for connections from clients. When you connect your client two things happen and can be done

  1. You can send command sequences in the same way you can do with the irsend command line program. The communication is done in ascii mode (No UTF-8 or other encoding) and each line must be terminated with a n character or otherwise no commands are executed. So you would send the string “UP 1000 ENTERn” to achieve the same as the irsend call done above.
  2. You are notified about any commands received from the real remote. For each command a line is send to your program in the form of 4177951108:HOME:0 where the first parameter is the IR code, the second one the alias and the third parameter the repeat count. Repeat count comes into play when the user holds a key pressed. It is increased by one each time a pressed key is resend. If another key is pressed is it reset to zero. Even when you don’t use the notifications you should still read them and flush them into the digital nirvana because otherwise it can happen that some buffer runs full and your process cannot communicate any longer with eiri.

As with all preview releases the target audience are advanced end users and developers that want to test things. The goal is to test if the application works on a broader base of devices. The application image does nothing permanently to your WDTV, so if you experience any problems simply delete the application from your USB stick.

Powered by WordPress