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] Aqara H1 EU With Neutral, Single Rocker Smart Wall Switch #1369

Closed Scoff123 closed 1 month ago

Scoff123 commented 2 years ago

Is your feature request related to a problem? Please describe. This device is supported by Zigbee2MQTT, DeConz and Zigbee for Domoticz.

Describe the solution you'd like I would like this device to be supported by ZHA, for the following features: device temperature power monitoring power outage memory switch decouple on/off

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.Router: 1>, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=<FrequencyBand.Freq2400MHz: 8>, mac_capability_flags=<MACCapabilityFlags.AllocateAddress|RxOnWhenIdle|MainsPowered|FullFunctionDevice: 142>, 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=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",
        "0x0002",
        "0x0003",
        "0x0004",
        "0x0005",
        "0x0006",
        "0x0012",
        "0xfcc0"
      ],
      "out_clusters": [
        "0x000a",
        "0x0019"
      ]
    },
    "21": {
      "profile_id": 260,
      "device_type": "0x0100",
      "in_clusters": [
        "0x000c"
      ],
      "out_clusters": []
    },
    "31": {
      "profile_id": 260,
      "device_type": "0x0100",
      "in_clusters": [
        "0x000c"
      ],
      "out_clusters": []
    },
    "41": {
      "profile_id": 260,
      "device_type": "0x0100",
      "in_clusters": [
        "0x0012"
      ],
      "out_clusters": []
    },
    "242": {
      "profile_id": 41440,
      "device_type": "0x0061",
      "in_clusters": [],
      "out_clusters": [
        "0x0021"
      ]
    }
  },
  "manufacturer": "LUMI",
  "model": "lumi.switch.n1aeu1",
  "class": "zigpy.device.Device"
}

Additional context URL for device: https://zigbee.blakadder.com/Aqara_WS-EUK03.html Model WS-EUK03 manufactured by Aqara Zigbee ID: "lumi.switch.n1aeu1"

ianfromnyc commented 2 years ago

I have a number of these switches. They work well in coupled relay mode, but decoupled mode (edit: and temperature reading, and status LED configuration) won't work without a quirk.

Scoff123 commented 2 years ago

ZHA only currently gives me on/off state control and a device temperature reading of 0.3degrees which is obviously incorrect. Are you seeing a valid device temperature reading on your switches in ZHA?

ianfromnyc commented 2 years ago

I do see the faulty temp reading of 0.3C in addition to on_off, identify, electrical_measurement, and smartenergy_metering summation_delivered. But since each switch only feeds about 10 or 20W of LED lighting, I'm not too concerned about temperature. I just really want decoupled mode.

Scoff123 commented 2 years ago

Thanks for confirming. I'm also not interested in the switches temperature, I was just unsure if I had a faulty switch, or if this was a problem with ZHA. If you are also getting 0.3C then it looks to be ZHA.

image

Can I ask how you get electrical_measurement, and smartenergy_metering summation_delivered? Does that information require a quirk?

ianfromnyc commented 2 years ago

I get a Sensors card on my device. I'm just using default ZHA and the switches are paired direct to the coordinator.

29D9617F-C22F-4D43-B311-2165DE066360

Scoff123 commented 2 years ago

That's interesting - I'm also using default ZHA and my single Aqara switch is paired to my coordinator. In fact, none of my ZHA devices show a Sensors card on the ZHA device info page - only 'Controls' and 'Diagnostics'. I wonder if this is an HA environment difference perhaps. I'm running HAOS on an Intel NUC, latest version available 2022.3.0 after just updating today, but this has always been the same, with none of my ZHA devices showing a Sensors card. Can I ask what environment you are running HA in? What Zigbee coordinator are you using also? I'm using a Tasmota flashed Sonoff ZBBridge

ianfromnyc commented 2 years ago

I'm running HAOS on a RPi4 with an internal Raspbee stick.

On Thu, 3 Mar 2022 at 13:30, Scoff123 @.***> wrote:

