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
719 stars 664 forks source link

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

Open PeteCondliffe opened 2 years ago

PeteCondliffe commented 2 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

nicwortel commented 2 years ago

I was able to solve my issues with the Aqara Roller Shade Driver E1 by updating the firmware of my zigbee gateway.

Context: I run Home Assistant in a Docker container on a Raspberry Pi with ZHA using the RaspBee II gateway. I have been following this thread for a while, but despite updating the Home Assistant docker container to the latest version, I could only control my roller shade drivers via their analog_output entity. A few days ago, after I updated the Home Assistant container again, even that stopped working. The analog output would show as NaN and I couldn't change the position of the covers anymore. In hindsight, I think the ZHA quirk for the Aqara Roller Shade Driver was never applied. If I remember correctly (unfortunately I didn't store it) the device signature used to be the same as what @Rev-777 posted a few weeks ago, and the Device Info would not show the quirk.

After reading the suggestions here to update the firmware of my zigbee gateway I decided to give it a try. My deCONZ firmware version was apparently 0x26690700, which was from December 2020. As I use the RaspBee I had to upgrade the firmware using my Raspberry Pi, which I managed to do using the Deconz docker image by following the firmware upgrade instructions. I first upgraded to deCONZ_RaspBeeII_0x26720700.bin.GCF (the latest stable version from 2021-08-20, and the version suggested by the firmware upgrade tool), which unfortunately did not solve my issues, even after removing and re-pairing the roller shade drivers. However, after upgrading to the beta version deCONZ_RaspBeeII_0x26780700.bin.GCF (released 2022-05-15) and re-pairing the roller shade drivers, ZHA seems to have finally picked up the zhaquirks.xiaomi.aqara.roller_curtain_e1.RollerE1AQ quirk.

Now, the Device Info panel lists the zhaquirks.xiaomi.aqara.roller_curtain_e1.RollerE1AQ quirk, the weird on/off entity is gone, and I can control my covers using both the cover entity and the analog_output entity:

afbeelding

The cluster ID 0xfcc0 now also appears in the device signature.

Rev-777 commented 2 years ago

Quick update.

The 'fix' to this was migrating to a new Zigbee controller (TubesZB CC2652 PoE). I wanted to revise the location of my controller so two birds meet one stone.

Thanks to everybody for trying to get this to work with the previous HUSBZB-1 controller. While it's actually a great piece of hardware, this was the only device I've come across that's given me continued problems.

Jordan-prog commented 1 year ago

Hi,

I recently brought one of these devices and it doesn't seem to be applying the quirk.

This is an excerpt from the diagnostics download:

"ieee": "**REDACTED**",
    "nwk": 6801,
    "manufacturer": "LUMI",
    "model": "lumi.curtain.acn002",
    "name": "LUMI lumi.curtain.acn002",
    "quirk_applied": false,
    "quirk_class": "zigpy.device.Device",
    "manufacturer_code": 4447,
    "power_source": "Battery or Unknown",
    "lqi": 180,
    "rssi": -55,
    "last_seen": "2022-10-17T18:39:08",
    "available": true,
    "device_type": "EndDevice",
    "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"
          ]
        }
      }
    }
iandarbey commented 1 year ago

This issue has re-emerged for me following migration to Skyconnect controller from conbee 2.

iandarbey commented 1 year ago
{
  "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"
}

Apologies for formatting but that's the signature. Not picking up a zhaquirk even with copying the e1 linked above in to my custom quirks. Worked fine with conbee but not working with skyconnect.

iandarbey commented 1 year ago

zha-001ec4eace4b0421091d0a1ff8c1e5c6-LUMI lumi.curtain.acn002-af1f6873f167b058c01bff0d2a2f9b6c.json.txt

Attached is my device diagnostics. It previously worked with the conbee ii but doesn't work with skyconnect.

@puddly I think you fixed the issue with the Aqara Opple remote in latest version of HA Core, not sure if this is a related or similar issue but skyconnect doesn't apply the quirk at the very least.

TheJulianJES commented 1 year ago

Did you re-pair the Aqara E1 driver after updating HA to the latest version?

iandarbey commented 1 year ago

I had... But I've just deleted and re-paired and it's picked up the quirk and survived a core restart. Apologies!

dewittutonnie commented 1 year ago

