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
777 stars 703 forks source link

[Device Support Request] Aqara Roller Shade Driver E1 #1181

Open PeteCondliffe opened 3 years ago

PeteCondliffe commented 3 years ago

Is your feature request related to a problem? Please describe. The cover entity in HA will control the roller but does not update its position so it is always 100 Looking at the WindowCovering cluster current_position_lift_percentage, always reports 0

Describe the solution you'd like Someone way smarter than me who would be so kind to fix it. I cannot get my head around creating a quirk

Device signature - this can be acquired by removing the device from ZHA and pairing it again from the add devices screen. Be sure to add the entire content of the log panel after pairing the device to a code block below this line.

{
  "node_descriptor": "NodeDescriptor(logical_type=<LogicalType.EndDevice: 2>, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=<FrequencyBand.Freq2400MHz: 8>, mac_capability_flags=<MACCapabilityFlags.AllocateAddress: 128>, manufacturer_code=4447, maximum_buffer_size=127, maximum_incoming_transfer_size=100, server_mask=11264, maximum_outgoing_transfer_size=100, descriptor_capability_field=<DescriptorCapability.NONE: 0>, *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": 260,
      "device_type": "0x0100",
      "in_clusters": [
        "0x0000",
        "0x0002",
        "0x0003",
        "0x0004",
        "0x0005",
        "0x0006",
        "0x0009",
        "0x000d",
        "0x0013",
        "0x0102"
      ],
      "out_clusters": [
        "0x000a",
        "0x0019"
      ]
    },
    "242": {
      "profile_id": 41440,
      "device_type": "0x0061",
      "in_clusters": [],
      "out_clusters": [
        "0x0021"
      ]
    }
  },
  "manufacturer": "LUMI",
  "model": "lumi.curtain.acn002",
  "class": "zigpy.device.Device"
}

Additional context There is a number entity, AnalongOutput cluster. This seems to update when controlling the roller via its physical buttons or the cover entity.

Bonus: make the device report battery state - I believe it reports in the official app although im not sure this is possable because I cannot see it in any of the clusters that makes any sense to me.

There is also a switch, which apears to do nothing and is always in an of state

schwickster commented 2 years ago

@hastime I use this method for as long if there's no new release of zigpy zha device handlers. https://github.com/zigpy/zha-device-handlers#testing-quirks-in-development-in-docker-based-install

If the pull request gets accepted it should be present in the next major release of HA.

hastime commented 2 years ago

@hastime I use this method for as long if there's no new release of zigpy zha device handlers. https://github.com/zigpy/zha-device-handlers#testing-quirks-in-development-in-docker-based-install

If the pull request gets accepted it should be present in the next major release of HA.

@schwickster - thanks that's awesome, I'll get cracking with this right away!

Kind regards,

iandarbey commented 2 years ago

Thanks @schwickster this is awesome working along with the guys on the deconz side of things.... Now to price watch Amazon and buy some more of these.

Mandalavandalz commented 2 years ago

@hastime I use this method for as long if there's no new release of zigpy zha device handlers. https://github.com/zigpy/zha-device-handlers#testing-quirks-in-development-in-docker-based-install

If the pull request gets accepted it should be present in the next major release of HA.

How to use this method when Portainer add-on is deprecated?

iandarbey commented 2 years ago

@hastime I use this method for as long if there's no new release of zigpy zha device handlers. https://github.com/zigpy/zha-device-handlers#testing-quirks-in-development-in-docker-based-install If the pull request gets accepted it should be present in the next major release of HA.

How to use this method when Portainer add-on is deprecated?

I followed these steps. https://community.home-assistant.io/t/how-to-setup-local-zha-quirks/341226

hastime commented 2 years ago

@hastime I use this method for as long if there's no new release of zigpy zha device handlers. https://github.com/zigpy/zha-device-handlers#testing-quirks-in-development-in-docker-based-install If the pull request gets accepted it should be present in the next major release of HA.

How to use this method when Portainer add-on is deprecated?

I followed these steps. https://community.home-assistant.io/t/how-to-setup-local-zha-quirks/341226

I've had a look at those steps so do I just copy the text from the PR and paste it in a a python file? Does naming convention matter? Does it need folder structure for /Xiaomi/aqara/ etc or just /config/custom_zha_quirks/?

Thanks

Kind regards

iandarbey commented 2 years ago