That's interesting - I'm also using default ZHA and my single Aqara switch is paired to my coordinator. In fact, none of my ZHA devices show a Sensors card on the ZHA device info page - only 'Controls' and 'Diagnostics'. I wonder if this is an HA environment difference perhaps. I'm running HAOS on an Intel NUC, latest version available 2022.3.0 after just updating today, but this has always been the same, with none of my ZHA devices showing a Sensors card. Can I ask what environment you are running HA in? What Zigbee coordinator are you using also? I'm using a Tasmota flashed Sonoff ZBBridge

— Reply to this email directly, view it on GitHub https://github.com/zigpy/zha-device-handlers/issues/1369#issuecomment-1058043354, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAPA5GVDZGI7WJXXCX5EXBTU6C5IVANCNFSM5OVNPYCQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you are subscribed to this thread.Message ID: @.***>

Scoff123 commented 2 years ago

Thank you for the info, I've raised the question about the sensors card on the HA forum under the ZHA category, and I hope you don't mind me using your screenshot as an example ;) I will also eventually want to use the decoupled mode on my switch, so hopefully this can be picked up here as an issue.

Scoff123 commented 2 years ago

Just FYI - I have uninstalled ZHA and tried Zigbee2MQTT for the first time today, still using my Sonoff ZBBridge even though ezsp still isn't officially supported, and I added the Aqara light switch to Z2M and everything works perfectly. I am getting an internal switch temperature of 30C, measured power, and decoupled mode works perfectly too. Don't think I'll be going back to ZHA based no this alone.

image

dmulcahey commented 2 years ago

Glad z2m works for you @Scoff123 but that doesn’t help us get things working here. Sorry we didn’t address this fast enough for you.

ianfromnyc commented 2 years ago

I'd still like to have a device handler for these switches. I've started working on one but I can't figure out why my Raspbee doesn't expose the 0xFCC0 cluster so the quirk fails to match.

On Fri, 4 Mar 2022 at 20:31, David F. Mulcahey @.***> wrote:

Glad z2m works for you @Scoff123 https://github.com/Scoff123 but that doesn’t help us get things working here. Sorry we didn’t address this fast enough for you.

— Reply to this email directly, view it on GitHub https://github.com/zigpy/zha-device-handlers/issues/1369#issuecomment-1059507433, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAPA5GTV3YQSDEDGJKEVVZTU6JXIPANCNFSM5OVNPYCQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you are subscribed to this thread.Message ID: @.***>

janjurek commented 2 years ago

Hi there guys I'm gonna chip in since I believe I'm having the same problem with probably slightly older revision of this device. I have RPi4 with original Raspbee and I've been using it with deCONZ up until now but assimilation of new devices is not great so I decided to switch to use the Home Assistant ZHA integration.

My device is: Xiaomi Aqara Wall Switch QBKG11LM https://zigbee.blakadder.com/Aqara_QBKG11LM.html It works and shows the exactly as @Scoff123 mentioned. I'm having on/off temperature and identify sensor, but power and power consumption sensors that @ianfromnyc have are not present for me.

I've already had some problem with this back when I was setting up the deCONZ and it looks like it's probably non standardly done by the manufacturer, but we were able to resolve it in the end: https://github.com/dresden-elektronik/deconz-rest-plugin/issues/1249

And finally here is my zigpy node description I've go from the HA:

