Use IR Universal Remote Control with HTPC to control Vera - HOW TO

Hi

I previously wrote a blog post here where I outlined how to control Vera from the command line on a Windows HTPC and also was able to add custom buttons to a Logitech Harmony IR remote to control Z-wave devices and run Vera scenes! ;D

The setup was basically this:

On the Windows HTPC I would have a series of .cmd files each one would contain a wGet HTTP command to control Vera to do something, either turn on or off a device or run a scene etc.

For example this HTTP command turns off my Lamp (Left) device in my lounge.

wget --delete-after "http://192.168.1.100:3480/data_request?id=lu_action&output_format=xml&DeviceNum=3&serviceId=urn:upnp-org:serviceId:SwitchPower1&action=SetTarget&newTargetValue=1"

And this wGet HTTP command runs the Vera Scene who’s ID=1

wget --delete-after "http://192.168.1.100:3480/data_request?id=lu_action&serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=RunScene&SceneNum=1"

Once I had the .cmd files working on the HTPC by double clicking them, I then needed a way to launch these from the IR remote control. I then used AutoHotKey on the HTPC. This sits in the system tray and has a little script, where you can map a certain keyboard command like Ctrl+Alt+1 to run one of the .cmd files which in turn sends the wGet HTTP command to Vera to do something.

This is an example of some code I would use in the AutoHotkey script.

^!1:: IfWinExist Untitled - Left Lamp On WinActivate else Run C:\Lights\Run-CMD.vbs C:\Lights\Lounge-On-Left.cmd return

^!1 = Ctrl+Alt+1 and it then runs the command file C:\Lights\Lounge-On-Left.cmd. So when I pressed Ctrl+Alt+1 on the keyboard the Left Lamp would come on.

The final step was to then teach my Logitech Harmony remote the new keyboard command Ctrl+Alt+1 which I did using a Microsoft IR keyboard like this MCE one. I added a new custom button to my Harmony’s LCD screen to turn on the Left Lamp.

All of this sounds convoluted but it worked fantastically well. I also wrote about this idea here for my old system before I had Vera which was mControl.

Move on to today and I have migrated away from Windows MCE and I am now using Linux Ubuntu Minimal (No desktop GUI) and XBMC.
Since migrating I have lost this functionality of being able to control Vera with the Harmony remote control, as I do not know how to go about setting up something similar in Linux, the missing part is something like AutoHotkey for Linux where I could map custom keyboard shortcut combinations which then run the wGet HTTP commands.

But being a Linux newbie its beyond my current skills. Any Linux guru’s on this forum want to have a go??

I’ve asked on the Ubuntu forum here

