Keene Electronics KIRA IR - Sending IR Codes Via Vera

@lolodomo

I’ll let you know :wink:

The challenge i currently have is that the Volume is controlled by the TV and the only emitter i have is set up to only point to the STB.

@Guessed

OK - I’ve added some IR codes in and I think i’m ready to have a go…

I have 2 x Device XMLs and 2 x Implementation XMLs

Under UI5, it looks like I need to go.

Main Tab - Apps
Sub Tab - Develop Apps
Click Button - Create Device

But which order do i need to load them into MiOS/Vera ?

You can upload them all to Vera at the same time, but as far as creating the devices I would create the Kira device first, as once this is working, when you create the Sky device, you’ll then need to pick the IR transmitter that this is connected to.

No, not directly. There’s really not that much real-estate in the Dashboard for doing such things. There’s always been a plan to have a more functional IR Remote, but that seems to go onto the backburner often.

Scenes…
In Vera itself, you’ll be able to create Scenes that involve the ACTIONS, or sets of them if you want a specific sequence. In turn these Scenes get buttons on the dashboard, but it’s a convoluted way to get what you want.

LU Invoke…
It’s also possible for you to see them by running lu_invoke:
http://192.168.1.x:3480/data_request?id=lu_invoke

this will brink up a drill-down menu of hyperlinks that’ll let you invoke each of the actions as well.

SQRemote
SQRemote natively understands these IR Actions that Vera exposes to it, so you can bind these to regular controls to create a clean remote control. I do this using the DirecTV, Onkyo (etc) Plugins for anything I can create a native Plugin for, and then backfil with Native SQRemote/SQBlaster IR for everything else.

The latter handles “repeat” and a few other items just better than the Vera/MiOS IR interfaces do.

SQRemote/SQBlaster also has a very extensive catalog of Devices and their “ProntoCode” is, in most cases, a direct mapping to an on-board Chip (on the SQBlaster) that’s got the real IR code. They augment anything not on that chip with a custom installer catalog, and then that’s augmented with learned codes (or standard Pronto codes)…

It’s really that built-in “library” you’re paying for when you buy their SQBlaster device, and it’s why it works so well.

@parkerc,
@strangely is correct in that it doesn’t matter what order the files are uploaded. You can upload them all together, and over time you can just upload the ones that you change as you make fixes (etc).

I imagine there will be a few kinks once you start to create the devices. You’ll need to create one Device for the KIRA IR Transmitter ([tt]D_KIRA1.xml/I_KIRA1.xml[/tt]) and another for the SkyHD IR Device ([tt]D_SkyHDDVR1.xml/I_SkyHDDVR1.xml[/tt]).

There’s also a step to perform, after these are both successfully uploaded, to “link” the SkyHD Device to use the KIRA for it’s IR Commands. Each time you call an ACTION on the SkyHD Device, it looks up it’s associated IR Transmitter device (which is in it’s config) and uses the SendProntoCode ACTION to send out that IR data block

BTW: I’m leaving these descriptions a little “loose” so you can feel your way around the system. I can make them more step-by-step, but I figured you’d be interested in learning more as you go along (through experimentation)

[tt]I_KIRA1.xml[/tt] had a slight problem, which I’ve corrected and uploaded/attached. It now correctly appears in the IR Transmitter attachment UI, as seen in the attached screencap.

During startup, you’ll see a log line, in /var/log/cmh/LuaUPnP.log like:

50 06/16/12 23:38:09.298 luup_log:90: KIRA: Running Ethernet Attached I_KIRA1.xml 90 on ip=192.168.1.19 <0x2bdc1680>

I follow this topic with full interest. Thank you guessed for your help.

There is another Kira model named Kira 128. This one can memorize 128 pronto codes. You request the sending of the IR code by pushing a HTTP request from the network. I imagine that for this model the “design” to integrate the Kira 128 with the Vera is totaly different ?

Kira 128 model is about 10 euros more expensive than the Kira model.

To finish my off topic with the Kira128, here is a french article explaining how to use it with the Vera (and others): Kira128: un émetteur IR en réseau - Maison et Domotique

Bonne nouvelle, c’est tout à fait réalisable, et très facilement: quand on étudie la page web du Kira permettant de déclencher un ordre IR, on s’aperçoit qu’il est fait appel à une requête http de cette forme:

http://IP_DU_KIRA/remote2.htm?buttonNUMEROBOUTON

Par exemple http://192.168.0.10/remote2.htm?button001 pour envoyer l’ordre IR correspondant au premier bouton paramétré.

Autrement dit, le Kira est pilotable depuis n’importe quelle box ou logiciel sachant appeler des requêtes http.

Hi lolodomo

Great minds think a like - http://forum.micasaverde.com/index.php/topic,8623.0.html - It was that site that heled me in my thinking about KIRA and Vera, only I wanted to take a slightly different approach