{
  "node_descriptor": "NodeDescriptor(logical_type=<LogicalType.Router: 1>, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=<FrequencyBand.Freq2400MHz: 8>, mac_capability_flags=<MACCapabilityFlags.AllocateAddress|RxOnWhenIdle|MainsPowered|FullFunctionDevice: 142>, manufacturer_code=4447, maximum_buffer_size=127, maximum_incoming_transfer_size=100, server_mask=0, 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=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": "0x0051",
      "in_clusters": [
        "0x0000",
        "0x0001",
        "0x0002",
        "0x0003",
        "0x0004",
        "0x0005",
        "0x0006",
        "0x000a",
        "0x0010"
      ],
      "out_clusters": [
        "0x000a",
        "0x0019"
      ]
    },
    "2": {
      "profile_id": 260,
      "device_type": "0x0009",
      "in_clusters": [
        "0x000c"
      ],
      "out_clusters": [
        "0x0004",
        "0x000c"
      ]
    },
    "3": {
      "profile_id": 260,
      "device_type": "0x0053",
      "in_clusters": [
        "0x000c"
      ],
      "out_clusters": [
        "0x000c"
      ]
    },
    "5": {
      "profile_id": 260,
      "device_type": "0x0000",
      "in_clusters": [
        "0x0010",
        "0x0012"
      ],
      "out_clusters": []
    }
  },
  "manufacturer": "LUMI",
  "model": "lumi.ctrl_ln1.aq1",
  "class": "zigpy.device.Device"
}

It looks like the clusters are there "2" should be "ZHAPower" and "3" should be "ZHAConsumption" so maybe _devicetype is not correctly set for those? I'm really new to this so I'm just fishing here.

janjurek commented 2 years ago

Well I've tried to dig into it a little bit, and tried to create custom quirk (fix the current one in handlers) for this to match the node decription (look like on 2 was "smartplug" instead of "power" then I've matched the replacements to mirror the signature and I believe I finally got some info in debug console

address_mode=ADDRESS_MODE.NWK_AND_IEEE address=0xd263>, 2, 260, 12, b'\x18=\nU\x009q=\xecA', 0, 175, 255, 163, 0, 1, 2, -47]
2022-04-01 15:21:46 DEBUG (MainThread) [zigpy.zcl] [0xd263:2:0x000c] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=True> manufacturer=None tsn=61 command_id=Command.Report_Attributes>
2022-04-01 15:21:46 DEBUG (MainThread) [zigpy.zcl] [0xd263:2:0x000c] ZCL request 0x000a: [[Attribute(attrid=85, value=<TypeValue type=Single, value=29.530000686645508>)]]
2022-04-01 15:21:46 DEBUG (MainThread) [zigpy.zcl] [0xd263:2:0x000c] Attribute report received: present_value=29.530000686645508
2022-04-01 15:21:46 DEBUG (MainThread) [zigpy_deconz.api] 'aps_data_indication' response from <DeconzAddress address_mode=ADDRESS_MODE.NWK_AND_IEEE address=0xd263>, ep: 2, profile: 0x0104, cluster_id: 0x000c, data: b'183d0a550039713dec41'

If I read this well this means that I've received 29.53 watts when I'e turn on the switch, that is probably roughly what it should show given the bulbs on that line.

The problem that remains though is that there is no "power" (or "consumption" for that matter) sensor in Home assistant for that device, no matter how many times I re-pair the wall switch, so there has to be some part missing. I'm unable to figure out what though... here is my quirk for anybody interested in this:

"""Xiaomi aqara single key wall switch devices."""
from zigpy.profiles import zha
from zigpy.zcl.clusters.general import (
    AnalogInput,
    Basic,
    BinaryOutput,
    DeviceTemperature,
    Groups,
    Identify,
    MultistateInput,
    OnOff,
    Ota,
    Scenes,
    Time,
)

from zhaquirks import Bus
from zhaquirks.const import (
    DEVICE_TYPE,
    ENDPOINTS,
    INPUT_CLUSTERS,
    MODELS_INFO,
    OUTPUT_CLUSTERS,
    PROFILE_ID,
    SKIP_CONFIGURATION,
)
from zhaquirks.xiaomi import (
    LUMI,
    AnalogInputCluster,
    BasicCluster,
    OnOffCluster,
    XiaomiCustomDevice,
    XiaomiPowerConfiguration,
)

