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
737 stars 675 forks source link

[Device Support Request] Tuya Smoke detector TS0205 #2607

Closed erkr closed 1 month ago

erkr commented 1 year ago

Problem description

I bought a few very affordable smoke detectors via AliExpress ( https://a.aliexpress.com/_Eue8kl5), They pair fine using ZHA (conbee2) and identify as a TS0205 by _TZ3210_up3pngle: image

Stock, they pair without a quirk and gets recognized as a motion detector, with two IAS sensors (opening and motion detection). I tried to make a custom quirk, based on the smoke detector TS0601. This custom quirk now only changes the the input IasZone.cluster_id by TuyaIasZone what provides the minimum needed:

According to the tuya description, it should be possible to mute the smoke detector via the app, but a mute button/switch for that is still missing.

Also the opening sensor, is not working, presuming that is the tampering switch

Solution description

Please have a look at my custom quirk and if possible, help me to add the mute button.

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": "0x0402", "input_clusters": [ "0x0000", "0x0001", "0x0004", "0x0005", "0x0500" ], "output_clusters": [ "0x0003", "0x0004", "0x0006", "0x000a", "0x0019", "0x1000" ] } }, "manufacturer": "_TZ3210_up3pngle", "model": "TS0205", "class": "ts0205_smoke.TuyaSmokeDetector0205" } ```

Diagnostic information

Diagnostic information ```json { "home_assistant": { "installation_type": "Home Assistant OS", "version": "2023.9.3", "dev": false, "hassio": true, "virtualenv": false, "python_version": "3.11.5", "docker": true, "arch": "aarch64", "timezone": "Europe/Amsterdam", "os_name": "Linux", "os_version": "6.1.21-v8", "supervisor": "2023.09.2", "host_os": "Home Assistant OS 10.5", "docker_version": "23.0.6", "chassis": "embedded", "run_as_root": true }, "custom_components": { "hacs": { "version": "1.33.0", "requirements": [ "aiogithubapi>=22.10.1" ] }, "pyscript": { "version": "1.5.0", "requirements": [ "croniter==1.3.8", "watchdog==2.3.1" ] }, "smartthinq_sensors": { "version": "0.33.3", "requirements": [ "pycountry>=20.7.3", "xmltodict>=0.12.0", "charset_normalizer>=2.0.0" ] }, "zha_toolkit": { "version": "v1.0.0", "requirements": [ "pytz" ] }, "neerslag": { "version": "2022.07.07.1", "requirements": [] } }, "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.4", "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.14" ], "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": 27262, "manufacturer": "_TZ3210_up3pngle", "model": "TS0205", "name": "_TZ3210_up3pngle TS0205", "quirk_applied": true, "quirk_class": "ts0205_smoke.TuyaSmokeDetector0205", "manufacturer_code": 4417, "power_source": "Battery or Unknown", "lqi": 255, "rssi": -47, "last_seen": "2023-09-26T19:42:24", "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": "0x0402", "input_clusters": [ "0x0000", "0x0001", "0x0004", "0x0005", "0x0500" ], "output_clusters": [ "0x0003", "0x0004", "0x0006", "0x000a", "0x0019", "0x1000" ] } }, "manufacturer": "_TZ3210_up3pngle", "model": "TS0205" }, "active_coordinator": false, "entities": [ { "entity_id": "sensor.rookmelder_battery", "name": "_TZ3210_up3pngle TS0205" }, { "entity_id": "binary_sensor.rookmelder_opening", "name": "_TZ3210_up3pngle TS0205" }, { "entity_id": "binary_sensor.rookmelder_smoke", "name": "_TZ3210_up3pngle TS0205" } ], "neighbors": [], "routes": [], "endpoint_names": [ { "name": "IAS_ZONE" } ], "user_given_name": "Rookmelder", "device_reg_id": "0d7e0c1abe500d696f8b4a236f2f0d7b", "area_id": "woonkamer", "cluster_details": { "1": { "device_type": { "name": "IAS_ZONE", "id": 1026 }, "profile_id": 260, "in_clusters": { "0x0000": { "endpoint_attribute": "basic", "attributes": {}, "unsupported_attributes": {} }, "0x0001": { "endpoint_attribute": "power", "attributes": { "0x0021": { "attribute_name": "battery_percentage_remaining", "value": 200 }, "0x0020": { "attribute_name": "battery_voltage", "value": 0 } }, "unsupported_attributes": {} }, "0x0004": { "endpoint_attribute": "groups", "attributes": {}, "unsupported_attributes": {} }, "0x0005": { "endpoint_attribute": "scenes", "attributes": {}, "unsupported_attributes": {} }, "0x0500": { "endpoint_attribute": "ias_zone", "attributes": { "0x0010": { "attribute_name": "cie_addr", "value": [ 161, 89, 7, 255, 255, 46, 33, 0 ] }, "0x0000": { "attribute_name": "zone_state", "value": 1 }, "0x0002": { "attribute_name": "zone_status", "value": 0 }, "0x0001": { "attribute_name": "zone_type", "value": 40 } }, "unsupported_attributes": {} } }, "out_clusters": { "0x0003": { "endpoint_attribute": "identify", "attributes": {}, "unsupported_attributes": {} }, "0x0004": { "endpoint_attribute": "groups", "attributes": {}, "unsupported_attributes": {} }, "0x000a": { "endpoint_attribute": "time", "attributes": {}, "unsupported_attributes": {} }, "0x0006": { "endpoint_attribute": "on_off", "attributes": { "0x0000": { "attribute_name": "on_off", "value": 0 } }, "unsupported_attributes": { "0x0000": { "attribute_name": "on_off" }, "0x4003": { "attribute_name": "start_up_on_off" } } }, "0x0019": { "endpoint_attribute": "ota", "attributes": {}, "unsupported_attributes": {} }, "0x1000": { "endpoint_attribute": "lightlink", "attributes": {}, "unsupported_attributes": {} } } } } } } ```

Logs

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

Custom quirk

Custom quirk ```python """Smoke Sensor.""" import zigpy.profiles.zha from zigpy.quirks import CustomCluster, CustomDevice import zigpy.types as t from zigpy.zcl.clusters.general import Basic, PowerConfiguration, Groups, Identify, OnOff, Ota, Scenes, Time from zigpy.zcl.clusters.security import IasZone from zigpy.zcl.clusters.lightlink import LightLink from zhaquirks import Bus from zhaquirks.const import ( DEVICE_TYPE, ENDPOINTS, INPUT_CLUSTERS, MODELS_INFO, OUTPUT_CLUSTERS, PROFILE_ID, ZONE_STATUS, ZONE_TYPE, ) from zhaquirks.tuya import TuyaManufCluster, TuyaManufClusterAttributes TUYA_SMOKE_DETECTED_ATTR = 0x0401 # [0]/[1] [Detected]/[Clear]! class TuyaSmokeDetectorCluster(TuyaManufClusterAttributes): """Manufacturer Specific Cluster of the TS0601 smoke detector.""" attributes = { TUYA_SMOKE_DETECTED_ATTR: ("smoke_detected", t.uint8_t, True), } def _update_attribute(self, attrid, value): super()._update_attribute(attrid, value) if attrid == TUYA_SMOKE_DETECTED_ATTR: if value == 0: self.endpoint.device.ias_bus.listener_event( "update_zone_status", IasZone.ZoneStatus.Alarm_1 ) else: self.endpoint.device.ias_bus.listener_event("update_zone_status", 0) else: _LOGGER.warning( "[0x%04x:%s:0x%04x] unhandled attribute: 0x%04x", self.endpoint.device.nwk, self.endpoint.endpoint_id, self.cluster_id, attrid, ) class TuyaIasZone(CustomCluster, IasZone): """IAS Zone.""" _CONSTANT_ATTRIBUTES = {ZONE_TYPE: IasZone.ZoneType.Fire_Sensor} def __init__(self, *args, **kwargs): """Init.""" super().__init__(*args, **kwargs) self.endpoint.device.ias_bus.add_listener(self) def update_zone_status(self, value): """Update IAS status.""" super()._update_attribute(ZONE_STATUS, value) class TuyaSmokeDetector0205(CustomDevice): """TS0601 Smoke detector quirk.""" def __init__(self, *args, **kwargs): """Init.""" self.ias_bus = Bus() super().__init__(*args, **kwargs) signature = { MODELS_INFO: [ ("_TZ3210_up3pngle", "TS0205"), ], ENDPOINTS: { 1: { PROFILE_ID: zigpy.profiles.zha.PROFILE_ID, DEVICE_TYPE: zigpy.profiles.zha.DeviceType.IAS_ZONE, INPUT_CLUSTERS: [ Basic.cluster_id, PowerConfiguration.cluster_id, Groups.cluster_id, Scenes.cluster_id, IasZone.cluster_id, ], OUTPUT_CLUSTERS: [ Identify.cluster_id, Groups.cluster_id, Time.cluster_id, OnOff.cluster_id, Ota.cluster_id, LightLink.cluster_id, ], }, }, } replacement = { ENDPOINTS: { 1: { PROFILE_ID: zigpy.profiles.zha.PROFILE_ID, DEVICE_TYPE: zigpy.profiles.zha.DeviceType.IAS_ZONE, INPUT_CLUSTERS: [ Basic.cluster_id, PowerConfiguration.cluster_id, Groups.cluster_id, Scenes.cluster_id, TuyaIasZone, ], OUTPUT_CLUSTERS: [ Identify.cluster_id, Groups.cluster_id, Time.cluster_id, OnOff.cluster_id, Ota.cluster_id, LightLink.cluster_id, ], }, }, } ```

Additional information

No response

Aleksandar896 commented 10 months ago

Also interested in this.

DEVAXTATOR commented 10 months ago

Also interested in this.

Krabalex commented 10 months ago

I also bought this smoke sensor, and for it to work I had to change ZHA to zigbee2mqtt, you can try too

DEVAXTATOR commented 10 months ago

I also bought this smoke sensor, and for it to work I had to change ZHA to zigbee2mqtt, you can try too

change to zigbee2mqqtt?? i have more devices that i can Trow a stick at it about 108 devices 680 entities and about 1000 automations...

erkr commented 10 months ago

I also bought this smoke sensor, and for it to work I had to change ZHA to zigbee2mqtt, you can try too

change to zigbee2mqqtt?? i have more devices that i can Trow a stick at it about 108 devices 680 entities and about 1000 automations...

Too much work ...

pabsi commented 10 months ago

One of the biggest issues for me with this one is to not have the battery level being reported. Only whether smoke has been detected or not. Luckily I know that it battery is running out it'll just start playing a beep every few minutes...but still, would be nice to have this directly on HA.

jmuf commented 10 months ago

Per TUYA Smokedetector spec, both battery status and "tamper" get sent along with the smoke detection attribute:

However, we cannot get battery percentages from this, just "ok" and "low". Not sure how to map this on ZHA ..(fixed "90%" and "5%" ?)

pabsi commented 10 months ago

Per TUYA Smokedetector spec, both battery status and "tamper" get sent along with the smoke detection attribute:

* Alarm1 + bit (2): tamper alarm.

* Alarm1 + bit (3): low voltage alarm.
  and would need to be handled as such in the above quirk (i.e route to/update the corresponding generic attribute)

However, we cannot get battery percentages from this, just "ok" and "low". Not sure how to map this on ZHA ..(fixed "90%" and "5%" ?)

Weird, as per https://developer.tuya.com/en/docs/iot/tuya-zigbee-smoke-sensor-access-standard?id=K9ik6zvm2tg0l#subtitle-7-Power%20configuration the device should report the exact battery level?

Sorry, perhaps my lack of knowledge about Zigbee and clusters and attributes is making this harder than it should.

Thanks

harrlih commented 9 months ago

Yes I also would like to have this integrated... I thought I would buy "_TZE204_ntcy3xu1" but had to learn I received "_TZ3210_up3pngle" instead (same casing, different content). Quirk from here: https://github.com/zigpy/zha-device-handlers/issues/1838 which perfectly supports _TZE204_ntcy3xu1 does not work, when I add _TZ3210_up3pngle to the list. Well I don't know if this is allowed, as the base type? seems to be different (not sure what TS0205 vs TS0601 really means...)

renekuehl commented 9 months ago

Problem description

I bought a few very affordable smoke detectors via AliExpress ( https://a.aliexpress.com/_Eue8kl5), They pair fine using ZHA (conbee2) and identify as a TS0205 by _TZ3210_up3pngle: image

Stock, they pair without a quirk and gets recognized as a motion detector, with two IAS sensors (opening and motion detection). I tried to make a custom quirk, based on the smoke detector TS0601. This custom quirk now only changes the the input IasZone.cluster_id by TuyaIasZone what provides the minimum needed:

* Recognized as a smoke detector.

* When I press the test button, the detection is received correctly.

According to the tuya description, it should be possible to mute the smoke detector via the app, but a mute button/switch for that is still missing.

Also the opening sensor, is not working, presuming that is the tampering switch

Solution description

Please have a look at my custom quirk and if possible, help me to add the mute button.

Screenshots/Video

Screenshots/Video

Device signature

Device signature

Diagnostic information

Diagnostic information

Logs

Logs

Custom quirk

Custom quirk

Additional information

No response

Just wanted to say "Thank you for the custom quirk". I received two of these for testing today and I was seeing that they were identified as Motion Sensors under ZHA. Thanks to your Code they are now seen as Smoke Detectors. Again a big Thank you ;)

Bildschirmfoto vom 2023-12-29 16-01-25

jmuf commented 9 months ago

Hm, I am not convinced the current "quirk" does much (except possibly to change the device type to ZoneType.Fire_Sensor). In particular, the part that would "route" unknown attributes

class TuyaSmokeDetectorCluster(TuyaManufClusterAttributes):
    """Manufacturer Specific Cluster of the TS0601 smoke detector."""
    attributes = {
        TUYA_SMOKE_DETECTED_ATTR: ("smoke_detected", t.uint8_t, True),
    }
    def _update_attribute(self, attrid, value):
[..]

doesn't seem to be triggered at all, since the device already reports itself as a IasZone (and not a TuyaManufCluster)

  INPUT_CLUSTERS: [
[..]
                    IasZone.cluster_id,

Instead, we directly get updated attributes into our replacement class. With a few more debug statements:

2023-12-29 17:29:05.087 WARNING (MainThread) [ts0205_smoke] [0xbc9a:1:0x0500] smoke quirk TuyaIasZone received _update_attribute: 0x0002=0x0004
2023-12-29 17:29:08.523 WARNING (MainThread) [ts0205_smoke] [0xbc9a:1:0x0500] smoke quirk TuyaIasZone received _update_attribute: 0x0002=0x0000
2023-12-29 17:30:31.359 WARNING (MainThread) [ts0205_smoke] [0xbc9a:1:0x0500] smoke quirk TuyaIasZone received _update_attribute: 0x0001=0x0028

these would correspond to "Zone status" (0x2) becoming "tamper alarm" 0x4 (i.e me taking the thing off the wallmount), "normal" 0x0" (put it back..), and then "Zone type" (0x1) is announced as "Fire_Sensor" (0x0028).

Derchristopher12 commented 9 months ago

Problem description

I bought a few very affordable smoke detectors via AliExpress ( https://a.aliexpress.com/_Eue8kl5), They pair fine using ZHA (conbee2) and identify as a TS0205 by _TZ3210_up3pngle: image Stock, they pair without a quirk and gets recognized as a motion detector, with two IAS sensors (opening and motion detection). I tried to make a custom quirk, based on the smoke detector TS0601. This custom quirk now only changes the the input IasZone.cluster_id by TuyaIasZone what provides the minimum needed:

* Recognized as a smoke detector.

* When I press the test button, the detection is received correctly.

According to the tuya description, it should be possible to mute the smoke detector via the app, but a mute button/switch for that is still missing. Also the opening sensor, is not working, presuming that is the tampering switch

Solution description

Please have a look at my custom quirk and if possible, help me to add the mute button.

Screenshots/Video

Screenshots/Video

Device signature

Device signature

Diagnostic information

Diagnostic information

Logs

Logs

Custom quirk

Custom quirk

Additional information

No response

Just wanted to say "Thank you for the custom quirk". I received two of these for testing today and I was seeing that they were identified as Motion Sensors under ZHA. Thanks to your Code they are now seen as Smoke Detectors. Again a big Thank you ;)

Bildschirmfoto vom 2023-12-29 16-01-25

can you send or link the code from the ZHA Quirk? No one i tried worked for me. Thank you :)

renekuehl commented 9 months ago

Problem description

I bought a few very affordable smoke detectors via AliExpress ( https://a.aliexpress.com/_Eue8kl5), They pair fine using ZHA (conbee2) and identify as a TS0205 by _TZ3210_up3pngle: image Stock, they pair without a quirk and gets recognized as a motion detector, with two IAS sensors (opening and motion detection). I tried to make a custom quirk, based on the smoke detector TS0601. This custom quirk now only changes the the input IasZone.cluster_id by TuyaIasZone what provides the minimum needed:

* Recognized as a smoke detector.

* When I press the test button, the detection is received correctly.

According to the tuya description, it should be possible to mute the smoke detector via the app, but a mute button/switch for that is still missing. Also the opening sensor, is not working, presuming that is the tampering switch

Solution description

Please have a look at my custom quirk and if possible, help me to add the mute button.

Screenshots/Video

Screenshots/Video

Device signature

Device signature

Diagnostic information

Diagnostic information

Logs

Logs

Custom quirk

Custom quirk

Additional information

No response

Just wanted to say "Thank you for the custom quirk". I received two of these for testing today and I was seeing that they were identified as Motion Sensors under ZHA. Thanks to your Code they are now seen as Smoke Detectors. Again a big Thank you ;) Bildschirmfoto vom 2023-12-29 16-01-25

can you send or link the code from the ZHA Quirk? No one i tried worked for me. Thank you :)

