From 6b47eef4cdffd49bd5ceaeedc222f90d57ae2b32 Mon Sep 17 00:00:00 2001 From: CaCO3 Date: Wed, 26 Oct 2022 10:25:17 +0200 Subject: [PATCH] use unique MQTT client ID. Without this (and multiple running deevices with same ID), they disconnect each other! --- code/components/jomjol_flowcontroll/ClassFlowMQTT.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/components/jomjol_flowcontroll/ClassFlowMQTT.cpp b/code/components/jomjol_flowcontroll/ClassFlowMQTT.cpp index 430f9b18..beab679c 100644 --- a/code/components/jomjol_flowcontroll/ClassFlowMQTT.cpp +++ b/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 = "";