In regards to the differences between the KIRA 128 and the normal KIRA, i think it is only the size of the internal memory that differs, as the 128 can store many more IR codes, than the one I am using. But, that is not a problem, as I’m storing all myIR codes in an xml file on Vera so I don’t have to worry about the internal storage differences. So technically either Kira module (in standalone mode) can just receive the udp IR ASCII string from Vera and converts it back to IR again to send it out via the emitter…

What Guessed has also just shown me suggests that I can do something similar to the http approach shown on that sute by using Lu-Invoke.

It’s really interesting stuff - I just wish I understood it all a bit more :wink:

I haven’t seen the manual for the Kira 128, but I ran GTranslate over the article and read that. I wouldn’t be surprised if you could, in addition to using “stored” IR, also simply send the K-codes we’re sending with this model.

It’d likely be a different URL and, to integrate that, you’d just change the I_KIRA1.xml to have some sort of configuration parameter to know if you’re dealing with a KIRA or KIRA128, then internally switch the implementation method from Raw UDP to URL… or build another implementation file altogether since there’s really not that much to them.

Sending static/stored codes gets tricky. You can always put these behind scene buttons etc, using the techniques shown in the article, but it’s probably not worth defining the “reusable” IR Device files. These latter would are already a Map between the MiOS IR and the function on the end device, and the KIRA 128 introduces another level of Map in-between.

Actually you don’t put the IP Address into the [tt]I_KIRA1.xml[/tt] file. It gets picked up, from the Device config, during Plugin startup and will overwrite that anyhow…

Attached is a screenshot of where it’s configured in my setup…

Some testing results. Since I don’t have a KIRA, I bench tested using TCPDump to see the data go out over the wire.

I ran this URL to test the Kira IR Transmitter:
http://192.168.x.x:49451/data_request?id=action&DeviceNum=90&serviceId=urn:micasaverde-com:serviceId:IrTransmitter1&action=SendProntoCode&ProntoCode=Hello+This+Is+A+Test

and got this output from [tt]tcpdump[/tt], the second packet listed below is the device [actively] responding that it doesn’t have a service running on port 65432:

[code]root@MiOS_312345678:/tmp/log/cmh# tcpdump -XX -i eth0.2 host 192.168.x.x
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0.2, link-type EN10MB (Ethernet), capture size 65535 bytes

09:53:39.256614 IP 192.168.x.x.46146 > 192.168.x.x.65432: UDP, length 20
0x0000: …
0x0010: …
0x0020: xxxx xxxx xxxx xxxx 359b 4865 6c6c 6f2b …B…5.Hello+
0x0030: 5468 6973 2b49 732b 412b 5465 7374 This+Is+A+Test
09:53:39.257317 IP 192.168.x.x > 192.168.x.x: ICMP 192.168.x.x udp port 65432 unreachable, length 56
0x0000: …
0x0010: …
0x0020: …
0x0030: …
0x0040: ff98 001c 359b 4865 6c6c 6f2b 5468 6973 …5.Hello+This
0x0050: 2b49 732b 412b 5465 7374 +Is+A+Test[/code]

I ran this URL to test the “Select” action of SkyHDDVR IR Device:
http://192.168.x.x:49451/data_request?id=action&DeviceNum=91&serviceId=urn:micasaverde-com:serviceId:MenuNavigation1&action=Select

10:04:19.848496 IP 192.168.x.x.55974 > 192.168.x.x.65432: UDP, length 226 0x0000: ... 0x0010: ... 0x0020: xxxx xxxx xxxx xxxx ca5e 4b20 3234 3136 .........^K.2416 0x0030: 2030 4136 4120 3033 3738 2030 3142 4320 .0A6A.0378.01BC. 0x0040: 3031 4243 2030 3142 4320 3031 4243 2030 01BC.01BC.01BC.0 0x0050: 3142 4320 3033 3738 2030 3142 4320 3033 1BC.0378.01BC.03 0x0060: 3738 2030 3337 3820 3031 4243 2030 3142 78.0378.01BC.01B 0x0070: 4320 3031 4243 2030 3142 4320 3031 4243 C.01BC.01BC.01BC 0x0080: 2030 3142 4320 3031 4243 2030 3142 4320 .01BC.01BC.01BC. 0x0090: 3031 4243 2030 3337 3820 3033 3738 2030 01BC.0378.0378.0 0x00a0: 3337 3820 3031 4243 2030 3142 4320 3031 378.01BC.01BC.01 0x00b0: 4243 2030 3142 4320 3033 3738 2030 3142 BC.01BC.0378.01B 0x00c0: 4320 3031 4243 2030 3142 4320 3031 4243 C.01BC.01BC.01BC 0x00d0: 2030 3337 3820 3033 3738 2030 3337 3820 .0378.0378.0378. 0x00e0: 3031 4243 2030 3142 4320 3031 4243 2030 01BC.01BC.01BC.0 0x00f0: 3142 4320 3033 3738 2030 3142 4320 3031 1BC.0378.01BC.01 0x0100: 4243 2030 3142 4320 3230 3030 BC.01BC.2000

So at least it seems to be working end to end.

