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
696 stars 641 forks source link

[Device Support Request] Siren from Heiman #2598

Closed mbo18 closed 3 months ago

mbo18 commented 10 months ago

Problem description

I'd like to reopen https://github.com/zigpy/zha-device-handlers/issues/922 in order to finish my quirk (which I lost but recreated) to add support for Heiman sirens.

What is missing:

From the old issue:

Z2M converter for informations: https://github.com/Koenkk/zigbee-herdsman-converters/blob/1f73585e16543af694ef742033ef9bb63ef18594/src/devices/heiman.ts#L263

Solution description

Since the old issue is 2 years old, maybe it will be easier to add these settings/info? For example for the battery, do I still have to modify the node descriptor to change this device to a battery powered one?

Thanks

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=4619, 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=False, *is_full_function_device=True, *is_mains_powered=True, *is_receiver_on_when_idle=True, *is_router=True, *is_security_capable=False)", "endpoints": { "1": { "profile_id": "0x0104", "device_type": "0x0403", "input_clusters": [ "0x0000", "0x0001", "0x0003", "0x0500", "0x0502", "0x0b05" ], "output_clusters": [ "0x0004", "0x0019" ] }, "242": { "profile_id": "0xa1e0", "device_type": "0x0061", "input_clusters": [], "output_clusters": [ "0x0021" ] } }, "manufacturer": "_TYZB01_8scntis1", "model": "TS0216", "class": "siren.HeimanSiren" } ```

Diagnostic information

