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??