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
758 stars 695 forks source link

[BUG] Saswell SEA802-Zigbee only showing off button and gets stuck #1900

Closed jzielke84 closed 2 years ago

jzielke84 commented 2 years ago

Describe the bug After adding my thermostat the climate card - aside of the temperature control - only shows the off-button. When I click on it, the thermostat is turned off and I can't control it anymore from HA. I have to manually set the thermostat to a specific temperature instead to switch the hvac_mode to heat. I tried overriding this with a customized yaml but then I get the following error while clicking on the heat button:

Nov  6 14:03:46 homeassistant homeassistant[909]: #033[33m2022-11-06 14:03:46.293 WARNING (MainThread) [homeassistant.components.zha.entity] climate.thermostat_thermostat: can't set 'heat' mode. Supported modes are: [<HVACMode.OFF: 'off'>]#033[0m

To Reproduce Steps to reproduce the behavior:

  1. Pair thermostat
  2. set temperature
  3. clickoff-button
  4. try to set temperature again. It won't change.

Expected behavior Offer a working off and heat button.

Screenshots Bildschirmfoto 2022-11-06 um 14 18 07

Device signature ```yaml IEEE: 84:ba:20:ff:fe:3c:e6:02 Nwk: 0xc598 Device Type: EndDevice LQI: Unbekannt RSSI: Unbekannt Zuletzt gesehen: 2022-11-06T13:54:12 Energiequelle: Battery or Unknown Eigenart: zhaquirks.tuya.ts0601_trv_sas.Thermostat_TZE200_c88teujp ``` marks. ```
Diagnostic information ```yaml { "home_assistant": { "installation_type": "Home Assistant Supervised", "version": "2022.11.1", "dev": false, "hassio": true, "virtualenv": false, "python_version": "3.10.7", "docker": true, "arch": "x86_64", "timezone": "Europe/Berlin", "os_name": "Linux", "os_version": "5.10.0-19-amd64", "supervisor": "2022.11.dev0401", "host_os": "Debian GNU/Linux 11 (bullseye)", "docker_version": "20.10.21", "chassis": "vm", "run_as_root": true }, "custom_components": { "hacs": { "version": "1.28.3", "requirements": [ "aiogithubapi>=22.2.4" ] } }, "integration_manifest": { "domain": "zha", "name": "Zigbee Home Automation", "config_flow": true, "documentation": "https://www.home-assistant.io/integrations/zha", "requirements": [ "bellows==0.34.2", "pyserial==3.5", "pyserial-asyncio==0.6", "zha-quirks==0.0.84", "zigpy-deconz==0.19.0", "zigpy==0.51.5", "zigpy-xbee==0.16.2", "zigpy-zigate==0.10.3", "zigpy-znp==0.9.1" ], "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": "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" ] } ], "codeowners": [ "@dmulcahey", "@adminiuga", "@puddly" ], "zeroconf": [ { "type": "_esphomelib._tcp.local.", "name": "tube*" }, { "type": "_zigate-zigbee-gateway._tcp.local.", "name": "*zigate*" }, { "type": "_zigstar_gw._tcp.local.", "name": "*zigstar*" } ], "dependencies": [ "file_upload" ], "after_dependencies": [ "onboarding", "usb", "zeroconf" ], "iot_class": "local_polling", "loggers": [ "aiosqlite", "bellows", "crccheck", "pure_pcapy3", "zhaquirks", "zigpy", "zigpy_deconz", "zigpy_xbee", "zigpy_zigate", "zigpy_znp" ], "is_built_in": true }, "data": { "ieee": "**REDACTED**", "nwk": 50584, "manufacturer": "_TZE200_yw7cahqs", "model": "TS0601", "name": "_TZE200_yw7cahqs TS0601", "quirk_applied": true, "quirk_class": "zhaquirks.tuya.ts0601_trv_sas.Thermostat_TZE200_c88teujp", "manufacturer_code": 4098, "power_source": "Battery or Unknown", "lqi": null, "rssi": null, "last_seen": "2022-11-06T13:54:12", "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=4098, maximum_buffer_size=82, maximum_incoming_transfer_size=82, server_mask=11264, maximum_outgoing_transfer_size=82, 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": 260, "device_type": "0x0301", "in_clusters": [ "0x0000", "0x0001", "0x0004", "0x0005", "0x0201", "0xef00" ], "out_clusters": [ "0x0001", "0x000a", "0x0019", "0x0201" ] } } }, "active_coordinator": false, "entities": [ { "entity_id": "sensor.thermostat_battery", "name": "_TZE200_yw7cahqs TS0601" }, { "entity_id": "sensor.thermostat_hvac_action", "name": "_TZE200_yw7cahqs TS0601" }, { "entity_id": "climate.thermostat_thermostat", "name": "_TZE200_yw7cahqs TS0601" } ], "neighbors": [], "endpoint_names": [ { "name": "THERMOSTAT" } ], "user_given_name": "Heizung Arbeitszimmer", "device_reg_id": "35ffd04914ede394cd7822dc087fa932", "area_id": "arbeitszimmer", "cluster_details": { "1": { "device_type": { "name": "THERMOSTAT", "id": 769 }, "profile_id": 260, "in_clusters": { "0x0000": { "endpoint_attribute": "basic", "attributes": { "0x0004": { "attribute_name": "manufacturer", "value": "_TZE200_yw7cahqs" }, "0x0005": { "attribute_name": "model", "value": "TS0601" } }, "unsupported_attributes": {} }, "0x0004": { "endpoint_attribute": "groups", "attributes": {}, "unsupported_attributes": {} }, "0x0005": { "endpoint_attribute": "scenes", "attributes": {}, "unsupported_attributes": {} }, "0xef00": { "endpoint_attribute": "tuya_manufacturer", "attributes": { "0x0165": { "attribute_name": "system_mode", "value": 0 }, "0x0267": { "attribute_name": "occupied_heating_setpoint", "value": 90 }, "0x0266": { "attribute_name": "local_temperature", "value": 234 }, "0x0569": { "attribute_name": "battery_state", "value": 0 } }, "unsupported_attributes": {} }, "0x0001": { "endpoint_attribute": "power", "attributes": { "0x0021": { "attribute_name": "battery_percentage_remaining", "value": 200 } }, "unsupported_attributes": {} }, "0x0201": { "endpoint_attribute": "thermostat", "attributes": { "0x0000": { "attribute_name": "local_temperature", "value": 2340 }, "0x0012": { "attribute_name": "occupied_heating_setpoint", "value": 900 }, "0x001c": { "attribute_name": "system_mode", "value": 0 }, "0x001e": { "attribute_name": "running_mode", "value": 0 } }, "unsupported_attributes": {} } }, "out_clusters": { "0x000a": { "endpoint_attribute": "time", "attributes": {}, "unsupported_attributes": {} }, "0x0019": { "endpoint_attribute": "ota", "attributes": {}, "unsupported_attributes": {} }, "0x0001": { "endpoint_attribute": "power", "attributes": {}, "unsupported_attributes": {} }, "0x0201": { "endpoint_attribute": "thermostat", "attributes": {}, "unsupported_attributes": {} } } } } } }``` marks. ```
Additional logs ``` Paste any additional debug logs here. Don't remove the extra line breaks outside the ``` marks. ```

Additional context MQTT Information

MattWestb commented 2 years ago

The Saswell SEA802 is not updated with more function then basic from it was added for nearly 2 years ago. Our users have trying fixing it and getting all function from this devices and its one working custom quirk for it but is not being merged in ZHA then the code is failing some test (code).

Configure local quirk in (Z)HA and adding the quirk from the post and restart HA https://github.com/zigpy/zha-device-handlers/issues/1189#issuecomment-1287512365. Also reading the thread for more information.

jzielke84 commented 2 years ago

@MattWestb Thanks for pointing that out. I've read the whole thread and the quirk seems to be broken. After adding it and re-pairing my thermostat, now I see a bunch of switches where I can only guess what they do. Why is this so difficult where zigbee2mqtt has no problems with that at all? Bildschirmfoto 2022-11-06 um 18 54 25

MattWestb commented 2 years ago

´ZHA can only using real Zigbee devices that is Zigbee compatible so we can only using the standard things and not investing new one then we is braking the system. Its possible writing custom GUI things but no user have not doing it for tuya TRVs. TRVs that is more standard is no problem in ZHA but tuya is zero Zoigbee standard and we is trying doing the best of it.

If you is reading the first post in the issue you is having the matrix wot all switches is and can renaming them.

Since currently we are not able to change names of on_off entities below is the description:

Window Detection
Child Lock
Anti-Freeze
Limescale Protection
Schedule Mode On/Off
Away Mode

Have you testing if the TRV functionality is OK ?

jzielke84 commented 2 years ago

@MattWestb

but tuya is zero Zoigbee standard and we is trying doing the best of it.

Yeah, that's what I have already learned while building my own system. I started with openhab and zigbee2mqtt first, but later changed to HA because this software really interacts with the setup process very well. Even though Linux is my daily business I sometime prefer not to write every config file by hand ;-)

Also, it's a pity what the European zigbee-market is offering right now. So many products having 'zigbee' written on their package but using proprietary implementations (like Bosch) or some EA-style subscription moneymaker licensing (like Tado). Zigbee imho seems to be the best protocol right now aside from zwave where at least we have some open standard...

The quirk seems to be working fine. Thanks for telling me the correct order of the switches. I have had some very steep learning curves in the past few days from both automation systems and sometimes I'm getting tired from reading doc after doc.

I'll close this issue as solved. Thank you for your help!

PS: I'll exchange my Conbee II with my Sonoff 3.0 adapter next week, because the Conbee needs USB 2.0 and has major issues with em shielding from usb 3 ports. Seriously, it's 2022! Who comes up with a product like that?

MattWestb commented 2 years ago

I was having one RaspBee I but is in the black box bad devices now then the company is not supporting there sold products you have paying for.

Its 2 versions of the Sonoff Zigbee 3 stick one with TI chip and one newer with Silabs EZSP both shall being OK but i think they still have some problems with it but i think it shall being fixed in upcoming firmware releases.

Some clue for not so bad Zigbee devices you can finding if they have being certificated at https://csa-iot.org/csa-iot_products/?p_keywords=&p_type%5B%5D=14&p_program_type%5B%5D=966&p_certificate=&p_family= but is no grantee that they is working 100% then can still using custom cluster and attributes that we is not knowing or bad hard and / or software (OSRAM).

tuya have 2 types of Zigbee devices most is normal Zigbee devices that can working OK or need some patching for working OK (like most LIDL devices) and some that is using one zuya MCU and is only using Zigbee for tunneling tuya DP commands to the tuya cloud. You device is the last type and its not documented and must being squeezed to one "normal Zigbee device" for working OK in ZHA.

If having problems keep asking its lot of brave users with different experience and some great devs that is helping then have time here and in the end most is being fixes then its possible. And we is learn new things all the life :-)

jzielke84 commented 2 years ago

@MattWestb Just one last question in advance: would you recommend using tuya devices out of the box or use https://github.com/ct-Open-Source/tuya-convert ?

MattWestb commented 2 years ago

The link is using ESP or other WiFI chips and tunneling to the cloud the same way your device is doing but your device cant being converted then its using one Zigbee module and the MCU is locked to the type of radio module (Its little different protocol steering / init the modules).

If using tuya WiFi device with ESP i have converting them to ESPHome but i dont have that.

And tuya is saying over 11 000 devices and many is using Zigbee for tunneling and is only using different DP (tuya commands) for all devices you is understanding wi is lost until some is getting the right commands in place.

Lights i using mostly IKEA then they is updating the device firmware (most no name and also known name is not doing that) but good sensors that is not very expensive you only finding CE ones (CE = China Expert and not Certificate European).