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] ORVIBO DD10Z spotlight #2642

Closed sj8023ld closed 5 months ago

sj8023ld commented 12 months ago

Problem description

I add this device to zha, but this device can't change brightness because this device doesn't support moveToLevelWithOnOff therefore this converter is needed.

Solution description

device Support for DD10Z by ORVIBO (use move_to_level)

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=4098, 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=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": "0x0104", "device_type": "0x0102", "input_clusters": [ "0x0000", "0x0003", "0x0004", "0x0005", "0x0006", "0x0008", "0x0300", "0xff00" ], "output_clusters": [ "0x0019" ] } }, "manufacturer": "ORVIBO", "model": "250bccf66c41421b91b5e3242942c164", "class": "zigpy.device.Device" } ```

Diagnostic information

Diagnostic information ```json { "home_assistant": { "installation_type": "Home Assistant Container", "version": "2023.8.4", "dev": false, "hassio": false, "virtualenv": false, "python_version": "3.11.4", "docker": true, "arch": "aarch64", "timezone": "Asia/Shanghai", "os_name": "Linux", "os_version": "4.19.232-ab79", "run_as_root": true }, "custom_components": { "xiaomi_miot": { "version": "0.7.11", "requirements": [ "construct==2.10.56", "python-miio>=0.5.6", "micloud>=0.3" ] }, "aqara_gateway": { "version": "0.0.14", "requirements": [ "paho-mqtt>=1.5.0" ] }, "colorfulclouds": { "version": "1.2.6", "requirements": [] }, "webrtc": { "version": "v3.3.0", "requirements": [] }, "haier": { "version": "0.1.2", "requirements": [] }, "hacs": { "version": "1.32.1", "requirements": [ "aiogithubapi>=22.10.1" ] }, "nodered": { "version": "2.2.0", "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" ], "requirements": [ "bellows==0.35.9", "pyserial==3.5", "pyserial-asyncio==0.6", "zha-quirks==0.0.102", "zigpy-deconz==0.21.0", "zigpy==0.56.4", "zigpy-xbee==0.18.1", "zigpy-zigate==0.11.0", "zigpy-znp==0.11.4" ], "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": "_slzb-06._tcp.local.", "name": "slzb-06*" } ], "is_built_in": true }, "data": { "ieee": "**REDACTED**", "nwk": 62590, "manufacturer": "ORVIBO", "model": "250bccf66c41421b91b5e3242942c164", "name": "ORVIBO 250bccf66c41421b91b5e3242942c164", "quirk_applied": false, "quirk_class": "zigpy.device.Device", "manufacturer_code": 4098, "power_source": "Mains", "lqi": 91, "rssi": null, "last_seen": "2023-10-11T23:31:40", "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=4098, 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=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": "0x0104", "device_type": "0x0102", "input_clusters": [ "0x0000", "0x0003", "0x0004", "0x0005", "0x0006", "0x0008", "0x0300", "0xff00" ], "output_clusters": [ "0x0019" ] } }, "manufacturer": "ORVIBO", "model": "250bccf66c41421b91b5e3242942c164" }, "active_coordinator": false, "entities": [ { "entity_id": "button.orvibo_250bccf66c41421b91b5e3242942c164_identify", "name": "ORVIBO 250bccf66c41421b91b5e3242942c164" }, { "entity_id": "light.orvibo_250bccf66c41421b91b5e3242942c164_light", "name": "ORVIBO 250bccf66c41421b91b5e3242942c164" }, { "entity_id": "number.orvibo_250bccf66c41421b91b5e3242942c164_on_off_transition_time", "name": "ORVIBO 250bccf66c41421b91b5e3242942c164" }, { "entity_id": "number.orvibo_250bccf66c41421b91b5e3242942c164_on_transition_time", "name": "ORVIBO 250bccf66c41421b91b5e3242942c164" }, { "entity_id": "number.orvibo_250bccf66c41421b91b5e3242942c164_off_transition_time", "name": "ORVIBO 250bccf66c41421b91b5e3242942c164" }, { "entity_id": "number.orvibo_250bccf66c41421b91b5e3242942c164_start_up_color_temperature", "name": "ORVIBO 250bccf66c41421b91b5e3242942c164" } ], "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": "1" }, { "device_type": "Router", "rx_on_when_idle": "On", "relationship": "Parent", "extended_pan_id": "**REDACTED**", "ieee": "**REDACTED**", "nwk": "0x32FB", "permit_joining": "Unknown", "depth": "15", "lqi": "27" }, { "device_type": "Router", "rx_on_when_idle": "On", "relationship": "Sibling", "extended_pan_id": "**REDACTED**", "ieee": "**REDACTED**", "nwk": "0x4761", "permit_joining": "Unknown", "depth": "15", "lqi": "128" }, { "device_type": "Router", "rx_on_when_idle": "On", "relationship": "Sibling", "extended_pan_id": "**REDACTED**", "ieee": "**REDACTED**", "nwk": "0x8F1E", "permit_joining": "Unknown", "depth": "15", "lqi": "238" } ], "routes": [ { "dest_nwk": "0xD811", "route_status": "Active", "memory_constrained": false, "many_to_one": false, "route_record_required": false, "next_hop": "0x32FB" }, { "dest_nwk": "0xE773", "route_status": "Active", "memory_constrained": true, "many_to_one": true, "route_record_required": true, "next_hop": "0xE773" }, { "dest_nwk": "0x8F1E", "route_status": "Active", "memory_constrained": true, "many_to_one": true, "route_record_required": true, "next_hop": "0x8F1E" }, { "dest_nwk": "0x32FB", "route_status": "Active", "memory_constrained": true, "many_to_one": true, "route_record_required": true, "next_hop": "0x32FB" }, { "dest_nwk": "0x0000", "route_status": "Active", "memory_constrained": false, "many_to_one": true, "route_record_required": false, "next_hop": "0x4761" }, { "dest_nwk": "0xF662", "route_status": "Active", "memory_constrained": false, "many_to_one": false, "route_record_required": false, "next_hop": "0x32FB" } ], "endpoint_names": [ { "name": "COLOR_DIMMABLE_LIGHT" } ], "user_given_name": "\u667a\u80fd\u8c03\u5149\u706f", "device_reg_id": "4667e2988593ae1c100413cf86f091cc", "area_id": "wei_sheng_jian", "cluster_details": { "1": { "device_type": { "name": "COLOR_DIMMABLE_LIGHT", "id": 258 }, "profile_id": 260, "in_clusters": { "0x0000": { "endpoint_attribute": "basic", "attributes": { "0x0004": { "attribute_name": "manufacturer", "value": "ORVIBO" }, "0x0005": { "attribute_name": "model", "value": "250bccf66c41421b91b5e3242942c164" } }, "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" } } }, "0x0008": { "endpoint_attribute": "level", "attributes": { "0x0000": { "attribute_name": "current_level", "value": 128 }, "0x0013": { "attribute_name": "off_transition_time", "value": 20 }, "0x0010": { "attribute_name": "on_off_transition_time", "value": 20 }, "0x0012": { "attribute_name": "on_transition_time", "value": 20 } }, "unsupported_attributes": { "0x4000": { "attribute_name": "start_up_current_level" }, "0x0003": { "attribute_name": "max_level" }, "0x0002": { "attribute_name": "min_level" }, "0x0014": { "attribute_name": "default_move_rate" }, "0x0011": { "attribute_name": "on_level" } } }, "0x0300": { "endpoint_attribute": "light_color", "attributes": { "0x400a": { "attribute_name": "color_capabilities", "value": 16 }, "0x0008": { "attribute_name": "color_mode", "value": 2 }, "0x400c": { "attribute_name": "color_temp_physical_max", "value": 371 }, "0x400b": { "attribute_name": "color_temp_physical_min", "value": 153 }, "0x0007": { "attribute_name": "color_temperature", "value": 250 }, "0x0003": { "attribute_name": "current_x", "value": 24939 }, "0x0004": { "attribute_name": "current_y", "value": 24701 }, "0x000f": { "attribute_name": "options", "value": 0 }, "0x4010": { "attribute_name": "start_up_color_temperature", "value": 153 } }, "unsupported_attributes": { "0x0000": { "attribute_name": "current_hue" }, "0x4000": { "attribute_name": "enhanced_current_hue" }, "0x0001": { "attribute_name": "current_saturation" }, "0x4002": { "attribute_name": "color_loop_active" } } }, "0xff00": { "endpoint_attribute": "manufacturer_specific", "attributes": {}, "unsupported_attributes": {} } }, "out_clusters": { "0x0019": { "endpoint_attribute": "ota", "attributes": {}, "unsupported_attributes": {} } } } } } } ```

