I needed to make use of the HTTP endpoint of the switches because the MQTT functionality of the switches did behave really weird and after hours of checking the configs and digging in the code, I had given up.
So I created a workaround: The MQTT messages are being sent to my node-RED instance which upon receiving a MQTT message of a certain topic, triggers the HTTP request which switches the Sonoff either off, on or toggles it’s state.
Ever since, I experienced a weird problem:
When I restart my node-RED docker container, my Sonoff Switches are being toggled very quickly.
It seems like either all or the “toggle” HTTP Requests are being sent when node-RED loads the flows. Any ideas how I can turn this off?
My flows.json is here:
Thank you in advance