1 parent
4e14029d65
commit
a1cfd57c23
1 file changed
+4
-4
+4
-4
@@ -1096,13 +1096,14 @@ void loop()
|
|||||||
lastNTWKReconnectAttempt = 0;
|
lastNTWKReconnectAttempt = 0;
|
||||||
if (client.connected())
|
if (client.connected())
|
||||||
{
|
{
|
||||||
// MQTT loop
|
|
||||||
connectedOnce = true;
|
|
||||||
lastMQTTReconnectAttempt = 0;
|
|
||||||
|
|
||||||
#ifdef ZmqttDiscovery
|
#ifdef ZmqttDiscovery
|
||||||
if(!connectedOnce) pubMqttDiscovery(); // at first connection we publish the discovery payloads
|
if(!connectedOnce) pubMqttDiscovery(); // at first connection we publish the discovery payloads
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
connectedOnce = true;
|
||||||
|
lastMQTTReconnectAttempt = 0;
|
||||||
|
|
||||||
client.loop();
|
client.loop();
|
||||||
|
|
||||||
#if defined(ESP8266) || defined(ESP32)
|
#if defined(ESP8266) || defined(ESP32)
|
||||||
@@ -1307,7 +1308,6 @@ void stateMeasures()
|
|||||||
#endif
|
#endif
|
||||||
#ifdef ZmqttDiscovery
|
#ifdef ZmqttDiscovery
|
||||||
modules = modules + ZmqttDiscovery;
|
modules = modules + ZmqttDiscovery;
|
||||||
pubMqttDiscovery();
|
|
||||||
#endif
|
#endif
|
||||||
#ifdef ZactuatorFASTLED
|
#ifdef ZactuatorFASTLED
|
||||||
modules = modules + ZactuatorFASTLED;
|
modules = modules + ZactuatorFASTLED;
|
||||||
|
|||||||
Reference in new issue
Block a user