Diagnostic information ```json { "home_assistant": { "installation_type": "Home Assistant OS", "version": "2023.9.2", "dev": false, "hassio": true, "virtualenv": false, "python_version": "3.11.5", "docker": true, "arch": "x86_64", "timezone": "Europe/Paris", "os_name": "Linux", "os_version": "6.1.45", "supervisor": "2023.09.2", "host_os": "Home Assistant OS 10.5", "docker_version": "23.0.6", "chassis": "embedded", "run_as_root": true }, "custom_components": { "landroid_cloud": { "version": "3.0.6", "requirements": [ "pyworxcloud==3.1.15" ] } }, "integration_manifest": { "domain": "zha", "name": "Zigbee Home Automation", "after_dependencies": [ "onboarding", "usb" ], "codeowners": [ "@dmulcahey", "@adminiuga", "@puddly" ], "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.36.3", "pyserial==3.5", "pyserial-asyncio==0.6", "zha-quirks==0.0.103", "zigpy-deconz==0.21.1", "zigpy==0.57.1", "zigpy-xbee==0.18.2", "zigpy-zigate==0.11.0", "zigpy-znp==0.11.4", "universal-silabs-flasher==0.0.13" ], "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" ] } ], "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": 49764, "manufacturer": "_TYZB01_8scntis1", "model": "TS0216", "name": "_TYZB01_8scntis1 TS0216", "quirk_applied": true, "quirk_class": "siren.HeimanSiren", "manufacturer_code": 4619, "power_source": "Mains", "lqi": 255, "rssi": -76, "last_seen": "2023-09-19T16:14:53", "available": true, "device_type": "Router", "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=4619, 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=False, *is_full_function_device=True, *is_mains_powered=True, *is_receiver_on_when_idle=True, *is_router=True, *is_security_capable=False)", "endpoints": { "1": { "profile_id": "0x0104", "device_type": "0x0403", "input_clusters": [ "0x0000", "0x0001", "0x0003", "0x0500", "0x0502", "0x0b05" ], "output_clusters": [ "0x0004", "0x0019" ] }, "242": { "profile_id": "0xa1e0", "device_type": "0x0061", "input_clusters": [], "output_clusters": [ "0x0021" ] } }, "manufacturer": "_TYZB01_8scntis1", "model": "TS0216" }, "active_coordinator": false, "entities": [ { "entity_id": "binary_sensor.sirene_iaszone", "name": "_TYZB01_8scntis1 TS0216" }, { "entity_id": "button.sirene_identify", "name": "_TYZB01_8scntis1 TS0216" }, { "entity_id": "siren.siren_entree", "name": "_TYZB01_8scntis1 TS0216" } ], "neighbors": [ { "device_type": "Coordinator", "rx_on_when_idle": "On", "relationship": "Sibling", "extended_pan_id": "**REDACTED**", "ieee": "**REDACTED**", "nwk": "0x0000", "permit_joining": "Unknown", "depth": "0", "lqi": "191" }, { "device_type": "Router", "rx_on_when_idle": "On", "relationship": "Sibling", "extended_pan_id": "**REDACTED**", "ieee": "**REDACTED**", "nwk": "0x0C84", "permit_joining": "Unknown", "depth": "15", "lqi": "35" }, { "device_type": "Router", "rx_on_when_idle": "On", "relationship": "Sibling", "extended_pan_id": "**REDACTED**", "ieee": "**REDACTED**", "nwk": "0x337A", "permit_joining": "Unknown", "depth": "15", "lqi": "92" }, { "device_type": "Router", "rx_on_when_idle": "On", "relationship": "Sibling", "extended_pan_id": "**REDACTED**", "ieee": "**REDACTED**", "nwk": "0x3D6B", "permit_joining": "Unknown", "depth": "15", "lqi": "70" }, { "device_type": "Router", "rx_on_when_idle": "On", "relationship": "Sibling", "extended_pan_id": "**REDACTED**", "ieee": "**REDACTED**", "nwk": "0x6E28", "permit_joining": "Unknown", "depth": "15", "lqi": "47" }, { "device_type": "Router", "rx_on_when_idle": "On", "relationship": "Sibling", "extended_pan_id": "**REDACTED**", "ieee": "**REDACTED**", "nwk": "0x7EEB", "permit_joining": "Unknown", "depth": "15", "lqi": "115" }, { "device_type": "Router", "rx_on_when_idle": "On", "relationship": "Sibling", "extended_pan_id": "**REDACTED**", "ieee": "**REDACTED**", "nwk": "0x8C32", "permit_joining": "Unknown", "depth": "15", "lqi": "64" }, { "device_type": "Router", "rx_on_when_idle": "On", "relationship": "Sibling", "extended_pan_id": "**REDACTED**", "ieee": "**REDACTED**", "nwk": "0x8C9F", "permit_joining": "Unknown", "depth": "15", "lqi": "41" }, { "device_type": "Router", "rx_on_when_idle": "On", "relationship": "Parent", "extended_pan_id": "**REDACTED**", "ieee": "**REDACTED**", "nwk": "0xA244", "permit_joining": "Unknown", "depth": "15", "lqi": "156" } ], "routes": [ { "dest_nwk": "0x0000", "route_status": "Active", "memory_constrained": false, "many_to_one": true, "route_record_required": false, "next_hop": "0x0000" }, { "dest_nwk": "0x8C32", "route_status": "Active", "memory_constrained": false, "many_to_one": false, "route_record_required": false, "next_hop": "0xA244" } ], "endpoint_names": [ { "name": "IAS_WARNING_DEVICE" }, { "name": "PROXY_BASIC" } ], "user_given_name": "Sir\u00e8ne", "device_reg_id": "18e3838705d2e058ef87dc0e16adc06f", "area_id": "entree", "cluster_details": { "1": { "device_type": { "name": "IAS_WARNING_DEVICE", "id": 1027 }, "profile_id": 260, "in_clusters": { "0x0000": { "endpoint_attribute": "basic", "attributes": { "0x0004": { "attribute_name": "manufacturer", "value": "_TYZB01_8scntis1" }, "0x0005": { "attribute_name": "model", "value": "TS0216" } }, "unsupported_attributes": {} }, "0x0001": { "endpoint_attribute": "power", "attributes": { "0x0021": { "attribute_name": "battery_percentage_remaining", "value": 200 }, "0x0020": { "attribute_name": "battery_voltage", "value": 42 } }, "unsupported_attributes": { "0x0000": { "attribute_name": "mains_voltage" }, "0x0031": { "attribute_name": "battery_size" }, "0x0033": { "attribute_name": "battery_quantity" }, "0xfffe": { "attribute_name": "reporting_status" } } }, "0x0003": { "endpoint_attribute": "identify", "attributes": {}, "unsupported_attributes": {} }, "0x0500": { "endpoint_attribute": "ias_zone", "attributes": { "0x0010": { "attribute_name": "cie_addr", "value": "00:21:2e:ff:ff:05:09:1d" }, "0x0000": { "attribute_name": "zone_state", "value": 0 }, "0x0002": { "attribute_name": "zone_status", "value": 16 }, "0x0001": { "attribute_name": "zone_type", "value": 549 } }, "unsupported_attributes": {} }, "0x0502": { "endpoint_attribute": "ias_wd", "attributes": {}, "unsupported_attributes": {} }, "0x0b05": { "endpoint_attribute": "diagnostic", "attributes": {}, "unsupported_attributes": {} } }, "out_clusters": { "0x0004": { "endpoint_attribute": "groups", "attributes": {}, "unsupported_attributes": {} }, "0x0019": { "endpoint_attribute": "ota", "attributes": {}, "unsupported_attributes": {} } } }, "242": { "device_type": { "name": "PROXY_BASIC", "id": 97 }, "profile_id": 41440, "in_clusters": {}, "out_clusters": { "0x0021": { "endpoint_attribute": "green_power", "attributes": {}, "unsupported_attributes": {} } } } } } } ```

