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
719 stars 666 forks source link

[BUG] SNZB-02 Reports Humidity regularly but never reports a new temperature value #2588

Closed cvocvo closed 11 months ago

cvocvo commented 12 months ago

Bug description

I have two SNZB-02 sensors and both of them regularly report humidity values, however, both of them seem to be 'stuck' with the same temperature value. They never update the value; one is indoors and one is in my shed as an experiment. At minimum the shed temperature should be regularly fluctuating, so I'll post data about that below.

Steps to reproduce

  1. I added the devices and saw initial temperature and humidity values
  2. After a while I can see changes in humidity are reported but no changes in temperature ever seem to be reported.

Expected behavior

Both temperature and humidity values to be regularly reported.

Screenshots/Video

Screenshots/Video ![image](https://github.com/zigpy/zha-device-handlers/assets/355711/24812be1-2507-4ffb-b211-ae365e5791ca) ![image](https://github.com/zigpy/zha-device-handlers/assets/355711/32a57d81-f3a8-45ed-aeaa-e128acf4b48b)

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=0, maximum_buffer_size=80, maximum_incoming_transfer_size=160, server_mask=0, maximum_outgoing_transfer_size=160, 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": "0x0302", "input_clusters": [ "0x0000", "0x0001", "0x0003", "0x0402", "0x0405" ], "output_clusters": [ "0x0003" ] } }, "manufacturer": "eWeLink", "model": "TH01", "class": "zigpy.device.Device" } ```

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": "America/Chicago", "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": "vm", "run_as_root": true }, "custom_components": { "dyson_cloud": { "version": "0.15.0", "requirements": [ "libdyson==0.8.7" ] }, "owlet": { "version": "1.0.0", "requirements": [ "PyJWT", "gcloud", "sseclient", "requests_toolbelt" ] }, "deepstack_face": { "version": "0.9.0", "requirements": [ "pillow", "deepstack-python==0.8" ] }, "weatheralerts": { "version": "0.1.5", "requirements": [] }, "dlink_hnap": { "version": "1.0.0", "requirements": [] }, "hacs": { "version": "1.32.1", "requirements": [ "aiogithubapi>=22.10.1" ] }, "dyson_local": { "version": "0.16.4-4", "requirements": [ "libdyson==0.8.11" ] }, "babybuddy": { "version": "v0.0.0", "requirements": [] }, "zha_toolkit": { "version": "v0.9.9", "requirements": [ "pytz" ] }, "simple_wyze_vac": { "version": "1.8.8", "requirements": [ "https://github.com/romedtino/wyze-sdk/archive/refs/tags/10.4.1.zip#wyze-sdk==10.4.1" ] }, "icloud3": { "version": "2.4.6", "requirements": [] }, "frigate": { "version": "4.0.0", "requirements": [ "pytz==2022.7" ] } }, "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": 29821, "manufacturer": "eWeLink", "model": "TH01", "name": "eWeLink TH01", "quirk_applied": false, "quirk_class": "zigpy.device.Device", "manufacturer_code": 0, "power_source": "Battery or Unknown", "lqi": 148, "rssi": -63, "last_seen": "2023-09-16T11:46:10", "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=0, maximum_buffer_size=80, maximum_incoming_transfer_size=160, server_mask=0, maximum_outgoing_transfer_size=160, 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": "0x0302", "input_clusters": [ "0x0000", "0x0001", "0x0003", "0x0402", "0x0405" ], "output_clusters": [ "0x0003" ] } }, "manufacturer": "eWeLink", "model": "TH01" }, "active_coordinator": false, "entities": [ { "entity_id": "button.zigbee_shed_temp_identify", "name": "eWeLink TH01" }, { "entity_id": "sensor.zigbee_shed_temp_battery", "name": "eWeLink TH01" }, { "entity_id": "sensor.zigbee_shed_temp_temperature", "name": "eWeLink TH01" }, { "entity_id": "sensor.zigbee_shed_temp_humidity", "name": "eWeLink TH01" } ], "neighbors": [], "routes": [], "endpoint_names": [ { "name": "TEMPERATURE_SENSOR" } ], "user_given_name": "Zigbee Shed Temp", "device_reg_id": "f38c17b0e3b698928be0094bd34de0b4", "area_id": "shed", "cluster_details": { "1": { "device_type": { "name": "TEMPERATURE_SENSOR", "id": 770 }, "profile_id": 260, "in_clusters": { "0x0000": { "endpoint_attribute": "basic", "attributes": { "0x0004": { "attribute_name": "manufacturer", "value": "eWeLink" }, "0x0005": { "attribute_name": "model", "value": "TH01" } }, "unsupported_attributes": {} }, "0x0003": { "endpoint_attribute": "identify", "attributes": {}, "unsupported_attributes": {} }, "0x0402": { "endpoint_attribute": "temperature", "attributes": { "0x0000": { "attribute_name": "measured_value", "value": 2591 } }, "unsupported_attributes": {} }, "0x0405": { "endpoint_attribute": "humidity", "attributes": { "0x0000": { "attribute_name": "measured_value", "value": 5175 } }, "unsupported_attributes": {} }, "0x0001": { "endpoint_attribute": "power", "attributes": { "0x0021": { "attribute_name": "battery_percentage_remaining", "value": 200 }, "0x0020": { "attribute_name": "battery_voltage", "value": 31 } }, "unsupported_attributes": { "0x0031": { "attribute_name": "battery_size" }, "0x0033": { "attribute_name": "battery_quantity" } } } }, "out_clusters": { "0x0003": { "endpoint_attribute": "identify", "attributes": {}, "unsupported_attributes": {} } } } } } } ```

Logs

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

My logs are 200MB so can't paste them here easily; not sure how to shrink them.

Additional information

No response

TheJulianJES commented 12 months ago

Perhaps the device started to sleep during the pairing process, thus missing the setup of the attribute reporting for the temperature value.

If the device has a button, you can you try to "reconfigure the device" (shown on the HA device page for that sensor). Whilst clicking "start reconfiguration", you can try to press the button (likely a reset button) once. Depending on the sensors firmware, that might cause the sensor to wake up (thus receiving the attribute reporting setup requests).

Otherwise, you'll likely have to allow joins again (click "Add Device") and then reset the sensor, so it can join the network again and hopefully finish configuration correctly that time. If it still doesn't finish, logs would be helpful. You can paste the section from the time when you joined the device (it will show something like "Device ... joined the network".

Also, you could try to reposition your coordinator. Maybe there's some interference. Make sure it's on a USB extension cable, away form metal, WiFi access points, bluetooth devices, ... Regarding this, can you also attach the diagnostic information from the ZHA integration itself? It can be downloaded on the integrations page.

cvocvo commented 12 months ago

(The data below is not from the same device in my shed, but has the same problem and is the same model (SNZB-02) of device. Also of note, I do have 3 of these that are completely fine. It's sort of weird two of them won't send temperature data but send humidity data fine.)

Reconfiguration on my 2nd SNZB-02 fails; I don't think the button wakes it up and I tried to insert the battery and then hit reconfigure but no luck. image

However, I grabbed the logs from re-adding the device and this seems to be the problem: [0xB4F1:1:0x0003]: Configuring cluster attribute reporting Error handling '_save_attribute' event with (00:12:4b:00:25:16:50:3a, 1, 0, 5, 'TH01', datetime.datetime(2023, 9, 17, 0, 46, 8, 994195, tzinfo=datetime.timezone.utc)) params: FOREIGN KEY constraint failed [0xB4F1:1:0x0402]: Failed to bind 'temperature' cluster: Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102> Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0xB4F1), src_ep=0, dst=AddrModeAddress(addr_mode=<AddrMode.Broadcast: 15>, address=<BroadcastAddress.ALL_ROUTERS_AND_COORDINATOR: 65532>), dst_ep=0, source_route=None, extended_timeout=False, tsn=5, profile_id=0, cluster_id=0, data=Serialized[b'\x01\xdf_=\x0b\x00o\r\x00\x00\x00'], tx_options=<TransmitOptions.NONE: 0>, radius=0, non_member_radius=0, lqi=255, rssi=-32) [0xb4f1:zdo] ZDO request ZDOCmd.NWK_addr_req: [00:0d:6f:00:0b:3d:5f:df, <AddrRequestType.Single: 0>, 0] [0xB4F1:1:0x0001]: Failed to bind 'power' cluster: Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102> Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0xB4F1), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), dst_ep=1, source_route=None, extended_timeout=False, tsn=6, profile_id=260, cluster_id=1026, data=Serialized[b'\x185\x07\x00'], tx_options=<TransmitOptions.NONE: 0>, radius=0, non_member_radius=0, lqi=255, rssi=-32)

