Still wonder how that works when harmony sends digits. They do not seem to be repeated?
No - digits are not repeated but most other commands are.
I also tried using a timed lockout in scene code to ignore the extra codes. It sort of worked but made adjustment unnaturally slow. I eventually realized that I didn’t really need infinite control as I typically ended-up at the same few levels - hence the switch to presets.
Hi. Another KiraRx fan here. I just recently purchased the Keene Receiver based upon the positive results in this forum. Many thanks for the plugin.
I’ve successfully learned my AV Receiver’s Volume UP code programmed into my Sky+ remote and use this in a scene to automatically turn on my AV Receiver. Works great.
I now want to see if unused buttons on my Sky+ remote (in TV mode) can be used to trigger lighting scenes, but I’m having some difficulty in recognising these IR codes. For example, KiraRx doesn’t seem to be able to understand the differences between the Red, Green, Yellow, and Blue buttons, and thinks they are all the same button press. I suspect that the learned IR code is too short, or perhaps KiraRx is not seeing the whole IR code.
When I compare the Red button’s KiraRx learn code with the Kira.exe learn program, I see the following significant differences. What do all the trailing LLSSSLSSSL strings mean? Please can you suggest what the cause of the problem may be? Thanks.
KiraRx saves the IR codes in an abbreviated form. The second set of four digits (041C) is the slicing value and the Ss and Ls refer to short or long code bursts. Short is when the burst is less than the slicing level and Long is when it is greater.
The two codes you have posted are not the same. The code learned by Kira.exe should look like:
If you have the codes in Kira form from Kira.exe, try importing them into KiraRx. Just copy/paste them into the Import field and click Kira. Then enter something appropriate in Name and click Save.
Over writing with a line of lua code did the trick in the end.
Interesting. You should have been able to overwrite it on the Advanced tab. Is this another UI7 gotcha? I’m glad you got it working.[/quote]
Must have been. The latest UI7 release has issues displaying empty fields in the Advanced tab making it hard to select them for first data entry. Not sure if that is how the string got picked up, but sure strange that no delete or backspace key could get it out, nor was it showing. probably because it is a html tag. I must say I have not yet seen this behavior before. So odd one indeed.
Works great btw, one more remote down ;). Once I get some more experience I may put together a short guide and refer to it from my Harmony Control plug in as many ask for this combo. So f you or Hans or any other user have tips on that, let me know.
I don’t really understand what slicing is, but as suggested I had a go at importing the long strings from Kira.exe codes into KiraRx.
What I observe now is that KiraRx is very confused about the codes, to the extent that pressing one button causes KiraRx to cycle between two codes. e.g. Pressing YELLOW causes KiraRx to display the sequence Red, Yellow, Red, Yellow.
This is very bizarre. Perhaps it is just my remote. I’ll retry later with a different remote.
Just in case it isn’t my remote, below are the codes I’ve learned and imported. Please let me know if you spot anything that could explain the issue. Thanks
The codes look OK and are different from each other. I would expect KiraRx to be able to differentiate between them. I can only think of two possible explanations:
Some remotes transmit different codes when a button is pressed for a short time or held down.
Check through your stored codes to make sure you have not saved the same code with different names. A slight difference in received burst lengths that changed the slicing level (calculated as the average of long and short bursts) could result in the codes being recognized alternately.
I just wanted to report that my issue is now resolved. I reprogrammed my Sky remote with different Pioneer TV remote codes, that seem to provide more reliable IR code differentiation between the Red, Green, Yellow, and Blue buttons. I still have difficulty distinguishing some other Sky IR codes (e.g. Sky button vs. Text button) that I can not fix, but it is only a minor issue that doesn’t matter.
In total, I now have 7 usable “spare” buttons to trigger Vera Scenes, in addition to detecting events like turning on my Sky box etc., that I am very happy with. Thanks again for this great plugin.
Does an event get fired for every time a code is received or only when a new code is seen?
It uses standard Vera event handling so an event only fires when the code changes. It is possible to change that by a tweak to one of the files but I have not tested this for side effects. Let me know if you want to be the test-pilot.[/quote]
Hi @RexBeckett. I find that I’m in a similar situation to above, in that I need the event to fire again if the same remote button is pressed repeatedly. Please can I try the code tweak that you mentioned a while ago? Thanks.
Does an event get fired for every time a code is received or only when a new code is seen?
It uses standard Vera event handling so an event only fires when the code changes. It is possible to change that by a tweak to one of the files but I have not tested this for side effects. Let me know if you want to be the test-pilot.[/quote]
Hi @RexBeckett. I find that I’m in a similar situation to above, in that I need the event to fire again if the same remote button is pressed repeatedly. Please can I try the code tweak that you mentioned a while ago? Thanks.[/quote]
@jtmoore, One thing to keep in mind is that some manufacturers use a series of repeated (identical) IR commands. for instance my samsung TV will simply ignore any command I send it via my Kira unless it is repeated 3 times in rapid succession. I presume this is some sort of rudimentary attempt at error-correction (there are much better ways to do ECC, but that’s beyond the scope of this discussion).
Anyways, because the above practice is pretty common, I shied away from Rex’s offer to test the patched refire-same-code approach. Given his excellent track record on the Kira plugin he probably accounted for that, but I simply chose a method that didn’t need it.
because I had a programmable remote (logitech harmony 700), I simply programmed any button I might need to press more than once in a row (e.g. media controls) as a macro that was a series of two IR commands. the first one was the command I actually wanted, followed immediately by a dummy command. When I trained the KiraRx plugin, I trained it using the individual commands, not the macro sequence. thus the value of RxCode from the plugin’s point of view would rapidly step between useful-command and no-op states. thus the next time I pressed the same button on my remote, the Kira would recognize it as a different event–even if the next time was one second later…
I haven’t played with Sky remotes at any point, so I have no idea if the above approach would work for you. Just offering my 2 cents on what worked for me.
@SM2k, thanks for the suggestion. If I had a universal remote that supported macros, I would undoubtedly follow your great suggestion. Unfortunately my UK Sky remote doesn’t have that capability.
I think that if KiraRx had the option to re-trigger when receiving the same IR code, it would also need to have some basic filter to prevent re-triggering from remotes that already transmit repeated sequences like your Samsung TV. So for example, have KiraRx only trigger if there is a big gap of say 0.5 seconds between sending the same remote IR code. That might make it work for manual repeat button presses, without breaking the current functionality. Just my thought, but I’m not sure how practical it would be to implement.
[quote=“jtmoore, post:211, topic:175170”]@SM2k, thanks for the suggestion. If I had a universal remote that supported macros, I would undoubtedly follow your great suggestion. Unfortunately my UK Sky remote doesn’t have that capability.
I think that if KiraRx had the option to re-trigger when receiving the same IR code, it would also need to have some basic filter to prevent re-triggering from remotes that already transmit repeated sequences like your Samsung TV. So for example, have KiraRx only trigger if there is a big gap of say 0.5 seconds between sending the same remote IR code. That might make it work for manual repeat button presses, without breaking the current functionality. Just my thought, but I’m not sure how practical it would be to implement.[/quote]
At serious risk of getting dirty looks from @RexBecket, I will post this.
You could try adding the following code to your startup lua. caveat: I typed this off the top of my head. there are probably typos. Whatever Rex was doing in his plugin is at least as good, and probably better.
KIRA_ID=<go look this id number up in your devices list>
function resetRxCode(lul_device)
luup.variable_set("urn:dcineco-com:serviceId:KiraRx1", "RxCode", "", lul_device)
end
function kiraReceived(lul_device, lul_service, lul_variable, lul_value_old, lul_value_new)
if (lul_value_new ~= "") then
luup.call_delay('resetRxCode', 1, lul_device)
end
end
luup.variable_watch("kiraReceived", "urn:dcineco-com:serviceId:KiraRx1", "RxCode", KIRA_ID)
basically any code stored in the RxCode variable will be removed after 1 second. It’s not ideal, and it makes debugging your codes a pain. and if you press a button on your remote at an interval faster than 1 second, it will not be recognized by KiraRx.
you should replace with the Device# from the advanced tab of your kira device (very top line)
Thank you @RexBeckett. The S_KiraRx.xml file works perfectly. So far no issues, but I imagine if I accidentally sit on the remote then Vera would probably get flooded and might misbehave.
I’ll probably use PLEG rather than standard Vera scenes so that I can set it to ignore repeats that occurred within 1 second (like a de-bounce). Ideally, I would prefer 0.5 seconds but I don’t think PLEG will let me go smaller than 1 second.
I did try @SM2k’s startup code (thanks for helping ) to delay subsequent IR responses within 1 second. I tried that before and after uploading S_KiraRx.xml, but I didn’t observe any change in behaviour. I put in the correct DeviceID, but perhaps I didn’t reload or restart Vera the right way for it to take effect.
I’ll have another play tomorrow with PLEG actions and I’ll keep an eye open for anything strange. Many thanks.
I initially was baffled by the same issue. Proud it worked, but only once. Then I found that sending the same IR command after even an hour does not trigger anything.
Is it an idea to make a switch for this? Zero means current behaviour and any number of (fractional) seconds means having it clear so repeat commands will work. Or even fancier, be able to specify that at IR command level.
I shall give that some thought. Meanwhile, you could use a luup.variable_set(…) in your scene Luup or one of the other techniques discussed here to clear RXCode.
because I tend to forget that not everybody on the forum is a coder. It has the potential to do more harm than good to post untested code. ;)[/quote]
Well that’s true. Newcomers often don’t know how to find and fix code errors. If it doesn’t work, they tend to write-off the proposed solution. It is good that you care.
I do try to run all my example code through LuaTest but it is only a complete test if I have the device in question on my system.
Reporting back on my results on using KiraRX with IR code repeat sequences. Having allowRepeats=“yes” did work to some extent, but I found that KiraRx was still triggering repeats sometimes up to two seconds later. Having to handle that for every IR response would affect complexity of my scenes and overall responsiveness.
Therefore, I had another go with resetting RxCode, but this time doing it 3 seconds after running the scene I wanted triggered. This is a much more surgical approach, as I only needed to do this for just 2 out of the 11 IR remote control buttons that I will use. It means that the default KiraRx behaviour works best for me.
I would like to feed back that I found executing the LUA RxCode reset after a delay was very difficult to achieve in practice. In Vera scenes I can add a 3 second delay, but I don’t seem to be able to run LUA code in there. I manged it in the end using convoluted PLEG actions to call Vera 2 scenes with a 3 second delay between them.
What would be great is if the KiraRx plugin could directly expose the RxCode reset, so that it can be used in the Advanced settings of a Vera scene. It would greatly simplify using the reset in the rare cases where this is required. Thanks.