class CtrlLnTest(XiaomiCustomDevice):
    """lumi.ctrl_ln1.aq1.test"""

    def __init__(self, *args, **kwargs):
        """Init."""
        self.voltage_bus = Bus()
        self.power_bus = Bus()
        self.consumption_bus = Bus()
        super().__init__(*args, **kwargs)

    signature = {
        MODELS_INFO: [(LUMI, "lumi.ctrl_ln1.aq1")],
        ENDPOINTS: {
            1: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.SMART_PLUG,
                INPUT_CLUSTERS: [
                    Basic.cluster_id,
                    XiaomiPowerConfiguration.cluster_id,
                    DeviceTemperature.cluster_id,
                    Identify.cluster_id,
                    Groups.cluster_id,
                    Scenes.cluster_id,
                    OnOff.cluster_id,
                    Time.cluster_id,
                    BinaryOutput.cluster_id,
                ],
                OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id],
            },
            2: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.MAIN_POWER_OUTLET,
                INPUT_CLUSTERS: [AnalogInput.cluster_id],
                OUTPUT_CLUSTERS: [Groups.cluster_id, AnalogInput.cluster_id],
            },
            3: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.METER_INTERFACE,
                INPUT_CLUSTERS: [AnalogInput.cluster_id],
                OUTPUT_CLUSTERS: [AnalogInput.cluster_id],
            },
            5: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.ON_OFF_SWITCH,
                INPUT_CLUSTERS: [MultistateInput.cluster_id, BinaryOutput.cluster_id],
                OUTPUT_CLUSTERS: [],
            },
        },
    }

    replacement = {
        SKIP_CONFIGURATION: True,
        ENDPOINTS: {
            1: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.SMART_PLUG,
                INPUT_CLUSTERS: [
                    BasicCluster,
                    XiaomiPowerConfiguration,
                    DeviceTemperature.cluster_id,
                    Identify.cluster_id,
                    Groups.cluster_id,
                    Scenes.cluster_id,
                    OnOffCluster,
                    Time.cluster_id,
                    BinaryOutput.cluster_id,
                ],
                OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id],
            },
            2: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.MAIN_POWER_OUTLET,
                INPUT_CLUSTERS: [AnalogInputCluster],
                OUTPUT_CLUSTERS: [Groups.cluster_id, AnalogInput.cluster_id],
            },
            3: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.METER_INTERFACE,
                INPUT_CLUSTERS: [AnalogInput.cluster_id],
                OUTPUT_CLUSTERS: [AnalogInput.cluster_id],
            },
        5: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.SMART_PLUG,
                INPUT_CLUSTERS: [OnOffCluster, BinaryOutput.cluster_id],
                OUTPUT_CLUSTERS: [],
            },
        },
    }
xhemp commented 2 years ago

Have the same problem and been trying to find out how to get the power consumption to be shown on HA.

mtwilliams5 commented 2 years ago