I thought about doing this but ended up with a different solution. I added IR code recognition directly to Vera so I can receive IR commands from my universal remote and run scenes or PLEG logic as required, See: [url=http://forum.micasaverde.com/index.php/topic,14618.0.html]http://forum.micasaverde.com/index.php/topic,14618.0.html[/url]

It’s a different approach but achieves the same result.

Hi

So you can send Ir commands from your Harmony to the Keene Ir receiver which can then tell Vera to do something?

So does a PC need to be in the loop or not?

It would be far better if no PC / HTPC was required as you could then use the Harmony remote to control lights and run scenes even when the HTPC is switched off.

Reading the product page for the Keene IR unit here, looks like there is a LAN port for IR over IP. So no PC would need to be turned on and in the loop so to speak, presumably the Harmony would send an IR signal to the Keene box, this would send the signal to Vera over IP and then you could make Vera do something based of that particular IR signal captured. That right? If so this is the perfect solution I have been seeking! ;D

Yup - that’s what it does. You need a PC, briefly, to configure the KIRA but after that it runs standalone.

When KIRA receives IR codes, it converts them to a string and transmits them by UDP. The KiraRx plugin opens a socket for the KIRA and, when it receives a valid code string, looks it up in a table of named codes. If it is in the table, it raises a code-received event and sticks the code name in a state-variable. Vera scenes and PLEG conditions are easily triggered by testing for the named code.

I did it this way to keep it simple. No additional PCs, servers or other stuff to go wrong. Even the KIRA is just passing on the code so doesn’t need special programming. The code table is present only in the plugin so is easily maintained.

If so this is the perfect solution I have been seeking!
Certainly not perfect but it's been running my lights and other stuff for quite a while now. It works cheerfully with several different remotes and the KIRA has incredible sensitivity - you can point to remotes almost anywhere in the room and it catches the code. When you find the bits that aren't perfect, let me know via the [i]KiraRx[/i] thread and I'll see if I can beat them into submission. ;D

This is fascinating to me as the Logitech remote is really perfect in my opinion.

is it possible to use the RF functionality rather than IR so you don’t always have to be pointed at an IR repeater?

Also is their anyway to integrate say a honeywell z-wave thermostat into the harmony remote?

is it possible to use the RF functionality rather than IR so you don't always have to be pointed at an IR repeater?
Depending on which model of Harmony remote you have, you may be able to use one of the Logitech RF Extenders or Hubs to convert RF to IR. I don't know of any way to receive Harmony RF signals directly. I don't find it necessary to point my Harmony 1100 at any of the IR receivers in my AV rig - including the KIRA. The IR bounces off the ceiling and walls.
Also is their anyway to integrate say a honeywell z-wave thermostat into the harmony remote?
I don't believe any of the Harmony remotes have Z-Wave capability. If the 'stat is a Vera device then you could use [i]KiraRx[/i] to trigger scenes when certain IR commands are received from the Harmony and use the scenes to control the 'stat.

Hi Rexbeckett

I think I will purchase a Keene IR over IP box at some point, just to confirm is has to be this exact model? Think the product code is: [KIRAM] or are there other variations of the unit?

Also I presume you need to add some device in to the Harmony software for the Keene IR over IP box ? How does it work in the Harmony software side of things.

Thanks again!

That’s the little fellow you need. They come as singles or pairs with UK or international PSUs. You just need one module which you configure as Standalone. In this mode it will convert received IR into a string and send it via UDP. You can download the configuration software from the Keene site.

You need to give Harmony a device to use as a home for the buttons. I just added a Light Controller of unspecified make (generic) and then learned the codes from an unused remote for the buttons I wanted. Actually I think I used the secondary function (DVD) of the remote for my Humax PVR. I just learned the number buttons (0-9) for different light scenes. You can configure the Harmony so it thinks it is turning the device on and off for the different Activities. I also added hard and soft buttons to the activities so I can trigger scene changes without changing pages.

Once you have the Harmony configured, you can learn the codes into KiraRx from the normal shooting distance.

OK great all that makes sense with the Harmony setup, I have actually already got setup on the MCE device for the HTPC extra custom buttons for turning lights on and off these where the Ctrl+Alt+1 and Ctrl+Alt+2 commands I taught the Harmony to work with Windows MCE and Vera. but these have stopped working since the switch to Linux / XBMC.

I can probably just use these existing IR commands with the Keene unit instead, if not I will setup a dummy device as you have in the Harmony software.

Cheers

I am so excited to come across this thread. I use to have a solution to controlling my z-wave controlled lights with an IR remote when I was using mControl but never found a good solution with Verde. I plan on ordering a KEENE box tonight!

Have the other people in this thread been happy with this solution?

Have the other people in this thread been happy with this solution?
I'm biased, having written the plugin, but [i]I'm[/i] certainly happy with it. The [b]Kira[/b] device and [b]KiraRx[/b] plugin do exactly what I wanted: recognize IR codes and trigger scenes. The solution works and I have had no missed codes or malfunctions for many months.

Kira is a good device with a very sensitive receiver. I cannot claim that KiraRx is the best possible solution but it does work. I’m receptive to suggestions for improvements if you post them on the KiraRx thread.

RexBeckett - Thanks for the feedback. I really just want to make sure I am not throwing more money at a potential solution that will end up not working for me. All I want to do it turn on and off z-wave controlled lights using my MX-800 IR/RF remote.

I already have a USB-UIRT. Do you know if any progress has been made to enable it to be plugged directly into Vera and trigger a event?

I already have a USB-UIRT. Do you know if any progress has been made to enable it to be plugged directly into Vera and trigger a event?
I haven't seen anything reported. I considered the USB-UIRT as a solution for my system but decided that an IP-based module served my purposes better.

There are other forum members using KiraRx. You could try asking your question on the main KiraRx thread: here.