Logs

Logs [home-assistant_2023-09-18T19-48-48.883Z copie.log](https://github.com/zigpy/zha-device-handlers/files/12662573/home-assistant_2023-09-18T19-48-48.883Z.copie.log)

Custom quirk

Custom quirk ```python """Siren.""" from zigpy.profiles import zgp, zha from zigpy.quirks import CustomDevice from zigpy.zcl.clusters.general import ( Basic, GreenPowerProxy, Groups, Identify, Ota, PowerConfiguration, ) from zigpy.zcl.clusters.homeautomation import Diagnostic from zigpy.zcl.clusters.security import IasWd, IasZone import zigpy.zdo.types from zhaquirks.const import ( DEVICE_TYPE, ENDPOINTS, INPUT_CLUSTERS, MODELS_INFO, NODE_DESCRIPTOR, OUTPUT_CLUSTERS, PROFILE_ID, ) from zhaquirks.heiman import HEIMAN class HeimanSiren(CustomDevice): """Heiman siren quirk.""" # NodeDescriptor( # logical_type=, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, # frequency_band=, mac_capability_flags=, # manufacturer_code=4619, 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=False, *is_full_function_device=True, # *is_mains_powered=True, *is_receiver_on_when_idle=True, *is_router=True, *is_security_capable=False) signature = { MODELS_INFO: [ ("HEIMAN", "WarningDevice"), ("HEIMAN", "WarningDevice-EF-3.0"), ("_TYZB01_8scntis1", "TS0216"), ("_TYZB01_4obovpbi", "TS0216"), ], ENDPOINTS: { # endpoint=1, profile=260, device_type=1027, device_version=0, # input_clusters=[0, 1, 3, 1280, 1282, 2821], # output_clusters=[4, 25] 1: { PROFILE_ID: zha.PROFILE_ID, DEVICE_TYPE: zha.DeviceType.IAS_WARNING_DEVICE, INPUT_CLUSTERS: [ Basic.cluster_id, PowerConfiguration.cluster_id, Identify.cluster_id, IasZone.cluster_id, IasWd.cluster_id, Diagnostic.cluster_id, ], OUTPUT_CLUSTERS: [ Groups.cluster_id, Ota.cluster_id, ], }, # endpoint=242, profile=41440, device_type=97, device_version=0, # input_clusters=[], # output_clusters=[33] 242: { PROFILE_ID: zgp.PROFILE_ID, DEVICE_TYPE: zgp.DeviceType.PROXY_BASIC, INPUT_CLUSTERS: [], OUTPUT_CLUSTERS: [GreenPowerProxy.cluster_id], }, }, } replacement = { ENDPOINTS: { 1: { PROFILE_ID: zha.PROFILE_ID, DEVICE_TYPE: zha.DeviceType.IAS_WARNING_DEVICE, INPUT_CLUSTERS: [ Basic.cluster_id, PowerConfiguration.cluster_id, Identify.cluster_id, IasZone.cluster_id, IasWd.cluster_id, Diagnostic.cluster_id, ], OUTPUT_CLUSTERS: [ Groups.cluster_id, Ota.cluster_id, ], }, 242: { PROFILE_ID: zgp.PROFILE_ID, DEVICE_TYPE: zgp.DeviceType.PROXY_BASIC, INPUT_CLUSTERS: [], OUTPUT_CLUSTERS: [GreenPowerProxy.cluster_id], }, }, } ```

Additional information

No response

ziporah commented 10 months ago

@mbo18 can you integrate all the Heiman devices from the z2m converter link ? I have bought ZHS1SA smoke detectors, and I would love to be able to activate the siren from homeassistant so I can test if the devices are fully functional and trigger all sirens if one of them detects fire. Right now I can't activete the siren. They also seem to be going offline after a few hours

github-actions[bot] commented 4 months ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.