-
Notifications
You must be signed in to change notification settings - Fork 707
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Device Support Request] Aqara H1 wireless switch double rocker (model WRS-R02) #940
Comments
what radio are you using? Can you enable debugging and post the logs for left and right button presses? |
I am using EZSP on a Xiaomi Gateway 3. Left button press: Right button press: I reconnected the switch in ZHA in order to get the log as well:
|
Leave the same debug log running, but press the left the. Right button and let me know the bed address of the device. |
I don't know what or where is the bed address of the device so I extracted the records for each button press from the home-assistant.log file. I hope it has the information you need. If not please give me more details on how to get it. Left button press
Right button press
|
I don't know if xiaomi does some extra, manufacturer specific configuration, but it is not possible to discern between left and right clicks, as incoming data is virtually the same. |
Z2M looks having the possibility changing operating mode between LO and HA. |
What is LO and what is HA? |
LO = Light and occupancy (sending light and commands) and HA = sending "clicks". |
Any hope getting this device to work? I have two of these sitting in my drawer. |
Would 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 |
Same here for a WRS-R02, through ZHA (with a zigate) on a virtual machine running on a DS916+ Synology, only a faulty power/battery entity associated. Would also love a support. Beginner to HA but available to do some test if necessary. It should be pretty close to the WS-EUK02 operating mode (wall switch without neutral) if I should guess. |
Same for me. |
Same here, but I'm adding some information: From the User Manual:
So I guess here we just need to find a way to send this command to the switch, things that zigbee2mqtt seems to allow https://www.zigbee2mqtt.io/devices/WRS-R02.html#operation-mode-enum |
The code used in Z2M: I dont knowing if its using more endpoint for sending commands then the 1 or the rest is being used at all. |
Hi! I am exactly the same as you, model b28ac1, CC2531 and I can only do an automation that applies to the two buttons, there is no way to be able to do different automation with the buttons. Have you been able to find something else?
I can use this automatization:
|
Would be great to get this working with ZHA, is it on the roadmap? |
I recently bought an Aqara H1 wireless switch single rocker version ( Here's my custom_quirk file (https://gist.github.com/xuxiaoqiao/6ed8dcb950f26337218d0507733970a0) which works for me, and it might be a starting point for the double rocker version.
P.S.2: The LO/HA mode works for me. I just realized I need to quickly press 5 times before making any changes to |
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:
|
Thank you very much for sharing your work. Unfortunately I was not able to integrate my double b28ac1. It still appears as LUMI lumi.remote.b28ac1 and I can not find the right Cluster Here is my config.yaml default_config:
group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
http:
ssl_certificate: /ssl/fullchain.pem
ssl_key: /ssl/privkey.pem
ip_ban_enabled: true
login_attempts_threshold: 5
sensor:
- platform: systemmonitor
resources:
- type: disk_use_percent
arg: /config
- type: memory_free
tts:
- platform: google_translate
language: 'fr'
base_url: https://*******
recorder:
db_url: mysql://******
alexa:
smart_home:
zha:
enable_quirks: True
custom_quirks_path: custom_zha_quirks
|
@cray19003 thanks for helping test it! I'm not sure why it's not loading. If you have already created the
signature (click to expand){ "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=, *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" }
Set log level to debug in configration.yaml by adding the following block and reboot HA (click to expand)logger: default: warning logs: homeassistant.components.zha: debug bellows.zigbee.application: debug bellows.ezsp: debug zigpy: debug zigpy_deconz.zigbee.application: debug zigpy_deconz.api: debug zigpy_xbee.zigbee.application: debug zigpy_xbee.api: debug zigpy_zigate: debug zigpy_znp: debug zhaquirks: debug For me, it's working, and I can find the following content in the log, if yours doesn't work, it'll be good to know at which step it went wrong.
|
This is my device signature:
So I had to modify the quirk a little bit: remove in Now I have I think the last issue. I'm sending successfully to |
When |
FYI here's the behavior of my aqara h1 single button remote under different settings.
Actually, if the quirk works on the H1 2-button version, can someone post the full contents of zha_event it sends under different settings? could help me write the device_automation part. |
Thank you @xuxiaoqiao. Below you can find payloads. I have one more issue - the only left button is working. The right one is not generating any events for options when in payload you can see button in args. click_mode: 1, operation_mode: 0
click_mode: 2, operation_mode: 0
no off command on double click. click_mode: 1, operation_mode: 1
click_mode: 2, operation_mode: 1
|
@mmatecki Great, seems we've made big progress. Thank you for your time. My guess is that we should add BTW, it seems if you press two buttons simultaneously in |
@xuxiaoqiao works perfectly well! Thank you. Event for the left button:
Event for the right button:
|
Hi, And for those wondering how to create an automation with those events, below is an example to toggle a light with the right button. - id: '1640791149833'
alias: H1 Right button
description: ''
trigger:
- platform: event
event_type: zha_event
event_data:
device_ieee: 54:ef:44:10:00:1b:09:dd
unique_id: 54:ef:44:10:00:1b:09:dd:2:0x0012
device_id: dea4120a7d912d1eafa097413bba89f5
condition:
- condition: template
value_template: '{{ trigger.event.data.command == ''2_single'' }}'
action:
- type: toggle
device_id: 62f7271352ef226d301c78ec023524e9
entity_id: light.shelly_shdm_2_40f5200038b7
domain: light
mode: single |
Did you try quickly press the button five times when setting mode? |
Hey everyone, I have an update and a request. First, I've just added Please let me know if it works or not. I need more feedback before I create a PR. And can anyone help confirm if the H1 remote supports "both buttons pressed at the same time" event? And if it does, does it support single/double/triple/long press? You might want to set mode to |
Can you post the quirk that you are using? |
First of all, thank you to everyone that has been contributing to this, your work is outstanding. A quick tip if someone is unable to make this work. I could not have the device recognize the custom quirk for the life of me, and I also couldn't see the AqaraRemoteManuSpecificCluster, which was making me think something was wrong despite the device being 'correctly' recognized After about 30 attempts and using different quirk versions, here's what worked for me:
This may have just been pure coincidence, but after hours of trying to add the switch by holding the button for 10sec it was only when I followed the steps above that it started working. I'm using SkyConnect as the Coordinator. |
Hi all, Okay, so, been reading through this, but it is still not clear to me. So, currently it seems my H1 is in "high speed mode". I want to use it in "multi mode" in ZHA. I tried switching modes by long pressing (above 30s) the left or right button. I also tried pressing the left or right button fast 5 times. No change. So, is the only way of getting this to work is to use a custom quirk? Like this version |
Yes it needs to be loading the quirk then you can set the click and operation modes |
This fixed it!!! Thanks! |
Yeah, got it working now. Thanks. Crazy amout of press combinataion: Single, Double, Tripple & Hold. This works for left, right and both together. Awesome! |
Hi guys I'm not able to make it work with my device. This is my signature:
Thanks! |
Hi folks, unk_model The signature is:
and the diagnostics file below: any pointers? |
@UserPiggy
|
@Yarrith , thanks for your help buddy. so, the added code did two things, it made the unk_manufacturer see the cluster but still didn't hear any responses when buttons were pressed... and the switch that was working fine is now acting like the unk_manufacturere was... with no options for cluster.... my solution, I'm just going to go all in on Aqara and pick up one of their hubs lol thanks again for your help Yarrith... |
Hi, all, |
Hi, does anyone's switches work via zigbee2mqtt? |
Could you share your final config? I'm also facing trouble getting a second switch to work :( |
aqara_h1_remote.zip |
I also hade the problem that I got one working and my other two not, so I added the file you posted with variant 7 and 5 but still the same. :( |
@Sjobusen could you share the signatures of the non-working devices please? This way it’s easier to see what can be done. |
Now I got one more working , the last one hade a loose contact on the battery side, must have been cold soldered as the pins came off when I touched it :(. The problem was that when I pressed the buttons I got the blue lamp to light up and had change batteries 2 times. |
Hi Everyone, Now I bought to additional devices and I cannot integrate them. I copied the quirk file from github https://gist.github.com/xuxiaoqiao/6ed8dcb950f26337218d0507733970a0#file-aqara_h1_remote-py in the The device still Signature info:
In the debug mode I receive error messages like
aqara_h1_remote.zip I use SkyConnect with PI4 Could you please help me how to progress? |
I've tried all quirks in this issue, but none worked. So I made some changes to class RemoteH1DoubleRocker3(XiaomiCustomDevice) according to my signature - see below both of them. I am not a programmer, just write simple scripts and it was my fist time dealing with signatures and all the stuff, so... changes I made may not be completely ok, they just work (for now at least) and I welcome further help and suggestions. class:
and my signature:
|
Sorry for the stupid question, but how this changes need to be done? |
I compared input_clusters and output_clusters in signature and script and adjusted script accrordingly. But I only changed commented section and have no idea why it worked (it should not) |
Not sure if it makes any difference, but for me the filepath for the custom quirk is: With this in
|
Managed to resolve the.issue. @xuxiaoqiao Thanks for your work even so far! |
Is 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.
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
Left button single press
The text was updated successfully, but these errors were encountered: