Nevermind. Got it working!
Thank you for this, Been looking for a way to get my double rocker identified properly for days.
I would like to control my main (physically connected) switch with this wireless switch, but it just wouldnt work. Can someone please help me figuring out what’s the issue here?
So basically what i’m after is that if I press a button on my wireless remote switch, my main switch’s button get pressed.
Any luck with this? @stickerey @sillevl @Mace
I purchased the double rocker wireless button/switch off Amazon GB recently and struggling with it in Home Assistant. Any help would be appreciated!
Hello,
I am also getting desperate to get the double rocker to work with my ConBee II :-/
"manufacturer": "LUMI",
"model": "lumi.remote.b28ac1",
"class": "aqara_h1_remote.RemoteH1DoubleRocker1"
So far, I manage to get the device to be well connected but events are all the same:
{
"event_type": "zha_event",
"data": {
"device_ieee": "54:ef:44:10:00:...",
"unique_id": "54:ef:44:10:00:2a:...",
"device_id": "b86edc7f54adb56289...",
"endpoint_id": 1,
"cluster_id": 6,
"command": "toggle",
"args": [],
"params": {}
},
"origin": "LOCAL",
"time_fired": "2022-04-26T05:22:14.187700+00:00",
"context": {
"id": "5012d16b8d25d47057b22f1392bca4ed",
"parent_id": null,
"user_id": null
}
}
I have tried to use the the zhaquirks file below but no change:
https://github.com/zigpy/zha-device-handlers/blob/93b11d3e48c798c633aab62e084dcc398f4a382a/zhaquirks/xiaomi/aqara/remote_h1.py
Only the “time_fired” and “Context” ID are different.
Any assistance will be highly appreciated.
I used the latest quirk from here and my H1 works
Hello Ditsuk,
Thanks for your message which gives me some hopes. Would you mind sharing how you did it?
I have included the below lines in my config file:
zha:
enable_quirks: True
custom_quirks_path: /config/custom_zha_quirks/
I have created a file aqara_h1_remote.py with the content from:
I have then rebooted HA and unpair / repair my H1 but I still have a single event coming through. The signature is the follwoing :
{
“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”: “0x0103”,
“in_clusters”: [
“0x0000”,
“0x0001”,
“0x0003”,
“0x0012”,
“0xfcc0”
],
“out_clusters”: [
“0x0003”,
“0x0006”
]
},
“2”: {
“profile_id”: 260,
“device_type”: “0x0103”,
“in_clusters”: [
“0x0003”,
“0x0012”
],
“out_clusters”: [
“0x0003”,
“0x0006”
]
},
“3”: {
“profile_id”: 260,
“device_type”: “0x0103”,
“in_clusters”: [
“0x0003”,
“0x0012”
],
“out_clusters”: [
“0x0003”,
“0x0006”
]
}
},
“manufacturer”: “LUMI”,
“model”: “lumi.remote.b28ac1”,
“class”: “aqara_h1_remote.RemoteH1DoubleRocker1”
}
In the log I can see:
2022-05-23 16:21:31 DEBUG (MainThread) [zigpy.quirks.registry] Checking quirks for LUMI lumi.remote.b28ac1 (54:ef:44:10:00:2a:2d:c2)
2022-05-23 16:21:31 DEBUG (MainThread) [zigpy.quirks.registry] Considering <class ‘aqara_h1_remote.RemoteH1DoubleRocker3’>
2022-05-23 16:21:31 DEBUG (MainThread) [zigpy.quirks.registry] Fail because endpoint list mismatch: {1, 2, 3} {1, 3}
2022-05-23 16:21:31 DEBUG (MainThread) [zigpy.quirks.registry] Considering <class ‘aqara_h1_remote.RemoteH1DoubleRocker2’>
2022-05-23 16:21:31 DEBUG (MainThread) [zigpy.quirks.registry] Fail because endpoint list mismatch: {1, 2, 3} {1, 3}
2022-05-23 16:21:31 DEBUG (MainThread) [zigpy.quirks.registry] Considering <class ‘aqara_h1_remote.RemoteH1DoubleRocker1’>
2022-05-23 16:21:31 DEBUG (MainThread) [zigpy.quirks.registry] Found custom device replacement for 54:ef:44:10:00:2a:2d:c2: <class ‘aqara_h1_remote.RemoteH1DoubleRocker1’>
As I posted above, both buttons work well but I can’t distinguish the event as only the unique ID for the click and timestamp change.
Thanks for your blueprint, helped me a lot !
hey sorry i didnt see your message!
did you get this working? i reccomend delete the device and re-adding it as this worked for me
Hey to all,
I’ve jus starting my big journey with HA. I imported this blueprint and created a simple automation: if I clift left button, then toggle aqara smart plug. Maybe I made simple mistake but I’m newbie, as said. Here is the errorI got:
Executed: 4 February 2023, 22:04:20
Error: UndefinedError: ‘dict object’ has no attribute ‘event’
Below my code:
''mode: restart
max_exceeded: silent
trigger:
- platform: event
event_type: zha_event
event_data:
device_id: e2466a5d7361bfbd7d64d85b0d403fee
action:
- variables:
command: '{{ trigger.event.data.command }}'
- choose:
- conditions:
- '{{ command == ''left_single'' }}'
sequence: []
- conditions:
- '{{ command == ''left_double'' }}'
sequence: []
- conditions:
- '{{ command == ''left_long press'' }}'
sequence: []
- conditions:
- '{{ command == ''right_single'' }}'
sequence:
- type: toggle
device_id: fae994a9847ef0b3f3ede071cd24dc3d
entity_id: switch.lumi_lumi_plug_maeu01_switch_3
domain: switch
- conditions:
- '{{ command == ''right_double'' }}'
sequence: []
- conditions:
- '{{ command == ''right_long press'' }}'
sequence: []
- conditions:
- '{{ command == ''both_single'' }}'
sequence: []
- conditions:
- '{{ command == ''both_double'' }}'
sequence: []
- conditions:
- '{{ command == ''both_long press'' }}'
sequence: []
id: '1675550164837'
alias: Tun on desk lamp
description: "
Hi. I’m trying to connect the Aqara wireless switch H1 to HA using sky connect ZHA. As someone above mentioned, when I connect it this is the state
Yesterday I tried like… 20 times, first connecting it to Aqara M2 hub, one time it got it right in HA and there were all the entities, single click, double click etc. But because it only registered single clicks, if I click it twice very fast, it just registered 2 single clicks I removed it from HA, try setting it again in Aqara app, from app settings there is an option for multi-function mode which allows single, double and hold, but then when I add it back in Aqara everytime it’s like in the screenshot.
Edit:
I also tried with the blueprint from the first post, but same erorr as jfk777.
Hi,
I got the exact same issue. I’ve tried pairing it multiple times but without any luck. I’m using ZHA with a sonoff zigbee 3.0 usb dongle plus E. But it doesn’t seem to come up correctly and does not show me any buttons. Also when i listen to ‘zha_event’ it doesn’t trigger anything.
Anyone got this working? Or has an idea what to try next?
I used the custom quirk provided by Yarrith in [Device Support Request] Aqara H1 wireless switch double rocker (model WRS-R02) · Issue #940 · zigpy/zha-device-handlers · GitHub
The quirk itself is here: AqaraH1.py · GitHub.
Read the code carefully! There you’ll find hints how to switch the operation modes.
After applying the appropriate operation mode I could record different events like in the screenshot:
Using the blueprint from Vogete
the whole things works like a charme: you could catch 12 different events
Unfortunately that quirk didn’t work for my device (or any of the others).
Solution was to migrate to Z2M where it worked with no additional config.
Hi. I have the button in HA but when I try and add it in the blueprint it cannot see the device name and says none available. What am I doing wrong?
I have noticed if I change the function setting on the Aqara app to multifunction mode, home assistant throws a wobbler and no longer works with it.
With that in mind, I assume you leave it as high speed click mode but then how does this blueprint work.
The switch is called Wireless Remote Switch H1 (Double Rocker) in the Aqara app btw.
Very lost and in need of help.
Thanks
Just realised mine isn’t through Zigbee, it is through Apple Homekit integration. Is there a way to change it to Zigbee? I have the Aqara hub E1 which I believe is Zigbee is it not?
Oh good lord!!
I am relatively new to HA and I bought the HA Yellow which arrived a few months ago. Been on a long learning curve since then and I have JUST NOW discovered that it has Zigbee built in and all I have to do is search for devices. What a fool!
THANKS ist works with the lumi.remote.b28ac1
It is important to change the modes: [Device Support Request] Aqara H1 wireless switch double rocker (model WRS-R02) · Issue #940 · zigpy/zha-device-handlers · GitHub
in my case click_mode=2 and operation_mode=1
Then use the blueprint from Vogete! Others don’t even work for me.
I can confirm that this solution also worked for me (thank you) but I was also able to use the blueprint from this topic - the commands in the blueprint need to be changed, e.g. instead of “{{ command == ‘left_single’ }}” we need to have “{{ command == ‘1_single’ }}”
you can find out what the commands are by starting listening to zha_event and clicking each button once, twice, thrice, both together etc
I try to use this with WXKG02LM aqara double rocker and detect but dont work…
I really like to use long press buttons.
How to make it work?