I have 2 of these and they work since I installed (approx. 5 months ago) them without any problem. (HassOS with all the latest updates, ZHA, Sonoff Zigbee 3.0 USB Dongle Plus, CC1352/CC2652, Z-Stack 3.30+ (build 20220219))

The only thing is that I get in the log the following warning and error at the moment a HA automation has closed or opened the covers the first time after a restart of HA :

2023-02-09 08:30:26.878 WARNING (MainThread) [zhaquirks.xiaomi] Failed to parse Xiaomi attribute report: b'\xf7\x00A7\x03(\x10\x05!\x01\x00\t!\x00\x00\n!\xfa\x7f\x0b \x00\x0c \x01\r#\x1b\x0e\x00\x00\x11#\x01\x00\x00\x00e Jf \xc0g &i \x02j![\x1ek \x00' 2023-02-09 08:30:26.884 ERROR (MainThread) [zigpy.device] Failed to parse message (b'1c5f11290af700413703281005210100092100000a21fa7f0b20000c20010d231b0e000011230100000065204a6620c06720266920026a215b1e6b2000') on cluster 64704, because Data is too short

As said the cover works fine, I'm only curious to know what is this warning and error about? Can I do anything to prevent them?

rahulpdev commented 1 year ago

I've tried deleting and repairing the device multiple times to my Home Assistant Yellow but I don't see any quirk being picked up, the number remains stuck at NaN and I can't interact with the device at all in Home Assistant. Am I missing a step, do I need to download the custom quirk (can you share a link?) or do something else?

Tbh this has been a very frustrating experience with this device and an example of everything that's wrong with Home Assistant :-(. I need to buy another roller blind and wondering if anyone has a recommendation for a device that works out of the box with ZHA?

iandarbey commented 1 year ago

Is your HA version up to date? Might take a bit of time for all the entities to come through properly.

XVII commented 1 year ago

Edit: Oops, didn't realise my HA was so out of date. # 2023.6 has picked up Quirk: zhaquirks.xiaomi.aqara.roller_curtain_e1.RollerE1AQ_3. Remove and re add worked.

Home Assistant: 2023.6.3 Zigbee: Skyconnect (?1.7) Aqara Roller Shade Driver E1s: 0.0.0_15302022-11-15


I'm using HA 2023.3.6 with SkyConnect on latest firmware. I updated my Aqara Roller Shade Driver E1s to latest firmware (Version: 0.0.0_15302022-11-15) via Aqara hub, then reassociated them with ZHA.

I seem to have no control over the blinds except lowering them by dragging a glitchy slider which is stuck on NaN...

image

ishmelev23 commented 9 months ago

Sadly, it can't. #2629 adds support for lumi.curtain.agl001 and doesn't fix issues related to lumi.curtain.acn002

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

snorbik commented 2 months ago

Hello people,

I seem to have simillar issue as some of you. I've installed new lumi.curtain.acn002 via ZHA into my Home Assistant, but I can't see battery level and LQI information in it.

I made OTA update of it, but not even after re-pairing and restarting HA, those attributes are not working properly.

Snímek obrazovky 2024-06-25 v 14 33 22

Can someone help?

DmitrijBuckovsky commented 1 month ago

Hello people,

I seem to have simillar issue as some of you. I've installed new lumi.curtain.acn002 via ZHA into my Home Assistant, but I can't see battery level and LQI information in it.

I made OTA update of it, but not even after re-pairing and restarting HA, those attributes are not working properly.

Snímek obrazovky 2024-06-25 v 14 33 22

Can someone help?

Hi Snorbi!

I can see the battery level on my devices (2x lumi.curtain.acn002), so I cannot help you with this issue.

Regarding to LQI and RSSI, you have to enable those entities.

image image image image

Source YT

snorbik commented 1 month ago

✅✅✅ My problem with showing battery level is solved now!

For those struggling the same. Me and @DmitrijBuckovsky managed to locate the problem and find its solution. I was using Sonoff Zigbee 3.0 Dongle (Texas Instruments) that was on 20210708 firmware. It is mentioned in future versions of FW that there was some fix for Xiaomi E1 devices, so this might've been the issue.

Anyway, as flashing new firmware to this dongle was bit much for me, I've decided to buy new dongle Sonoff Zigbee 3.0 Dongle v2 (from different manufacturer - Silicon Labs) which uses some newer firmware and after re-pairing my Roller Shades, everything works correctly.

Snímek obrazovky 2024-07-18 v 9 37 05