diff --git a/mqttclient/fanATserial2mqtt.py b/mqttclient/fanATserial2mqtt.py index 3b4079a..2a068e3 100644 --- a/mqttclient/fanATserial2mqtt.py +++ b/mqttclient/fanATserial2mqtt.py @@ -5,7 +5,7 @@ from paho.mqtt import client as mqtt_client import os import serial -MAXIMUM_COMMUNICATION_FAILURE=100 +MAXIMUM_COMMUNICATION_FAILURE=1000 TEMPERATUR_MIN_DIFFERENCE = 2 TARGET_MIN_DIFFERENCE = 1 @@ -59,7 +59,9 @@ client.loop_start() client.publish(mqtt_topic + "device", ser.name) # check which port was really used +# Reset Serial Communication statistic SerialCommunicationFailureCounter=0 +client.publish(mqtt_topic + "serialcom/failure", str(SerialCommunicationFailureCounter)) # store last published value lastTemperatur = -1