Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 1251

Python • Re: Help with MQTT restart code

$
0
0
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).

Statistics: Posted by DougieLawson — Tue Feb 11, 2025 9:48 am



Viewing all articles
Browse latest Browse all 1251

Trending Articles