zigpy / zha-device-handlers

ZHA device handlers bridge the functionality gap created when manufacturers deviate from the ZCL specification, handling deviations and exceptions by parsing custom messages to and from Zigbee devices.
Apache License 2.0
720 stars 667 forks source link

[Device Support Request] Avatto ZWT07 - TS0601 _TZE200_g9a3awaj #2968

Open jezzaaa opened 7 months ago

jezzaaa commented 7 months ago

Problem description

I have a Tuya-based ZigBee thermostat purchased from Aliexpress. The device TS0601 _TZE200_g9a3awaj has no support in Quirks. The device packaging lists the manufacturer as Ecobuy smart controls Co Ltd, and the model number is T5Z.

However, I was able to get it to partially work by hacking the device name into a local copy of ts0601_electric_heating.py. The current temp and set temp are showing in HA, although the set temp is scaled by a factor of 10 (eg 215C instead of 21.5C). The Idle/Heating status is reversed (shows Heating when the thermostat turns off and removes the flame symbol). I've tweaked the code to get the set temp displaying correctly, and I could probably work out how to reverse the sense of the Idle/Heating setting. But other issues would remain.

Probably the biggest problem is that setting anything in HA doesn't reflect on the thermostat. If I change the temperature on HA, the change isn't reflected on the thermostat. If I change the mode from Heat to Off, the thermostat doesn't turn off.

Product link here. The device is battery powered, and has dry Normally Open (NO) contacts, rated 24-230VAC up to 5A.

Solution description

A new quirk is required for this device. I can code, but I'm not familiar with how HA's codebase hangs together, nor do I know anything about how to interact with ZigBee devices. I'd gladly work on this if I had a few pointers on how to implement the missing features.

Screenshots/Video

Screenshots/Video [Paste/upload your media here]

Device signature

Device signature ```json { "node_descriptor": "NodeDescriptor(logical_type=, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=, mac_capability_flags=, manufacturer_code=4417, maximum_buffer_size=66, maximum_incoming_transfer_size=66, server_mask=10752, maximum_outgoing_transfer_size=66, descriptor_capability_field=, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=True, *is_full_function_device=False, *is_mains_powered=False, *is_receiver_on_when_idle=False, *is_router=False, *is_security_capable=False)", "endpoints": { "1": { "profile_id": "0x0104", "device_type": "0x0301", "input_clusters": [ "0x0000", "0x0004", "0x0005", "0x0201", "0x0204", "0xef00" ], "output_clusters": [ "0x000a", "0x0019" ] } }, "manufacturer": "_TZE200_g9a3awaj", "model": "TS0601" } ```

Diagnostic information

