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

[Device Support Request] Homebata (?) temperature / humidity sensor with display (and clock) #1725

Closed bsafh closed 1 year ago

bsafh commented 2 years ago

Is your feature request related to a problem? Please describe. After pairing, no entities show up

Describe the solution you'd like I would like to use this sensor for temperature and humidity measurements.

Device signature ```yaml { "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": 260, "device_type": "0x0051", "in_clusters": [ "0x0000", "0x0004", "0x0005", "0xef00" ], "out_clusters": [ "0x000a", "0x0019" ] } }, "manufacturer": "_TZE200_locansqn", "model": "TS0601", "class": "zigpy.device.Device" } ```
Diagnostic information ```yaml { "home_assistant": { "installation_type": "Home Assistant Supervised", "version": "2022.8.7", "dev": false, "hassio": true, "virtualenv": false, "python_version": "3.10.5", "docker": true, "arch": "x86_64", "timezone": "Europe/Berlin", "os_name": "Linux", "os_version": "5.10.0-17-amd64", "supervisor": "2022.08.5", "host_os": "Debian GNU/Linux 11 (bullseye)", "docker_version": "20.10.17", "chassis": "vm", "run_as_root": true }, "custom_components": { "hacs": { "version": "1.26.2", "requirements": [ "aiogithubapi>=22.2.4" ] }, "openweathermap_all": { "version": "0.0.1", "requirements": [ "owm2json==0.1.89" ] }, "climate_group": { "version": "0.4.2", "requirements": [] }, "holidays": { "version": "1.8.0", "requirements": [ "python-dateutil>=2.8.2", "holidays>=0.14.2" ] }, "openwrt": { "version": "0.0.1", "requirements": [] }, "homematicip_local": { "version": "1.15.0", "requirements": [ "hahomematic==2022.8.10" ] }, "truenas": { "version": "0.0.0", "requirements": [] }, "nodered": { "version": "1.0.9", "requirements": [] }, "ai_thermostat": { "version": "0.9.3", "requirements": [] }, "browser_mod": { "version": "1.5.3", "requirements": [] }, "better_thermostat": { "version": "1.0.0-beta14", "requirements": [] }, "ferienapidotde": { "version": "0.2.3", "requirements": [ "ferien-api==0.3.6" ] }, "climate_scheduler": { "version": "0.1.0", "requirements": [] }, "webrtc": { "version": "v2.3.1", "requirements": [] }, "gismeteo": { "version": "2.5.0", "requirements": [] }, "frigate": { "version": "2.3", "requirements": [] }, "zha_toolkit": { "version": "v0.8.13", "requirements": [] }, "reversotts": { "version": "1.0.2", "requirements": [ "pyttsreverso==0.4" ] }, "picotts_remote": { "version": "1.0.1", "requirements": [] }, "scheduler": { "version": "v0.0.0", "requirements": [] }, "dwd_weather": { "version": "1.2.22", "requirements": [ "simple_dwd_weatherforecast==1.1.5", "markdownify==0.6.5" ] }, "shelly": { "version": "1.0.1", "requirements": [ "pyShelly==1.0.2", "paho-mqtt==1.6.1", "websocket-client" ] }, "opnsense": { "version": "0.1.0", "requirements": [ "mac-vendor-lookup>=0.1.11" ] }, "dwains_dashboard": { "version": "3.2.0", "requirements": [] } }, "integration_manifest": { "domain": "zha", "name": "Zigbee Home Automation", "config_flow": true, "documentation": "https://www.home-assistant.io/integrations/zha", "requirements": [ "bellows==0.33.1", "pyserial==3.5", "pyserial-asyncio==0.6", "zha-quirks==0.0.78", "zigpy-deconz==0.18.0", "zigpy==0.50.2", "zigpy-xbee==0.15.0", "zigpy-zigate==0.9.2", "zigpy-znp==0.8.2" ], "usb": [ { "vid": "10C4", "pid": "EA60", "description": "*2652*", "known_devices": [ "slae.sh cc2652rb stick" ] }, { "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*" } ], "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": 34896, "manufacturer": "_TZE200_locansqn", "model": "TS0601", "name": "_TZE200_locansqn TS0601", "quirk_applied": false, "quirk_class": "zigpy.device.Device", "manufacturer_code": 4417, "power_source": "Battery or Unknown", "lqi": 105, "rssi": null, "last_seen": "2022-08-30T17:47:17", "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": 260, "device_type": "0x0051", "in_clusters": [ "0x0000", "0x0004", "0x0005", "0xef00" ], "out_clusters": [ "0x000a", "0x0019" ] } } }, "active_coordinator": false, "entities": [], "neighbors": [], "endpoint_names": [ { "name": "SMART_PLUG" } ], "user_given_name": null, "device_reg_id": "73b8fc11c3a650e05f33ab10a3246d59", "area_id": null, "cluster_details": { "1": { "device_type": { "name": "SMART_PLUG", "id": 81 }, "profile_id": 260, "in_clusters": { "0x0004": { "endpoint_attribute": "groups", "attributes": {}, "unsupported_attributes": {} }, "0x0005": { "endpoint_attribute": "scenes", "attributes": {}, "unsupported_attributes": {} }, "0xef00": { "endpoint_attribute": null, "attributes": {}, "unsupported_attributes": {} }, "0x0000": { "endpoint_attribute": "basic", "attributes": { "0x0001": { "attribute_name": "app_version", "value": 70 }, "0x0004": { "attribute_name": "manufacturer", "value": "_TZE200_locansqn" }, "0x0005": { "attribute_name": "model", "value": "TS0601" } }, "unsupported_attributes": {} } }, "out_clusters": { "0x0019": { "endpoint_attribute": "ota", "attributes": {}, "unsupported_attributes": {} }, "0x000a": { "endpoint_attribute": "time", "attributes": {}, "unsupported_attributes": {} } } } } } } ```
Additional logs ``` 2022-08-30 17:44:36.357 DEBUG (MainThread) [zigpy.zcl] [0x8850:1:0x0000] Decoded ZCL frame: Basic:Read_Attributes_rsp(status_records=[ReadAttributeRecord(attrid=0x0004, status=, value=TypeValue(type=CharacterString, value='_TZE200_locansqn')), ReadAttributeRecord(attrid=0x0005, status=, value=TypeValue(type=CharacterString, value='TS0601'))]) 2022-08-30 17:44:36.360 INFO (MainThread) [zigpy.device] [0x8850] Read model 'TS0601' and manufacturer '_TZE200_locansqn' from > 2022-08-30 17:44:36.360 INFO (MainThread) [zigpy.device] [0x8850] Discovered basic device information for 2022-08-30 17:44:36.360 DEBUG (MainThread) [zigpy.application] Device is initialized 2022-08-30 17:44:36.361 DEBUG (MainThread) [zigpy.quirks.registry] Checking quirks for _TZE200_locansqn TS0601 (a4:c1:38:47:ad:0e:3e:87) 2022-08-30 17:44:36.382 DEBUG (MainThread) [zigpy.appdb] Error handling '_save_attribute' event with (a4:c1:38:47:ad:0e:3e:87, 1, 0, 4, '_TZE200_locansqn') params: FOREIGN KEY constraint failed ``` ``` 2022-08-30 17:43:57.259 DEBUG (MainThread) [zigpy_znp.api] Received command: ZDO.TCDevInd.Callback(SrcNwk=0x8850, SrcIEEE=a4:c1:38:47:ad:0e:3e:87, ParentNwk=0x4D8B) 2022-08-30 17:43:57.259 INFO (MainThread) [zigpy_znp.zigbee.application] TC device join: ZDO.TCDevInd.Callback(SrcNwk=0x8850, SrcIEEE=a4:c1:38:47:ad:0e:3e:87, ParentNwk=0x4D8B) 2022-08-30 17:43:57.259 DEBUG (MainThread) [zigpy_znp.api] Received command: ZDO.TCDevInd.Callback(SrcNwk=0x8850, SrcIEEE=a4:c1:38:47:ad:0e:3e:87, ParentNwk=0x4D8B) 2022-08-30 17:43:57.259 INFO (MainThread) [zigpy_znp.zigbee.application] TC device join: ZDO.TCDevInd.Callback(SrcNwk=0x8850, SrcIEEE=a4:c1:38:47:ad:0e:3e:87, ParentNwk=0x4D8B) 2022-08-30 17:44:02.261 INFO (MainThread) [zigpy.application] New device 0x8850 (a4:c1:38:47:ad:0e:3e:87) joined the network 2022-08-30 17:44:09.555 DEBUG (MainThread) [zigpy.application] Received frame on uninitialized device from ep 1 to ep 1, cluster 61184: b'\x09\xEF\x11\x00\x06\x40' 2022-08-30 17:44:09.561 DEBUG (MainThread) [zigpy.application] Received frame on uninitialized device from ep 1 to ep 1, cluster 61184: b'\x09\xEF\x11\x00\x06\x40' 2022-08-30 17:44:10.000 DEBUG (MainThread) [zigpy.application] Received frame on uninitialized device from ep 1 to ep 1, cluster 61184: b'\x09\xEF\x11\x00\x06\x40' 2022-08-30 17:44:11.101 DEBUG (MainThread) [zigpy.application] Received frame on uninitialized device from ep 1 to ep 1, cluster 0: b'\x08\xF0\x0A\x01\x00\x20\x46\xE2\xFF\x20\x36\xE4\xFF\x20\x01' 2022-08-30 17:44:12.202 DEBUG (MainThread) [zigpy.application] Received frame on uninitialized device from ep 1 to ep 1, cluster 61184: b'\x09\xF1\x02\x00\x36\x01\x02\x00\x04\x00\x00\x00\xFB' 2022-08-30 17:44:13.310 DEBUG (MainThread) [zigpy.application] Received frame on uninitialized device from ep 1 to ep 1, cluster 61184: b'\x09\xF2\x02\x00\x37\x02\x02\x00\x04\x00\x00\x00\x3B' 2022-08-30 17:44:14.415 DEBUG (MainThread) [zigpy.application] Received frame on uninitialized device from ep 1 to ep 1, cluster 61184: b'\x09\xF3\x24\x38\x00' 2022-08-30 17:44:20.167 DEBUG (MainThread) [zigpy.application] Received frame on uninitialized device from ep 1 to ep 1, cluster 61184: b'\x09\xF4\x02\x00\x39\x0E\x04\x00\x01\x02' 2022-08-30 17:44:30.575 DEBUG (MainThread) [zigpy.application] Received frame on uninitialized device from ep 1 to ep 1, cluster 61184: b'\x09\xF5\x02\x00\x3A\x0F\x04\x00\x01\x02' 2022-08-30 17:44:35.942 DEBUG (MainThread) [zigpy.application] Received frame on uninitialized device from ep 0 to ep 0, cluster 32770: b'@\x00P\x88\x02@\x80A\x11BB\x00\x00*B\x00\x00' 2022-08-30 17:44:36.077 DEBUG (MainThread) [zigpy.application] Received frame on uninitialized device from ep 0 to ep 0, cluster 32773: b'B\x00P\x88\x01\x01' 2022-08-30 17:44:36.238 DEBUG (MainThread) [zigpy.application] Received frame on uninitialized device from ep 0 to ep 0, cluster 32772: b'C\x00P\x88\x14\x01\x04\x01Q\x00\x01\x04\x04\x00\x05\x00\x00\xef\x00\x00\x02\x19\x00\n\x00' 2022-08-30 17:44:36.360 INFO (MainThread) [zigpy.device] [0x8850] Discovered basic device information for 2022-08-30 17:44:36.360 DEBUG (MainThread) [zigpy.application] Device is initialized 2022-08-30 17:44:36.361 DEBUG (MainThread) [zigpy.quirks.registry] Checking quirks for _TZE200_locansqn TS0601 (a4:c1:38:47:ad:0e:3e:87) 2022-08-30 17:44:36.367 DEBUG (MainThread) [homeassistant.components.zha.core.gateway] device - 0x8850:a4:c1:38:47:ad:0e:3e:87 entering async_device_initialized - is_new_join: True 2022-08-30 17:44:36.367 DEBUG (MainThread) [homeassistant.components.zha.core.gateway] device - 0x8850:a4:c1:38:47:ad:0e:3e:87 has joined the ZHA zigbee network 2022-08-30 17:44:36.382 DEBUG (MainThread) [zigpy.appdb] Error handling '_save_attribute' event with (a4:c1:38:47:ad:0e:3e:87, 1, 0, 4, '_TZE200_locansqn') params: FOREIGN KEY constraint failed 2022-08-30 17:44:36.386 DEBUG (MainThread) [zigpy.appdb] Error handling '_save_attribute' event with (a4:c1:38:47:ad:0e:3e:87, 1, 0, 5, 'TS0601') params: FOREIGN KEY constraint failed ```

Additional context can be found e.g. here: https://de.aliexpress.com/item/1005003975168772.html?

tube0013 commented 2 years ago

dupe - see https://github.com/zigpy/zha-device-handlers/issues/1286