[Device Support Request] Aqara H1 wireless switch double rocker (model WRS-R02)
See original GitHub issueIs your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I’m always frustrated when […] The device is not yet supported in ZHA but I saw that it received support in zigbee2mqtt https://www.zigbee2mqtt.io/devices/WRS-R02.html
Describe the solution you’d like A clear and concise description of what you want to happen. Support for single/double/triple/long press of left/right & both buttons.
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(byte1=2, byte2=64, mac_capability_flags=128, manufacturer_code=4447, maximum_buffer_size=127, maximum_incoming_transfer_size=100, server_mask=11264, maximum_outgoing_transfer_size=100, descriptor_capability_field=0, *allocate_address=True, *complex_descriptor_available=False, *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, *is_valid=True, *logical_type=<LogicalType.EndDevice: 2>, *user_descriptor_available=False)",
"endpoints": {
"1": {
"profile_id": 260,
"device_type": "0x0103",
"in_clusters": [
"0x0000",
"0x0001",
"0x0003"
],
"out_clusters": [
"0x0003",
"0x0006"
]
},
"2": {
"profile_id": null,
"device_type": "",
"in_clusters": [],
"out_clusters": []
},
"3": {
"profile_id": 260,
"device_type": "0x0103",
"in_clusters": [
"0x0003"
],
"out_clusters": [
"0x0006"
]
},
"4": {
"profile_id": null,
"device_type": "",
"in_clusters": [],
"out_clusters": []
},
"5": {
"profile_id": null,
"device_type": "",
"in_clusters": [],
"out_clusters": []
},
"6": {
"profile_id": null,
"device_type": "",
"in_clusters": [],
"out_clusters": []
}
},
"manufacturer": "LUMI",
"model": "lumi.remote.b28ac1",
"class": "zigpy.device.Device"
}
Additional context Add any other context or screenshots about the feature request here.
The device was paired in home assistant’s ZHA integration but not working properly. Both buttons behave as the same button. Below is the result of zha_event listening
Right button single press
{
"event_type": "zha_event",
"data": {
"device_ieee": "EDITED OUT",
"unique_id": "EDITED OUT",
"device_id": "EDITED OUT",
"endpoint_id": 1,
"cluster_id": 6,
"command": "toggle",
"args": []
},
"origin": "LOCAL",
"time_fired": "2021-06-26T13:43:42.499260+00:00",
"context": {
"id": "b9d5f1afde358915f8619d1153832a07",
"parent_id": null,
"user_id": null
}
}
Left button single press
{
"event_type": "zha_event",
"data": {
"device_ieee": "EDITED OUT",
"unique_id": "EDITED OUT",
"device_id": "EDITED OUT",
"endpoint_id": 1,
"cluster_id": 6,
"command": "toggle",
"args": []
},
"origin": "LOCAL",
"time_fired": "2021-06-26T13:43:32.947572+00:00",
"context": {
"id": "d35c686ec88e197fa8f7adad07ad1b72",
"parent_id": null,
"user_id": null
}
}
Issue Analytics
- State:
- Created 2 years ago
- Reactions:18
- Comments:136 (38 by maintainers)
Top GitHub Comments
Hey everyone,
I’ve finished my prototype zhaquirk which (hopefully) will work with WRS-R02.
Just in case you don’t have experience with custom zha quirks before, here are the steps:
custom_zha_quirks
folder under the home assistant config folderconfiguration.yaml
put the
aqara_h1_remote.py
https://gist.github.com/xuxiaoqiao/6ed8dcb950f26337218d0507733970a0#file-aqara_h1_remote-py in thecustom_zha_quirks
folderreload the ZHA home assistant integration, or just reboot the whole home assistant
Home Assistant ➡️ Configuration ➡️ Devices & Services ➡️ Find the H1 Wireless Remote Device. You should see
Quirk: aqara_h1_remote.RemoteH1DoubleRocker
in the Device Info section. If it’s not the case, maybe I’ve made some mistake in the quirk signature.(Just to be safe) remove the H1 remote device and pair again.
Now in Home Assistant ➡️ Developer Tools ➡️ Events ➡️ Listen to events, fill zha_event and press start listening. When you press the Aqara H1 remote, you should see something.
Then you might want to set the H1 Remote to your desired mode:
AqaraRemoteManuSpecificCluster (Endpoint id: 1, Id: 0xfcc0, Type: in)
➡️ See “Cluster Attributes”operation_mode (id: 0x0009)
: Fill your desired value, set “Manufacturer Code Override” to 4447, press “Set Zigbee Attribute”. You may need to press H1 remote five times quickly to wake it up.0
means “command” mode, aka LO (Light and occupancy) mentioned by @MattWestb. In the “command” mode, the remote will send commands like “toggle” or “off”. You can bind the device with a light (it works like ikea tradfri remotes). Pro: when you bind to a specific light, the button works even when home assistant is down. Con: Limited customization. Btw, it seems there’s no way to differentiate the left/right button in this mode.1
means “event” mode. In the “event” mode, the remote will send generic click events to HA, and HA is responsible for the automation. When HA is down, the automation is down. But it allows more customization. I’m using this mode.click_mode (id: 0x0125)
, set it similarly.1
means single click mode. This mode has lower delay but only detects single click events. This is the default mode after factory reset.2
means multiple click mode. This mode has a slightly higher delay but detects single/double/triple click and long press. I’m using this mode.click_mode=1 and operation_mode=0
toggle
zha_eventclick_mode=2 and operation_mode=0
toggle
zha_eventoff
zha_eventclick_mode=1 and operation_mode=1
1_single
zha_eventclick_mode=2 and operation_mode=1
1_single
zha_event1_double
zha_event1_triple
zha_event1_hold
zha_eventDone. When you press the button, a
zha_event
will be triggered, which can be used in automation. The device trigger might help your automation as wellWould love to see support too. I was able to pair it on HomeAssistant via ZHA on A RPi with Raspbee2 but it does not show any entities except a malfunctioning power/battery entity. Events only show toggle commands for both buttons