ninjablocks / 433Utils

433Kit is a collection of code and documentation designed to assist you in the connection and usage of RF 433MHz transmit and receive modules to/with your Arduino and Rapberry Pi.
ninjablocks.com
MIT License
893 stars 336 forks source link

Brennenstuhl RC CE1 4003: Swap Lines #76

Open Griffsano opened 2 years ago

Griffsano commented 2 years ago

I'm controlling Brennenstuhl RC CE1 4003 power plugs with 433 Utils running on a Raspberry Pi. To get the code working for this specific plugs, I had to change the order of these two lines in codesend.cpp:

if (protocol != 0) mySwitch.setProtocol(protocol);
if (pulseLength != 0) mySwitch.setPulseLength(pulseLength);

I'm not sure exactly why this has to be done, but I could not get the Brennenstuhl power plugs working without the change. I made the changes after reading this thread, which documents some troubleshooting with the Brennenstuhl plugs (unfortunately in German): https://forum.arduino.cc/index.php?topic=513836.0

The adapted code is running without problems for years now. I just saw my notes from back then and decided to open an issue and pull request. Thank you for this awesome library, it makes home automation a lot easier :D