Diagnostic information ```json { "home_assistant": { "installation_type": "Home Assistant OS", "version": "2024.2.0", "dev": false, "hassio": true, "virtualenv": false, "python_version": "3.12.1", "docker": true, "arch": "x86_64", "timezone": "Australia/Sydney", "os_name": "Linux", "os_version": "6.1.74-haos", "supervisor": "2024.01.1", "host_os": "Home Assistant OS 11.5", "docker_version": "24.0.7", "chassis": "vm", "run_as_root": true }, "custom_components": { "hacs": { "version": "1.34.0", "requirements": [ "aiogithubapi>=22.10.1" ] }, "localtuya": { "version": "5.2.1", "requirements": [] }, "ble_monitor": { "version": "12.9.0", "requirements": [ "pycryptodomex>=3.18.0", "janus>=1.0.0", "aioblescan>=0.2.14", "btsocket>=0.2.0", "pyric>=0.1.6.3" ] }, "webrtc": { "version": "v3.5.1", "requirements": [] }, "smartthinq_sensors": { "version": "0.37.2", "requirements": [ "pycountry>=20.7.3", "xmltodict>=0.12.0", "charset_normalizer>=2.0.0" ] }, "sonoff": { "version": "3.5.4", "requirements": [ "pycryptodome>=3.6.6" ] }, "waste_collection_schedule": { "version": "1.45.1", "requirements": [ "icalendar", "recurring_ical_events", "icalevents", "beautifulsoup4", "lxml" ] }, "dwains_dashboard": { "version": "3.6.0", "requirements": [] } }, "integration_manifest": { "domain": "zha", "name": "Zigbee Home Automation", "after_dependencies": [ "onboarding", "usb" ], "codeowners": [ "@dmulcahey", "@adminiuga", "@puddly", "@TheJulianJES" ], "config_flow": true, "dependencies": [ "file_upload" ], "documentation": "https://www.home-assistant.io/integrations/zha", "iot_class": "local_polling", "loggers": [ "aiosqlite", "bellows", "crccheck", "pure_pcapy3", "zhaquirks", "zigpy", "zigpy_deconz", "zigpy_xbee", "zigpy_zigate", "zigpy_znp", "universal_silabs_flasher" ], "requirements": [ "bellows==0.38.0", "pyserial==3.5", "pyserial-asyncio==0.6", "zha-quirks==0.0.111", "zigpy-deconz==0.23.0", "zigpy==0.62.3", "zigpy-xbee==0.20.1", "zigpy-zigate==0.12.0", "zigpy-znp==0.12.1", "universal-silabs-flasher==0.0.18", "pyserial-asyncio-fast==0.11" ], "usb": [ { "vid": "10C4", "pid": "EA60", "description": "*2652*", "known_devices": [ "slae.sh cc2652rb stick" ] }, { "vid": "1A86", "pid": "55D4", "description": "*sonoff*plus*", "known_devices": [ "sonoff zigbee dongle plus v2" ] }, { "vid": "10C4", "pid": "EA60", "description": "*sonoff*plus*", "known_devices": [ "sonoff zigbee dongle plus" ] }, { "vid": "10C4", "pid": "EA60", "description": "*tubeszb*", "known_devices": [ "TubesZB Coordinator" ] }, { "vid": "1A86", "pid": "7523", "description": "*tubeszb*", "known_devices": [ "TubesZB Coordinator" ] }, { "vid": "1A86", "pid": "7523", "description": "*zigstar*", "known_devices": [ "ZigStar Coordinators" ] }, { "vid": "1CF1", "pid": "0030", "description": "*conbee*", "known_devices": [ "Conbee II" ] }, { "vid": "0403", "pid": "6015", "description": "*conbee*", "known_devices": [ "Conbee III" ] }, { "vid": "10C4", "pid": "8A2A", "description": "*zigbee*", "known_devices": [ "Nortek HUSBZB-1" ] }, { "vid": "0403", "pid": "6015", "description": "*zigate*", "known_devices": [ "ZiGate+" ] }, { "vid": "10C4", "pid": "EA60", "description": "*zigate*", "known_devices": [ "ZiGate" ] }, { "vid": "10C4", "pid": "8B34", "description": "*bv 2010/10*", "known_devices": [ "Bitron Video AV2010/10" ] } ], "zeroconf": [ { "type": "_esphomelib._tcp.local.", "name": "tube*" }, { "type": "_zigate-zigbee-gateway._tcp.local.", "name": "*zigate*" }, { "type": "_zigstar_gw._tcp.local.", "name": "*zigstar*" }, { "type": "_uzg-01._tcp.local.", "name": "uzg-01*" }, { "type": "_slzb-06._tcp.local.", "name": "slzb-06*" } ], "is_built_in": true }, "data": { "ieee": "**REDACTED**", "nwk": 33875, "manufacturer": "_TZE200_g9a3awaj", "model": "TS0601", "name": "_TZE200_g9a3awaj TS0601", "quirk_applied": true, "quirk_class": "ts0601_electric_heating.Jez", "quirk_id": null, "manufacturer_code": 4417, "power_source": "Battery or Unknown", "lqi": 255, "rssi": -51, "last_seen": "2024-02-08T22:31:01", "available": true, "device_type": "EndDevice", "signature": { "node_descriptor": "NodeDescriptor(logical_type=, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=, mac_capability_flags=, manufacturer_code=4417, maximum_buffer_size=66, maximum_incoming_transfer_size=66, server_mask=10752, maximum_outgoing_transfer_size=66, descriptor_capability_field=, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=True, *is_full_function_device=False, *is_mains_powered=False, *is_receiver_on_when_idle=False, *is_router=False, *is_security_capable=False)", "endpoints": { "1": { "profile_id": "0x0104", "device_type": "0x0301", "input_clusters": [ "0x0000", "0x0004", "0x0005", "0x0201", "0x0204", "0xef00" ], "output_clusters": [ "0x000a", "0x0019" ] } }, "manufacturer": "_TZE200_g9a3awaj", "model": "TS0601" }, "active_coordinator": false, "entities": [ { "entity_id": "update.heater_firmware", "name": "_TZE200_g9a3awaj TS0601" }, { "entity_id": "sensor.heater_hvac_action", "name": "_TZE200_g9a3awaj TS0601" }, { "entity_id": "climate.heater_thermostat", "name": "_TZE200_g9a3awaj TS0601" } ], "neighbors": [], "routes": [], "endpoint_names": [ { "name": "THERMOSTAT" } ], "user_given_name": "Heater", "device_reg_id": "a07cd2a70b2be21203bb40d66d6fec1d", "area_id": "landing", "cluster_details": { "1": { "device_type": { "name": "THERMOSTAT", "id": 769 }, "profile_id": 260, "in_clusters": { "0x0000": { "endpoint_attribute": "basic", "attributes": { "0x0001": { "attribute_name": "app_version", "value": 72 }, "0x0004": { "attribute_name": "manufacturer", "value": "_TZE200_g9a3awaj" }, "0x0005": { "attribute_name": "model", "value": "TS0601" } }, "unsupported_attributes": { "0x0008": { "attribute_name": "generic_device_class" }, "0x0009": { "attribute_name": "generic_device_type" } } }, "0x0004": { "endpoint_attribute": "groups", "attributes": {}, "unsupported_attributes": {} }, "0x0005": { "endpoint_attribute": "scenes", "attributes": {}, "unsupported_attributes": {} }, "0xef00": { "endpoint_attribute": "tuya_manufacturer", "attributes": { "0x0128": { "attribute_name": "child_lock", "value": 0 }, "0x0101": { "attribute_name": "enabled", "value": 1 }, "0x0402": { "attribute_name": "manual_mode", "value": 0 }, "0x0424": { "attribute_name": "running_mode", "value": 0 }, "0x0210": { "attribute_name": "target_temperature", "value": 270 }, "0x0218": { "attribute_name": "temperature", "value": 264 } }, "unsupported_attributes": {} }, "0x0201": { "endpoint_attribute": "thermostat", "attributes": { "0x001b": { "attribute_name": "ctrl_sequence_of_oper", "value": 2 }, "0x0000": { "attribute_name": "local_temperature", "value": 2640 }, "0x0012": { "attribute_name": "occupied_heating_setpoint", "value": 2700 }, "0x0025": { "attribute_name": "programing_oper_mode", "value": 0 }, "0x001e": { "attribute_name": "running_mode", "value": 4 }, "0x0029": { "attribute_name": "running_state", "value": 1 }, "0x001c": { "attribute_name": "system_mode", "value": 4 } }, "unsupported_attributes": { "0x0000": { "attribute_name": "local_temperature" }, "0x0002": { "attribute_name": "occupancy" }, "0x0003": { "attribute_name": "abs_min_heat_setpoint_limit" }, "0x0004": { "attribute_name": "abs_max_heat_setpoint_limit" }, "0x0005": { "attribute_name": "abs_min_cool_setpoint_limit" }, "0x0006": { "attribute_name": "abs_max_cool_setpoint_limit" }, "0x0007": { "attribute_name": "pi_cooling_demand" }, "0x0016": { "attribute_name": "max_heat_setpoint_limit" }, "0x0008": { "attribute_name": "pi_heating_demand" }, "0x0010": { "attribute_name": "local_temperature_calibration" }, "0x0011": { "attribute_name": "occupied_cooling_setpoint" }, "0x0012": { "attribute_name": "occupied_heating_setpoint" }, "0x0013": { "attribute_name": "unoccupied_cooling_setpoint" }, "0x0014": { "attribute_name": "unoccupied_heating_setpoint" }, "0x0015": { "attribute_name": "min_heat_setpoint_limit" }, "0x0017": { "attribute_name": "min_cool_setpoint_limit" }, "0x0018": { "attribute_name": "max_cool_setpoint_limit" }, "0x001c": { "attribute_name": "system_mode" }, "0x001e": { "attribute_name": "running_mode" }, "0x0029": { "attribute_name": "running_state" }, "0x0030": { "attribute_name": "setpoint_change_source" } } }, "0x0204": { "endpoint_attribute": "thermostat_ui", "attributes": { "0x0001": { "attribute_name": "keypad_lockout", "value": 0 } }, "unsupported_attributes": { "0x0001": { "attribute_name": "keypad_lockout" } } } }, "out_clusters": { "0x000a": { "endpoint_attribute": "time", "attributes": {}, "unsupported_attributes": {} }, "0x0019": { "endpoint_attribute": "ota", "attributes": { "0x0002": { "attribute_name": "current_file_version", "value": 72 } }, "unsupported_attributes": {} } } } } } } ```

