Closed florianbrede-ayet closed 1 year ago
I understood that (1) is a bug of my thermostats. They randomly(?) decide whether to respect the calibration_offset or just ignore it. It works after 1-2 published states for offset ranges between -5 to +6
.
Are the thermostats broken by design or is this a zigbee2mqtt problem?:
Info MQTT publish: topic 'zigbee2mqtt/thermostat_vorflur_schlafzimmer', payload '{"anti_scaling":"ON","away_mode":"OFF","battery_low":false,"child_lock":"LOCK","current_heating_setpoint":20,"device":{"applicationVersion":85,"dateCode":"","friendlyName":"thermostat_vorflur_schlafzimmer","hardwareVersion":1,"ieeeAddr":"0xcc86ecfffea8580e","manufacturerID":4098,"manufacturerName":"_TZE200_yw7cahqs","model":"SEA801-Zigbee/SEA802-Zigbee","networkAddress":52029,"powerSource":"Battery","stackVersion":0,"type":"EndDevice","zclVersion":3},"frost_detection":"ON","linkquality":255,"local_temperature":22.7,"local_temperature_calibration":0,"preset_mode":"none","system_mode":"heat","window_detection":"ON"}'
Info MQTT publish: topic 'zigbee2mqtt/thermostat_vorflur_schlafzimmer', payload '{"anti_scaling":"ON","away_mode":"OFF","battery_low":false,"child_lock":"LOCK","current_heating_setpoint":20,"device":{"applicationVersion":85,"dateCode":"","friendlyName":"thermostat_vorflur_schlafzimmer","hardwareVersion":1,"ieeeAddr":"0xcc86ecfffea8580e","manufacturerID":4098,"manufacturerName":"_TZE200_yw7cahqs","model":"SEA801-Zigbee/SEA802-Zigbee","networkAddress":52029,"powerSource":"Battery","stackVersion":0,"type":"EndDevice","zclVersion":3},"frost_detection":"ON","linkquality":255,"local_temperature":22.7,"local_temperature_calibration":-5,"preset_mode":"none","system_mode":"heat","window_detection":"ON"}'
Info MQTT publish: topic 'zigbee2mqtt/thermostat_vorflur_schlafzimmer', payload '{"anti_scaling":"ON","away_mode":"OFF","battery_low":false,"child_lock":"LOCK","current_heating_setpoint":20,"device":{"applicationVersion":85,"dateCode":"","friendlyName":"thermostat_vorflur_schlafzimmer","hardwareVersion":1,"ieeeAddr":"0xcc86ecfffea8580e","manufacturerID":4098,"manufacturerName":"_TZE200_yw7cahqs","model":"SEA801-Zigbee/SEA802-Zigbee","networkAddress":52029,"powerSource":"Battery","stackVersion":0,"type":"EndDevice","zclVersion":3},"frost_detection":"ON","linkquality":255,"local_temperature":17.7,"local_temperature_calibration":-5,"preset_mode":"none","system_mode":"heat","window_detection":"ON"}'
Info MQTT publish: topic 'zigbee2mqtt/thermostat_vorflur_schlafzimmer', payload '{"anti_scaling":"ON","away_mode":"OFF","battery_low":false,"child_lock":"LOCK","current_heating_setpoint":20,"device":{"applicationVersion":85,"dateCode":"","friendlyName":"thermostat_vorflur_schlafzimmer","hardwareVersion":1,"ieeeAddr":"0xcc86ecfffea8580e","manufacturerID":4098,"manufacturerName":"_TZE200_yw7cahqs","model":"SEA801-Zigbee/SEA802-Zigbee","networkAddress":52029,"powerSource":"Battery","stackVersion":0,"type":"EndDevice","zclVersion":3},"frost_detection":"ON","linkquality":255,"local_temperature":17.7,"local_temperature_calibration":-7,"preset_mode":"none","system_mode":"heat","window_detection":"ON"}'
Info MQTT publish: topic 'zigbee2mqtt/thermostat_vorflur_schlafzimmer', payload '{"anti_scaling":"ON","away_mode":"OFF","battery_low":false,"child_lock":"LOCK","current_heating_setpoint":20,"device":{"applicationVersion":85,"dateCode":"","friendlyName":"thermostat_vorflur_schlafzimmer","hardwareVersion":1,"ieeeAddr":"0xcc86ecfffea8580e","manufacturerID":4098,"manufacturerName":"_TZE200_yw7cahqs","model":"SEA801-Zigbee/SEA802-Zigbee","networkAddress":52029,"powerSource":"Battery","stackVersion":0,"type":"EndDevice","zclVersion":3},"frost_detection":"ON","linkquality":255,"local_temperature":17.7,"local_temperature_calibration":-7,"preset_mode":"none","system_mode":"heat","window_detection":"ON"}'
Info MQTT publish: topic 'zigbee2mqtt/thermostat_vorflur_schlafzimmer', payload '{"anti_scaling":"ON","away_mode":"OFF","battery_low":false,"child_lock":"LOCK","current_heating_setpoint":19,"device":{"applicationVersion":85,"dateCode":"","friendlyName":"thermostat_vorflur_schlafzimmer","hardwareVersion":1,"ieeeAddr":"0xcc86ecfffea8580e","manufacturerID":4098,"manufacturerName":"_TZE200_yw7cahqs","model":"SEA801-Zigbee/SEA802-Zigbee","networkAddress":52029,"powerSource":"Battery","stackVersion":0,"type":"EndDevice","zclVersion":3},"frost_detection":"ON","linkquality":255,"local_temperature":18.7,"local_temperature_calibration":5,"preset_mode":"none","system_mode":"heat","window_detection":"ON"}'
Info MQTT publish: topic 'zigbee2mqtt/thermostat_vorflur_schlafzimmer', payload '{"anti_scaling":"ON","away_mode":"OFF","battery_low":false,"child_lock":"LOCK","current_heating_setpoint":19,"device":{"applicationVersion":85,"dateCode":"","friendlyName":"thermostat_vorflur_schlafzimmer","hardwareVersion":1,"ieeeAddr":"0xcc86ecfffea8580e","manufacturerID":4098,"manufacturerName":"_TZE200_yw7cahqs","model":"SEA801-Zigbee/SEA802-Zigbee","networkAddress":52029,"powerSource":"Battery","stackVersion":0,"type":"EndDevice","zclVersion":3},"frost_detection":"ON","linkquality":255,"local_temperature":27.7,"local_temperature_calibration":5,"preset_mode":"none","system_mode":"heat","window_detection":"ON"}'
Its limited by HA to -6 to +6 this is a main issue in Z2M currently.
In 0.9.3 its workaround by limit the calibration to the max and min values in HA, so no error should be appear.
The new z2m release (out for a few days) should fix that, right?
Just in Theory, the new release have my PR to allowed Z2M to send float values, but there its also special for the SEA802 and other tuya devices, the converter from decimal to hex only convert int values and sometimes totaly break if it gets a double.
I emit that issue to Z2M but its currently not solved.
also i must checkout what HA gets from Z2M looks like this need another fix too.
As you can see, min max is now 30 -30 thats good, but the step isn't changed.
This issue has been automatically marked as stale because it has not had recent activity.
I forked this repository and implemented a PID controller to improve my badly & slowly reacting SEA802 valves on old, high volume & heat radiators. When working on
master
, I noticed 2 possible bugs that broke the ai_thermostat functionality for me:1.) I have problems understanding why inclimate.py
, the current TRV calibration is carried over, although the calibration delta wouldn't apply to the external sensor anyway (right now it's like recursively updating the calibration).Current Implementation:
new_calibration = float((float(self._cur_temp) - float(state.get('local_temperature'))) + float(state.get('local_temperature_calibration')))
:Working:
new_calibration = float(self._cur_temp) - float(state.get('local_temperature'))
:2.) Another bug I have is that the wrong (the last in the HA entity list) thermostat's calibration entity is selected.
entity_entries
contains ALL entities in HA. Due to the partial matching forlocal_temperature_calibration
, any thermostat will match and the last one will be used. I changed the code to this to get it to work:That should probably be improved by instead correctly filtering for entities belonging to the configured TRV device, but I have little experience with HA so this was the easiest solution and works in my setup with standard entity names.