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
744 stars 681 forks source link

[Device Support Request] SmartThings Power Outlet UK reports some values incorrectly #1872

Closed jamesgreeley closed 1 year ago

jamesgreeley commented 1 year ago

Is your feature request related to a problem? Please describe.

SmartThings Power Outlet UK F-APP-UK-V2 reports incorrect values

The entities reporting incorrect values appear to be (plug named smart_thing_plug_1_dehumidifier)

sensor.smart_thing_plug_1_dehumidifier_electricalmeasurement sensor.smart_thing_plug_1_dehumidifier_electricalmeasurementrmscurrent

electricalmeasurement in watts appears to be roughly 10x higher than the real value dehumidifier_electricalmeasurementrmscurrent is out by a much larger factor.

Describe the solution you'd like Correct values to be reported

Screenshot 2022-10-30 at 08 43 11
Device 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=4174, 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": { "1": { "profile_id": 260, "device_type": "0x0100", "in_clusters": [ "0x0000", "0x0003", "0x0004", "0x0005", "0x0006", "0x0b04", "0x0b05" ], "out_clusters": [ "0x0019" ] } }, "manufacturer": "CentraLite", "model": "3200-Sgb", "class": "zigpy.device.Device" } ```
Diagnostic information ``` { "home_assistant": { "installation_type": "Home Assistant OS", "version": "2022.10.5", "dev": false, "hassio": true, "virtualenv": false, "python_version": "3.10.5", "docker": true, "arch": "x86_64", "timezone": "Europe/London", "os_name": "Linux", "os_version": "5.15.74", "supervisor": "2022.10.0", "host_os": "Home Assistant OS 9.3", "docker_version": "20.10.18", "chassis": "vm", "run_as_root": true }, "custom_components": { "purpleair": { "version": "3.1.0", "requirements": [] }, "hacs": { "version": "1.28.3", "requirements": [ "aiogithubapi>=22.2.4" ] }, "plant": { "version": "2.0.0", "requirements": [] }, "govee": { "version": "0.2.2", "requirements": [ "govee-api-laggat==0.2.2", "dacite==1.6.0" ] }, "authenticated": { "version": "21.9.0", "requirements": [] }, "hildebrand_glow_ihd": { "version": "1.1.0", "requirements": [] }, "octopusagile": { "version": "2021.3.0b0", "requirements": [] }, "garbage_collection": { "version": "4.8.3", "requirements": [ "python-dateutil>=2.8.2" ] }, "powercalc": { "version": "v0.26.1", "requirements": [ "numpy>=1.21.1" ] }, "adaptive_lighting": { "version": "1.1.0", "requirements": [] }, "hildebrandglow": { "version": "0.1.1", "requirements": [ "requests", "paho-mqtt" ] }, "nest_protect": { "version": "0.3.8", "requirements": [] }, "sonoff": { "version": "3.3.1", "requirements": [ "pycryptodome>=3.6.6" ] }, "blitzortung": { "version": "1.0.1", "requirements": [ "paho-mqtt>=1.5.0" ] }, "openplantbook": { "version": "1.1.0", "requirements": [ "pyopenplantbook==0.0.4" ] }, "thermal_comfort": { "version": "1.5.3", "requirements": [] } }, "integration_manifest": { "domain": "zha", "name": "Zigbee Home Automation", "config_flow": true, "documentation": "https://www.home-assistant.io/integrations/zha", "requirements": [ "bellows==0.34.2", "pyserial==3.5", "pyserial-asyncio==0.6", "zha-quirks==0.0.83", "zigpy-deconz==0.19.0", "zigpy==0.51.3", "zigpy-xbee==0.16.2", "zigpy-zigate==0.10.2", "zigpy-znp==0.9.1" ], "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" ] } ], "codeowners": [ "@dmulcahey", "@adminiuga", "@puddly" ], "zeroconf": [ { "type": "_esphomelib._tcp.local.", "name": "tube*" }, { "type": "_zigate-zigbee-gateway._tcp.local.", "name": "*zigate*" }, { "type": "_zigstar_gw._tcp.local.", "name": "*zigstar*" } ], "dependencies": [ "file_upload" ], "after_dependencies": [ "onboarding", "usb", "zeroconf" ], "iot_class": "local_polling", "loggers": [ "aiosqlite", "bellows", "crccheck", "pure_pcapy3", "zhaquirks", "zigpy", "zigpy_deconz", "zigpy_xbee", "zigpy_zigate", "zigpy_znp" ], "is_built_in": true }, "data": { "ieee": "**REDACTED**", "nwk": 14246, "manufacturer": "CentraLite", "model": "3200-Sgb", "name": "CentraLite 3200-Sgb", "quirk_applied": false, "quirk_class": "zigpy.device.Device", "manufacturer_code": 4174, "power_source": "Mains", "lqi": 215, "rssi": -67, "last_seen": "2022-10-30T08:54:01", "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=4174, 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": { "1": { "profile_id": 260, "device_type": "0x0100", "in_clusters": [ "0x0000", "0x0003", "0x0004", "0x0005", "0x0006", "0x0b04", "0x0b05" ], "out_clusters": [ "0x0019" ] } } }, "active_coordinator": false, "entities": [ { "entity_id": "button.smart_thing_plug_1_dehumidifier_identifybutton", "name": "CentraLite 3200-Sgb" }, { "entity_id": "sensor.smart_thing_plug_1_dehumidifier_electricalmeasurement", "name": "CentraLite 3200-Sgb" }, { "entity_id": "sensor.smart_thing_plug_1_dehumidifier_electricalmeasurementrmscurrent", "name": "CentraLite 3200-Sgb" }, { "entity_id": "sensor.smart_thing_plug_1_dehumidifier_electricalmeasurementrmsvoltage", "name": "CentraLite 3200-Sgb" }, { "entity_id": "sensor.smart_thing_plug_1_dehumidifier_electricalmeasurementfrequency", "name": "CentraLite 3200-Sgb" }, { "entity_id": "sensor.smart_thing_plug_1_dehumidifier_electricalmeasurementpowerfactor", "name": "CentraLite 3200-Sgb" }, { "entity_id": "switch.smart_thing_plug_1_dehumidifier_switch", "name": "CentraLite 3200-Sgb" } ], "neighbors": [ { "device_type": "Coordinator", "rx_on_when_idle": "On", "relationship": "NoneOfTheAbove", "extended_pan_id": "**REDACTED**", "ieee": "**REDACTED**", "nwk": "0x0000", "permit_joining": "Unknown", "depth": "0", "lqi": "255" }, { "device_type": "Router", "rx_on_when_idle": "On", "relationship": "NoneOfTheAbove", "extended_pan_id": "**REDACTED**", "ieee": "**REDACTED**", "nwk": "0x0887", "permit_joining": "Unknown", "depth": "15", "lqi": "255" }, { "device_type": "Router", "rx_on_when_idle": "On", "relationship": "NoneOfTheAbove", "extended_pan_id": "**REDACTED**", "ieee": "**REDACTED**", "nwk": "0x08A1", "permit_joining": "Unknown", "depth": "15", "lqi": "254" }, { "device_type": "Router", "rx_on_when_idle": "On", "relationship": "NoneOfTheAbove", "extended_pan_id": "**REDACTED**", "ieee": "**REDACTED**", "nwk": "0x0B6F", "permit_joining": "Unknown", "depth": "15", "lqi": "253" }, { "device_type": "Router", "rx_on_when_idle": "On", "relationship": "NoneOfTheAbove", "extended_pan_id": "**REDACTED**", "ieee": "**REDACTED**", "nwk": "0x3DDB", "permit_joining": "Unknown", "depth": "15", "lqi": "255" }, { "device_type": "Router", "rx_on_when_idle": "On", "relationship": "NoneOfTheAbove", "extended_pan_id": "**REDACTED**", "ieee": "**REDACTED**", "nwk": "0x4137", "permit_joining": "Unknown", "depth": "15", "lqi": "253" }, { "device_type": "Router", "rx_on_when_idle": "On", "relationship": "NoneOfTheAbove", "extended_pan_id": "**REDACTED**", "ieee": "**REDACTED**", "nwk": "0x45AE", "permit_joining": "Unknown", "depth": "15", "lqi": "254" }, { "device_type": "Router", "rx_on_when_idle": "On", "relationship": "NoneOfTheAbove", "extended_pan_id": "**REDACTED**", "ieee": "**REDACTED**", "nwk": "0x7320", "permit_joining": "Unknown", "depth": "15", "lqi": "252" }, { "device_type": "Router", "rx_on_when_idle": "On", "relationship": "NoneOfTheAbove", "extended_pan_id": "**REDACTED**", "ieee": "**REDACTED**", "nwk": "0x7374", "permit_joining": "Unknown", "depth": "15", "lqi": "254" }, { "device_type": "Router", "rx_on_when_idle": "On", "relationship": "NoneOfTheAbove", "extended_pan_id": "**REDACTED**", "ieee": "**REDACTED**", "nwk": "0x8BDF", "permit_joining": "Unknown", "depth": "15", "lqi": "254" }, { "device_type": "Router", "rx_on_when_idle": "On", "relationship": "NoneOfTheAbove", "extended_pan_id": "**REDACTED**", "ieee": "**REDACTED**", "nwk": "0x9CD8", "permit_joining": "Unknown", "depth": "15", "lqi": "254" }, { "device_type": "Router", "rx_on_when_idle": "On", "relationship": "NoneOfTheAbove", "extended_pan_id": "**REDACTED**", "ieee": "**REDACTED**", "nwk": "0xA269", "permit_joining": "Unknown", "depth": "15", "lqi": "254" }, { "device_type": "Router", "rx_on_when_idle": "On", "relationship": "NoneOfTheAbove", "extended_pan_id": "**REDACTED**", "ieee": "**REDACTED**", "nwk": "0xB307", "permit_joining": "Unknown", "depth": "15", "lqi": "253" }, { "device_type": "Router", "rx_on_when_idle": "On", "relationship": "NoneOfTheAbove", "extended_pan_id": "**REDACTED**", "ieee": "**REDACTED**", "nwk": "0xD145", "permit_joining": "Unknown", "depth": "15", "lqi": "248" }, { "device_type": "Router", "rx_on_when_idle": "On", "relationship": "NoneOfTheAbove", "extended_pan_id": "**REDACTED**", "ieee": "**REDACTED**", "nwk": "0xE2A3", "permit_joining": "Unknown", "depth": "15", "lqi": "255" }, { "device_type": "Router", "rx_on_when_idle": "On", "relationship": "NoneOfTheAbove", "extended_pan_id": "**REDACTED**", "ieee": "**REDACTED**", "nwk": "0xEB9F", "permit_joining": "Unknown", "depth": "15", "lqi": "254" } ], "endpoint_names": [ { "name": "ON_OFF_LIGHT" } ], "user_given_name": "Smart Thing Plug 1 - dehumidifier", "device_reg_id": "1083bf1a6e53075846244dad1fefc218", "area_id": null, "cluster_details": { "1": { "device_type": { "name": "ON_OFF_LIGHT", "id": 256 }, "profile_id": 260, "in_clusters": { "0x0000": { "endpoint_attribute": "basic", "attributes": { "0x0004": { "attribute_name": "manufacturer", "value": "CentraLite" }, "0x0005": { "attribute_name": "model", "value": "3200-Sgb" } }, "unsupported_attributes": {} }, "0x0003": { "endpoint_attribute": "identify", "attributes": {}, "unsupported_attributes": {} }, "0x0004": { "endpoint_attribute": "groups", "attributes": {}, "unsupported_attributes": {} }, "0x0005": { "endpoint_attribute": "scenes", "attributes": {}, "unsupported_attributes": {} }, "0x0006": { "endpoint_attribute": "on_off", "attributes": { "0x0000": { "attribute_name": "on_off", "value": 1 } }, "unsupported_attributes": { "0x4003": { "attribute_name": "start_up_on_off" } } }, "0x0b04": { "endpoint_attribute": "electrical_measurement", "attributes": { "0x0000": { "attribute_name": "measurement_type", "value": 0 }, "0x0300": { "attribute_name": "ac_frequency", "value": 50 }, "0x0505": { "attribute_name": "rms_voltage", "value": 240 }, "0x0508": { "attribute_name": "rms_current", "value": 1995 }, "0x050b": { "attribute_name": "active_power", "value": 3042 }, "0x0602": { "attribute_name": "ac_current_multiplier", "value": 1 }, "0x0603": { "attribute_name": "ac_current_divisor", "value": 1 }, "0x0604": { "attribute_name": "ac_power_multiplier", "value": 1 }, "0x0605": { "attribute_name": "ac_power_divisor", "value": 1 } }, "unsupported_attributes": { "0x0600": { "attribute_name": "ac_voltage_multiplier" }, "0x0601": { "attribute_name": "ac_voltage_divisor" }, "0x0302": { "attribute_name": "ac_frequency_max" }, "0x0401": { "attribute_name": "ac_frequency_divisor" }, "0x050d": { "attribute_name": "active_power_max" }, "0x0400": { "attribute_name": "ac_frequency_multiplier" }, "0x0507": { "attribute_name": "rms_voltage_max" }, "0x0403": { "attribute_name": "power_divisor" }, "0x0402": { "attribute_name": "power_multiplier" }, "0x050a": { "attribute_name": "rms_current_max" }, "0x050f": { "attribute_name": "apparent_power" } } }, "0x0b05": { "endpoint_attribute": "diagnostic", "attributes": {}, "unsupported_attributes": {} } }, "out_clusters": { "0x0019": { "endpoint_attribute": "ota", "attributes": {}, "unsupported_attributes": {} } } } } } } ``` ## System Information version | core-2022.10.5 -- | -- installation_type | Home Assistant OS dev | false hassio | true docker | true user | root virtualenv | false python_version | 3.10.5 os_name | Linux os_version | 5.15.74 arch | x86_64 timezone | Europe/London config_dir | /config
Home Assistant Cloud logged_in | false -- | -- can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | ok
Home Assistant Supervisor host_os | Home Assistant OS 9.3 -- | -- update_channel | stable supervisor_version | supervisor-2022.10.0 agent_version | 1.4.1 docker_version | 20.10.18 disk_total | 30.8 GB disk_used | 19.4 GB healthy | true supported | true board | ova supervisor_api | ok version_api | ok
bmccluskey commented 1 year ago

I have seen this issue with devices on the same firmware version 0x30015310. The 2 devices I have on the same version report approx 10x the real value for electrical measurement. I have 4 other devices using version 0x30065310 (Note the 6 instead of 1) that are reporting the value correctly.

Im attempting to upgrade the firmware via Smartthings. Well let you know if I have any success.

TheJulianJES commented 1 year ago

So for the power consumption, we could just make a quirk that overrides the AC_POWER_DIVISOR on the ElectricalMeasurement cluster to 10.

However, I'm not sure by what value the current is off. It looks like it should be 1,263 A * 241 V = 304.4 W

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