Logs

Logs ```python [Paste the logs here] ```

Custom quirk

Custom quirk ```python """Map from manufacturer to standard clusters for electric heating thermostats.""" import logging from zigpy.profiles import zha import zigpy.types as t from zigpy.zcl.clusters.general import Basic, Groups, Ota, Scenes, Time from zhaquirks.const import ( DEVICE_TYPE, ENDPOINTS, INPUT_CLUSTERS, MODELS_INFO, OUTPUT_CLUSTERS, PROFILE_ID, ) from zhaquirks.tuya import ( TuyaManufClusterAttributes, TuyaThermostat, TuyaThermostatCluster, TuyaUserInterfaceCluster, ) # info from https://github.com/zigpy/zha-device-handlers/pull/538#issuecomment-723334124 # https://github.com/Koenkk/zigbee-herdsman-converters/blob/master/converters/fromZigbee.js#L239 # and https://github.com/Koenkk/zigbee-herdsman-converters/blob/master/converters/common.js#L113 MOESBHT_TARGET_TEMP_ATTR = 0x0210 # [0,0,0,21] target room temp (degree) MOESBHT_TEMPERATURE_ATTR = 0x0218 # [0,0,0,200] current room temp (decidegree) MOESBHT_SCHEDULE_MODE_ATTR = 0x0403 # [1] false [0] true /!\ inverted MOESBHT_MANUAL_MODE_ATTR = 0x0402 # [1] false [0] true /!\ inverted MOESBHT_ENABLED_ATTR = 0x0101 # [0] off [1] on MOESBHT_RUNNING_MODE_ATTR = 0x0424 # [1] idle [0] heating /!\ inverted MOESBHT_CHILD_LOCK_ATTR = 0x0128 # [0] unlocked [1] child-locked _LOGGER = logging.getLogger(__name__) class JezManufCluster(TuyaManufClusterAttributes): """Manufacturer Specific Cluster of some electric heating thermostats.""" attributes = { MOESBHT_TARGET_TEMP_ATTR: ("target_temperature", t.uint32_t, True), MOESBHT_TEMPERATURE_ATTR: ("temperature", t.uint32_t, True), MOESBHT_SCHEDULE_MODE_ATTR: ("schedule_mode", t.uint8_t, True), MOESBHT_MANUAL_MODE_ATTR: ("manual_mode", t.uint8_t, True), MOESBHT_ENABLED_ATTR: ("enabled", t.uint8_t, True), MOESBHT_RUNNING_MODE_ATTR: ("running_mode", t.uint8_t, True), MOESBHT_CHILD_LOCK_ATTR: ("child_lock", t.uint8_t, True), } def _update_attribute(self, attrid, value): super()._update_attribute(attrid, value) if attrid == MOESBHT_TARGET_TEMP_ATTR: self.endpoint.device.thermostat_bus.listener_event( "temperature_change", "occupied_heating_setpoint", value * 10, # degree to decidegree ) elif attrid == MOESBHT_TEMPERATURE_ATTR: self.endpoint.device.thermostat_bus.listener_event( "temperature_change", "local_temperature", value * 10, # decidegree to centidegree ) elif attrid == MOESBHT_SCHEDULE_MODE_ATTR: if value == 0: # value is inverted self.endpoint.device.thermostat_bus.listener_event( "program_change", "scheduled" ) elif attrid == MOESBHT_MANUAL_MODE_ATTR: if value == 0: # value is inverted self.endpoint.device.thermostat_bus.listener_event( "program_change", "manual" ) elif attrid == MOESBHT_ENABLED_ATTR: self.endpoint.device.thermostat_bus.listener_event("enabled_change", value) elif attrid == MOESBHT_RUNNING_MODE_ATTR: # value is inverted self.endpoint.device.thermostat_bus.listener_event( "state_change", 1 - value ) elif attrid == MOESBHT_CHILD_LOCK_ATTR: self.endpoint.device.ui_bus.listener_event("child_lock_change", value) class JezThermostat(TuyaThermostatCluster): """Thermostat cluster for some electric heating controllers.""" def map_attribute(self, attribute, value): """Map standardized attribute value to dict of manufacturer values.""" if attribute == "occupied_heating_setpoint": # decidegree to degree return {MOESBHT_TARGET_TEMP_ATTR: round(value / 10)} if attribute == "system_mode": if value == self.SystemMode.Off: return {MOESBHT_ENABLED_ATTR: 0} if value == self.SystemMode.Heat: return {MOESBHT_ENABLED_ATTR: 1} self.error("Unsupported value for SystemMode") elif attribute == "programing_oper_mode": # values are inverted if value == self.ProgrammingOperationMode.Simple: return {MOESBHT_MANUAL_MODE_ATTR: 0, MOESBHT_SCHEDULE_MODE_ATTR: 1} if value == self.ProgrammingOperationMode.Schedule_programming_mode: return {MOESBHT_MANUAL_MODE_ATTR: 1, MOESBHT_SCHEDULE_MODE_ATTR: 0} self.error("Unsupported value for ProgrammingOperationMode") return super().map_attribute(attribute, value) def program_change(self, mode): """Programming mode change.""" if mode == "manual": value = self.ProgrammingOperationMode.Simple else: value = self.ProgrammingOperationMode.Schedule_programming_mode self._update_attribute( self.attributes_by_name["programing_oper_mode"].id, value ) def enabled_change(self, value): """System mode change.""" if value == 0: mode = self.SystemMode.Off else: mode = self.SystemMode.Heat self._update_attribute(self.attributes_by_name["system_mode"].id, mode) class JezUserInterface(TuyaUserInterfaceCluster): """HVAC User interface cluster for tuya electric heating thermostats.""" _CHILD_LOCK_ATTR = MOESBHT_CHILD_LOCK_ATTR class Jez(TuyaThermostat): """Tuya thermostat for Ecobuy T6Z aka _TZE200_g9a3awaj.""" signature = { # endpoint=1 profile=260 device_type=81 device_version=1 input_clusters=[0, 4, 5, 61184], # output_clusters=[10, 25] MODELS_INFO: [ ("_TZE200_g9a3awaj", "TS0601"), ], ENDPOINTS: { 1: { PROFILE_ID: zha.PROFILE_ID, DEVICE_TYPE: zha.DeviceType.SMART_PLUG, INPUT_CLUSTERS: [ Basic.cluster_id, Groups.cluster_id, Scenes.cluster_id, TuyaManufClusterAttributes.cluster_id, ], OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id], } }, } replacement = { ENDPOINTS: { 1: { PROFILE_ID: zha.PROFILE_ID, DEVICE_TYPE: zha.DeviceType.THERMOSTAT, INPUT_CLUSTERS: [ Basic.cluster_id, Groups.cluster_id, Scenes.cluster_id, JezManufCluster, JezThermostat, JezUserInterface, ], OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id], } } } ```