I have this wall switch (lumi.switch.n1aeu1), and am hoping to be able to get it into decoupled mode (ideally without switching to zigbee2mqtt, since I don't want to migrate all my other devices over). Fairly new to ZHA stuff, but if there's anything I can do to help push this along, happy to help.

piomis commented 2 years ago

Hi

Currently I have Aqara H1 WS-EUK03 (single rocker with neutral) and Aqara H1 WS-EUK04 (double rocker with neutral). Looks that single rocker variant presents electrical measurements (power meter and energy meter), double rocker does not.

Reported temperature on both looks to be constant (and invalid) - 0.3 degree with EUK04 and 0.4 degree with EUK03.

Soon I plan to purchase also EUK01 variant (single rocker without neutral),

I confirm that on_off in coupled mode (both from HA and physical switch) works perfectly fine.

rosscullen commented 2 years ago

I'm having similar issue to the comments above. No energy monitoring and 0.3 degrees sensor showing. On_off works fine. Using Conbee II and ZHA on VM. I recall it working ok previously using Z2MQTT. Thanks

sppre commented 2 years ago

Hi

I also have Aqara H1 WS-EUK03 lumi.switch.n1aeu1 (single rocker with neutral) and Aqara H1 WS-EUK04 lumi.switch.n2aeu1 (double rocker with neutral). Before upgrading to 8.2022 I had power meter and energy meter on both types. After updating to 8.2022 I lost all sensors on the Aqara H1 WS-EUK04 (double rocker with neutral), but the single rocker still works. Removing and repairing several times did not help. image image

rosscullen commented 2 years ago

Anyone any thoughts on how this might be reviewed? Would it get better traction on the core HA issues respository? Thanks

mateuszlukasik-PL commented 2 years ago

Hi

I also have Aqara H1 WS-EUK03 lumi.switch.n1aeu1 (single rocker with neutral) and Aqara H1 WS-EUK04 lumi.switch.n2aeu1 (double rocker with neutral). Before upgrading to 8.2022 I had power meter and energy meter on both types. After updating to 8.2022 I lost all sensors on the Aqara H1 WS-EUK04 (double rocker with neutral), but the single rocker still works. Removing and repairing several times did not help. !

I have the same problem. On Aqara H1 WS-EUK04 entity domain has changed to "switch" - was "light", power measurement is gone. ZHA Quirk is now : zhaquirks.xiaomi.aqara.opple_switch.XiaomiOpple2ButtonSwitchFace2

On Aqara H1 WS-EUK03 entity domain is still "light", power measurement working fine.

sppre commented 1 year ago

Dear All, Is there any solution in sight? Kind regards

ianfromnyc commented 1 year ago

I tried to write a patch to add the single rocker switch, but for some reason my switches wouldn't expose the 0xfcc0 cluster under ZHA and I wasn't able to figure out why.

Eventually I decided I was spending more time trying to make ZHA work than it would take to migrate to Z2M, so I migrated.

On Wed, 11 Jan 2023 at 10:03, sppre @.***> wrote:

Dear All, Is there any solution in sight? Kind regards

— Reply to this email directly, view it on GitHub https://github.com/zigpy/zha-device-handlers/issues/1369#issuecomment-1378505582, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAPA5GVIDLBHW4NDCKYK3N3WR2AP7ANCNFSM5OVNPYCQ . You are receiving this because you were mentioned.Message ID: @.***>

rosscullen commented 1 year ago

I tried to write a patch to add the single rocker switch, but for some reason my switches wouldn't expose the 0xfcc0 cluster under ZHA and I wasn't able to figure out why.

Eventually I decided I was spending more time trying to make ZHA work than it would take to migrate to Z2M, so I migrated.

On Wed, 11 Jan 2023 at 10:03, sppre @.***> wrote:

Dear All, Is there any solution in sight? Kind regards

— Reply to this email directly, view it on GitHub https://github.com/zigpy/zha-device-handlers/issues/1369#issuecomment-1378505582, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAPA5GVIDLBHW4NDCKYK3N3WR2AP7ANCNFSM5OVNPYCQ . You are receiving this because you were mentioned.Message ID: @.***>

Might do similar with a separate Zigbee controller (dongle) and Zigbee2MQTT. Thanks

Scoff123 commented 1 year ago

Exactly what I did and I have been much happier with Z2M. This issie has been open 11 months now so not sure whether support for this device in ZHA will ever be added.

spitfire commented 1 year ago

Hi

I also have Aqara H1 WS-EUK03 lumi.switch.n1aeu1 (single rocker with neutral) and Aqara H1 WS-EUK04 lumi.switch.n2aeu1 (double rocker with neutral). Before upgrading to 8.2022 I had power meter and energy meter on both types. After updating to 8.2022 I lost all sensors on the Aqara H1 WS-EUK04 (double rocker with neutral), but the single rocker still works. Removing and repairing several times did not help. !

I have the same problem.

On Aqara H1 WS-EUK04 entity domain has changed to "switch" - was "light", power measurement is gone.

ZHA Quirk is now : zhaquirks.xiaomi.aqara.opple_switch.XiaomiOpple2ButtonSwitchFace2

On Aqara H1 WS-EUK03 entity domain is still "light", power measurement working fine.

So does this mean the Aqara H1 EU double rocker with neutral works (with power metering), but the single rocker version doesn't?

kylehowells commented 1 year ago

I have a Aqara H1 EU With Neutral, Single Rocker Smart Wall Switch - WS-EUK03 lumi.switch.n1aeu1 like this items title lists, but mine shows a different signature (different in clusters):

{
  "node_descriptor": "NodeDescriptor(logical_type=<LogicalType.Router: 1>, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=<FrequencyBand.Freq2400MHz: 8>, mac_capability_flags=<MACCapabilityFlags.AllocateAddress|RxOnWhenIdle|MainsPowered|FullFunctionDevice: 142>, 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=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",
        "0x0002",
        "0x0003",
        "0x0004",
        "0x0005",
        "0x0006",
        "0x0009",
        "0x0702",
        "0x0b04"
      ],
      "out_clusters": [
        "0x000a",
        "0x0019"
      ]
    },
    "242": {
      "profile_id": 41440,
      "device_type": "0x0061",
      "in_clusters": [],
      "out_clusters": [
        "0x0021"
      ]
    }
  },
  "manufacturer": "LUMI",
  "model": "lumi.switch.n1aeu1",
  "class": "zigpy.device.Device"
}