@hastime I use this method for as long if there's no new release of zigpy zha device handlers. https://github.com/zigpy/zha-device-handlers#testing-quirks-in-development-in-docker-based-install If the pull request gets accepted it should be present in the next major release of HA.

How to use this method when Portainer add-on is deprecated?

I followed these steps. https://community.home-assistant.io/t/how-to-setup-local-zha-quirks/341226

I've had a look at those steps so do I just copy the text from the PR and paste it in a a python file? Does naming convention matter? Does it need folder structure for /Xiaomi/aqara/ etc or just /config/custom_zha_quirks/?

Thanks

Kind regards

I named it the same as it is in the repository. But it just sits in the custom_zha_quirks folder no sub folder or anything necessary.

hastime commented 2 years ago

@iandarbey thanks! I have added it and restarted HA. Although I still have the limited control of the blind as before, do I need to remove and repair the device?

Thanks

iandarbey commented 2 years ago

Just make sure you've pulled the latest commit.

All I had to do was restart HA and it worked. A remove and pair again might sort though.

hastime commented 2 years ago

Just make sure you've pulled the latest commit.

All I had to do was restart HA and it worked. A remove and pair again might sort though.

I pulled mine from the file linked above and created a file in HA in the custom quirks folder name roller_curtain_e1.py and copied and pasted from the file.

Just so I can confirm can you link to the latest commit?

Also sorry about this, still learning zha after two years of deconz.

Kind regards,

iandarbey commented 2 years ago

It would be this file.

hastime commented 2 years ago

Hi All,

I have now repaired the device and I'm not sure if I have done something incorrectly. Where before on the cover entity I only had the option for 'Close' I now only have the options for 'Open' and 'Stop', both of these work and using the set position works for both open and close. It still seems as though the blind isn't reporting its current position/state. I might try and fully delete the device and re-add from scratch, to see how that goes.

Thanks again for all the help!

Kind regards,

hastime commented 2 years ago

Scratch that! I repaired again and now it is working correctly! Thanks for everyone's help! I have four of these now and its nice to think I can install the other three outside the office now ;) I think it was me that started the original device request on the Deconz GitHub.

Thanks all!

Rev-777 commented 2 years ago