The Code is available under "Custom Quirk" in the first Post ;) That's the Code I used ...

eyk107 commented 9 months ago

Hi, thank you for your work. Silly question: Do I need to delete and add the devices again? I added your quirk and reboot HA but the SD is still available as motion detector.

erkr commented 9 months ago

Please check if the quirk got loaded for the SD (In the device info): image If that is the case. Re-pairing can help

kruegertom commented 9 months ago

btw: is there meanwhile any solution for the other IAS-ZoneStatus attributes like Tamper or Battery?

Thorsten1982 commented 8 months ago

I would like to use the custom quirk and have understood most of what needs to be done. It's just not clear to me what the file with the custom quirk should be called, I think this doesn't matter so that it can be assigned to the device?

eyk107 commented 8 months ago

the name doesn't matter in my opinion. You only have to add the following line to your configuration: zha: custom_quirks_path: config/custom_zha_quirks/

eyk107 commented 8 months ago

@erkr thank you very much, works great. One last question: Why is the battery level not listed in the sensors overview but in Diagnostics? grafik

erkr commented 8 months ago

Why is the battery level not listed in the sensors overview but in Diagnostics?

ZHA always puts battery and identity under diagnostics. Nice it works for you!

Thorsten1982 commented 7 months ago

Somehow it doesn't work, I don't know why. Have

