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
750 stars 685 forks source link

[Device Support Request] Danfoss Icon2 Room Sensor (088U2121) #2914

Open JohnConnett opened 9 months ago

JohnConnett commented 9 months ago

Problem description

I would like to have the Danfoss Icon2 Room Sensor (088U2121) fully supported under ZHA.

Note that there is a similar request for zigbee2mqtt, Danfoss Icon2 Room Sensor (088U2121).

The device is recognized by ZHA but some values returned are incorrect:

Device info 0x8040 by Danfoss Firmware: 0x0000010c IEEE: 8c:f6:81:ff:fe:82:4a:00 Nwk: 0xc938 Device Type: EndDevice LQI: 255 RSSI: -33 Last seen: 2024-01-15T16:33:34 Power source: Battery or Unknown Controls Thermostat Heat 21 °C Currently: 24.2 °C Sensors Humidity 26.0% HVAC action Unknown Temperature -327.7 °C Diagnostic Battery 100% Identity PRESS LQI RSSI Logbook January 15, 2024 Danfoss 0x8040 Identify changed to January 15, 2024 at 4:20 PM triggered by service Button: Press 4:20:48 PM - 25 minutes ago - John Connett

Note that the Thermostat temperature is correct (24.2 °C) but the Sensors temperature is wrong (-327.7 °C)

Solution description

I would like the Danfoss Icon2 Room Sensor (088U2121) to be fully supported.

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=4678, maximum_buffer_size=82, maximum_incoming_transfer_size=82, server_mask=11264, maximum_outgoing_transfer_size=82, descriptor_capability_field=, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=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": "0x0301", "input_clusters": [ "0x0000", "0x0001", "0x0003", "0x0020", "0x0201", "0x0204", "0x0402", "0x0405", "0x0b05" ], "output_clusters": [ "0x0003", "0x0019" ] } }, "manufacturer": "Danfoss", "model": "0x8040", "class": "zigpy.device.Device" } ```

Diagnostic information

Diagnostic information ```json { "home_assistant": { "installation_type": "Home Assistant OS", "version": "2024.1.3", "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.71-haos", "supervisor": "2023.12.0", "host_os": "Home Assistant OS 11.4", "docker_version": "24.0.7", "chassis": "vm", "run_as_root": true }, "custom_components": {}, "integration_manifest": { "domain": "zha", "name": "Zigbee Home Automation", "after_dependencies": [ "onboarding", "usb" ], "codeowners": [ "@dmulcahey", "@adminiuga", "@puddly", "@TheJulianJES" ], "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.37.6", "pyserial==3.5", "pyserial-asyncio==0.6", "zha-quirks==0.0.109", "zigpy-deconz==0.22.4", "zigpy==0.60.4", "zigpy-xbee==0.20.1", "zigpy-zigate==0.12.0", "zigpy-znp==0.12.1", "universal-silabs-flasher==0.0.15", "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": "0403", "pid": "6015", "description": "*conbee*", "known_devices": [ "Conbee III" ] }, { "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": 16866, "manufacturer": "Danfoss", "model": "0x8040", "name": "Danfoss 0x8040", "quirk_applied": false, "quirk_class": "zigpy.device.Device", "quirk_id": null, "manufacturer_code": 4678, "power_source": "Battery or Unknown", "lqi": 255, "rssi": -5, "last_seen": "2024-01-16T15:05:42", "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=4678, maximum_buffer_size=82, maximum_incoming_transfer_size=82, server_mask=11264, maximum_outgoing_transfer_size=82, descriptor_capability_field=, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=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": "0x0301", "input_clusters": [ "0x0000", "0x0001", "0x0003", "0x0020", "0x0201", "0x0204", "0x0402", "0x0405", "0x0b05" ], "output_clusters": [ "0x0003", "0x0019" ] } }, "manufacturer": "Danfoss", "model": "0x8040" }, "active_coordinator": false, "entities": [ { "entity_id": "sensor.danfoss_0x8040_battery", "name": "Danfoss 0x8040" }, { "entity_id": "sensor.danfoss_0x8040_temperature", "name": "Danfoss 0x8040" }, { "entity_id": "sensor.danfoss_0x8040_humidity", "name": "Danfoss 0x8040" }, { "entity_id": "sensor.danfoss_0x8040_hvac_action", "name": "Danfoss 0x8040" }, { "entity_id": "climate.danfoss_0x8040_thermostat", "name": "Danfoss 0x8040" }, { "entity_id": "button.danfoss_0x8040_identify", "name": "Danfoss 0x8040" } ], "neighbors": [], "routes": [], "endpoint_names": [ { "name": "THERMOSTAT" } ], "user_given_name": null, "device_reg_id": "0bfcfdb1b6dd7085664c22e6e2ca3a07", "area_id": null, "cluster_details": { "1": { "device_type": { "name": "THERMOSTAT", "id": 769 }, "profile_id": 260, "in_clusters": { "0x0000": { "endpoint_attribute": "basic", "attributes": { "0x0004": { "attribute_name": "manufacturer", "value": "Danfoss" }, "0x0005": { "attribute_name": "model", "value": "0x8040" } }, "unsupported_attributes": {} }, "0x0001": { "endpoint_attribute": "power", "attributes": { "0x0021": { "attribute_name": "battery_percentage_remaining", "value": 200 } }, "unsupported_attributes": { "0x0020": { "attribute_name": "battery_voltage" }, "0x0033": { "attribute_name": "battery_quantity" }, "0x0031": { "attribute_name": "battery_size" } } }, "0x0003": { "endpoint_attribute": "identify", "attributes": {}, "unsupported_attributes": {} }, "0x0020": { "endpoint_attribute": "poll_control", "attributes": { "0x0000": { "attribute_name": "checkin_interval", "value": 13200 } }, "unsupported_attributes": {} }, "0x0201": { "endpoint_attribute": "thermostat", "attributes": { "0x001b": { "attribute_name": "ctrl_sequence_of_oper", "value": 2 }, "0x0000": { "attribute_name": "local_temperature", "value": 2392 }, "0x0016": { "attribute_name": "max_heat_setpoint_limit", "value": 3500 }, "0x0015": { "attribute_name": "min_heat_setpoint_limit", "value": 400 }, "0x0012": { "attribute_name": "occupied_heating_setpoint", "value": 2100 }, "0x001c": { "attribute_name": "system_mode", "value": 4 } }, "unsupported_attributes": { "0x0002": { "attribute_name": "occupancy" }, "0x0003": { "attribute_name": "abs_min_heat_setpoint_limit" }, "0x0004": { "attribute_name": "abs_max_heat_setpoint_limit" }, "0x0005": { "attribute_name": "abs_min_cool_setpoint_limit" }, "0x0006": { "attribute_name": "abs_max_cool_setpoint_limit" }, "0x0007": { "attribute_name": "pi_cooling_demand" }, "0x0008": { "attribute_name": "pi_heating_demand" }, "0x0010": { "attribute_name": "local_temperature_calibration" }, "0x0017": { "attribute_name": "min_cool_setpoint_limit" }, "0x0011": { "attribute_name": "occupied_cooling_setpoint" }, "0x0013": { "attribute_name": "unoccupied_cooling_setpoint" }, "0x0014": { "attribute_name": "unoccupied_heating_setpoint" }, "0x0018": { "attribute_name": "max_cool_setpoint_limit" }, "0x001e": { "attribute_name": "running_mode" }, "0x0029": { "attribute_name": "running_state" } } }, "0x0204": { "endpoint_attribute": "thermostat_ui", "attributes": {}, "unsupported_attributes": {} }, "0x0402": { "endpoint_attribute": "temperature", "attributes": { "0x0000": { "attribute_name": "measured_value", "value": -32768 } }, "unsupported_attributes": {} }, "0x0405": { "endpoint_attribute": "humidity", "attributes": { "0x0000": { "attribute_name": "measured_value", "value": 2700 } }, "unsupported_attributes": {} }, "0x0b05": { "endpoint_attribute": "diagnostic", "attributes": {}, "unsupported_attributes": {} } }, "out_clusters": { "0x0003": { "endpoint_attribute": "identify", "attributes": {}, "unsupported_attributes": {} }, "0x0019": { "endpoint_attribute": "ota", "attributes": {}, "unsupported_attributes": {} } } } } } } ```