Mine joins instantly, but then doesn't stay connected. The device never leaves pairing mode (even though HA can now control it) and after a while it times out, disconnects from HA and enters red LED "failed to connect" mode.

TB-SE commented 1 year ago

OMG, when did the progress go backwards? I switched to Z2M some time ago because there where still issues with the power metering. And now switching back because of HA Yellow I only have two switch entities. I can't even decouple the relay! 😕😑Why? What happened?

szamfirov commented 1 year ago

Just raised a PR for adding a quirk for the single rocker (with neutral) version of the switch: https://github.com/zigpy/zha-device-handlers/pull/2385

It's work in progress but would appreciate any support.

szamfirov commented 1 year ago

The PR above was recently merged which should resolve any issues with the single rocker (with neutral version). Feel free to give the quirk a try. I've been using the wall switch in decoupled mode for quite some time and it works like a charm.

tarosk commented 1 year ago

Thanks for the work @szamfirov Can this be replicated to double rocker version as well? Issue #2251

szamfirov commented 1 year ago

@tarosk, the logic is already in there. I'm basing my implementation on the one for the double rocker switch.

Feel free to check this comment for detailed instructions on how to enable decoupled mode.

danielshiloah commented 1 year ago

I also have the double rocker (WS-EUK04), will there be a fix for that? looked at the device support request and it looks like nothing is happening... Did any one get it to work for them?

spitfire commented 1 year ago

I also have the double rocker (WS-EUK04), will there be a fix for that? looked at the device support request and it looks like nothing is happening...

Did any one get it to work for them?

Yes, in Zigbee2MQTT;)

tadaszelvys commented 11 months ago