Updated to 2022.4.0 this morning and now have this error while implementing the quirk for the roller driver (it's also taken down the ZHA integration).

Logger: homeassistant.config_entries Source: custom_zha_quirks/roller_curtain_e1.py:41 First occurred: 10:16:33 (1 occurrences) Last logged: 10:16:33

Error setting up entry HubZ Smart Home Controller, s/n: C130044F - Silicon Labs for zha Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 335, in async_setup result = await component.async_setup_entry(hass, self) File "/usr/src/homeassistant/homeassistant/components/zha/init.py", line 99, in async_setup_entry setup_quirks(config) File "/usr/local/lib/python3.9/site-packages/zhaquirks/init.py", line 409, in setup importer.find_module(modname).load_module(modname) File "", line 529, in _check_name_wrapper File "", line 1029, in load_module File "", line 854, in load_module File "", line 274, in _load_module_shim File "", line 711, in _load File "", line 680, in _load_unlocked File "", line 850, in exec_module File "", line 228, in _call_with_frames_removed File "/config/custom_zha_quirks/roller_curtain_e1.py", line 41, in class XiaomiAqaraRollerE1(XiaomiCluster, ManufacturerSpecificCluster): File "/usr/local/lib/python3.9/site-packages/zigpy/zcl/init.py", line 91, in __init_subclass__ raise TypeError( TypeError: manufacturer_attributes is deprecated. Copy the parent class's attributes dictionary and update it with your manufacturer-specific attributes. Make sure to specify that it is manufacturer-specific through the appropriate constructor or tuple!

hastime commented 2 years ago

Updated to 2022.4.0 this morning and now have this error while implementing the quirk for the roller driver (it's also taken down the ZHA integration).

Logger: homeassistant.config_entries Source: custom_zha_quirks/roller_curtain_e1.py:41 First occurred: 10:16:33 (1 occurrences) Last logged: 10:16:33

Error setting up entry HubZ Smart Home Controller, s/n: C130044F - Silicon Labs for zha Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 335, in async_setup result = await component.async_setup_entry(hass, self) File "/usr/src/homeassistant/homeassistant/components/zha/init.py", line 99, in async_setup_entry setup_quirks(config) File "/usr/local/lib/python3.9/site-packages/zhaquirks/init.py", line 409, in setup importer.find_module(modname).load_module(modname) File "", line 529, in _check_name_wrapper File "", line 1029, in load_module File "", line 854, in load_module File "", line 274, in _load_module_shim File "", line 711, in _load File "", line 680, in _load_unlocked File "", line 850, in exec_module File "", line 228, in _call_with_frames_removed File "/config/custom_zha_quirks/roller_curtain_e1.py", line 41, in class XiaomiAqaraRollerE1(XiaomiCluster, ManufacturerSpecificCluster): File "/usr/local/lib/python3.9/site-packages/zigpy/zcl/init.py", line 91, in __init_subclass__ raise TypeError( TypeError: manufacturer_attributes is deprecated. Copy the parent class's attributes dictionary and update it with your manufacturer-specific attributes. Make sure to specify that it is manufacturer-specific through the appropriate constructor or tuple!

I had this same error, I have moved the custom quirk out of the folder and the roller shade appears to still function, would be good to understand why this has happened though.

Kind regards,

puddly commented 2 years ago

would be good to understand why this has happened though

Custom quirks are meant for development. There's no way to prevent them from breaking when zigpy or quirks change.

Rev-777 commented 2 years ago

would be good to understand why this has happened though

Custom quirks are meant for development. There's no way to prevent them from breaking when zigpy or quirks change.

Yes, wanted to add my data point to this specific thread.

Removing the quirk does not fix it for me, have restored to 2022.3.8 in order to return functionality while this is worked on.

Thanks to everybody for their work!

schwickster commented 2 years ago

Argh... I'll look into it soon what the new way is to add new attributes. In the mean time you can remove the ManufacturerSpecificCluster since it only gives extra attributes in Zigbee.

iandarbey commented 2 years ago

@schwickster to clarify...... I should edit the quirk and remove that part? Is it due to be brought in to ZHA / HA directly soon? Thought I saw it merged and first thing I thought was some sort of conflict between merged and still having the custom quirk sitting there.

Also Aqara owe you commission.... I've bought 2 more of these because of you and plan to buy 2 more.

schwickster commented 2 years ago

@iandarbey Quickly looking into it what happened. Currently I think I was using a deprecated method which was still accepted when I was using it and now with release it isn't.

And yes, edit the quirk and remove that part. Should work in theory and should not cause any problems.

schwickster commented 2 years ago

@iandarbey @Rev-777 @hastime I think I see the problem now. Are you guys/girls running hass OS or supervised? Cause I am running a container version of HA and that actually refreshed the files from Zigpy. My guess is that you are running an older version of the quirk. @dmulcahey changed the file some more to already fix this (sorry again David! Seeing I missed some more things).

Try copying the file from https://github.com/zigpy/zha-device-handlers/blob/master/zhaquirks/xiaomi/aqara/roller_curtain_e1.py and see if this fixes the problem. For me I didn't get the error because again the files were refreshed for me because docker containers refresh the full content.

hastime commented 2 years ago

@schwickster - thanks for the response, I'm new to zha, I didn't realize that there would be manual steps to update zha after a home assistant update. I will try what you have suggested, I have had another device stop working since the update but this didn't have a custom quirk installed for it, it just worked natively, are there steps I need to do to set up automatically updating these files/zha?

Thanks

Kind regards

iandarbey commented 2 years ago

@iandarbey @Rev-777 @hastime I think I see the problem now. Are you guys/girls running hass OS or supervised? Cause I am running a container version of HA and that actually refreshed the files from Zigpy. My guess is that you are running an older version of the quirk. @dmulcahey changed the file some more to already fix this (sorry again David! Seeing I missed some more things).

Try copying the file from https://github.com/zigpy/zha-device-handlers/blob/master/zhaquirks/xiaomi/aqara/roller_curtain_e1.py and see if this fixes the problem. For me I didn't get the error because again the files were refreshed for me because docker containers refresh the full content.

Updated the quirk and then installed 2022.4 No notable issues until controlling the blind via the cover entity.....

It responds and physically moves but the front-end throws an error....

Failed to call service cover/set_cover_position. 'Status' object is not subscriptable.

It does still work despite this error though.

schwickster commented 2 years ago

@hastime It should already be part of the 2022.4 release. See https://github.com/home-assistant/core/pull/68921 Normally you don't have to do anything before or after updating. But seeing you installed the custom quirk for testing before the release.. this means you need to remove the custom files before updating.

@iandarbey Yes I did notice the error also.. not sure if it's a HA problem or ZHA problem. But as you report it is working.

hastime commented 2 years ago

@schwickster - Thanks, that makes sense! So on the release notes for 2022.4 there is no mention of a zigpy upgrade where do I find a release note for the zigpy update and confirm whether the core update is updating zigpy also? Thanks, as I mentioned I haven't been using zha very long!

Thanks,

Kind regards,

schwickster commented 2 years ago

@hastime see the pull request I linked or see full change log https://www.home-assistant.io/changelogs/core-2022.4

hastime commented 2 years ago

Aha I see now! @schwickster Thank you!

iandarbey commented 2 years ago

So I can delete the custom quirk and will have same functionality in 2022.4?

schwickster commented 2 years ago

@iandarbey BEFORE updatre yes. AFTER update no. If you have updated then simply copy the file from master branch that I linked above.

iandarbey commented 2 years ago

I copied the file and then updated to 2022.4. Will need to leave it in place until? Reboot? Next Update?

schwickster commented 2 years ago

@iandarbey should be good. Next reboot or update should be good also.

arvinsingla commented 2 years ago

@schwickster question when you have a minute. I’ve been following this thread but never applied the custom quirk instead choosing to wait for HA 2022.4 I have now upgraded but after deleting and re-adding the blinds driver I’m still not seeing anything different. Am I missing something? I’m running hassos if that helps.

schneimo commented 2 years ago

Hi everyone and thanks for your effort working on integrating the roller shade driver. I recently got one and I am unable to integrate it correctly into HA.

So up to now I created a roller_curtain_e1.py with the content from https://github.com/zigpy/zha-device-handlers/blob/master/zhaquirks/xiaomi/aqara/roller_curtain_e1.py in the folder _config/custom_zhaquirks/ and added this folder as _custom_quirkspath in the configuration.yaml.

Problematically, this does not change anything and I am only able to control the analog output but I am not able to stop the driver afterwards via HA. I have deleted and added the driver multiple times and looked into the quirk but without any success.

Here is the output of my Zigbee device signature:

{
  "node_descriptor": "NodeDescriptor(logical_type=<LogicalType.EndDevice: 2>, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=<FrequencyBand.Freq2400MHz: 8>, mac_capability_flags=<MACCapabilityFlags.AllocateAddress: 128>, manufacturer_code=4447, maximum_buffer_size=127, maximum_incoming_transfer_size=100, server_mask=11264, maximum_outgoing_transfer_size=100, descriptor_capability_field=<DescriptorCapability.NONE: 0>, *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": 260,
      "device_type": "0x0100",
      "in_clusters": [
        "0x0000",
        "0x0002",
        "0x0003",
        "0x0004",
        "0x0005",
        "0x0006",
        "0x0009",
        "0x000d",
        "0x0013",
        "0x0102"
      ],
      "out_clusters": [
        "0x000a",
        "0x0019"
      ]
    },
    "242": {
      "profile_id": 41440,
      "device_type": "0x0061",
      "in_clusters": [],
      "out_clusters": [
        "0x0021"
      ]
    }
  },
  "manufacturer": "LUMI",
  "model": "lumi.curtain.acn002",
  "class": "zigpy.device.Device"
}

It seems that the _inclusters value is missing the Xiaomi Aqara cluster ID 0xFCC0.

Firmware is 11-24-2021 given by the date_code command. I am running HA 2022.04 and I am using a CC2531 as coordinator.

Edit: Looking at the logs during the add of the driver, I got the following additional information:

Considering <class 'zhaquirks.xiaomi.aqara.roller_curtain_e1.RollerE1AQ'>
Fail because input cluster mismatch on at least one endpoint
Rev-777 commented 2 years ago

@schwickster

@iandarbey @Rev-777 @hastime I think I see the problem now. Are you guys/girls running hass OS or supervised? Cause I am running a container version of HA and that actually refreshed the files from Zigpy. My guess is that you are running an older version of the quirk. @dmulcahey changed the file some more to already fix this (sorry again David! Seeing I missed some more things).

Try copying the file from https://github.com/zigpy/zha-device-handlers/blob/master/zhaquirks/xiaomi/aqara/roller_curtain_e1.py and see if this fixes the problem. For me I didn't get the error because again the files were refreshed for me because docker containers refresh the full content.

Thanks. I'm running HassOS on a Dell Thin Client.

I tried two different ways of updating the blind driver:

1) removed quirk in 2022.3.8, updated to 2022.4.0. No control of blind from Lovelace/Dashboard entity, only the analog output.

2) restored to 2022.3.8, updated quirk to your posted file, saved, updated 2022.4.0. No control of blind again.