Logs

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

Custom quirk

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

Additional information

No response

JohnConnett commented 9 months ago

As noted against the zigbee2mqtt issue:

According to the Cluster Library Specification Document 07-5123 Revision 8 in section 4.4.2.2.1 MeasuredValue Attribute: A MeasuredValue of 0x8000 indicates that the temperature measurement is unknown.

So it appears to be a valid response when the temperature measurement is unknown. Perhaps there should be a test for that specific value rather than reporting -327.68 °C?

JohnConnett commented 9 months ago

This may be slightly off-topic. I was comparing the contents of Download diagnostics with attributes visible through Manage zigbee device.

For example, consider the Cluster Library Specification Document 07-5123 Revision 8, section 6.6 Thermostat User Interface Configuration. The relevant section of the diagnostics is:

          "0x0204": {
            "endpoint_attribute": "thermostat_ui",
            "attributes": {},
            "unsupported_attributes": {}

However, if inspected using Manage zigbee device then three attributes are visible, two mandatory: TemperatureDisplayMode (Id: 0x0000) and KeypadLockout (Id: 0x0001); and one optional: ScheduleProgrammingVisibility (Id: 0x0002). READ ATTRIBUTE returns values for the two mandatory attributes and None for the optional attribute.

I would have expected Download diagnostics, in this case, to list the two mandatory attributes and list ScheduleProgrammingVisibility in unsupported_attributes. I'm not sure if this is a bug or a feature ...

My experience with ZHA is very limited. If there is a tool that can characterize which attributes are supported by a new device that would be very useful. Would stepping through all the options in Manage zigbee device uncover them?

github-actions[bot] commented 3 months ago

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

JohnConnett commented 3 months ago

Still interested in full support for this device. Will put in more effort if time permits.

kongsted commented 4 weeks ago

If I can be at any help with getting info about the device (we're having both 088U2121 and 088U2122 in our house), I would gladly help. Unfortunately my knowledge on how to create quirks and similar in HA is limited (haven't done that yet). //Anders