I created a directory and inserted a file there with and the Customk Quirk code from the post.

I added the following code to the Configuartion.yaml

zha: zigpy_config: ota: otau_directory: /config/zigpy_ota ikea_provider: true inovelli_provider: true ledvance_provider: true salus_provider: true sonoff_provider: true thirdreality_provider: true custom_quirks_path: /config/zha_quirks/

I then re-added the device but the custom quirk is not loaded. Screenshot 2024-02-11 125030

Screenshot 2024-02-11 124747 Screenshot 2024-02-11 124812

Screenshot 2024-02-11 125143

erkr commented 7 months ago

Should not make a difference, but I explicitly added enable_quirks: true

eyk107 commented 7 months ago

I have to use the following to get it to work: custom_quirks_path: config/zha_quirks/

erkr commented 7 months ago

I have a slash before config. That works fine. Don’t forget to restart ha when you make these changes

MikeInMaine commented 7 months ago

Seems to work. Thanks!

Thorsten1982 commented 7 months ago

Strange, I've tried all the tips now, but it just doesn't work.

erkr commented 7 months ago

tips

Your configuration looks fine to me. You can try to remove and re- pair the smoke detector.

Thorsten1982 commented 7 months ago

I've already tried it several times

Eric Kreuwels @.***> schrieb am Di., 13. Feb. 2024, 09:18:

