Test mqttclient.isconnected() and if it's negative go through a connect() process.
I'm sorry I don't have an example, most of my Mosquitto code acts as a client using connect, subscribe, get message, disconnect. The one that sends that data is run on an Arduino. Or is getting a message from a public server (Glowmarkt or Myenergi for my solar, electric and car charging).
I'm sorry I don't have an example, most of my Mosquitto code acts as a client using connect, subscribe, get message, disconnect. The one that sends that data is run on an Arduino. Or is getting a message from a public server (Glowmarkt or Myenergi for my solar, electric and car charging).
Statistics: Posted by DougieLawson — Tue Feb 11, 2025 9:48 am