MQTT gateway - MQTT connection status
-
Hello to all, I have successfully set-up a MQTT gateway. Now i'm trying to expand my gateway with a LCD screen in order to display some relevant statusses. I was wondering how I can e.g know if the MQTT connection is ok or not not - you can see this if you enable debugging mode but this is too much info to display on the lcd (and not that user friendly)
-
If you are using pubsubclient, then
bool PubSubClient::connected()
should do the trick
-
@lood29 said in MQTT gateway - MQTT connection status:
bool PubSubClient::connected()
Did not work like this: it works with if (!_MQTT_client.connected()) {