lemoncube.com Search: (normal)
Articles
Links
News
Projects

Disclaimer

Using the tivo remote as a sorta universal remote

Before you get too excited, this'll probably only work on a series 1 tivo, and its aimed mainly at the Oztivo and NZtivo people.

Like a lot of technology nerds, my lounge room is full of remote controls. There's the TV, the surround amp, the DVD player, the xbox and tivo remotes. The tivo is the most used item, but in order to use it you need to find the TV remote, turn the TV on, make sure its on 'Video', not 'TV', then find the amp remote, turn on the amp ,then make sure its on VCR/DVR, then grab the tivo remote and start doing something. The remote for the amp is meant to be a universal remote, but it was designed by someone without a brain, so its not very easy to use.

I have been tempted to buy a proper universal remote. Not your cheap 4-in-1, or 6-in-1 complex mess, but something with an LCD screen and a computer interface ... but they ain't cheap.

Given that the tivo has an IR blaster to send IR codes to set top boxes and such, I thought it'd be logical to convince the tivo to send the IR codes to the TV and the amp by somehow pressing some buttons on the tivo remote.

Tools

In the Uploads section of the oztivo site are two useful tools (actually there are lots of very simple but useful tools there); PowerIRTools and trickey. PowerIRTools was meant as a tool to send IR codes to your Set Top Box in order to turn it on under program control. trickey monitors what buttons you're pressing on the tivo remote, and when it senses certain quick 'combos' (like the SELECT PLAY SELECT backdoors), it runs a program of your choice.

I thought I could combine the two; trickey would watch for a special combo of keys, then run a script that would send all the necesary IR codes to turn on the TV and AMP.

So how do I do this?

Grab both PowerIRTools and trickey. From PowerIRTools, take the irlock file and put it into /hack/bin. From trickey, take the 'trickey' file and put it in /hack/bin, and put the example trickey.conf into /hack/etc

Grab the Tivo UniRemote tarball and copy the files inside it as follows:

send_code.sh/hack/bin
pioneer.codes/hack/etc
sony.codes/hack/etc
convert_ccf_to_tivo.awk/hack/bin
on.sh/hack/bin
off.sh/hack/bin

Now you'll need to get the IR codes for the devices you want to turn on and off. I suggest you read this ozTivo howto for some background. What I did was to go to remotecentral.com, find some Pronto CCF files for my AMP and TV, then run a Windows program called ccf2efc to convert from the CCF format to plain text. By looking through the resultant text file you can (by sight) find the IR Code key sequences you need, but they'll need to be converted into a form that the tivo can understand.

convert_ccf_to_tivo.awk is a small awk script that does the conversion from a CCF file text dump into something that send_code.sh can use. It does a similar job to the Tivo IR Blaster file generator web page. Copy the text dump of your CCF file to the tivo and do something like:

  mawk -f /hack/bin/convert_ccf_to_tivo.awk pronto_ccf_dump.txt \ 
   > transonic.codes
You'll still need to hand edit the output file. On some CCF files, it kinda just works. On others it requires a lot of hand editing. The idea is to end up with a text file that consists of lines like:
  Power_on:0 48 1 34 5 6 7 67 57   ....
  Power_off:0 48 44 33 22 1 2 ...
Have a look at the sony.codes and pioneer.codes files in the tarball. The sony file is a generic one for Sony TVs and the pioneer one seems ot work on my VSX D510 amp. The text at the start of each line is what send_code.sh uses to find the right IR code to send. On one CCF file I tried, my awk script produced something like:
  Learned:0 48 1 3 54 6 7 ..
  Learned:0 48 9 12 3 44 88 1 ...
For this one, I needed to go back to the original CCF file dump and scroll through to find out what each IR code definition corresponded to what. Here's kinda what I saw:
 Mute(00035CEB)
    IR Code: "Learned" 0000 0067 0044 0 ...
So I just edited the text file, changed the 'Learned' to 'Mute' and reran the awk script. There's quite a bit of trial and error involved here. I'd suggest just trying to narrow things down to the Power on, off or power cycle IR codes and play with them. Also, you don't want duplicate entries in your 'codes' file (eg. multiple Power_on entries corresponding to say a TV, a VCR, and a fridge). Try renaming them (eg. TV_Power_on, VCR_Power_on ... ) or split it into separate code files. Just remember that the send_code.sh script pretty much just does a grep on a codes file to find the correct IR sequence.

You might be reading all this thinking; "So when do I have to insert the IR codes into the tivo MFS database?". You don't have to. Thats only for when you're configuring a set top box or other device that the tivo needs to talk to. Note that the '.codes' file you generate should go into the /hack/etc directory so that send_code.sh can find it.

So to test your captured codes, try running send_code.sh to power on your device. Lets say you captured your codes, converted them, and ended up with a codes file called /hack/etc/rankarena.codes. You can try doing something like:

  send_codes rankarena.codes Power_on
You'll see some 'Microcode 00034' or somesuch message, and hopefully your Rank Arena will power on. If it doesn't work, try some different codes, or try a different device to convince yourself that something is coming out of your IR Blaster (You did have them pointing at your AMP or TV didn't you?)

Have a look at on.sh. You can see that its an example of powering on a tv and an amp, as well as setting the TV to 'Input 1' and the AMP to the VCR input. I ended up turning the tv on at the start of the script and then switching it to 'Input 1' at the end to give it some time to kick into life.

What about Trickey?

OK, so you've sorted out your on.sh so that it turns everything on. Now edit /hack/etc/trickey.conf and put something like:
 S1S      SELECT,NUM1,SELECT 3    /var/hack/bin/on.sh
 S2S      SELECT,NUM2,SELECT 3    /var/hack/bin/off.sh
Start (or restart) trickey (see the readme that comes with trickey), and try pressing SELECT ONE SELECT on the remote. Hopefully, whatever on.sh is meant to turn on will turn on.