Additional information

No response

jezzaaa commented 7 months ago

This appears to be a re-branded Avatto model ZWT07. There's support in Z2M for this model.

douglascrc-git commented 7 months ago

This appears to be a re-branded Avatto model ZWT07. There's support in Z2M for this model.

I have the same device.

After testing the quirk you provided, I noticed that the device appeared in Home Assistant (HA). However, I encountered a limitation – while I could read the values, I couldn't adjust the temperature or control the device's power state.

Additionally, I observed an anomaly: when the set point temperature is lower than the current temperature, the device begins heating, but when the set point is higher, the device remains idle. This suggests there may be an issue with the code.

I will now attempt to troubleshoot and rectify the problem.

jezzaaa commented 6 months ago

After testing the quirk you provided,

I didn't provide any quirk here. I only requested support for an existing quirk to support this device.

I noticed that the device appeared in Home Assistant (HA). However, I encountered a limitation – while I could read the values, I couldn't adjust the temperature or control the device's power state.

Yes, that's what I found. The values seemed to be read-only.

Additionally, I observed an anomaly: when the set point temperature is lower than the current temperature, the device begins heating, but when the set point is higher, the device remains idle. This suggests there may be an issue with the code.

I think what you're saying here is that the heating/idle are reversed? Is it just the status shown in HA that's reversed, or is it the thermostat itself actually turning on the heating when its set temp is lower? If it's the latter then this would likely happen even without connecting to HA, and would indicate a fault in the thermostat.

