I'm using IR Commands from a universal remote that are not related at all to any of my devices. In other words I just pick some random code for the TV button so that it does not actually control my TV and I can map the received command to any device I want.
I have a situation where my Mute button is supposed to mute my A/V Receiver. So as stated above I send some bogus Mute IR code to the USB Uirt and then when that is received CQC tells the USB UIRT to send the proper IR code to the receiver to mute it.
My problem though is that most of the time when I press mute on my remote the A/V receiver is muted and immediately unmuted. It's as if CQC is sending two mute commands for my one button press. What is the best way to prevent this from happening. I've considered starting a one second timer or maybe doing some math using a time variable to test for duplicate commands but I wanted to see what everyone else would do in this situation.
Are you sure it's not responding to both what CQC is sending and the original signal from the remote control? If that's not it, then the repeat count could be it. The default repeat count is 2 in a device mode. But, if you are getting a really strong signal and according to the type of IR remote, this might cause it to see two commands. So edit the device model and bump the repeat count down to 1.
make sure that youre mute button doesnt send out more than 1 command (string?). example, my harmony remote is retarded and for some reason sends out the numbers a zillion times. so when i config'd the USB-UIRT i needed to hit the number buttons very very quickly so it didnt get 2. i used to constantly tune to channels like 112 or 779 because the damn buttons always sent 2 strings (or whatever theyre called).
i think it has something to do with the way you hold down the button to make sure its read into CQC.
Dean, the remote is not sending the same IR signal so that's not the issue. Also, I made sure the IR command repeat is set to 1 so unless there is a bug in that it should only be sending one.
I ran out of time last night but tonight I will put a log message in the action and see if it's the action actually being fired twice. My predicition is the same as JK's. I think the remote is sending a bunch of IR commands really fast and CQC is catching multiples and reacting twice. The log messages should confirm it.
If that is the case what is the best possible solution?
Yeh, you probably captured more than one iteration of the command. Be sure to train it correctly, with the IR output LED of the remote just a couple inches from the front of the UIRT. Otherwise, you can get inconsistent signals.
I just tested it out and JK was right. I put a LogMsg in the event action and it's triggering the action two to three times with one press of the IR button.
So is this something Dean would solve on his end by adding another type of delay or is it something I should solve using timers?