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
684 stars 636 forks source link

[Device Support Request] Niko Zigbee Connected RollerShade Control 552-72301 #3200

Open nikplas opened 4 weeks ago

nikplas commented 4 weeks ago

Problem description

I got this Niko zigbee motor control , 552-723, (https://www.niko.eu/en/products/niko-home-control/products-for-traditional-wiring/connected-motor-control-3-a-zigbee-productmodel-niko-7a97247a-5e33-5eaf-b21e-893ba9f15378) ; in order to operate rollershades; I got HAOS with RPI with latest versions: Core 2024.6.2, Supervisor 2024.06.0, Operating System 12.3, Frontend 20240610.0 24.6.2

I got also ZHA and skyconnect; This Niko zigbee Device is easily discoverd and installed, but there is no support for calibration, or how to set the up/down limit in seconds; This device comes preinstalled with a 90sec up and/or 90sec down running time, wich is practically too long . An other issue is the visualisation of the state on HA, when the roller is 100% up, HA shows state closed en vice versa; Support for invertion also not possible;

Operation with the buttons on device self is no issue and works wel. When left button is pressed, cover goes up en when right button is cover goes down;

Operation via HA automations, for example the window cover open or close on a specifiek time is also no issue; it goes to the right direction up or down

Solution description

please advice on how to gain this extra funcionality, invertion om cover state and setting up/down time limit i am beginner with ZHA and cluster settings but would like to try it

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=4703, 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": "0x0202", "input_clusters": [ "0x0000", "0x0003", "0x0004", "0x0005", "0x0102", "0x0b05", "0xfc00", "0xfc01" ], "output_clusters": [ "0x0019" ] }, "242": { "profile_id": "0xa1e0", "device_type": "0x0061", "input_clusters": [], "output_clusters": [ "0x0021" ] } }, "manufacturer": "NIKO NV", "model": "Connectable motor control,3A", "class": "zigpy.device.Device" ] ```

Diagnostic information

Diagnostic information ```json [{ "home_assistant": { "installation_type": "Home Assistant OS", "version": "2024.6.2", "dev": false, "hassio": true, "virtualenv": false, "python_version": "3.12.2", "docker": true, "arch": "aarch64", "timezone": "Europe/Amsterdam", "os_name": "Linux", "os_version": "6.6.28-haos-raspi", "supervisor": "2024.06.0", "host_os": "Home Assistant OS 12.3", "docker_version": "25.0.5", "chassis": "embedded", "run_as_root": true }, "custom_components": { "scheduler": { "documentation": "https://github.com/nielsfaber/scheduler-component", "version": "v0.0.0", "requirements": [] }, "alexa_media": { "documentation": "https://github.com/alandtse/alexa_media_player/wiki", "version": "4.10.2", "requirements": [ "alexapy==1.27.10", "packaging>=20.3", "wrapt>=1.14.0" ] }, "weatherlink": { "documentation": "https://github.com/astrandb/weatherlink", "version": "2024.1.1", "requirements": [] }, "daikin_residential": { "documentation": "https://github.com/rospogrigio/daikin_residential/", "version": "2.3.1", "requirements": [ "oic==1.6.0" ] }, "localtuya": { "documentation": "https://github.com/rospogrigio/localtuya/", "version": "5.2.1", "requirements": [] }, "hacs": { "documentation": "https://hacs.xyz/docs/configuration/start", "version": "1.34.0", "requirements": [ "aiogithubapi>=22.10.1" ] } }, "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.39.0", "pyserial==3.5", "zha-quirks==0.0.116", "zigpy-deconz==0.23.1", "zigpy==0.64.0", "zigpy-xbee==0.20.1", "zigpy-zigate==0.12.0", "zigpy-znp==0.12.1", "universal-silabs-flasher==0.0.20", "pyserial-asyncio-fast==0.11" ], "usb": [ { "vid": "10C4", "pid": "EA60", "description": "*2652*", "known_devices": [ "slae.sh cc2652rb stick" ] }, { "vid": "10C4", "pid": "EA60", "description": "*slzb-07*", "known_devices": [ "smlight slzb-07" ] }, { "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 }, "setup_times": { "null": { "setup": 0.00039119600023695966 }, "0779122d634d3c35063a82c02a16c7a0": { "wait_import_platforms": -0.0012064530001225648, "wait_base_component": -0.004700449999745615, "config_entry_setup": 55.51574662600024 } }, "data": { "ieee": "**REDACTED**", "nwk": 2200, "manufacturer": "NIKO NV", "model": "Connectable motor control,3A", "name": "NIKO NV Connectable motor control,3A", "quirk_applied": false, "quirk_class": "zigpy.device.Device", "quirk_id": null, "manufacturer_code": 4703, "power_source": "Mains", "lqi": 176, "rssi": -56, "last_seen": "2024-06-12T10:15:58", "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=4703, 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": "0x0202", "input_clusters": [ "0x0000", "0x0003", "0x0004", "0x0005", "0x0102", "0x0b05", "0xfc00", "0xfc01" ], "output_clusters": [ "0x0019" ] }, "242": { "profile_id": "0xa1e0", "device_type": "0x0061", "input_clusters": [], "output_clusters": [ "0x0021" ] } }, "manufacturer": "NIKO NV", "model": "Connectable motor control,3A" }, "active_coordinator": false, "entities": [ { "entity_id": "button.niko_shutter_control_identificeren", "name": "NIKO NV Connectable motor control,3A" }, { "entity_id": "cover.niko_shutter_control_raambekleding", "name": "NIKO NV Connectable motor control,3A" }, { "entity_id": "sensor.niko_shutter_control_window_covering_type", "name": "NIKO NV Connectable motor control,3A" }, { "entity_id": "update.niko_shutter_control_firmware", "name": "NIKO NV Connectable motor control,3A" } ], "neighbors": [ { "device_type": "Coordinator", "rx_on_when_idle": "On", "relationship": "Parent", "extended_pan_id": "**REDACTED**", "ieee": "**REDACTED**", "nwk": "0x0000", "permit_joining": "Unknown", "depth": "0", "lqi": "163" }, { "device_type": "Router", "rx_on_when_idle": "On", "relationship": "Sibling", "extended_pan_id": "**REDACTED**", "ieee": "**REDACTED**", "nwk": "0x61B0", "permit_joining": "Unknown", "depth": "15", "lqi": "191" }, { "device_type": "Router", "rx_on_when_idle": "On", "relationship": "Sibling", "extended_pan_id": "**REDACTED**", "ieee": "**REDACTED**", "nwk": "0x69C4", "permit_joining": "Unknown", "depth": "15", "lqi": "118" }, { "device_type": "Router", "rx_on_when_idle": "On", "relationship": "Sibling", "extended_pan_id": "**REDACTED**", "ieee": "**REDACTED**", "nwk": "0x9C3C", "permit_joining": "Unknown", "depth": "15", "lqi": "200" } ], "routes": [ { "dest_nwk": "0x0000", "route_status": "Active", "memory_constrained": true, "many_to_one": true, "route_record_required": false, "next_hop": "0x0000" } ], "endpoint_names": [ { "name": "WINDOW_COVERING_DEVICE" }, { "name": "PROXY_BASIC" } ], "user_given_name": "Niko_Shutter_Control", "device_reg_id": "496d3c9cad8d8149796084f7c67a1f3e", "area_id": "living_room", "cluster_details": { "1": { "device_type": { "name": "WINDOW_COVERING_DEVICE", "id": 514 }, "profile_id": 260, "in_clusters": { "0x0000": { "endpoint_attribute": "basic", "attributes": { "0x0001": { "attribute_name": "app_version", "value": 2 }, "0x0006": { "attribute_name": "date_code", "value": "20200930" }, "0x0008": { "attribute_name": "generic_device_class", "value": 255 }, "0x0009": { "attribute_name": "generic_device_type", "value": 255 }, "0x0004": { "attribute_name": "manufacturer", "value": "NIKO NV" }, "0x0005": { "attribute_name": "model", "value": "Connectable motor control,3A" }, "0x0007": { "attribute_name": "power_source", "value": 1 }, "0x000b": { "attribute_name": "product_url", "value": "www.niko.eu" }, "0x4000": { "attribute_name": "sw_build_id", "value": "313-690-00" }, "0x0000": { "attribute_name": "zcl_version", "value": 3 } }, "unsupported_attributes": { "0x0013": { "attribute_name": "alarm_mask" }, "0x0010": { "attribute_name": "location_desc" }, "0x0011": { "attribute_name": "physical_env" }, "0x0014": { "attribute_name": "disable_local_config" }, "0x0012": { "attribute_name": "device_enabled" } } }, "0x0003": { "endpoint_attribute": "identify", "attributes": { "0x0000": { "attribute_name": "identify_time", "value": 0 } }, "unsupported_attributes": { "0xfffe": { "attribute_name": "reporting_status" } } }, "0x0004": { "endpoint_attribute": "groups", "attributes": {}, "unsupported_attributes": {} }, "0x0005": { "endpoint_attribute": "scenes", "attributes": {}, "unsupported_attributes": {} }, "0x0102": { "endpoint_attribute": "window_covering", "attributes": { "0x0007": { "attribute_name": "config_status", "value": 3 }, "0x0008": { "attribute_name": "current_position_lift_percentage", "value": 100 }, "0x0005": { "attribute_name": "number_of_actuations_lift", "value": 56 }, "0x0017": { "attribute_name": "window_covering_mode", "value": 1 }, "0x0000": { "attribute_name": "window_covering_type", "value": 0 } }, "unsupported_attributes": { "0x0011": { "attribute_name": "installed_closed_limit_lift" }, "0x0001": { "attribute_name": "physical_closed_limit_lift" }, "0x0002": { "attribute_name": "physical_closed_limit_tilt" }, "0x0003": { "attribute_name": "current_position_lift" }, "0x0004": { "attribute_name": "current_position_tilt" }, "0x0016": { "attribute_name": "deceleration_time_lift" }, "0x0006": { "attribute_name": "number_of_actuations_tilt" }, "0x0014": { "attribute_name": "velocity_lift" }, "0x0015": { "attribute_name": "acceleration_time_lift" }, "0x0009": { "attribute_name": "current_position_tilt_percentage" }, "0x0013": { "attribute_name": "installed_closed_limit_tilt" }, "0x0010": { "attribute_name": "installed_open_limit_lift" }, "0x0012": { "attribute_name": "installed_open_limit_tilt" }, "0x0018": { "attribute_name": "intermediate_setpoints_lift" }, "0x0017": { "attribute_name": "window_covering_mode" }, "0x0019": { "attribute_name": "intermediate_setpoints_tilt" } } }, "0x0b05": { "endpoint_attribute": "diagnostic", "attributes": {}, "unsupported_attributes": { "0x0116": { "attribute_name": "aps_decrypt_failures" } } }, "0xfc00": { "endpoint_attribute": "manufacturer_specific", "attributes": {}, "unsupported_attributes": {} }, "0xfc01": { "endpoint_attribute": "manufacturer_specific", "attributes": {}, "unsupported_attributes": {} } }, "out_clusters": { "0x0019": { "endpoint_attribute": "ota", "attributes": { "0x0002": { "attribute_name": "current_file_version", "value": 555089926 } }, "unsupported_attributes": {} } } }, "242": { "device_type": { "name": "PROXY_BASIC", "id": 97 }, "profile_id": 41440, "in_clusters": {}, "out_clusters": { "0x0021": { "endpoint_attribute": "green_power", "attributes": {}, "unsupported_attributes": {} } } } } } }] ```

Logs

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

Custom quirk

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

Additional information

No response

nikplas commented 3 weeks ago

i also see the following lines in the zigbee device configuration details, i assume that 900 is in ms the preset running time of the motor 90sec, does someboby know how to edit this?

WindowCovering Attribute min/max/change
current_position_lift_percentage: 0/900/1 current_position_tilt_percentage: 0/900/1

JFMous commented 3 weeks ago

I just purchased the same control and facing the same issues. I've already been able to figure out that the opening/closing time in seconds are zigbee attributes 0xfcc1 (opening seconds) and 0xfcc2 (closing seconds) in cluster 0x0102 (window_covering). But the reversed reporting for the open/closed state is really annoying.

nikplas commented 3 weeks ago

I just purchased the same control and facing the same issues. I've already been able to figure out that the opening/closing time in seconds are zigbee attributes 0xfcc1 (opening seconds) and 0xfcc2 (closing seconds) in cluster 0x0102 (window_covering). But the reversed reporting for the open/closed state is really annoying.

JFMous, super, thnks for your feedback, i will check and replace the closing/opening attributes so as you describe

nikplas commented 3 weeks ago

attributes1 attributes2

how did you manage to get those 0xfcc1 and 0xfcc2 attributes? i dont see these 2 in my window_covering cluster, see also screenshot

JFMous commented 3 weeks ago

how did you manage to get those 0xfcc1 and 0xfcc2 attributes? i dont see these 2 in my window_covering cluster, see also screenshot

I used ZHA toolkit. After you've installed the toolkit, you can call the service as follows from the Development tools >> services (YAML mode):

service: zha_toolkit.attr_write
data:
  ieee: '60:b6:47:ff:fe:07:8a:5d' #replace with IEEE of NIKO motor control
  cluster: 0x0102
  attribute: 0xfcc1
  manf: 4703
  attr_val: 26 #seconds to lift

Just replace the ieee with the address of your motor controller and the attr_val with the time in seconds to fully open the roller shade. Then change attribute to 0xfcc2 and attr_val to the time it takes to close the shade (in my case that was 2 seconds shorter, because gravity helps a bit when closing) and issue the command again.

nikplas commented 3 weeks ago

how did you manage to get those 0xfcc1 and 0xfcc2 attributes? i dont see these 2 in my window_covering cluster, see also screenshot

I used ZHA toolkit. After you've installed the toolkit, you can call the service as follows from the Development tools >> services (YAML mode):

service: zha_toolkit.attr_write
data:
  ieee: '60:b6:47:ff:fe:07:8a:5d' #replace with IEEE of NIKO motor control
  cluster: 0x0102
  attribute: 0xfcc1
  manf: 4703
  attr_val: 26 #seconds to lift

Just replace the ieee with the address of your motor controller and the attr_val with the time in seconds to fully open the roller shade. Then change attribute to 0xfcc2 and attr_val to the time it takes to close the shade (in my case that was 2 seconds shorter, because gravity helps a bit when closing) and issue the command again.

JFMous, thank you very much, I did exactly what you described and it worked! I have now installed the correct opening and closing times.

if we can still figure out, how to fix the reversed repported roller state on HA, that would be perfect. Maybe someone who uses the Niko Home Control and their zigbee hub can tell us if we still miss more functionality, for example the feedback leds option to activate/deactivate