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
687 stars 638 forks source link

[Device Support Request] Hive SLR2B and SLT3b by Computime #2776

Open andyb2000 opened 7 months ago

andyb2000 commented 7 months ago

Problem description

I'm using the Hive devices SLR2B (Boiler relay/controller) and SLT3b (Thermostat/wall unit) by Computime which are the Hive zigbee units. I have paired them up with information available based on SLR1B (https://zigbee.blakadder.com/Hive_SLR1b.html The difference between 1B and 2B are the channels, 2B is for heating and hot water, 1B is heating only). The two channels work fine, I've just had to note/name the entities to distinguish them. The issue is the connection to Zigbee, this seems to keep dropping with these devices causing them to go offline (and turn the heating relays off).

After pairing them, in Home Assistant ZHA I go into the device info and can see the current room temperature, current target and what status the relays are in (heating or idle). However, after a varying amount of time (I have recorded, 6 minutes, 8 minutes, 9 minutes, etc) the unit will turn the red light on (on the boiler relay, this also switches off both relays to my boiler), the thermostat will say "Receiving" or "No signal" and the system will not respond to changes. It then will start working again, this time with a more regular amount of time (6:01minutes, 6:11, 6:06, 5:57 - so always around the 6 minute mark) and resume the functions it was doing (relays turn back on. Green light comes on boiler relay unit).

Solution description

The zigbee connection to remain connected. It appears to be some type of heartbeat or signal getting missed which causes them to lose sight of each other. They then appear to re-connect automatically and resume operations on their own.

Screenshots/Video

The SLR2B in ZHA:

image

You can see the cycling, during these periods the heating was supposed to be on constantly but due to the signal/drop it goes idle then re-connects and resumes

image

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=4153, maximum_buffer_size=82, maximum_incoming_transfer_size=82, server_mask=0, 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": { "5": { "profile_id": "0x0104", "device_type": "0x0301", "input_clusters": [ "0x0000", "0x0003", "0x0009", "0x000a", "0x0201", "0xfd00" ], "output_clusters": [ "0x0000", "0x000a", "0x0019", "0x0402", "0xfd00" ] }, "6": { "profile_id": "0x0104", "device_type": "0x0301", "input_clusters": [ "0x0201" ], "output_clusters": [] }, "7": { "profile_id": "0x0104", "device_type": "0x0301", "input_clusters": [ "0x0402" ], "output_clusters": [] }, "8": { "profile_id": "0x0104", "device_type": "0x0301", "input_clusters": [ "0x0402" ], "output_clusters": [] } }, "manufacturer": "Computime", "model": "SLR2b", "class": "zigpy.device.Device" } ```

Diagnostic information