I took a look at a fork of the ZHA quirks by @jacekk015; one that included an Avatto thermostat quirk. It didn't include our model of thermostat, but it's is similar enough to one of the supported models (_TZE200_2ekuz3dz) that I managed to get it to work correctly for me. One of the issues I had to address was that the heating/idle status was being reversed in the existing code so I had to remove that reversal for my model to have the correct status displayed. Most importantly, the Avatto quirk allowed setting, not just reading, the power state and the set temp.

Perhaps you could give the Avatto quirk a try, with my mods that I've submitted to @jacekk015 for inclusion: https://github.com/jacekk015/zha_quirks/issues/49

jezzaaa commented 6 months ago

The "2ekuz3dz" model on which I based my mods is supported in the mainline code, in the file ts0601_electric_heating.py. I had a go at doing the same mods to this file, but I was unsuccessful - the result was read-only, so I couldn't change the set temp. There are significant differences between how "2ekuz3dz" is supported in the "ts0601_electric_heating.py" file and jacekk015's "ts0601_thermostat_avatto.py" file, so much so that I wonder if the "2ekuz3dz" thermostat actually works with the mainline code.

Jacekk015's quirk has a lot of devices in the one file, which made his pull request unable to be tested and accepted for inclusion in mainline. I'd really love to get support for this thermostat added, but without help from knowledgeable folks, I don't know how I can make progress. All I can think of doing is to make a copy of my hacked working version, stripping out support for the handful of other thermostats, and trying to get it accepted on its own. I don't know that I have the skills to do this.