tips

Your configuration looks fine to me. You can try to remove and re- pair the smoke detector.

— Reply to this email directly, view it on GitHub https://github.com/zigpy/zha-device-handlers/issues/2607#issuecomment-1940704047, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIEABKKMAF7A47BEAJR7B3YTMOWZAVCNFSM6AAAAAA5IDZUQGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNBQG4YDIMBUG4 . You are receiving this because you commented.Message ID: @.***>

erkr commented 7 months ago

@Thorsten1982

I'm just a user running out of ideas ;-)

Thorsten1982 commented 7 months ago

I have found this information in the log:

2024-02-13 06:36:44.985 DEBUG (MainThread) [zigpy.quirks.registry] Checking quirks for _TZ3210_up3pngle TS0205 (a4:c1:38:72:4b:be:8f:ca) 2024-02-13 06:36:44.985 DEBUG (MainThread) [zigpy.quirks.registry] Considering <class 'zhaquirks.xbee.xbee_io.XBeeSensor'> 2024-02-13 06:36:44.985 DEBUG (MainThread) [zigpy.quirks.registry] Fail because endpoint list mismatch: {232, 230} {1} 2024-02-13 06:36:44.985 DEBUG (MainThread) [zigpy.quirks.registry] Considering <class 'zhaquirks.xbee.xbee3_io.XBee3Sensor'> 2024-02-13 06:36:44.985 DEBUG (MainThread) [zigpy.quirks.registry] Fail because endpoint list mismatch: {232, 230} {1} 2024-02-13 06:36:44.985 DEBUG (MainThread) [zigpy.quirks.registry] Considering <class 'zhaquirks.tuya.ts0201.MoesTemperatureHumidtySensorWithScreen'> 2024-02-13 06:36:44.986 DEBUG (MainThread) [zigpy.quirks.registry] Fail because device_type mismatch on at least one endpoint 2024-02-13 06:36:44.986 DEBUG (MainThread) [zigpy.quirks.registry] Considering <class 'zhaquirks.smartthings.tag_v4.SmartThingsTagV4'> 2024-02-13 06:36:44.986 DEBUG (MainThread) [zigpy.quirks.registry] Fail because device_type mismatch on at least one endpoint 2024-02-13 06:36:44.986 DEBUG (MainThread) [zigpy.quirks.registry] Considering <class 'zhaquirks.smartthings.multi.SmartthingsMultiPurposeSensor'> 2024-02-13 06:36:44.986 DEBUG (MainThread) [zigpy.quirks.registry] Fail because input cluster mismatch on at least one endpoint 2024-02-13 06:36:44.986 DEBUG (MainThread) [zigpy.quirks.registry] Considering <class 'zhaquirks.netvox.z308e3ed.Z308E3ED'> 2024-02-13 06:36:44.986 DEBUG (MainThread) [zigpy.quirks.registry] Fail because input cluster mismatch on at least one endpoint 2024-02-13 06:36:44.986 DEBUG (MainThread) [zigpy.quirks.registry] Considering <class 'zhaquirks.gledopto.soposhgu10.SoposhGU10'> 2024-02-13 06:36:44.986 DEBUG (MainThread) [zigpy.quirks.registry] Fail because endpoint list mismatch: {11, 13} {1}