Full logs:

Logs ```python Device 0xb4f1 (00:12:4b:00:25:16:50:3a) joined the network [0xb4f1] Scheduling initialization [0xb4f1] Canceling old initialize call Received frame on uninitialized device from ep 0 to ep 0, cluster 19: b'\x00\xf1\xb4:P\x16%\x00K\x12\x00\x80' [0xb4f1:zdo] ZDO request ZDOCmd.Device_annce: [0xB4F1, 00:12:4b:00:25:16:50:3a, 128] Tries remaining: 5 [0xb4f1] Requesting 'Node Descriptor' [0xb4f1] Extending timeout for 0x25 request Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=, address=0xF3B8), src_ep=1, dst=AddrModeAddress(addr_mode=, address=0x0000), dst_ep=1, source_route=None, extended_timeout=False, tsn=195, profile_id=260, cluster_id=1029, data=Serialized[b'\x18 \n\x00\x00!4\x14'], tx_options=, radius=0, non_member_radius=0, lqi=228, rssi=-43) [0xF3B8:1:0x0405] Received ZCL frame: b'\x18 \n\x00\x00!4\x14' [0xF3B8:1:0x0405] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=, is_manufacturer_specific=0, direction=, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True), tsn=32, command_id=10, *direction=) [0xF3B8:1:0x0405] Decoded ZCL frame: RelativeHumidity:Report_Attributes(attribute_reports=[Attribute(attrid=0x0000, value=TypeValue(type=uint16_t, value=5172))]) [0xF3B8:1:0x0405] Received command 0x0A (TSN 32): Report_Attributes(attribute_reports=[Attribute(attrid=0x0000, value=TypeValue(type=uint16_t, value=5172))]) [0xF3B8:1:0x0405] Attribute report received: measured_value=5172 Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=, address=0xB4F1), src_ep=0, dst=AddrModeAddress(addr_mode=, address=0x0000), dst_ep=0, source_route=None, extended_timeout=False, tsn=1, profile_id=0, cluster_id=32770, data=Serialized[b'%\x00\xf1\xb4\x02@\x80\x00\x00P\xa0\x00\x00\x00\xa0\x00\x00'], tx_options=, radius=0, non_member_radius=0, lqi=255, rssi=-32) Received frame on uninitialized device from ep 0 to ep 0, cluster 32770: b'%\x00\xf1\xb4\x02@\x80\x00\x00P\xa0\x00\x00\x00\xa0\x00\x00' [0xb4f1] Got 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=0, maximum_buffer_size=80, maximum_incoming_transfer_size=160, server_mask=0, maximum_outgoing_transfer_size=160, 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) [0xb4f1] Discovering endpoints [0xb4f1] Extending timeout for 0x27 request Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=, address=0xB4F1), src_ep=0, dst=AddrModeAddress(addr_mode=, address=0x0000), dst_ep=0, source_route=None, extended_timeout=False, tsn=2, profile_id=0, cluster_id=32773, data=Serialized[b"'\x00\xf1\xb4\x01\x01"], tx_options=, radius=0, non_member_radius=0, lqi=255, rssi=-32) Received frame on uninitialized device from ep 0 to ep 0, cluster 32773: b"'\x00\xf1\xb4\x01\x01" [0xb4f1] Discovered endpoints: [1] [0xb4f1] Initializing endpoints [>] [0xb4f1:1] Discovering endpoint information [0xb4f1] Extending timeout for 0x29 request Tries remaining: 4 [0xb4f1] Already have endpoints: {0: , 1: >} [0xb4f1] Initializing endpoints [>] [0xb4f1:1] Discovering endpoint information [0xb4f1] Extending timeout for 0x2b request Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=, address=0xB4F1), src_ep=0, dst=AddrModeAddress(addr_mode=, address=0x0000), dst_ep=0, source_route=None, extended_timeout=False, tsn=3, profile_id=0, cluster_id=32772, data=Serialized[b'+\x00\xf1\xb4\x14\x01\x04\x01\x02\x03\x00\x05\x00\x00\x03\x00\x02\x04\x05\x04\x01\x00\x01\x03\x00'], tx_options=, radius=0, non_member_radius=0, lqi=255, rssi=-32) Received frame on uninitialized device from ep 0 to ep 0, cluster 32772: b'+\x00\xf1\xb4\x14\x01\x04\x01\x02\x03\x00\x05\x00\x00\x03\x00\x02\x04\x05\x04\x01\x00\x01\x03\x00' [0xb4f1:1] Discovered endpoint information: SizePrefixedSimpleDescriptor(endpoint=1, profile=260, device_type=770, device_version=0, input_clusters=[0, 3, 1026, 1029, 1], output_clusters=[3]) [0xB4F1:1:0x0000] Sending request header: ZCLHeader(frame_control=FrameControl(frame_type=, is_manufacturer_specific=False, direction=, disable_default_response=0, reserved=0, *is_cluster=False, *is_general=True), tsn=45, command_id=, *direction=) [0xB4F1:1:0x0000] Sending request: Read_Attributes(attribute_ids=[4, 5]) [0xb4f1] Extending timeout for 0x2d request Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=, address=0xB4F1), src_ep=1, dst=AddrModeAddress(addr_mode=, address=0x0000), dst_ep=1, source_route=None, extended_timeout=False, tsn=4, profile_id=260, cluster_id=0, data=Serialized[b'\x18-\x01\x04\x00\x00B\x07eWeLink\x05\x00\x00B\x04TH01'], tx_options=, radius=0, non_member_radius=0, lqi=255, rssi=-32) [0xB4F1:1:0x0000] Received ZCL frame: b'\x18-\x01\x04\x00\x00B\x07eWeLink\x05\x00\x00B\x04TH01' [0xB4F1:1:0x0000] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=, is_manufacturer_specific=0, direction=, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True), tsn=45, command_id=1, *direction=) [0xB4F1:1:0x0000] Decoded ZCL frame: Basic:Read_Attributes_rsp(status_records=[ReadAttributeRecord(attrid=0x0004, status=, value=TypeValue(type=CharacterString, value='eWeLink')), ReadAttributeRecord(attrid=0x0005, status=, value=TypeValue(type=CharacterString, value='TH01'))]) [0xb4f1] Read model 'TH01' and manufacturer 'eWeLink' from > [0xb4f1] Discovered basic device information for Device is initialized Checking quirks for eWeLink TH01 (00:12:4b:00:25:16:50:3a) Considering Fail because endpoint list mismatch: {1, 2, 242} {1} Considering Fail because endpoint list mismatch: {1, 2, 41, 42, 242, 51, 21, 31} {1} Considering Fail because endpoint list mismatch: {232, 230} {1} Considering Fail because endpoint list mismatch: {232, 230} {1} Considering Fail because input cluster mismatch on at least one endpoint Considering Fail because device_type mismatch on at least one endpoint Considering Fail because device_type mismatch on at least one endpoint Considering Fail because device_type mismatch on at least one endpoint Considering Fail because endpoint list mismatch: {11, 13} {1} Creating cluster handler for cluster id: 0 class: Creating cluster handler for cluster id: 3 class: Creating cluster handler for cluster id: 1026 class: Creating cluster handler for cluster id: 1029 class: Creating cluster handler for cluster id: 1 class: Discovering entities for endpoint: 00:12:4b:00:25:16:50:3a-1 'button' component -> 'ZHAIdentifyButton' using ['identify'] 'sensor' component -> 'Battery' using ['power'] 'sensor' component -> 'Temperature' using ['temperature'] 'sensor' component -> 'RSSISensor' using ['basic'] 'sensor' component -> 'LQISensor' using ['basic'] 'sensor' component -> 'Humidity' using ['humidity'] device - 0xB4F1:00:12:4b:00:25:16:50:3a entering async_device_initialized - is_new_join: True device - 0xB4F1:00:12:4b:00:25:16:50:3a has joined the ZHA zigbee network [0xB4F1](TH01): started configuration [0xB4F1:ZDO](TH01): 'async_configure' stage succeeded [0xB4F1:1:0x0003]: Configuring cluster attribute reporting Error handling '_save_attribute' event with (00:12:4b:00:25:16:50:3a, 1, 0, 5, 'TH01', datetime.datetime(2023, 9, 17, 0, 46, 8, 994195, tzinfo=datetime.timezone.utc)) params: FOREIGN KEY constraint failed [0xB4F1:1:0x0402]: Failed to bind 'temperature' cluster: Failed to deliver message: Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=, address=0xB4F1), src_ep=0, dst=AddrModeAddress(addr_mode=, address=), dst_ep=0, source_route=None, extended_timeout=False, tsn=5, profile_id=0, cluster_id=0, data=Serialized[b'\x01\xdf_=\x0b\x00o\r\x00\x00\x00'], tx_options=, radius=0, non_member_radius=0, lqi=255, rssi=-32) [0xb4f1:zdo] ZDO request ZDOCmd.NWK_addr_req: [00:0d:6f:00:0b:3d:5f:df, , 0] [0xB4F1:1:0x0001]: Failed to bind 'power' cluster: Failed to deliver message: Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=, address=0xB4F1), src_ep=1, dst=AddrModeAddress(addr_mode=, address=0x0000), dst_ep=1, source_route=None, extended_timeout=False, tsn=6, profile_id=260, cluster_id=1026, data=Serialized[b'\x185\x07\x00'], tx_options=, radius=0, non_member_radius=0, lqi=255, rssi=-32) [0xB4F1:1:0x0402] Received ZCL frame: b'\x185\x07\x00' [0xB4F1:1:0x0402] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=, is_manufacturer_specific=0, direction=, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True), tsn=53, command_id=7, *direction=) [0xB4F1:1:0x0402] Decoded ZCL frame: TemperatureMeasurement:Configure_Reporting_rsp(status_records=[ConfigureReportingResponseRecord(status=)]) [0xB4F1:1:0x0402]: Successfully configured reporting for '{'measured_value': (30, 900, 50)}' on 'temperature' cluster: [ConfigureReportingResponseRecord(status=)] Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=, address=0xB4F1), src_ep=0, dst=AddrModeAddress(addr_mode=, address=0x0000), dst_ep=0, source_route=None, extended_timeout=False, tsn=8, profile_id=0, cluster_id=32801, data=Serialized[b'1\x00'], tx_options=, radius=0, non_member_radius=0, lqi=255, rssi=-32) [0xB4F1:1:0x0405]: bound 'humidity' cluster: Status.SUCCESS Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=, address=0xB4F1), src_ep=1, dst=AddrModeAddress(addr_mode=, address=0x0000), dst_ep=1, source_route=None, extended_timeout=False, tsn=9, profile_id=260, cluster_id=1, data=Serialized[b'\x188\x07\x00'], tx_options=, radius=0, non_member_radius=0, lqi=255, rssi=-32) [0xB4F1:1:0x0001] Received ZCL frame: b'\x188\x07\x00' [0xB4F1:1:0x0001] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=, is_manufacturer_specific=0, direction=, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True), tsn=56, command_id=7, *direction=) [0xB4F1:1:0x0001] Decoded ZCL frame: PowerConfiguration:Configure_Reporting_rsp(status_records=[ConfigureReportingResponseRecord(status=)]) [0xB4F1:1:0x0001]: Successfully configured reporting for '{'battery_voltage': (3600, 10800, 1), 'battery_percentage_remaining': (3600, 10800, 1)}' on 'power' cluster: [ConfigureReportingResponseRecord(status=)] Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=, address=0xB4F1), src_ep=1, dst=AddrModeAddress(addr_mode=, address=0x0000), dst_ep=1, source_route=None, extended_timeout=False, tsn=10, profile_id=260, cluster_id=1029, data=Serialized[b'\x18:\x07\x00'], tx_options=, radius=0, non_member_radius=0, lqi=255, rssi=-32) [0xB4F1:1:0x0405] Received ZCL frame: b'\x18:\x07\x00' [0xB4F1:1:0x0405] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=, is_manufacturer_specific=0, direction=, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True), tsn=58, command_id=7, *direction=) [0xB4F1:1:0x0405] Decoded ZCL frame: RelativeHumidity:Configure_Reporting_rsp(status_records=[ConfigureReportingResponseRecord(status=)]) [0xB4F1:1:0x0405]: Successfully configured reporting for '{'measured_value': (30, 900, 100)}' on 'humidity' cluster: [ConfigureReportingResponseRecord(status=)] [0xB4F1:1:0x0003]: 'async_configure' stage succeeded [0xB4F1:1:0x0402]: 'async_configure' stage succeeded [0xB4F1:1:0x0405]: 'async_configure' stage succeeded [0xB4F1:1:0x0000]: 'async_configure' stage succeeded [0xB4F1:1:0x0001]: 'async_configure' stage succeeded [0xB4F1](TH01): completed configuration Tries remaining: 3 [0xB4F1:1:0x0003] Sending request header: ZCLHeader(frame_control=FrameControl(frame_type=, is_manufacturer_specific=False, direction=, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False), tsn=60, command_id=64, *direction=) [0xB4F1:1:0x0003] Sending request: trigger_effect(effect_id=, effect_variant=) [0xb4f1] Extending timeout for 0x3c request Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=, address=0xB4F1), src_ep=1, dst=AddrModeAddress(addr_mode=, address=0x0000), dst_ep=1, source_route=None, extended_timeout=False, tsn=11, profile_id=260, cluster_id=3, data=Serialized[b'\x18<\x0b@\x81'], tx_options=, radius=0, non_member_radius=0, lqi=255, rssi=-32) [0xB4F1:1:0x0003] Received ZCL frame: b'\x18<\x0b@\x81' [0xB4F1:1:0x0003] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=, is_manufacturer_specific=0, direction=, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True), tsn=60, command_id=11, *direction=) [0xB4F1:1:0x0003] Decoded ZCL frame: Identify:Default_Response(command_id=64, status=) [0xB4F1](TH01): started initialization [0xB4F1:ZDO](TH01): 'async_initialize' stage succeeded [0xB4F1:1:0x0003]: initializing cluster handler: from_cache: False [0xB4F1:1:0x0003]: finished cluster handler initialization [0xB4F1:1:0x0402]: initializing cluster handler: from_cache: False [0xB4F1:1:0x0402]: initializing uncached cluster handler attributes: ['measured_value'] - from cache[False] [0xB4F1:1:0x0402]: Reading attributes in chunks: ['measured_value'] [0xB4F1:1:0x0402] Sending request header: ZCLHeader(frame_control=FrameControl(frame_type=, is_manufacturer_specific=False, direction=, disable_default_response=0, reserved=0, *is_cluster=False, *is_general=True), tsn=62, command_id=, *direction=) [0xB4F1:1:0x0402] Sending request: Read_Attributes(attribute_ids=[0]) [0xb4f1] Extending timeout for 0x3e request [0xB4F1:1:0x0405]: initializing cluster handler: from_cache: False [0xB4F1:1:0x0405]: initializing uncached cluster handler attributes: ['measured_value'] - from cache[False] [0xB4F1:1:0x0405]: Reading attributes in chunks: ['measured_value'] [0xB4F1:1:0x0405] Sending request header: ZCLHeader(frame_control=FrameControl(frame_type=, is_manufacturer_specific=False, direction=, disable_default_response=0, reserved=0, *is_cluster=False, *is_general=True), tsn=64, command_id=, *direction=) [0xB4F1:1:0x0405] Sending request: Read_Attributes(attribute_ids=[0]) [0xb4f1] Extending timeout for 0x40 request [0xB4F1:1:0x0000]: initializing cluster handler: from_cache: False [0xB4F1:1:0x0000]: finished cluster handler initialization [0xB4F1:1:0x0001]: initializing cluster handler: from_cache: False [0xB4F1:1:0x0001]: initializing uncached cluster handler attributes: ['battery_voltage', 'battery_percentage_remaining'] - from cache[False] [0xB4F1:1:0x0001]: Reading attributes in chunks: ['battery_voltage', 'battery_percentage_remaining'] [0xB4F1:1:0x0001] Sending request header: ZCLHeader(frame_control=FrameControl(frame_type=, is_manufacturer_specific=False, direction=, disable_default_response=0, reserved=0, *is_cluster=False, *is_general=True), tsn=66, command_id=, *direction=) [0xB4F1:1:0x0001] Sending request: Read_Attributes(attribute_ids=[32, 33]) [0xb4f1] Extending timeout for 0x42 request Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=, address=0xB4F1), src_ep=1, dst=AddrModeAddress(addr_mode=, address=0x0000), dst_ep=1, source_route=None, extended_timeout=False, tsn=12, profile_id=260, cluster_id=1026, data=Serialized[b'\x18>\x01\x00\x00\x00)\xc3\t'], tx_options=, radius=0, non_member_radius=0, lqi=255, rssi=-32) [0xB4F1:1:0x0402] Received ZCL frame: b'\x18>\x01\x00\x00\x00)\xc3\t' [0xB4F1:1:0x0402] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=, is_manufacturer_specific=0, direction=, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True), tsn=62, command_id=1, *direction=) [0xB4F1:1:0x0402] Decoded ZCL frame: TemperatureMeasurement:Read_Attributes_rsp(status_records=[ReadAttributeRecord(attrid=0x0000, status=, value=TypeValue(type=int16s, value=2499))]) [0xB4F1:1:0x0402]: finished cluster handler initialization Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=, address=0xB4F1), src_ep=1, dst=AddrModeAddress(addr_mode=, address=0x0000), dst_ep=1, source_route=None, extended_timeout=False, tsn=13, profile_id=260, cluster_id=1029, data=Serialized[b'\x18@\x01\x00\x00\x00)\xb0\x11'], tx_options=, radius=0, non_member_radius=0, lqi=255, rssi=-32) [0xB4F1:1:0x0405] Received ZCL frame: b'\x18@\x01\x00\x00\x00)\xb0\x11' [0xB4F1:1:0x0405] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=, is_manufacturer_specific=0, direction=, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True), tsn=64, command_id=1, *direction=) [0xB4F1:1:0x0405] Decoded ZCL frame: RelativeHumidity:Read_Attributes_rsp(status_records=[ReadAttributeRecord(attrid=0x0000, status=, value=TypeValue(type=int16s, value=4528))]) [0xB4F1:1:0x0405]: finished cluster handler initialization Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=, address=0xB4F1), src_ep=1, dst=AddrModeAddress(addr_mode=, address=0x0000), dst_ep=1, source_route=None, extended_timeout=False, tsn=14, profile_id=260, cluster_id=1, data=Serialized[b'\x18B\x01 \x00\x00 \x1f!\x00\x00 \xc8'], tx_options=, radius=0, non_member_radius=0, lqi=255, rssi=-32) [0xB4F1:1:0x0001] Received ZCL frame: b'\x18B\x01 \x00\x00 \x1f!\x00\x00 \xc8' [0xB4F1:1:0x0001] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=, is_manufacturer_specific=0, direction=, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True), tsn=66, command_id=1, *direction=) [0xB4F1:1:0x0001] Decoded ZCL frame: PowerConfiguration:Read_Attributes_rsp(status_records=[ReadAttributeRecord(attrid=0x0020, status=, value=TypeValue(type=uint8_t, value=31)), ReadAttributeRecord(attrid=0x0021, status=, value=TypeValue(type=uint8_t, value=200))]) [0xB4F1:1:0x0001]: Performing cluster handler specific initialization: ['battery_voltage', 'battery_percentage_remaining'] [0xB4F1:1:0x0001]: Reading attributes in chunks: ['battery_size', 'battery_quantity'] [0xB4F1:1:0x0001] Sending request header: ZCLHeader(frame_control=FrameControl(frame_type=, is_manufacturer_specific=False, direction=, disable_default_response=0, reserved=0, *is_cluster=False, *is_general=True), tsn=68, command_id=, *direction=) [0xB4F1:1:0x0001] Sending request: Read_Attributes(attribute_ids=[49, 51]) [0xb4f1] Extending timeout for 0x44 request Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=, address=0xB4F1), src_ep=1, dst=AddrModeAddress(addr_mode=, address=0x0000), dst_ep=1, source_route=None, extended_timeout=False, tsn=16, profile_id=260, cluster_id=1029, data=Serialized[b'\x18\x01\n\x00\x00!F\x11'], tx_options=, radius=0, non_member_radius=0, lqi=255, rssi=-32) [0xB4F1:1:0x0405] Received ZCL frame: b'\x18\x01\n\x00\x00!F\x11' [0xB4F1:1:0x0405] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=, is_manufacturer_specific=0, direction=, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True), tsn=1, command_id=10, *direction=) [0xB4F1:1:0x0405] Decoded ZCL frame: RelativeHumidity:Report_Attributes(attribute_reports=[Attribute(attrid=0x0000, value=TypeValue(type=uint16_t, value=4422))]) [0xB4F1:1:0x0405] Received command 0x0A (TSN 1): Report_Attributes(attribute_reports=[Attribute(attrid=0x0000, value=TypeValue(type=uint16_t, value=4422))]) [0xB4F1:1:0x0405] Attribute report received: measured_value=4422 Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=, address=0xB4F1), src_ep=1, dst=AddrModeAddress(addr_mode=, address=0x0000), dst_ep=1, source_route=None, extended_timeout=False, tsn=17, profile_id=260, cluster_id=1, data=Serialized[b'\x18D\x011\x00\x863\x00\x86'], tx_options=, radius=0, non_member_radius=0, lqi=255, rssi=-33) [0xB4F1:1:0x0001] Received ZCL frame: b'\x18D\x011\x00\x863\x00\x86' [0xB4F1:1:0x0001] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=, is_manufacturer_specific=0, direction=, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True), tsn=68, command_id=1, *direction=) [0xB4F1:1:0x0001] Decoded ZCL frame: PowerConfiguration:Read_Attributes_rsp(status_records=[ReadAttributeRecord(attrid=0x0031, status=), ReadAttributeRecord(attrid=0x0033, status=)]) [0xB4F1:1:0x0001]: finished cluster handler initialization [0xB4F1:1:0x0003]: 'async_initialize' stage succeeded [0xB4F1:1:0x0402]: 'async_initialize' stage succeeded [0xB4F1:1:0x0405]: 'async_initialize' stage succeeded [0xB4F1:1:0x0000]: 'async_initialize' stage succeeded [0xB4F1:1:0x0001]: 'async_initialize' stage succeeded [0xB4F1](TH01): power source: Battery or Unknown [0xB4F1](TH01): completed initialization [0xF1D6](S31 Lite zb): Device seen - marking the device available and resetting counter [0xF1D6](S31 Lite zb): Update device availability - device available: True - new availability: True - changed: False [0x11B2](lumi.vibration.aq1): Device seen - marking the device available and resetting counter [0x11B2](lumi.vibration.aq1): Update device availability - device available: True - new availability: True - changed: False [0xC315](DS01): Device seen - marking the device available and resetting counter [0xC315](DS01): Update device availability - device available: True - new availability: True - changed: False ```
TheJulianJES commented 12 months ago