Diagnostic information ```json { "home_assistant": { "installation_type": "Home Assistant OS", "version": "2023.11.1", "dev": false, "hassio": true, "virtualenv": false, "python_version": "3.11.6", "docker": true, "arch": "x86_64", "timezone": "Europe/London", "os_name": "Linux", "os_version": "6.1.59", "supervisor": "2023.11.3", "host_os": "Home Assistant OS 11.1", "docker_version": "24.0.6", "chassis": "embedded", "run_as_root": true }, "custom_components": { "zha_toolkit": { "version": "v1.1.6", "requirements": [ "pytz" ] }, "hildebrandglow_dcc": { "version": "1.0.3", "requirements": [ "pyglowmarkt==0.5.5" ] }, "alexa_media": { "version": "4.6.5", "requirements": [ "alexapy==1.27.6", "packaging>=20.3", "wrapt>=1.14.0" ] }, "hacs": { "version": "1.33.0", "requirements": [ "aiogithubapi>=22.10.1" ] }, "browser_mod": { "version": "2.3.0", "requirements": [] }, "auto_backup": { "version": "1.4.1", "requirements": [] }, "eventsensor": { "version": "3.3.1", "requirements": [] }, "better_thermostat": { "version": "1.4.0", "requirements": [] }, "hello_service": { "version": "0.1.0", "requirements": [] }, "bluetooth_tracker": { "version": "1.0.0", "requirements": [ "bt-proximity==0.2.1", "git+https://github.com/pybluez/pybluez.git#pybluez==0.30" ] }, "localtuya": { "version": "5.2.1", "requirements": [] }, "mikrotik_router": { "version": "0.0.0", "requirements": [ "librouteros>=3.2.0", "mac-vendor-lookup>=0.1.12" ] }, "gardena_smart_system": { "version": "1.0.0", "requirements": [ "py-smart-gardena==1.3.7" ] }, "templatebinarysensor": { "version": "0.0.2", "requirements": [] }, "hottubmanager": { "version": "0.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.8", "pyserial==3.5", "pyserial-asyncio==0.6", "zha-quirks==0.0.106", "zigpy-deconz==0.21.1", "zigpy==0.59.0", "zigpy-xbee==0.19.0", "zigpy-zigate==0.11.0", "zigpy-znp==0.11.6", "universal-silabs-flasher==0.0.14", "pyserial-asyncio-fast==0.11" ], "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": 25529, "manufacturer": "Computime", "model": "SLR2b", "name": "Computime SLR2b", "quirk_applied": false, "quirk_class": "zigpy.device.Device", "quirk_id": null, "manufacturer_code": 4153, "power_source": "Mains", "lqi": 29, "rssi": null, "last_seen": "2023-11-27T13:59:14", "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=4153, maximum_buffer_size=82, maximum_incoming_transfer_size=82, server_mask=0, 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": { "6": { "profile_id": "0x0104", "device_type": "0x0301", "input_clusters": [ "0x0201" ], "output_clusters": [] }, "7": { "profile_id": "0x0104", "device_type": "0x0301", "input_clusters": [ "0x0402" ], "output_clusters": [] }, "8": { "profile_id": "0x0104", "device_type": "0x0301", "input_clusters": [ "0x0402" ], "output_clusters": [] }, "5": { "profile_id": "0x0104", "device_type": "0x0301", "input_clusters": [ "0x0000", "0x0003", "0x0009", "0x000a", "0x0201", "0xfd00" ], "output_clusters": [ "0x0000", "0x000a", "0x0019", "0x0402", "0xfd00" ] } }, "manufacturer": "Computime", "model": "SLR2b" }, "active_coordinator": false, "entities": [ { "entity_id": "button.heating_boiler_identify", "name": "Computime SLR2b" }, { "entity_id": "climate.heating_boiler_thermostat", "name": "Computime SLR2b" }, { "entity_id": "climate.heating_boiler_thermostat_2", "name": "Computime SLR2b" }, { "entity_id": "sensor.heating_boiler_hvac_action", "name": "Computime SLR2b" }, { "entity_id": "sensor.heating_boiler_temperature", "name": "Computime SLR2b" }, { "entity_id": "sensor.heating_boiler_temperature_2", "name": "Computime SLR2b" }, { "entity_id": "sensor.heating_boiler_hvac_action_2", "name": "Computime SLR2b" } ], "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": "252" }, { "device_type": "Router", "rx_on_when_idle": "On", "relationship": "Sibling", "extended_pan_id": "**REDACTED**", "ieee": "**REDACTED**", "nwk": "0x342F", "permit_joining": "Unknown", "depth": "15", "lqi": "234" }, { "device_type": "Router", "rx_on_when_idle": "On", "relationship": "Sibling", "extended_pan_id": "**REDACTED**", "ieee": "**REDACTED**", "nwk": "0x74B0", "permit_joining": "Unknown", "depth": "15", "lqi": "230" }, { "device_type": "Router", "rx_on_when_idle": "On", "relationship": "Sibling", "extended_pan_id": "**REDACTED**", "ieee": "**REDACTED**", "nwk": "0xE63E", "permit_joining": "Unknown", "depth": "15", "lqi": "248" }, { "device_type": "Router", "rx_on_when_idle": "On", "relationship": "Sibling", "extended_pan_id": "**REDACTED**", "ieee": "**REDACTED**", "nwk": "0xE85B", "permit_joining": "Unknown", "depth": "15", "lqi": "202" }, { "device_type": "EndDevice", "rx_on_when_idle": "Off", "relationship": "Child", "extended_pan_id": "**REDACTED**", "ieee": "**REDACTED**", "nwk": "0x6B5E", "permit_joining": "NotAccepting", "depth": "2", "lqi": "255" }, { "device_type": "EndDevice", "rx_on_when_idle": "Off", "relationship": "Child", "extended_pan_id": "**REDACTED**", "ieee": "**REDACTED**", "nwk": "0xB87C", "permit_joining": "NotAccepting", "depth": "2", "lqi": "255" } ], "routes": [ { "dest_nwk": "0x0000", "route_status": "Active", "memory_constrained": false, "many_to_one": true, "route_record_required": false, "next_hop": "0x0000" }, { "dest_nwk": "0x8022", "route_status": "Active", "memory_constrained": false, "many_to_one": false, "route_record_required": false, "next_hop": "0x0000" }, { "dest_nwk": "0x1746", "route_status": "Active", "memory_constrained": false, "many_to_one": false, "route_record_required": false, "next_hop": "0xE63E" }, { "dest_nwk": "0xDE14", "route_status": "Active", "memory_constrained": false, "many_to_one": false, "route_record_required": false, "next_hop": "0x0000" }, { "dest_nwk": "0x34C4", "route_status": "Discovery_Underway", "memory_constrained": false, "many_to_one": false, "route_record_required": false, "next_hop": "0x0000" } ], "endpoint_names": [ { "name": "THERMOSTAT" }, { "name": "THERMOSTAT" }, { "name": "THERMOSTAT" }, { "name": "THERMOSTAT" } ], "user_given_name": "Heating-Boiler", "device_reg_id": "e2ab7805c32cd84407d60c41cf2d7af2", "area_id": null, "cluster_details": { "6": { "device_type": { "name": "THERMOSTAT", "id": 769 }, "profile_id": 260, "in_clusters": { "0x0201": { "endpoint_attribute": "thermostat", "attributes": { "0x001b": { "attribute_name": "ctrl_sequence_of_oper", "value": 2 }, "0x0000": { "attribute_name": "local_temperature", "value": 2100 }, "0x0016": { "attribute_name": "max_heat_setpoint_limit", "value": 3000 }, "0x0015": { "attribute_name": "min_heat_setpoint_limit", "value": 1500 }, "0x0011": { "attribute_name": "occupied_cooling_setpoint", "value": 2100 }, "0x0012": { "attribute_name": "occupied_heating_setpoint", "value": 2200 }, "0x0029": { "attribute_name": "running_state", "value": 0 }, "0x001c": { "attribute_name": "system_mode", "value": 0 } }, "unsupported_attributes": { "0x0002": { "attribute_name": "occupancy" }, "0x0008": { "attribute_name": "pi_heating_demand" }, "0x0003": { "attribute_name": "abs_min_heat_setpoint_limit" }, "0x0004": { "attribute_name": "abs_max_heat_setpoint_limit" }, "0x0005": { "attribute_name": "abs_min_cool_setpoint_limit" }, "0x0007": { "attribute_name": "pi_cooling_demand" }, "0x0006": { "attribute_name": "abs_max_cool_setpoint_limit" }, "0x0013": { "attribute_name": "unoccupied_cooling_setpoint" }, "0x0014": { "attribute_name": "unoccupied_heating_setpoint" }, "0x003a": { "attribute_name": "emergency_heat_delta" }, "0x0017": { "attribute_name": "min_cool_setpoint_limit" }, "0x0018": { "attribute_name": "max_cool_setpoint_limit" }, "0x001e": { "attribute_name": "running_mode" } } } }, "out_clusters": {} }, "7": { "device_type": { "name": "THERMOSTAT", "id": 769 }, "profile_id": 260, "in_clusters": { "0x0402": { "endpoint_attribute": "temperature", "attributes": { "0xfffd": { "attribute_name": "cluster_revision", "value": 1 }, "0x0000": { "attribute_name": "measured_value", "value": 0 } }, "unsupported_attributes": {} } }, "out_clusters": {} }, "8": { "device_type": { "name": "THERMOSTAT", "id": 769 }, "profile_id": 260, "in_clusters": { "0x0402": { "endpoint_attribute": "temperature", "attributes": { "0x0000": { "attribute_name": "measured_value", "value": 0 } }, "unsupported_attributes": {} } }, "out_clusters": {} }, "5": { "device_type": { "name": "THERMOSTAT", "id": 769 }, "profile_id": 260, "in_clusters": { "0x0000": { "endpoint_attribute": "basic", "attributes": { "0x0004": { "attribute_name": "manufacturer", "value": "Computime" }, "0x0005": { "attribute_name": "model", "value": "SLR2b" } }, "unsupported_attributes": {} }, "0x0003": { "endpoint_attribute": "identify", "attributes": {}, "unsupported_attributes": {} }, "0x0009": { "endpoint_attribute": "alarms", "attributes": { "0x0000": { "attribute_name": "alarm_count", "value": 0 } }, "unsupported_attributes": {} }, "0x000a": { "endpoint_attribute": "time", "attributes": { "0xfffd": { "attribute_name": "cluster_revision", "value": 1 } }, "unsupported_attributes": {} }, "0x0201": { "endpoint_attribute": "thermostat", "attributes": { "0x001b": { "attribute_name": "ctrl_sequence_of_oper", "value": 2 }, "0x0000": { "attribute_name": "local_temperature", "value": 1864 }, "0x0016": { "attribute_name": "max_heat_setpoint_limit", "value": 3200 }, "0x0015": { "attribute_name": "min_heat_setpoint_limit", "value": 500 }, "0x0011": { "attribute_name": "occupied_cooling_setpoint", "value": 2100 }, "0x0012": { "attribute_name": "occupied_heating_setpoint", "value": 1900 }, "0x0029": { "attribute_name": "running_state", "value": 0 }, "0x001c": { "attribute_name": "system_mode", "value": 4 }, "0x0023": { "attribute_name": "temp_setpoint_hold", "value": 1 }, "0x0024": { "attribute_name": "temp_setpoint_hold_duration", "value": 65535 } }, "unsupported_attributes": { "0x0001": { "attribute_name": "outdoor_temperature" }, "0x0002": { "attribute_name": "occupancy" }, "0x0008": { "attribute_name": "pi_heating_demand" }, "0x0003": { "attribute_name": "abs_min_heat_setpoint_limit" }, "0x0004": { "attribute_name": "abs_max_heat_setpoint_limit" }, "0x0005": { "attribute_name": "abs_min_cool_setpoint_limit" }, "0x0007": { "attribute_name": "pi_cooling_demand" }, "0x0006": { "attribute_name": "abs_max_cool_setpoint_limit" }, "0x0009": { "attribute_name": "system_type_config" }, "0x0031": { "attribute_name": "setpoint_change_amount" }, "0x0010": { "attribute_name": "local_temperature_calibration" }, "0x0013": { "attribute_name": "unoccupied_cooling_setpoint" }, "0x0014": { "attribute_name": "unoccupied_heating_setpoint" }, "0x003a": { "attribute_name": "emergency_heat_delta" }, "0x0017": { "attribute_name": "min_cool_setpoint_limit" }, "0x0018": { "attribute_name": "max_cool_setpoint_limit" }, "0x001a": { "attribute_name": "remote_sensing" }, "0x001e": { "attribute_name": "running_mode" }, "0x0025": { "attribute_name": "programing_oper_mode" }, "0x0030": { "attribute_name": "setpoint_change_source" }, "0x0041": { "attribute_name": "ac_capacity" } } }, "0xfd00": { "endpoint_attribute": "manufacturer_specific", "attributes": {}, "unsupported_attributes": {} } }, "out_clusters": { "0x0000": { "endpoint_attribute": "basic", "attributes": {}, "unsupported_attributes": {} }, "0x000a": { "endpoint_attribute": "time", "attributes": {}, "unsupported_attributes": {} }, "0x0019": { "endpoint_attribute": "ota", "attributes": {}, "unsupported_attributes": {} }, "0x0402": { "endpoint_attribute": "temperature", "attributes": {}, "unsupported_attributes": {} }, "0xfd00": { "endpoint_attribute": "manufacturer_specific", "attributes": {}, "unsupported_attributes": {} } } } } } } ```

