Fixed empty setpoint values

Sat, 30 Apr 2016 21:25:10 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Sat, 30 Apr 2016 21:25:10 +0200
changeset 498
4903b4da9d40
parent 497
18ace27338e5
child 499
602d9968960f

Fixed empty setpoint values

thermferm/thermferm.c file | annotate | diff | comparison | revisions
--- a/thermferm/thermferm.c	Sat Apr 30 21:06:20 2016 +0200
+++ b/thermferm/thermferm.c	Sat Apr 30 21:25:10 2016 +0200
@@ -1975,7 +1975,7 @@
 		    }
 		}
 #ifdef HAVE_MOSQUITTO_H
-		if (mqtt_use && (seconds == 60)) {
+		if (mqtt_use && (seconds == 60) && ((unit->mode == UNITMODE_FRIDGE) || (unit->mode == UNITMODE_BEER) || (unit->mode == UNITMODE_PROFILE))) {
 		    sprintf(buf, "%.1f", LCDspH);
 		    snprintf(topic, 1023, "fermenter/%s/%s/setpoint/high", hostname, unit->uuid);
 		    mosquitto_publish(mosq, &mqtt_mid_sent, topic, strlen(buf), buf, mqtt_qos, 1);

mercurial