I have some TUYA devices connected / controlled by NR.
One of which is a 3 outlet main power board.
I use one of the outputs to control something else.
Daily (or when scheduled) the outlet it turned on for about 10 minutes (5 either side of when it has to happen) and then turns off.
Swell.
But I am recently finding the entire set of 3 outputs/outlets are turned on.
OK, there is a button to turn them all on/off. It seems it is the cause, as it too is in the on position.
Yes, I need to monitor the MQTT topic/channel and see what is going on.
How can I see who is sending the message though?
Thanks.
(Why am I asking? For the past 1.5 years I have been 50% of the time away and never really got to see this happening. I would get home and maybe one of the machines had rebooted or locked up and I then had to reboot it. I put it down to that. I'm not sure that is the reason, so I am looking into it.)
Add a debug node everywhere you publish to the topic that switches the light. Give each node a name and set them to output to the console. Then after it happens you can search syslog to find what happens. Or use the flogger node if you prefer to do the same thing.
If the debug node names are all of the form mqtt_debug_something then you can use grep "mqtt_debug_" /var/log/syslog
to find them all.
Is the pi resetting when this happens? Or node-red restarting?
[Edit] Also, if you restart node-red or reboot the pi does it happen?