That looks like the sensor is asleep. Can you try to re-pair it? (maybe even try multiple times and/or with fresh batteries)

MattWestb commented 12 months ago

If its going deep sleep and not being configured OK it can being needed removing the battery and putting it in and doing the reconfigure for it receiving it (Some IKEA controller with latest firmware is one normal problem).

cvocvo commented 11 months ago

Thank you for your replies; I've been doing a bit of testing. I tried re-pairing a few times and most of them failed and got stuck on "Starting Interview". I wonder if this issue is related to this: https://github.com/home-assistant/core/issues/99497 I've tried repairing with new batteries, reloading the integration, and rebooting home assistant.

In any case, when I repair either of these SNZB-02 devices the temperature doesn't update beyond the initial update. Humidity updates just fine.

Or perhaps it's an issue with the coordinator I have? SONOFF ZBDongle-E

It seems the only way I can get new devices to pair reliably is via "Add Devices Via This Device" on the Coordinator.

Zigbee Shed Temp

Re-Pairing Logs: Zigbee Shed Temp (Fails to Pair) ```python New device 0x955f (00:12:4b:00:2a:52:26:bd) joined the network [0x955f] Requesting 'Node Descriptor' Device 0x955f (00:12:4b:00:2a:52:26:bd) joined the network [0x955f] Requesting 'Node Descriptor' [0x955f] Requesting 'Node Descriptor' Device 0x955f (00:12:4b:00:2a:52:26:bd) left the network Device 0x955f (00:12:4b:00:2a:52:26:bd) joined the network [0x955f] Requesting 'Node Descriptor' [0x955f] Requesting 'Node Descriptor' [0x955f] Requesting 'Node Descriptor' [0x955f] Requesting 'Node Descriptor' [0x955f] Requesting 'Node Descriptor' Device 0x955f (00:12:4b:00:2a:52:26:bd) joined the network [0x955f] Requesting 'Node Descriptor' Device 0x955f (00:12:4b:00:2a:52:26:bd) joined the network [0x955f] Requesting 'Node Descriptor' [0x955f] Got 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=0, maximum_buffer_size=80, maximum_incoming_transfer_size=160, server_mask=0, maximum_outgoing_transfer_size=160, 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) [0x955f] Discovering endpoints [0x955f] Discovered endpoints: [1] [0x955f] Initializing endpoints [>] [0x955f:1] Discovering endpoint information [0x955f] Already have endpoints: {0: , 1: >} [0x955f] Initializing endpoints [>] [0x955f:1] Discovering endpoint information [0x955f] Already have endpoints: {0: , 1: >} [0x955f] Initializing endpoints [>] [0x955f:1] Discovering endpoint information [0x955f] Already have endpoints: {0: , 1: >} [0x955f] Initializing endpoints [>] [0x955f:1] Discovering endpoint information [0x955f] Already have endpoints: {0: , 1: >} [0x955f] Initializing endpoints [>] [0x955f:1] Discovering endpoint information ```
Re-Pairing Logs: Zigbee Shed Temp (Fails to Pair again) ```python New device 0xd73f (00:12:4b:00:2a:52:26:bd) joined the network [0xd73f] Requesting 'Node Descriptor' Device 0xd73f (00:12:4b:00:2a:52:26:bd) joined the network [0xd73f] Requesting 'Node Descriptor' [0xd73f] Got 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=0, maximum_buffer_size=80, maximum_incoming_transfer_size=160, server_mask=0, maximum_outgoing_transfer_size=160, 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) [0xd73f] Discovering endpoints [0xd73f] Discovered endpoints: [1] [0xd73f] Initializing endpoints [>] [0xd73f:1] Discovering endpoint information ```
Re-Pairing Logs: Zigbee Shed Temp (Repaired using "Add Devices Via This Device") ```python Device 0xf8c5 (00:12:4b:00:2a:52:26:bd) joined the network [0xf8c5] Already have endpoints: {0: , 1: >} [0xf8c5] Initializing endpoints [>] [0xf8c5:1] Discovering endpoint information Device 0xf8c5 (00:12:4b:00:2a:52:26:bd) joined the network [0xf8c5] Already have endpoints: {0: , 1: >} [0xf8c5] Initializing endpoints [>] [0xf8c5:1] Discovering endpoint information [0xf8c5] Already have endpoints: {0: , 1: >} [0xf8c5] Initializing endpoints [>] [0xf8c5:1] Discovering endpoint information [0xf8c5:1] Discovered endpoint information: SizePrefixedSimpleDescriptor(endpoint=1, profile=260, device_type=770, device_version=0, input_clusters=[0, 3, 1026, 1029, 1], output_clusters=[3]) [0xf8c5] Read model 'TH01' and manufacturer 'eWeLink' from > [0xf8c5] Discovered basic device information for Creating cluster handler for cluster id: 0 class: Creating cluster handler for cluster id: 3 class: Creating cluster handler for cluster id: 1026 class: Creating cluster handler for cluster id: 1029 class: Creating cluster handler for cluster id: 1 class: ```
TheJulianJES commented 11 months ago

