Supress DCMD error messages in the log.

Sat, 11 Jan 2020 11:33:00 +0100

author
Michiel Broek <mbroek@mbse.eu>
date
Sat, 11 Jan 2020 11:33:00 +0100
changeset 590
a43b8b85d8b3
parent 589
b6a73022abe7
child 591
28738f44d42e

Supress DCMD error messages in the log.

bmsd/mqtt.c file | annotate | diff | comparison | revisions
--- a/bmsd/mqtt.c	Wed Jan 08 23:32:16 2020 +0100
+++ b/bmsd/mqtt.c	Sat Jan 11 11:33:00 2020 +0100
@@ -175,6 +175,9 @@
 	    fermenter_log(message->topic, (char *)message->payload);
 	    return;
 	}
+	if (strstr(message->topic, (char *)"fermenters") && strstr(message->topic, (char *)"DCMD")) {
+            return; // just ignore our own commands.
+        }
 	if (strstr(message->topic, (char *)"co2meters") &&  strstr(message->topic, (char *)"DBIRTH")) {
             co2meter_birth_data(message->topic, (char *)message->payload);
             return;

mercurial