douglascrc-git commented 6 months ago

Thank you for you quick answer!

I think what you're saying here is that the heating/idle are reversed? Is it just the status shown in HA that's reversed, or is it the thermostat itself actually turning on the heating when its set temp is lower? If it's the latter then this would likely happen even without connecting to HA, and would indicate a fault in the thermostat.

I was talking about the status in HA being reversed, not the thermostat itself.

I took a look at a fork of the ZHA quirks by @jacekk015; one that included an Avatto thermostat quirk. It didn't include our model of thermostat, but it's is similar enough to one of the supported models (_TZE200_2ekuz3dz) that I managed to get it to work correctly for me. One of the issues I had to address was that the heating/idle status was being reversed in the existing code so I had to remove that reversal for my model to have the correct status displayed. Most importantly, the Avatto quirk allowed setting, not just reading, the power state and the set temp.

Perhaps you could give the Avatto quirk a try, with my mods that I've submitted to @jacekk015 for inclusion: jacekk015/zha_quirks#49

I gave a try to the file you uploaded, sadly it did not work for me. The issue with the status being reversed was solved, nevertheless it is still imposible to change from HA the target temperature, turn on/off , etc.

I have exactly the same device you have. What version of HA OS do you have?

This is how the device is shown in HA for me: image

jezzaaa commented 6 months ago

I'm running HAOS 11.5 with core 2024.2.2. Here's my device info page:

image

I'm curious that your device isn't showing max and min heat settings under "Configuration" like mine is. Instead you have "Compensacion" (compensation?) whereas mine does not. (This is different from "Number Temperature Calibration" which we both have under "Controls"). I'm wondering if you might have another quirk being loaded? I don't think my quirk has compensation.

After adding your quirk did you remove and re-add your device? I don't know if this is strictly necessary, but I've seen it recommended in some forum posts. When I add/change a quirk, I just restart Home Assistant and that seems to be sufficient most of the time.

douglascrc-git commented 6 months ago

I'm running HAOS 11.5 with core 2024.2.2. Here's my device info page:

I had a older version, maybe it is the reason my HA instalation displays different configuration.

I'm curious that your device isn't showing max and min heat settings under "Configuration" like mine is. Instead you have "Compensacion" (compensation?) whereas mine does not. (This is different from "Number Temperature Calibration" which we both have under "Controls"). I'm wondering if you might have another quirk being loaded? I don't think my quirk has compensation.