Any ideas?

schwickster commented 2 years ago

@arvinsingla: What firmware are you running? @MoritzTaylor You don't need to delete and update the quirk after updating to the april release. This is only needed if you tested the quirk before the April release. That said, I can't explain why it won't work for you. You got the same firmware as me. I did hear the input cluster can sometimes take time to populate. I would say delete the device in HA and repair. Followed by pressing up and down buttons on the device. Also make sure to firmware your Zigbee controller to the latest firmware. @Rev-777: What firmware is the device? Also make sure to firmware your Zigbee controller to the latest firmware.

iandarbey commented 2 years ago

Just to confirm - Updated custom quirk Updated to 2022.04 - device and cover entity works as expected (despite throwing an error).

Deleted custom quirk and updated to 2022.04.01 Device and cover entity work as expected (error message apparently gone).

schneimo commented 2 years ago

@schwickster Thanks for your help! I think it is a firmware problem of the CC2531. On the website of zigbee2mqtt you can find the information that the CC2531 needs a newer firmware to work with the driver (https://www.zigbee2mqtt.io/devices/ZNJLBL01LM.html). Good to know for everyone which also runs it this problem. I will get back to you when I updated my CC2531.

@schwickster Which coordinator do you use?

iandarbey commented 2 years ago

Something strange happening with the entity cover when you ask it to move. If you set to fully open or fully closed it updates when it finishes moving. If you set it to a particular position (between but not equal to 0 and 100) it'll move no problem but the icon stays with the arrow up if it moved up to get there and down if it moved down. Device works fine, still responds to further commands. Cover entity updates as expected if operated from buttons on device.

elandraz commented 2 years ago

I have the exact same problem as @MoritzTaylor. Exactly the same clusters, also missing the Xiaomi Aqara cluster ID 0xFCC0 in the in_clusters. Firmware is also 11-24-2021 from the date_code. Only difference is i'm using CC1352/CC2652 which i flashed the firmware with the latest version and nothing at all changed ( currently on CC1352/CC2652, Z-Stack 3.30+ - build 20220219 ).

I have tried fixing and reattaching multiple times. Has anyone had any luck with this from this state? I have ordered another unit to see if it shows up differently and will update if that helps.

iandarbey commented 2 years ago

The cover entity took some time to appear when I added my most recent one. Give it an hour before removing and readding.

elandraz commented 2 years ago

I wish this would have worked for me sadly I have given it overnight twice and no luck and tired a few times throughout the day too.

arvinsingla commented 2 years ago

I upgraded the firmware on my Zigbee coordinator and too didn't have any luck. I migrated over to zigbee2mqtt and things seem to be working as expected.

elandraz commented 2 years ago

Also I have the window covering entity , I don't have the Xiaomi Aqara cluster, so the quirk doesn't work. maybe i'll have to give up and move to zigbee2mqtt but it's such a massive change.

schneimo commented 2 years ago

I have updated to a coordinator with the latest firmware (the Sonoff dongle with firmware 20220219) and after setting the ranges of the blind driver, everything works fine now with HA. The driver is now correctly detected and has the cluster id 0xFCC0 also.

ptyers commented 2 years ago

The problem Not recognising the inbuilt ZHAquirk for roller shutter E1 does recognise other quirks for Aqra buttons and contact sensors (see Front Door Sensor)

What version of Home Assistant Core has the issue? 2022.4.7

What was the last working version of Home Assistant Core? No response

What type of installation are you running? Home Assistant OS

Integration causing the issue ZHA

Using Conbee II with ZHA

Conbee II firmware 26520700 reflashed from deCONZ_R21_0x26520700.bin.GCF today 27/4/2022

Date codes of roller shutters, from device mange clusters e/point 1, cluster 0x0000 attribute 0x0006 are (two) 05-18-2021 (Front Left and Front Right Curtain) and a third (Side Curtain) 11-24-2021

Have deleted and repaired all 3 devices after flashing CONBEE II, have restarted raspberry pi host

attached diagnostic down loads for Left Curtain MAC address ending in 32:90:D1 Date Code 05-18-2021 Side Curtain MAC address ending in 3E:35:9D Date Code 11-24-2021 neither signatures contain cluster 0xFCC0 all three drivers are not recognising the inbuilt roller shade quirk

also attached HA.log file

WHERE DO I GO FROM HERE??

side curtain device

zha-2822abee777aa758d665e3b9df504f74-LUMI lumi.curtain.acn002-8705a76b274d24c57a05f327ddf129f9.json.txt

zha-2822abee777aa758d665e3b9df504f74-LUMI lumi.curtain.acn002-42a95b08fb19e62d4c263e930677938c.json.txt

home-assistant.log

Rev-777 commented 2 years ago

@schwickster Coming back to this thread as I'm at a complete loss at getting my E1 roller drivers to function with HA via ZHA.

I've updated both the Zigbee hub (HUSBZB-1) and ensured both roller drivers on are on the latest firmware (11-24-2021), reset the roller drivers probably 50 times. If you look up insanity in the dictionary...

Any ideas where we can go from here? I'm into these devices for $120 (shipping/duty fees, etc.) and would really appreciate any help you could provide.

schwickster commented 2 years ago

@Rev-777 I honestly have no clue what else you can do... what's the device signature?

Rev-777 commented 2 years ago

@Rev-777 I honestly have no clue what else you can do... what's the device signature?

{
  "node_descriptor": "NodeDescriptor(logical_type=<LogicalType.EndDevice: 2>, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=<FrequencyBand.Freq2400MHz: 8>, mac_capability_flags=<MACCapabilityFlags.AllocateAddress: 128>, manufacturer_code=4447, maximum_buffer_size=127, maximum_incoming_transfer_size=100, server_mask=11264, maximum_outgoing_transfer_size=100, descriptor_capability_field=<DescriptorCapability.NONE: 0>, *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": 260,
      "device_type": "0x0202",
      "in_clusters": [
        "0x0000",
        "0x0002",
        "0x0003",
        "0x0004",
        "0x0005",
        "0x0006",
        "0x0009",
        "0x000d",
        "0x0013",
        "0x0102"
      ],
      "out_clusters": [
        "0x000a",
        "0x0019"
      ]
    },
    "242": {
      "profile_id": 41440,
      "device_type": "0x0061",
      "in_clusters": [],
      "out_clusters": [
        "0x0021"
      ]
    }
  },
  "manufacturer": "LUMI",
  "model": "lumi.curtain.acn002",
  "class": "zigpy.device.Device"
}
matthiasdebaat commented 2 years ago