Logs

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

Custom quirk

Custom quirk ```python [Paste your custom quirk here] ```

Additional information

No response

alrassia commented 7 months ago

Could you also post the logs from zha? Let’s make sure something else like weak signal or interference is not an issue as well.

andyb2000 commented 7 months ago

Thanks, yes makes sense. As an aside I also had the same issue with both the boiler relay unit and the receiver a couple of feet away from my Zigbee receiver.

Also, now I've watched it, I don't think signal between the boiler relay (SLR2b) and my Zigbee/ZHA drops as it immediately shows "Idle" for both heating states when the signal/red light goes on the boiler relay, so perhaps this is the communication between the SLT3b at fault here rather than the boiler unit and my zigbee dongle.

Attached is my ZHA debug log for a short duration, notable times:

18:33:08 - working, hot water is on, green light ON 18:38:46 - switched heating temperature higher, heating turned on 18:43:55 - red light, both switch to idle as no longer communicating. receiver stuck on "receiving" - FAULT CONDITION 18:49:07 - working, hot water back on, heating on and green light ON - SELF RECOVERY CONDITION

(The file is large, I've grepped based on the times/logs but not sure if this is correct. My ZHA debug log was 209Mb before grepping so let me know what I should be grepping the file for to upload)

zha_grepped.log

andyb2000 commented 7 months ago

Actually, I think you may be right with connectivity, although not a 'typical' signal drop. Looking at my visualisation, the SLR3b doesn't show a link at all, yet it is connected and shows correctly in "Last Seen". Not sure if that is because the SLR3b is connected 'through' the SLR2b pairing or not though and that is expected behaviour.

image

I also added another Zigbee router 'inbetween' physically the two to ensure it's not a signal loss situation and I can confirm the Zigbee signal to both the SLR2b and SLR3b are good.

AlexC commented 5 months ago

I'm also experiencing this issue, where the thermostat and receiver disconnect from each other and the red light appears on the receiver

AlexC commented 5 months ago

@andyb2000 are you using the Sonoff ZigBee 3.0 P dongle by any chance? Last night I flashed the firmware to the latest, and things appear to be much more stable. I also no longer get hundreds of ZHA Check-in events for the Hive thermostat.

Looking at the changelog for the firmware, I see the following which may have solved this for me:

Increase message timeout from 7 to 8 seconds to increase message delivery success rate for devices using a 7.5 seconds poll interval (https://github.com/Koenkk/zigbee2mqtt/issues/13478#issuecomment-1501188485)

See https://github.com/Koenkk/Z-Stack-firmware/blob/master/coordinator/Z-Stack_3.x.0/CHANGELOG.md

mikestir commented 2 weeks ago

I've done some work on this after having what sounds like the same issue. It seems to be related to the reporting interval that ZHA sets up in the thermostat, which appears to default to 15 minutes. This is too slow and the receiver thinks the thermostat has gone away.

Using zha_toolkit I was able to execute the following command from within HA in developer tools->services:

service: zha_toolkit.execute
data:
  ieee: sensor.hive_thermostat_temperature
  command: conf_report
  endpoint: 9
  cluster: 0x402
  attribute: 0
  min_interval: 5
  max_interval: 120
  reportable_change: 50
  tries: 100
  event_done: zha_done

Change the entity name as required.