Open nordicblue opened 7 years ago
Add on to this. I setup another node to receive signals and the issue is not with the 315Mhz transmitting, as the only things I receive are the on and off signals I am sending. So, this issue may have something to do with the WiFi maybe? The blue light does turn off, but it is still connected to WiFi and will receive MQTT requests...
I was going to just do a restart of the ESP, but that doesn't clear the issue either. Only way to clear is to do a hard disconnect and reboot.
So which protocols did you try? the default (1), 5 and 6 -- what about 2,3,4?
A wild guess might be that you are running into some kind of timeout for message handlers (I am blindly guessing here) -- the sync duration of protocol 6 is much longer than that of 1 and 5. If that's the case, the protocol 3 should also break, because it has an even longer sync.
The way I fixed it was a hack for sure, but it works for now. I ended up moving the length and the protocol right above the send. Then, below the send, I would call the length and protocol again, this time with protocol 1, and then doing another send with a zero byte payload. This resets the unit and it starts behaving normally again.
I know it's a hack, but I couldn't come up with any other way to get it to stop whatever broadcast it was doing after sending a protocol 6 message.
6 is the only one that works with my fan, so I couldn't use the others
Hi guys. Hopefully someone could help me with a little issue I am experiencing. I have been scratching my head for hours and just not getting anywhere:(
I have built a NodeMCU to transmit 315Mhz on/off signals to a fan and a light via MQTT. The issue that I run into is that, as soon as I transmit on Protocol 6, the NodeMCU's light turns off and the transmitter starts broadcasting constantly. No errors are seen in the serial connection. This constant broadcast is then blocking other communications in my house, in the 315Mhz range, which I cannot have:)
This issue seems to only happen when Protocol 6 is used, as if I use the default protocol or even protocol 5, the issue does not happen.
I have another NodeMCU, configured in the 433 Mhz range, and that one works flawlessly on Protocol 1.
Are there any known issues with the NodeMCU ESP8266-12E and protocol 6 that I cannot find?
For reference, the code I use is below. Commenting out the "mySwitch.setProtocol(6);" corrects the issue of the constant transmission, but then I cannot control my fan or light any longer, as the default protocol does not work. The code also does continue to work, as in, even though it is constantly broadcasting, if I send it a MQTT message to turn the light on or off, it still sends the right signal and the light turns on or off.
So, I just need to find out what is causing the system to continue to broadcast after the signal is sent to it and it fires off the mySwitch.send.