Am Di., 13. Feb. 2024 um 10:12 Uhr schrieb Eric Kreuwels < @.***>:

@Thorsten1982 https://github.com/Thorsten1982

  • Nothing in your log file?
  • Is the quirk file in the right format (utf-8 only LF, no CR)?
  • If you make a deliberate syntacs error in the quirk file, you should see errors logged. If that happens you know your config to load custom quirks is ok.

I'm just a user running out of ideas ;-)

— Reply to this email directly, view it on GitHub https://github.com/zigpy/zha-device-handlers/issues/2607#issuecomment-1940849417, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIEABI7I2LPRODF7I2YGULYTMU7FAVCNFSM6AAAAAA5IDZUQGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNBQHA2DSNBRG4 . You are receiving this because you were mentioned.Message ID: @.***>

erkr commented 7 months ago

That looks like the matching of available quirks against devices. I don't see the custom quirk class TuyaSmokeDetector0205 mentioned. So no evidence your custom quirk was loaded. Try step 3: just temporary remove e.g the model part of the quirk. That should result in an error in your log during startup if custom quirks are loaded.

DEVAXTATOR commented 7 months ago

im just putting my two cents first in configuration.yaml you have to put zha:

On Tue, Feb 13, 2024 at 10:22 AM Eric Kreuwels @.***> wrote:

