HTTP Request for Infrared Control?

I’m using a USB-UIRT, have the device added on the Vera and control works properly via SQ-Remote.

I’d like to be able to send an HTTP request to turn my television on and off. Can this be done, and what’s the proper request? I currently use http requests to fire a few scenes from my keyboard, but I don’t think I can add infrared control to a scene.

I don’t really know much about Lua code, but here’s what I’m trying, and it’s not working.

http://192.168.0.2:49451/data_request?id=lu_action&output_format=xml&serviceId=urn:micasaverde-com:serviceId:TogglePower1&action=OnOff

Hitting it from a web browser gives this response: error on line 2 at column 25: xmlns:u: 'Unknown Service' is not a valid URI

I’m pretty sure the action is right, I got the name from S_TogglePower1.xml, but I’m not sure what to put as the serviceId. My TV’s XML file, D_AVR5800.xml has the following:

		[code]			<service>
			<serviceType>urn:micasaverde-com:service:TogglePower:1</serviceType>
			<serviceId>urn:micasaverde-com:serviceId:TogglePower1</serviceId>
			<SCPDURL>S_TogglePower1.xml</SCPDURL>
		</service>[/code]

This is what I use for Off and On:

http://Your_IP_Address_Here:49451/data_request?id=lu_action&DeviceNum=27&serviceId=urn:micasaverde-com:serviceId:DiscretePower1&action=Off
http://Your_IP_Address_Here:49451/data_request?id=lu_action&DeviceNum=27&serviceId=urn:micasaverde-com:serviceId:DiscretePower1&action=On

Toggle would be:

http://Your_IP_Address_Here:49451/data_request?id=lu_action&DeviceNum=27&serviceId=urn:micasaverde-com:serviceId:TogglePower1&action=OnOff

You should be able to add your IP address and change the DeviceNum (from mine which is 27) and you should be good to go.

Sweet, That did the trick for me! Thanks, Strangely.

I’ve taken these http requests and combined them with applescripts and a hotkey utility on my mac to let me use my Logitech bluetooth keyboard’s F keys as a universal remote.