Regarding this, can you also attach the diagnostic information from the ZHA integration itself? It can be downloaded on the integrations page.

^

and is that stick a Z-Wave and Zigbee stick? Also, grabbing the logs from home-assistant.log is a bit more helpful, as it includes time/logger and so on. The logs from the pairing dialog strip all that information.

cvocvo commented 11 months ago

Can you toss me a screenshot for where to grab the logs you're looking for?

Edit: found it -- working on cutting down the logs to something useful / postable. Also not a Z-Wave + Zigbee stick, just Zigbee on this one. I used to have one that does both and swapped over to newer ones for each a month or so ago.

Edit2: Log is attached now; I removed everything that didn't have "zig" or "zha" (my owlet integration is noisy, among others). home-assistant_2023-09-23T22-04-05.186Z.txt

I was also thinking it makes sense as to why you were wondering if this was the dual-zigbee + z-wave (HUSBZB-1). I migrated my radio/network to the SONOFF ZBDongle-E so I assume it's probably still partially identified as the HUSBZB-1 or something.

Edit3: OOPS I got my wires crossed. I actually moved to a SONOFF ZBDongle-E for Zigbee.

cvocvo commented 11 months ago

Today I updated the firmware on my SONOFF ZBDongle-E from 6.10.3 to 7.3.1 and at first this didn't do much, however, after several pairing attempts I was able to re-pair the shed temp SNZB-02 with Home Assistant. I still don't think the temperature is regularly updating and humidity still is. home-assistant_zha_2023-09-24T19-42-19.274Z_RepairingWorked_zhaonly.log

Edit: In case anyone is wondering, I used this to update the firmware from the web easily; it only took me a few minutes to do. https://darkxst.github.io/silabs-firmware-builder/

cvocvo commented 11 months ago

Update: it seems that the temp is updating. I put the sensor under my leg and let it be for a few minutes and it is updating now! It seems updating the firmware and repairing a few times did the trick! image

I'm re-testing https://github.com/zigpy/zha-device-handlers/issues/2587 as well and it seems that at least one of those is also fixed now.

Bedroom temp also fixed: image