That looks like the matching of available quirks against devices. I don't see the custom quirk class TuyaSmokeDetector0205 mentioned. So no evidence your custom quirk was loaded.

— Reply to this email directly, view it on GitHub https://github.com/zigpy/zha-device-handlers/issues/2607#issuecomment-1941093056, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOI7KSST3BPGKSFJ76H45FTYTM5G7AVCNFSM6AAAAAA5IDZUQGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNBRGA4TGMBVGY . You are receiving this because you commented.Message ID: @.***>

MikeInMaine commented 7 months ago

In my HA docker install the leading "/" needs to be left off of " custom_quirks_path: /config/custom_zha_quirks/", hence it reads " custom_quirks_path: config/custom_zha_quirks/. I expect this is because I haven't done the necessary mapping between the docker instance and the OS. BUt I prefer the config path to be inside the docker home directory.

On Tue, Feb 13, 2024 at 3:02 PM DEVAXTATOR @.***> wrote:

im just putting my two cents first in configuration.yaml you have to put zha:

  • enable_quirks: true*
  • custom_quirks_path: /config/custom_zha_quirks/* then create the folder and create the file [image: image.png] the code is in this thread then reboot ha then delete and add the device again [image: image.png] boom shakalaka!!

On Tue, Feb 13, 2024 at 10:22 AM Eric Kreuwels @.***> wrote:

That looks like the matching of available quirks against devices. I don't see the custom quirk class TuyaSmokeDetector0205 mentioned. So no evidence your custom quirk was loaded.

— Reply to this email directly, view it on GitHub < https://github.com/zigpy/zha-device-handlers/issues/2607#issuecomment-1941093056>,

or unsubscribe < https://github.com/notifications/unsubscribe-auth/AOI7KSST3BPGKSFJ76H45FTYTM5G7AVCNFSM6AAAAAA5IDZUQGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNBRGA4TGMBVGY>

. You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/zigpy/zha-device-handlers/issues/2607#issuecomment-1942337918, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABAU7PB5ITDAITWJWNB26V3YTPBGXAVCNFSM6AAAAAA5IDZUQGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNBSGMZTOOJRHA . You are receiving this because you commented.Message ID: @.***>

Thorsten1982 commented 7 months ago

Thanks for the many tips, it works now. I recreated the Custom Quirk file again. Now it's working

cdalexndr commented 7 months ago

Opened PR https://github.com/zigpy/zha-device-handlers/pull/2991

github-actions[bot] commented 1 month 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.