First, thanks a lot to the developer(s) for the rc-switch plugin. I have used it for more than a year with my RC sockets in combination with MQTT and Openhab and found it very stable.
However, for some reason, my commands are always repeated 3 times it seems. Despite the device setup is made with repeat=1 and the mqtt payload is always with 1
example: mymosquitto:/IOT_MASTER/cmd:command:Up:rfsend,16059141,1,24
For the control of RF sockets it does not matter to repeat a few times or more. However, in setting up LED light control with some min RF controllers, and when toggling light on/off, repeating the command is making the light blinkering and leaving the controller in and unkown state, which makes it difficult.
I have not gone trough the code in details for some easy parameters adjustments, i wanted to hear if i'm the only one having theese issues?
I found about about the minimum 3 repeats by recieving the RC signals with the original RC-switch code for arduino "RecieveDemo_Advanced":
Code: Select all
/*
Example for receiving
http://code.google.com/p/rc-switch/
If you want to visualize a telegram copy the raw data and
paste it into http://test.sui.li/oszi/
*/
#include <RCSwitch.h>
RCSwitch mySwitch = RCSwitch();
void setup() {
Serial.begin(9600);
mySwitch.enableReceive(0); // Receiver on inerrupt 0 => that is pin #2
}
void loop() {
if (mySwitch.available()) {
output(mySwitch.getReceivedValue(), mySwitch.getReceivedBitlength(), mySwitch.getReceivedDelay(), mySwitch.getReceivedRawdata(),mySwitch.getReceivedProtocol());
mySwitch.resetAvailable();
}
}