thermferm/thermferm.c

changeset 608
a69b5d92fd72
parent 606
798dd0c4fd00
child 611
732d482f47c8
--- a/thermferm/thermferm.c	Sat Jun 27 19:28:10 2020 +0200
+++ b/thermferm/thermferm.c	Sat Sep 12 15:23:49 2020 +0200
@@ -1271,7 +1271,7 @@
 		    if (rc == DEVPRESENT_YES) {
 			if (unit->air_temperature != temp) {
 			    unit->mqtt_flag |= MQTT_FLAG_DATA;
-			    pub_domoticz_temp(unit->air_idx, temp);
+//			    pub_domoticz_temp(unit->air_idx, temp);
 			}
 			unit->air_temperature = temp;
 			unit->air_state = 0;
@@ -1287,7 +1287,7 @@
 		    if (rc == DEVPRESENT_YES) {
 			if (unit->beer_temperature != temp) {
 			    unit->mqtt_flag |= MQTT_FLAG_DATA;
-			    pub_domoticz_temp(unit->beer_idx, temp);
+//			    pub_domoticz_temp(unit->beer_idx, temp);
 			}
     			unit->beer_temperature = temp;
 			unit->beer_state = 0;
@@ -1303,7 +1303,7 @@
 		    if (rc == DEVPRESENT_YES) {
 			if (unit->chiller_temperature != temp) {
 			    unit->mqtt_flag |= MQTT_FLAG_DATA;
-			    pub_domoticz_temp(unit->chiller_idx, temp);
+//			    pub_domoticz_temp(unit->chiller_idx, temp);
 			}
 			unit->chiller_temperature = temp;
 			unit->chiller_state = 0;
@@ -1324,14 +1324,14 @@
 			    if (unit->door_state == 0) {
 			    	syslog(LOG_NOTICE, "Unit `%s' door closed", unit->alias);
 			    	unit->door_state = 1;
-				pub_domoticz_output(unit->door_idx, unit->door_state);
+//				pub_domoticz_output(unit->door_idx, unit->door_state);
 				unit->mqtt_flag |= MQTT_FLAG_DATA;
 			    }
 			} else {
 			    if (unit->door_state) {
 			    	syslog(LOG_NOTICE, "Unit `%s' door opened", unit->alias);
 			    	unit->door_state = 0;
-				pub_domoticz_output(unit->door_idx, unit->door_state);
+//				pub_domoticz_output(unit->door_idx, unit->door_state);
 				unit->mqtt_flag |= MQTT_FLAG_DATA;
 			    }
 			    /*
@@ -1358,14 +1358,14 @@
 			    if (unit->psu_state == 0) {
 				syslog(LOG_NOTICE, "Unit `%s' PSU (12 volt) is on", unit->alias);
 				unit->psu_state = 1;
-				pub_domoticz_output(unit->psu_idx, unit->psu_state);
+//				pub_domoticz_output(unit->psu_idx, unit->psu_state);
 				unit->mqtt_flag |= MQTT_FLAG_DATA;
 			    }
 			} else {
 			    if (unit->psu_state) {
 				syslog(LOG_NOTICE, "Unit `%s' PSU (12 volt) is off", unit->alias);
 				unit->psu_state = 0;
-				pub_domoticz_output(unit->psu_idx, unit->psu_state);
+//				pub_domoticz_output(unit->psu_idx, unit->psu_state);
 				unit->mqtt_flag |= MQTT_FLAG_DATA;
 			    }
 			    unit->alarm_flag |= ALARM_FLAG_PSU;
@@ -1710,7 +1710,7 @@
 				if (unit->heater_state != power) {
 				    syslog(LOG_NOTICE, "Unit `%s' heater %d%% => %d%%", unit->alias, unit->heater_state, power);
 				    unit->heater_state = power;
-				    pub_domoticz_output(unit->heater_idx, unit->heater_state);
+//				    pub_domoticz_output(unit->heater_idx, unit->heater_state);
 				    if (unit->heater_address) {
 					unit->mqtt_flag |= MQTT_FLAG_DATA;
 				    }
@@ -1723,7 +1723,7 @@
 				if (unit->heater_state) {
 				    syslog(LOG_NOTICE, "Unit `%s' heater On => Off", unit->alias);
 				    unit->heater_state = 0;
-				    pub_domoticz_output(unit->heater_idx, unit->heater_state);
+//				    pub_domoticz_output(unit->heater_idx, unit->heater_state);
 				    if (unit->heater_address) {
 					unit->mqtt_flag |= MQTT_FLAG_DATA;
 				    }
@@ -1746,7 +1746,7 @@
 				if (unit->cooler_state != power) {
 				    syslog(LOG_NOTICE, "Unit `%s' cooler %d%% => %d%%", unit->alias, unit->cooler_state, power);
 				    unit->cooler_state = power;
-				    pub_domoticz_output(unit->cooler_idx, unit->cooler_state);
+//				    pub_domoticz_output(unit->cooler_idx, unit->cooler_state);
 				    if (unit->cooler_address) {
 					unit->mqtt_flag |= MQTT_FLAG_DATA;
 				    }
@@ -1759,7 +1759,7 @@
 				if (unit->cooler_state) {
 				    syslog(LOG_NOTICE, "Unit `%s' cooler On => Off", unit->alias);
 				    unit->cooler_state = 0;
-				    pub_domoticz_output(unit->cooler_idx, unit->cooler_state);
+//				    pub_domoticz_output(unit->cooler_idx, unit->cooler_state);
 				    if (unit->cooler_address) {
 					unit->mqtt_flag |= MQTT_FLAG_DATA;
 				    }
@@ -1786,7 +1786,7 @@
 			    	if (! unit->fan_state) {
 				    syslog(LOG_NOTICE, "Unit `%s' Fan Off => On", unit->alias);
 				    unit->fan_state = 100;
-				    pub_domoticz_output(unit->fan_idx, unit->fan_state);
+//				    pub_domoticz_output(unit->fan_idx, unit->fan_state);
 				    if (unit->fan_address) {
 					unit->mqtt_flag |= MQTT_FLAG_DATA;
 				    }
@@ -1799,7 +1799,7 @@
 			    	if (unit->fan_state) {
 				    syslog(LOG_NOTICE, "Unit `%s' Fan On => Off", unit->alias);
 			    	    unit->fan_state = 0;
-				    pub_domoticz_output(unit->fan_idx, unit->fan_state);
+//				    pub_domoticz_output(unit->fan_idx, unit->fan_state);
 				    if (unit->fan_address) {
 					unit->mqtt_flag |= MQTT_FLAG_DATA;
 				    }
@@ -1844,7 +1844,10 @@
 			LCDspH = unit->prof_target_hi;
 		    }
 		}
-		if ((seconds == 60) && ((unit->mode == UNITMODE_FRIDGE) || (unit->mode == UNITMODE_BEER) || (unit->mode == UNITMODE_PROFILE))) {
+//		if ((seconds == 60) && ((unit->mode == UNITMODE_FRIDGE) || (unit->mode == UNITMODE_BEER) || (unit->mode == UNITMODE_PROFILE))) {
+//		    unit->mqtt_flag |= MQTT_FLAG_DATA;
+//		}
+		if (seconds == 60) {
 		    unit->mqtt_flag |= MQTT_FLAG_DATA;
 		}
 #ifdef HAVE_WIRINGPI_H

mercurial