Przeglądaj źródła

use unique MQTT client ID. Without this (and multiple running deevices with same ID), they disconnect each other!

CaCO3 3 lat temu
rodzic
commit
6b47eef4cd

+ 3 - 1
code/components/jomjol_flowcontroll/ClassFlowMQTT.cpp

@@ -26,7 +26,9 @@ void ClassFlowMQTT::SetInitialParameter(void)
 
     topicUptime = "";
     topicFreeMem = "";
-    clientname = "watermeter";
+
+    clientname = "AIOTED-" + getMac();
+
     OldValue = "";
     flowpostprocessing = NULL;  
     user = "";