It paired seamlessly, thanks! Only it's inverted, when my blinds are open it shows as closed and the other way around. Is that a device setting or ZHA implementation? I can create a template to fix it, but it's of course nicer without.

schwickster commented 2 years ago

@Rev-777 I honestly have no clue what else you can do... what's the device signature?

{ "node_descriptor": "NodeDescriptor(logical_type=<LogicalType.EndDevice: 2>, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=<FrequencyBand.Freq2400MHz: 8>, mac_capability_flags=<MACCapabilityFlags.AllocateAddress: 128>, manufacturer_code=4447, maximum_buffer_size=127, maximum_incoming_transfer_size=100, server_mask=11264, maximum_outgoing_transfer_size=100, descriptor_capability_field=<DescriptorCapability.NONE: 0>, 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": 260, "device_type": "0x0202", "in_clusters": [ "0x0000", "0x0002", "0x0003", "0x0004", "0x0005", "0x0006", "0x0009", "0x000d", "0x0013", "0x0102" ], "out_clusters": [ "0x000a", "0x0019" ] }, "242": { "profile_id": 41440, "device_type": "0x0061", "in_clusters": [], "out_clusters": [ "0x0021" ] } }, "manufacturer": "LUMI", "model": "lumi.curtain.acn002", "class": "zigpy.device.Device" }

@Rev-777 By the looks of it you are missing the Aqara node (0xFCC0). Try deleting line 200 (https://github.com/zigpy/zha-device-handlers/blob/dev/zhaquirks/xiaomi/aqara/roller_curtain_e1.py) in your local setup and see if it works for you... granted... for me if I remove that line than the device isn't recognized by ZHA. But maybe for you it will work

@matthiasdebaat: On the device itself you can do this. From the manual:

Remap the buttons to rotate the motor in the opposite direction If you press the button of which the direction is opposite to the actual rolling direction of the roller shade, the rotating direction of the motor can be reversed by pressing the RESET button three times; and then, if the indicator turns to blue and lasts for 1 second, it indicates that the rolling direction of the motor is reversed.