I have an esp32-wroom-32 with OMG 0.9.5 installed and BLT and RF enabled. I use RF433 wireless wall switch. I can switch the lights directly on the wall switch, or I can control the lights by rf433 code. When I turn off the light directly on the wall switch, OMG often sends the light on code automatically. Only when I use OMG to send on / off light code and switch on / off light directly without using wall switch, OMG will not send code by itself. This was not the case in the previous version 0.92.
Is there anybody here who could give me a hint what I am doing wrong?
Thanks in advance!
Could you post your config files without credentials and a picture of your setup ?
Thank you very much for your help.
This is the configuration of platformio.ini:
This is the configuration on User_config.h:
This the configuration of Homeassistant:
And the config_RF.h match your wiring ?
Do you have a serial monitor extract when receiving or emitting?
I use the wall wireless switch, which can switch lights directly on the wall switch. At the same time, I can also use OMG transmit switch code to switch lights. Suppose that when the light is on, I directly use the wall switch to turn off the light, and the switch light state of Homeassistant is still “on”. After a few hours, the mqtt monitor will receive a light on code from OMG, and the light will be turned on automatically. At this point, I query the historical status record of Homeassistant, and there is no change.
The devices that send light on / off command to OMG are Homeassistant and Node-Red. When the light turns on automatically, I query the record of Node-Red, which does not output any instructions.
That is to say, when the light is on, I use the wall switch to turn off the light directly. After a few hours, a rf433 light on message will be sent out automatically. At this time, neither Homeassistant nor Node-Red send any instructions. So I think OMG sent the code automatically.
I mean did you check what happens on the gateway side by plugging an USB cable and checking the serial monitor traces?
Sorry for the late reply. When ESP32 is powered off and restarted, it will automatically send the previous status message. I can see that it has sent the message in the mqtt monitor. Is there something wrong with the mqtt configuration (“retain: true”)? And ESP32 will restart itself?