@parkerc, can you let me know if it’s working in practice?

Hi Guessed

Humm sadly nothing happened :frowning:

Both devices were created and I linked them together; I then went to Automation (UI5) and created a new scene (see attached) to have Vera turn the Sky HD box over to channel 101 - The scene reported via the UI that it was successfully run, but nothing happened…

  • All I filled in within the new scene was the Advanced Tab…

I’ll try again.

OK, still not working…

Also, if I try to use Lu Invoke (e.g. http://192.168.1.x:3480/data_request?id=lu_invoke) and try the entries I know have a IR code attached I receive the following message.

ERROR: No implementation

All thoughts/input welcome.

ok, that can happen in a few cases. The most common is when there’s a mistake in the implementation file.

Can you attach/upload all 4x files that you’re currently using to this thread? The ones I’m using are ok, but I want to see if there are any problems in the ones you’re operating with (any mods etc)

@Guessed

Attached are the 4 files I installed on my Vera Lite - i hope you can help me find the missing bit…

Running just the code only scene i created to change the channel to 101, still seems to work OK, so the network connection and the IR emitter placement still seem fine

@parkerc,
I validated the files last night against those on my Vera, and they’re the same. So it’s going to boil down to some piece of configuration being missing in the overall setup.

Can you validate the following:

a) The KIRA1 IR Transmitter has the correct IP Address specified in the Advanced Tab
b) The Sky IR Device has the KIRA1 IR Transmitter specified as it’s IR Transmitter (per screenshot above)
c) What errors are in the logs if you run, using your Device’s ID, the URL above to “call” the IR Transmitter with a test string.
d) What errors are in the logs if you run, using your Device’s ID, the URL above to “call” the IR Device

In all cases, the log file I’m interested in is [tt]/var/log/cmh/LuaUPnP.log[/tt]

I tested Kira with samsung Tv (modified SkyHDDVR1 files with samsung ir codes) and it works. Also it works with SQremote

Thanks for the confirmation @laimjar, it sounds like it might be a config issue with @parkerc’s setup. Hopefully we can get that sorted quickly.

BTW, for anyone that knows, when looking at the KIRA docs I couldn’t tell if it understood “standard” Pronto codes. It definitely understands those it records itself, but I’d like to know if it understands the standard ones also.

Anyone know?

Hi Guessed

Hope this helps us

Yes I have the KIRA IR IP Device, with the correct IP on the settings tab, under Variables/IP address

Yes, looking in the SKY HD Remote Device, under Advanced it says it is Controlled Via the KIRA IR IP

I updated the IP and changed the device ID to the one given to the KIRA IR IP device and when run in Google Chrome it reports back to say this.

This XML file does not appear to have any style information associated with it. The document tree is shown below.
<u:SendProntoCodeResponse xmlns:u=“urn:schemas-micasaverde-com:service:IrTransmitter:1”>
OK
</u:SendProntoCodeResponse>

The logs show the following

08 06/22/12 23:19:45.664 JobHandler_LuaUPnP::HandleActionRequest device: 20 service: urn:micasaverde-com:serviceId:IrTransmitter1 action: e[36;1mSendProntoCodee[0m <0x2e8f1680>
08 06/22/12 23:19:45.665 JobHandler_LuaUPnP::HandleActionRequest argument DeviceNum=20 <0x2e8f1680>
08 06/22/12 23:19:45.665 JobHandler_LuaUPnP::HandleActionRequest argument serviceId=urn:micasaverde-com:serviceId:IrTransmitter1 <0x2e8f1680>
08 06/22/12 23:19:45.665 JobHandler_LuaUPnP::HandleActionRequest argument action=SendProntoCode <0x2e8f1680>
08 06/22/12 23:19:45.665 JobHandler_LuaUPnP::HandleActionRequest argument ProntoCode=Hello+This+Is+A+Test <0x2e8f1680>
08 06/22/12 23:20:14.937 JobHandler_LuaUPnP::HandleActionRequest device: 20 service: urn:micasaverde-com:serviceId:IrTransmitter1 action: e[36;1mSendProntoCodee[0m <0x2e8f1680>
08 06/22/12 23:20:14.938 JobHandler_LuaUPnP::HandleActionRequest argument DeviceNum=20 <0x2e8f1680>
08 06/22/12 23:20:14.938 JobHandler_LuaUPnP::HandleActionRequest argument serviceId=urn:micasaverde-com:serviceId:IrTransmitter1 <0x2e8f1680>
08 06/22/12 23:20:14.938 JobHandler_LuaUPnP::HandleActionRequest argument action=SendProntoCode <0x2e8f1680>
08 06/22/12 23:20:14.938 JobHandler_LuaUPnP::HandleActionRequest argument ProntoCode=Hello+This+Is+A+Test <0x2e8f1680>

I updated the IP and changed the device ID to the one given to the SKY HD Remote IP device and when run in Google Chrome it reports back to say this.

ERROR: No implementation

The logs show nothing I think, cant seem to see anything related to it?

Hope that helps