LUA/LUUP Code for sending a single IRProntoCode using USB-UIRT

I have a USB-UIRT connected to my Vera2 which is pointed at another USB-UIRT plugged into my Media Center.

I’m trying to initiate sending a ProntoCode with vera, through the connected USB-UIRT.

What would be the LUA/LUUP code to send a prontocode?

Thanks,

Frank

It’ll look something like:

[tt] luup.call_action(“urn:micasaverde-com:serviceId:IrTransmitter1”,“SendProntoCode”,{ProntoCode=“…”}, 6)[/tt]

where [tt]IrTransmitter1[/tt] is the serviceId (listed in [tt]D_USBUIRT.xml[/tt]), SendProntoCode is the action advertised in [tt]S_IrTransmitter1.xml[/tt], and [tt]ProntoCode[/tt] is the only input parameter to that action.

Normal rules apply, substitute “[tt]6[/tt]” for the specific DeviceId of your USBUIRT device, and “…” should be substituted with the actual Pronto code string that you want to send over to the USB UIRT device.

I haven’t actually tried this, but it should work. I have implemented the [tt]SendProntoCode[/tt] action, for something else, so that bit is definitely correct.

Thanks guessed… I’ll give it a shot tonight.

@FrankHill73, Do you have a media center plugin? Does using a USB-UIRT on the windows end require special code set other than the standard MCE IR codes?

Also, have you thought about doing this over IP? There is an (windows based) MCE plugin to enable telnet commands for the majority of the MCE commands that you could probably quite easily develop a plugin for! Seems this would be a lot cleaner than using IR to IR.
Ive thought about doing this myself but I don’t use MCE enough at the moment to justify it and normally revert to using a few basic pronto codes that such as turning the PC on and off that I’ve added to one of my other MiOS IR USB-UIRT plugins.

@ Strangely: I use an application called “BeyondTV” by Snapstream for television recording and viewing. I use “Media Portal” for everything else.

Currently, I am using a harmony remote which controls all of my devices. The commands are interpreted by the “Girder” application.

The nice thing about the Girder application is I don’t need any particular pronto codes, just ones that don’t interfere with my actual IR-based devices. I can have Girder “learn” whatever random code I send it, to execute any command I want on the PVR.

of course, I would prefer to do this all over IP. If you have some examples of where to start with LUA/LUUP I’d be glad to work on it. I am just getting into LUA, so I have yet to make much use of it in a plug-in.

@Frank,
There are some example source code files out there for my TV, Amp and @strangely’s HDMI 4x4 Matrix switch:

http://code.mios.com/trac/mios_panasonic-tv
http://code.mios.com/trac/mios_onkyo-media-control
http://code.mios.com/trac/mios_monoprice-hdmi-switch

Most of these should be simple enough to reverse into a different type of Plugin for “similar” AV control devices. There are other Services that can be implemented apart from the ones that these expose, but they do cover most of the common ones.

The first step is Protocol doco for the device you’re trying to talk to. Once you have that, then writing the Plugin tend to be fairly simple (except where the Protocol is crazy exotic, the Onkyo nearly falls into this camp)

Reach out if none of this makes sense, there are folks here that will help you write it… some of them may even have the same AV components as you.

The Telnet-to-MCE thing @strangely references has been previously mentioned, and would be easy to write a plugin for… I’d write it, but have no way to test it since I don’t have MCE.

Spent a little time with this last night.

I ended up using the Sharp Aquos plug-in as a starting point. I modified a few of the pronto codes in the Implementation XML file, just to see if this would work. (Here I learned that you can’t simply change the HEX on any portion of a pronto code. Pronto codes are broken into several very important parts. :o )

I set up a scene to execute commands, easy enough with GUESSED’s LUA code, but it soon occurred to me that a scene for every event was going to be kinda daunting and not all that clean. Sooo…

I loaded up the SQRemote on my iPhone and created a navigational layout and assigned some of the commands (UP & DOWN & Power). This worked pretty well, with a small glitch… If I pressed a command on the SQRemote, (e.g. “UP”) the USB-UIRT would blast the command, but it would blast it for 1-2seconds, so long, that the “BeyondTV” application responded as if I had pressed the UP button 5 X’s. Luckily, as mentioned previously, I am using the GIRDER application to interpret USB-UIRT input and the GIRDER Application has an option to enter an “anti-repeat” variable (in milliseconds) to prevent this. A 1 Second delay seemed to solve the issue.

Tonight’s task is going to see if I can use “LMRemoteKeyMap” application to learn the Pronto Codes for my “Sharp SD-HX600” receiver which don’t appear to be anywhere on the interwebs. :frowning:

I laugh now when I think about people with blinking VCR displays because they couldn’t figure out how to program the correct time with their remote. ::slight_smile:

Then I have high hopes that I can configure the SQRemote app to operate my PVR, TV, Receiver, and Media Portal Application.

You can indeed get SQ remote to do this using another hacked/edited plugin :slight_smile:
I’ve made a few this way with great success and now have my entire HT controlled like this or via RS232 where available.

By the way, upcoming versions of SQ remote will also contain macros and repeats for keys; so in the long term its going to be great solution for you!

I use this to learn the pronto codes using the USB-UIRT:
http://www.usbuirt.com/lrnhelper_0_0_5.zip

If you need any more help with the steps involved then let me know.

You can also search remotecentral.com

Strangely is correct, SQ Remote will be the perfect solution for you.

If you can wait for their “Puck” hinted at on their website, there was an update of sorts here today:

http://forum.micasaverde.com/index.php?topic=3684.msg21303#msg21303