Beiträge von holeymoley

    Hi, I use an RGB2 connected to a broker and have another seperate home automation system subscribed to its topics, and I have some scripting that keeps the two systems synchronised. I had a few issues that sound like yours when I started out. I wanted to use the Shelly native app, and my own Automation system app also, so I had some scripts syncing the two devices. For a while, I was causing loops, when one system updated the other, and then that one tried to update the first one again etc... I put small time delays in my scripts, and also some rules to only update the shared values if the change of value was greater than X percent etc.. So I basically applied a small deadband, or hysteresis effect. My scripts are all homemade and very tailored to my own needs so not much point in sharing the specifics, but that was the basic principle. I don't use Node-Red, so can't offer you any specific advice there...

    Some other things that helped were to set the MQTT QOS of the Shelly to 2, and also the QOS of my subscribing automation system to 2 aswell, so you can then be certain the messages are only sent once and received once. Also do not use 'clean-sessions' - untick it, and do use the Retain feature on both ends. Then you can be sure you have the most stable MQTT setup possible. If you do that, you might then find possible loops elsewhere. I know you mentioned you are pretty sure you don't have any, but I thought that too until I found them :). If you do find loops, you can relax the MQTT settings in the future...

    You can also set the MQTT update period to a much higher value, with the command http://192.168.xx.xxx/settings?mqtt_update_period=300 - so you only get broadcasts every 5 minutes. That should be fine, as real events and changes are still broadcast pretty much straight away. The update period broadcast things is only really for sorting out trivial drifts in state...