OpenElec XBMC - Curl to send HTTP commands to Vera

Hi

I am looking for a bit of help from someone who knows Linux. I’ve just been playing around in terminal on my OpenElec XBMC PC which is Linux based and using a command like this I was able to turn on my fireplace:

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

And this command to turn it off

curl "http://192.168.1.100:3480/data_request?id=lu_action&output_format=xml&DeviceNum=17&serviceId=urn:upnp-org:serviceId:SwitchPower1&action=SetTarget&newTargetValue=0"

My thinking is that when I was using Windows Media Center instead of OpenElec, I could use commands like the above but with wget, I would put these commands in to a .bat file and then using AutoHotKey I could detect a particular command from my Logitech Harmony IR remote and it would then run the appropriate .bat file to then do something in Vera, this worked really well and turned my IR remote in to a controller for running scenes and controlling devices in Vera, whilst using my HTPC. I wrote a setup guide for it all back here.

So now I’d like to do something similar with OpenElec / Linux based HTPC. Problem is I don’t know Linux too well. The first part works I can send HTTP commands to Vera using a CURL command line. Second part would be to add these commands in to some kind of executable file .bat equivalent. Third I would need to be able to install something like AutoHotKey for Linux, some software to detect certain IR KEYBOARD commands sent from the Logitech Harmony and then in turn to run one of the CURL commands to do something in Vera. EDIT: Might be possible to do something with the XBMC keyboard keymap to run a CURL command file?

Any ideas or suggestions welcome :wink:

Thanks

I started a thread on the OpenElec forums here.

Working solution for XBMC OpenElec (Linux) here

Enables you to program a universal remote control to send keyboard commands to XBMC which in turn runs a python script to send a http request using curl to Vera to do something like turn on a light.