Logs

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

Custom quirk

Custom quirk ```python """ORVIBO dimmers.""" from zigpy.profiles import zha from zigpy.quirks import CustomDevice from zigpy.zcl.clusters.general import Basic, Groups, LevelControl, OnOff, Scenes, Ota from zigpy.zcl.clusters.lighting import Color from zhaquirks.const import ( DEVICE_TYPE, ENDPOINTS, INPUT_CLUSTERS, MODELS_INFO, OUTPUT_CLUSTERS, PROFILE_ID, ) from zhaquirks.orvibo import ORVIBO MANUFACTURER_SPECIFIC_CLUSTER_ID = 0xFF00 class DD10Z(CustomDevice): """DD10Z Spotlight.""" signature = { # MODELS_INFO: [(ORVIBO, "250bccf66c41421b91b5e3242942c164")], ENDPOINTS: { 1: { PROFILE_ID: zha.PROFILE_ID, DEVICE_TYPE: zha.DeviceType.COLOR_DIMMABLE_LIGHT, INPUT_CLUSTERS: [ Basic.cluster_id, Groups.cluster_id, Scenes.cluster_id, OnOff.cluster_id, LevelControl.cluster_id, Color.cluster_id, MANUFACTURER_SPECIFIC_CLUSTER_ID, ], OUTPUT_CLUSTERS: [Ota.cluster_id], } }, } replacement = { ENDPOINTS: { 1: { DEVICE_TYPE: zha.DeviceType.DIMMABLE_LIGHT, INPUT_CLUSTERS: [ Basic.cluster_id, Groups.cluster_id, Scenes.cluster_id, OnOff.cluster_id, LevelControl.cluster_id, ], OUTPUT_CLUSTERS: [Ota.cluster_id], } } } ```

Additional information

No response

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