Multiple IR commands in a scene or I_XYZ.xml?

Hey everyone,

I have multiple GC iTachs and about 12 devices I’m controlling via IR. I’ve successfully installed the GC100 plugin, and have successfully created the virtual devices that communicate and send IR commands through the GC100 plugin.

Question: Can I send multiple IR commands within the I_XYZ.xml definition file? Do I just create another tagged command within the for that specified action? Or is the xml designed for single tagged commands per function?

If it’s 1 IR command per function, I could create a scene that sends more than 1 IR command. I’ve followed the instructions on http://www.vesternet.com/resources/application-notes/apnt-68#.Vq2L8yorKHt , which were fantastic, but I need scenes with many different IR commands, and they need delays. How can I inject delays between IR commands? Like 0.5 seconds.

Thanks for the help!

Question: Can I send multiple IR commands within the I_XYZ.xml definition file? Do I just create another tagged command within the for that specified action? Or is the xml designed for single tagged commands per function?

I’m guessing that only one IR tag is allowed per action but you could try it out and see what happens. However, if you have details of the IR protocol, you can design a single prontocode that sends multiple codes. Depending on the AV device, it may require multiple codes to be sent to allow the code to be validated. In other cases, multiple codes are sent with larger interspersed delays, to create say up/down volume repeats. The later are more problematic to implement, given the delays and how do you request the repeat amounts ie how far to up/down the volume.

I ended up changing to a Lua based approach, where I had a bit more control of the codes and almost make them perhaps more understandable/readable. Here is an example of a ProntoCode controlling a Sony device. It just drops the volume one notch. The code is sent four times with a (preset) adjustable delay between. This same code (all concatenated) could just be inserted into an IR tag I_XYZ.xml definition file and it would work.

Other readers need to note that the G100 plugin needs to be modified, to send codes only once, not twice. See Vesternet link above.

[code]
local function sendProntoCodeTab(PCodeTab)
local PCode = table.concat(PCodeTab,’ ')
luup.call_action(‘urn:micasaverde-com:serviceId:IrTransmitter1’, ‘SendProntoCode’, {ProntoCode = PCode}, IODevice_ID)
end

– Sony STR K1600: Volume Down
function sendCode_Down()
– 0C00h seems to work OK; 0B00h is a bit unreliable. Looks like you need an extra 45 msec gap as the inter command delay.
local INTER_CMD_DELAY = ‘0C00’

local PCodeTab = {
'0000 0067 0000 0080',  -- send this code four times

– we need to get the unit’s attention before any change to the volume can be made
‘0060 0018 0030 0018 0030 0018 0018 0018 0018 0018 0030 0018 0018 0018 0018 0018’,
‘0018 0018 0018 0018 0018 0018 0018 0018 0030 0018 0030 0018 0018 0018 0018 0366’,

'0060 0018 0030 0018 0030 0018 0018 0018 0018 0018 0030 0018 0018 0018 0018 0018',
'0018 0018 0018 0018 0018 0018 0018 0018 0030 0018 0030 0018 0018 0018 0018', INTER_CMD_DELAY,

– -1
‘0060 0018 0030 0018 0030 0018 0018 0018 0018 0018 0030 0018 0018 0018 0018 0018’,
‘0018 0018 0018 0018 0018 0018 0018 0018 0030 0018 0030 0018 0018 0018 0018 0366’,

'0060 0018 0030 0018 0030 0018 0018 0018 0018 0018 0030 0018 0018 0018 0018 0018',
'0018 0018 0018 0018 0018 0018 0018 0018 0030 0018 0030 0018 0018 0018 0018', INTER_CMD_DELAY,

– -2
‘0060 0018 0030 0018 0030 0018 0018 0018 0018 0018 0030 0018 0018 0018 0018 0018’,
‘0018 0018 0018 0018 0018 0018 0018 0018 0030 0018 0030 0018 0018 0018 0018 0366’,

'0060 0018 0030 0018 0030 0018 0018 0018 0018 0018 0030 0018 0018 0018 0018 0018',
'0018 0018 0018 0018 0018 0018 0018 0018 0030 0018 0030 0018 0018 0018 0018', INTER_CMD_DELAY,

– -3
‘0060 0018 0030 0018 0030 0018 0018 0018 0018 0018 0030 0018 0018 0018 0018 0018’,
‘0018 0018 0018 0018 0018 0018 0018 0018 0030 0018 0030 0018 0018 0018 0018 0366’,

'0060 0018 0030 0018 0030 0018 0018 0018 0018 0018 0030 0018 0018 0018 0018 0018',
'0018 0018 0018 0018 0018 0018 0018 0018 0030 0018 0030 0018 0018 0018 0018 0366'}

sendProntoCodeTab(PCodeTab)
return true

end[/code]