Almost two years and ZHA still not working with Aqara H1 EU :( Yesterday I connected it using Zigbee2MTTQ and it works like a charm. But I really like ZHA over Z2M :(

danielshiloah commented 9 months ago

@TheJulianJES commented here that there was a push towards better support in ZHA for H1 double rocker, just checked it out and finally I get the Power consumption and overall power consumption. as well as voltage (stays on 0 for me although im 220v). No temperature yet. Another issue is that the 2 buttons are identified as switch instead of lets say switch 1/2 so you cant do automations based on a specific button pressed / double pressed / hold.

But hay at least someone is working on it finally!

nlucansk commented 8 months ago

lumi.switch.n1aeu1

Works like a charm

Core 2024.1.3
Supervisor 2023.12.0
Operating System 11.3
Frontend 20240104.0

Using Skyconnect USB Firmware: 7.4.0.0 build 0

Is there any way how to enable all those fancy double clicks? I've found guide for other type of switch but those values are not present on my end https://thesmarthomejourney.com/2024/01/15/aqara-h1-remote-switch-with-zha/

I am able to see events like

event_type: zha_event
data:
  device_ieee: xxxxxxxxxx
  unique_id: xxxxxxxxxx
  device_id: xxxxxxxxxx
  endpoint_id: 41
  cluster_id: 18
  command: 41_double
  args:
    button: 41
    press_type: double
...

I've made an automation that if fired from GUI works fine. When trying to do it on the button itself its not working

EDIT : fixed and works

alias: New automation
description: ""
trigger:
  - platform: event
    event_type: zha_event
    event_data:
      device_ieee: 54:ef:44:10:00:ad:df:55
      endpoint_id: 41
      cluster_id: 18
      command: 41_double
      args:
        button: 41
        press_type: double
        attr_id: 85
        value: 2
condition: []
action:
  - type: turn_on
    device_id: 83d95775bb901d539fa539326dd2928e
    entity_id: switch.officelightswitch_switch
    domain: switch
mode: single
AlexKusnezov commented 8 months ago

Hey guys, also having issue with lumi.ctrl_ln1.aq1

No power consumptionm, no tempreature. I copied ctrl_ln.py into my quirks folder, but it seems not to load. Other quirks with other devices work perfectly. Maybe you can point me in the right drirection on how to load this specific quirk

Screenshot 2024-01-31 at 15 30 21

signature:

{
  "node_descriptor": "NodeDescriptor(logical_type=<LogicalType.Router: 1>, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=<FrequencyBand.Freq2400MHz: 8>, mac_capability_flags=<MACCapabilityFlags.FullFunctionDevice|MainsPowered|RxOnWhenIdle|AllocateAddress: 142>, manufacturer_code=4447, maximum_buffer_size=127, maximum_incoming_transfer_size=100, server_mask=0, 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=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": "0x0051",
      "input_clusters": [
        "0x0000",
        "0x0001",
        "0x0002",
        "0x0003",
        "0x0004",
        "0x0005",
        "0x0006",
        "0x000a",
        "0x0010"
      ],
      "output_clusters": [
        "0x000a",
        "0x0019"
      ]
    },
    "2": {
      "profile_id": "0x0104",
      "device_type": "0x0009",
      "input_clusters": [
        "0x000c"
      ],
      "output_clusters": [
        "0x0004",
        "0x000c"
      ]
    },
    "3": {
      "profile_id": "0x0104",
      "device_type": "0x0053",
      "input_clusters": [
        "0x000c"
      ],
      "output_clusters": [
        "0x000c"
      ]
    },
    "5": {
      "profile_id": "0x0104",
      "device_type": "0x0000",
      "input_clusters": [
        "0x0010",
        "0x0012"
      ],
      "output_clusters": []
    }
  },
  "manufacturer": "LUMI",
  "model": "lumi.ctrl_ln1.aq1",
  "class": "zigpy.device.Device"
}
Diagnostic:
    "ieee": "**REDACTED**",
    "nwk": 56392,
    "manufacturer": "LUMI",
    "model": "lumi.ctrl_ln1.aq1",
    "name": "LUMI lumi.ctrl_ln1.aq1",
    "quirk_applied": false,
    "quirk_class": "zigpy.device.Device",
    "quirk_id": null,
    "manufacturer_code": 4447,
    "power_source": "Mains",
    "lqi": 180,
    "rssi": -55,
    "last_seen": "2024-01-31T15:19:00",
    "available": true,
    "device_type": "Router"

That's the quirk I'm trying to use: https://github.com/zigpy/zha-device-handlers/blob/dev/zhaquirks/xiaomi/aqara/ctrl_ln.py

monsieurhannes commented 7 months ago

Does anyone know if it's possible to disable "pairing mode" when holding one of the buttons for longer than 10 seconds? I would like to use it as a dimmer and I can see already, that someone is just pressing it forever (even though I put the dimmer steps so it would be bright after less than 10 seconds). I just need it for one button, so the other one could still be used for pairing... :)

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