I'm working on some projects using the Node-Red dashboards and MQTT. Lately power and internet have become unreliable. When the internet goes away my programs crash after repeated mqtt publish commands are sent.
I need a way to tell that I am not getting out on the internet and stop sending the mqtt publish messages, then re-connecting when the internet is available. I've figured it out after a power loss to the pico, but the action is pretty drastic by doing a machine reset and test over and over until it re-connects. My Node-Red won't come back on its own because the PC that hosts it does not restart on its own.
My projects need to be able to run on their own and just use Node-Red as a dashboard.
Any idea?