I believed that too, sadly, after seeking, I could not find another quirk assigned to the thermostat. So, that was not the cause.

After adding your quirk did you remove and re-add your device? I don't know if this is strictly necessary, but I've seen it recommended in some forum posts. When I add/change a quirk, I just restart Home Assistant and that seems to be sufficient most of the time.

I deleted the device and tried to add it again, but HA was not able to link the device. So, I tried in another raspberry with an older version of HA and the quirk work perfectly! Nevertheless, HA does not show the same configuration that you have.

I appreciate your help!

image

Next, I will try it again in a newer version of HA, because I'd like to have the same parameters you have.

douglascrc-git commented 6 months ago

I'm running HAOS 11.5 with core 2024.2.2. Here's my device info page:

I finally updated my HAOS image

But the device does not work! The HVAC is unkown

image

Can you please share the quirk you have installed?

jezzaaa commented 6 months ago

Can you please share the quirk you have installed?

The quirk hasn't changed from the link you posted above. It's the same one I put in my issue in Jacekk015's repo: https://github.com/jacekk015/zha_quirks/issues/49

I'm currently running 2024.2.2, and I've just re-tested the thermostat to check that it is still working (we're in summer here in Australia, so I haven't had to use the heater in a while).

I'm about to upgrade to 2024.3.0, so I'll re-test after that. [edit:]Still works after upgrading to 2024.3.0.

Have you removed the ZigBee device and re-paired it? Also check the logs to see if HA is throwing any errors when pairing, or on loading the quirk at start-up. I'm not really sure where to look for problems though.

jacekk015 commented 6 months ago

Code has been merged. Quirk updated https://github.com/jacekk015/zha_quirks

darknessblade commented 4 months ago

Code has been merged. Quirk updated https://github.com/jacekk015/zha_quirks

I am having some issues that the thermostat gets picked up by the wrong quirk, even though I have the correct custom quick loaded

home-assistant_2024-05-11T12-15-06.878Z.log

Quirk: ts0601_temperature2.TuyaNousE6TempHumiditySensor

jacekk015 commented 4 months ago

@darknessblade 2024-05-11 14:14:58.300 DEBUG (MainThread) [zigpy.quirks] Fail because endpoint list mismatch: {1, 242} {1} Is that a new device? Signature is OK, but it complains about an extra 242 endpoint... which those device normally have.

darknessblade commented 4 months ago

@darknessblade 2024-05-11 14:14:58.300 DEBUG (MainThread) [zigpy.quirks] Fail because endpoint list mismatch: {1, 242} {1} Is that a new device? Signature is OK, but it complains about an extra 242 endpoint... which those device normally have.

This is the one I bought roughly a week ago: aliexpress.com/item/1005006241271065.html?

[After discounts it was like 9 euro]

was Planning to use it as something of a remote for my IR panel, which is connected to a different heating panel.


Production date on the package says: "May 4 2024" It might also be the device that is defective [software defect]. because the smartelife app also has issues with it.

{Already send a message to the seller regarding this, will wait what they say as well}

jacekk015 commented 4 months ago

Probably Chinese friends changed the endpoints and left same signature. You could check updated ts0601_thermostat_avatto.py file https://github.com/jacekk015/zha_quirks Should be OK.

MattWestb commented 4 months ago

The MCU is the same and its having the the "tuya device ID" is coming from the MCU and the Zigbee module is reading it the its booting up. So they have changing the Zigbee module or the firmware on it but the MCU is the same.

darknessblade commented 4 months ago

Probably Chinese friends changed the endpoints and left same signature. You could check updated ts0601_thermostat_avatto.py file https://github.com/jacekk015/zha_quirks Should be OK.

A lot more entities shows up now only the thermostat entity is not working properly [Hvac on/off works] Thermostat says UNKNOWN

home-assistant_2024-05-11T20-09-23.147Z.log

thermostat remote

darknessblade commented 4 months ago

The MCU is the same and its having the the "tuya device ID" is coming from the MCU and the Zigbee module is reading it the its booting up. So they have changing the Zigbee module or the firmware on it but the MCU is the same.

Might be the case, as smartelife doesn't like it, with it not properly detecting the thermostat.

Which is the benefit of HA, that it is more versatile and can work with nearly ANY entity/quirk