HAPPY NEW YEAR
I am steadily working through the course and have run into a couple of issues. The first is in the section regarding the esp8266/leds and then progressing on to the 433mhz sockets. I am not really interested in using these devices but I have some and decided to try it out. I have a set of five that came from Amazon by MagicFly. I used two of them in this section and made sure they were both working before proceeding. They both work fine with the remote.
I then constructed the receiver unit with a Uno device as per the instructions and had no trouble recovering the binary codes, the protocol and the PulseLength. I tried this several times to make sure the results were consistent. I then used that data to create the sketch for the transmission device. I edited the sketch to include the numbers as well as the changes required in the “if” statements to match the node red names. The sketch uploaded with no errors but the devices would not switch.
The serial monitor reported the correct actions and “off/on” responses to the switch actions on the dashboard. Fortunately, I have a second computer with the IDE on it so I connected the Uno and the rcvr to that unit and then tried the transmission again. Everything seemed to be correct except for one thing. The PulseLength reported almost twice the length that I had entered in the sketch.
I would appreciate your thoughts on this matter.
The other matter involves the Sonoff basic flashing but I will put that in a separate input.
Did you try with the two different pulse lengths that you’ve decoded? Can you post the decoded data that your receiver got?
I’m not sure what’s missing, you seem to be doing everything correct. I can only imagine it’s something wrong with the transmitter code that is causing that issue…
I did try several different pulse lengths to see if it made any difference without any suitable results.
Here is the decoded results from the rcvr.
Binary: 100001011110000100001101 Tri-State: not applicable PulseLength: 176 microseconds Protocol: 1
Binary: 100001011110000100000101 Tri-State: not applicable PulseLength: 176 microseconds Protocol: 1
Binary: 100001011110000100001011 Tri-State: not applicable PulseLength: 176 microseconds Protocol: 1
Binary: 100001011110000100000011 Tri-State: not applicable PulseLength: 175 microseconds Protocol: 1
These four lines represent the on/off switches for two devices.
I welcome your inputs but I don’t intend to spend a lot of time on these devices as I am far more interested in getting the sonoff switches working on my home server.
I will work this out later
If you can decode the RF signals and if you’re tried with the right pulse length and protocol number… I honestly don’t know what’s missing and I would have to test the circuit myself.
I can only recommend these 3 things:
- Are the MQTT messages triggering the section that sends 433MHz signals? Does it print a message in the Arduino IDE serial monitor? You need to ensure that it’s actually sending the RF signals
- I would also test with a different 433MHz transmitter to see it’s a problem with the transmitter
- Finally, I would double-check if the binary codes were set properly
Otherwise, I’m honestly I don’t have any other ideas, because this has never happened before… Some readers experience problems decoding the signals, but the transmitter always works.
Thanks, RUI. but I am going to set this aside for now as I have spent far too much time on this. In response to your questions:
The MQTT messages that appear on the serMon all seem to be in order and produce the correct response as shown in the image.
I have tested a verified the signals from the tx by setting up a separate arduino/rcvr and verifying the signals using the esp outputs versus the handheld remote that came with the units. As I mentioned before, the pulse length coming from the esp is double the original, It was 175ms vs 350ms. I then went to the sketch and verified that it did not make any difference waht number I inserted into the pulse length value in the sketch, test rcvr always showed 350ms. As for the binary codes, they were cut and paste from the original file.
Please don’t waste any more time on this.
I am moving on to the handheld remote and the daily scheduling of most of the other sonoff devices. Many of them are used to turn on/off at dawn/dusk. I have been studying a scheduler designed for nodeRed. I really have no plan to use any other sensors in this project. The prime reason for the remote control device is to make up for the access to Alexa and Google voice operation that I am giving up to avoid the internet.
I’m sorry about that! This is definitely very frustrating and I honestly don’t know what’s missing to make it work. It seems like you’ve debugged and done everything correctly.
I can’t figure out what was missing. I’ll mark this thread as “closed” for now.
If you have more questions, feel free to create a new thread here: https://rntlab.com/ask-question/