thermferm/thermferm.c

changeset 498
4903b4da9d40
parent 497
18ace27338e5
child 499
602d9968960f
equal deleted inserted replaced
497:18ace27338e5 498:4903b4da9d40
1973 LCDspL = unit->prof_target_lo; 1973 LCDspL = unit->prof_target_lo;
1974 LCDspH = unit->prof_target_hi; 1974 LCDspH = unit->prof_target_hi;
1975 } 1975 }
1976 } 1976 }
1977 #ifdef HAVE_MOSQUITTO_H 1977 #ifdef HAVE_MOSQUITTO_H
1978 if (mqtt_use && (seconds == 60)) { 1978 if (mqtt_use && (seconds == 60) && ((unit->mode == UNITMODE_FRIDGE) || (unit->mode == UNITMODE_BEER) || (unit->mode == UNITMODE_PROFILE))) {
1979 sprintf(buf, "%.1f", LCDspH); 1979 sprintf(buf, "%.1f", LCDspH);
1980 snprintf(topic, 1023, "fermenter/%s/%s/setpoint/high", hostname, unit->uuid); 1980 snprintf(topic, 1023, "fermenter/%s/%s/setpoint/high", hostname, unit->uuid);
1981 mosquitto_publish(mosq, &mqtt_mid_sent, topic, strlen(buf), buf, mqtt_qos, 1); 1981 mosquitto_publish(mosq, &mqtt_mid_sent, topic, strlen(buf), buf, mqtt_qos, 1);
1982 sprintf(buf, "%.1f", LCDspL); 1982 sprintf(buf, "%.1f", LCDspL);
1983 snprintf(topic, 1023, "fermenter/%s/%s/setpoint/low", hostname, unit->uuid); 1983 snprintf(topic, 1023, "fermenter/%s/%s/setpoint/low", hostname, unit->uuid);

mercurial