I am a small YouTuber, publishing fun stuff that I do with my computer.
Since recently I started tinkering with Home Assistant which brought me to purchasing Aqara H2 EU light switch because, overall, right now it seems like a good fit for me, although imperfect (there is a bug report on the bottom).
Out of the box this switch is very easy to get going with Home Assistant and ZBT-2 and an existing Thread network. Just scan the QR and voila - it’s in the dashboard.
Upper two buttons are attached to relays and cannot be detached in Matter/Thread mode. I guess this is not a deal breaker, but I noticed that all four button report to HA separately the state of each button being pressed or not pressed. This seems like a preparation for some future firmware which will offer decoupled mode. Maybe. Already with firmware 1.0.1 I can automate with upper two button simply by measuring the time how long have they been pressed. Let’s say below 300ms is single click, twice in a row in very short time naturally a double click, and pressed and held for longer than 300ms we can use as long press. The problem is … you CAN do this already, but relays fire anyway and they are loud. So if you don’t connect relays to anything you can already have a four button controller that can each have at least three functions. I tried it and it works. Except for the fact that relays fire without actually closing any electrical circuitry in this way of using it. However, I ended up installing my fist H2 in Bathroom where I connected upped two buttons to bathroom fan and mirror light which is non-smart.
Bottom two buttons I programmed with the built-in single press feature to turn on my lights at 80% and 100% because my family prefers these two brightness options. However, the single press action is being sent twice in a row which seems like a bug to me. I cannot find a valid reason why the single press event is being sent twice so in Home Assistant I have setup a “guard” that will ignore the second event that comes right after the first one in a very short time.
Long press (the one I simulated by using the state of the button being pressed or not) I have setup to increase and decrease light brightness. I just hold the button and the brightness is increasing until I let go. This works well except when I press both bottom buttons at once. Then one of them stays in Home Assistant reporting as pressed forever so I had to install another guard rail to stop increasing/decreasing the brightness after the button is being held for max 5 seconds. I also believe this is some kind of a bug in firmware and I am willing to provide whatever logs you request of me.
There is one small issue that I would like to see fixed/implemented: When I click bottom button to turn on the light I would like to have the built in LED light up to provide feedback to the user. The upper buttons have this. Bottom ones don’t do it because they only send commands to Home Assistant but they have no way to receive any feedback from HA in order to lit up those LED’s.
So LED’s and decoupled mode and the two bugs described above fixed and I think this switch would come close to perfection.
Thanks for sharing such detailed feedback. We’ll share your feedback with our team for further consideration. BTW I’d like to know more about your youtube channel
The main vibe of the channel is Free Software (as in freedom), open technologies, independence from big tech, DIY, self hosting. I also teach people the insides of Linux as live and interactive classrooms on Sundays. In the same format we are learning C programming (that’s my current program on Sundays).
As for static videos which I create and upload, I am currently infatuated with smart home and I have invested a ton of hours into understanding how Matter and Thread work and I will be publishing a series of videos on that topic soon.
I just realized that I love Aqara instant single click events. They are so much faster than IKEA Bilresa remote which waits for my second click for way too long before sending an action. UX is much better with Aqara, but here is a challenge. My family prefers 1050 lumen IKEA bulbs and we turn them on at 80% brightness on a single click while holding Bilresa gives us 100% brightness. With Aqara this is not possible because it does not send double click events. And not only that, but it SOMETIMES sends a phantom click right after the first click. So in order to make single click work properly I have to program Home Assistant to ignore the second click for at least 50ms unless I want my light to instantly turn on and off like nothing actually happened. This is a bug in Aqara firmware, no doubt.
But I love Aqara instant command so I came up with this Home Assistant automation: If human clicks once then turn on bulb at 80% and ignore further clicks for 50ms and then listen for a little while to see if another click will arrive. If it does then treat it as a double click and send 100% brightness command to the bulb. This way I get instant reactions and getting that 100% brightness feels like some kind of power boost, visually, and I actually like how it behaves. So now I have double click on Aqara in Matter mode.
alias: Bathroom Aqara H2 Button 7 - 80% / Double Click 100%
description: ''
triggers:
- trigger: event.received
target:
entity_id: event.bathroom_aqara_h2_button_7
options:
event_type:
- initial_press
conditions: []
actions:
# Prvi klik: ODMAH toggle na 80%
- action: light.toggle
target:
entity_id: light.bathroom
data:
brightness_pct: 80
color_temp_kelvin: 3000
# Aqara phantom event comes fast after the real event.
# During this time we ignore the second event.
- delay:
milliseconds: 50
# After debounce window we now wait for possible second human click.
- wait_for_trigger:
- trigger: event.received
target:
entity_id: event.bathroom_aqara_h2_button_7
options:
event_type:
- initial_press
timeout:
milliseconds: 450
continue_on_timeout: true
# If the second human-operated click arrives -> 100%
- if:
- condition: template
value_template: "{{ wait.trigger is not none }}"
then:
- action: light.turn_on
target:
entity_id: light.bathroom
data:
brightness_pct: 100
color_temp_kelvin: 3000
mode: single
max_exceeded: silent
Note that I tested my doubleclick speed and I can’t do it faster than 100ms no matter how much I try. So you can move the debounce closer to 100 if you are afraid of slower phantom events until Aqara fixes this bug. Or maybe it is a hardware fault that generates a double click. I don’t know.
After a couple of days with this switch I remain with my initial opinion:
a way to send a matter command to switch to activate LED
decouple mode so I can have all buttons for automation while keeping the ability to remotely control the relay via matter commands
solve the problem of phantom double click issue
solve the bug where holding the button would sometimes “jam” the state of report towards HA that the button is being held. when I let go the button then the “held” state should return to 0 (zero) in 100% of cases
Mind BILRESA does not wait for anything and can be as instant, it sends the Initial Press action as soon as you press the button and, later, it will tell you if it was a short press, long press, double and whatnot. Wrote about that in a reddit post.
Unfortunately, most platforms, including Home Assistant until this PR gets accepted, ignore the initial press event when the button supports more events and won’t let you use it in automations.
To recap, in Matter, having a fast single click if that’s the only thing you want is not incompatible with supporting double click for instance. The event is the same in both cases and it’s there, the initial press.
The PR is not mine but don’t worry, there’s nothing to vote and they are prioritizing it now after a few months of less visible activity.
They are taking their time because they are revamping the way to automate buttons in Home Assistant to make it easier and less error prone, including new purpose-specific triggers and defining more natural event names regardless of the integration used (they were talking about exposing the initial_press as press_start for instance).
Thanks for sharing your experience! I like it as well but mainly just use it with the Aqara app and Apple home !
I also would recommend to you to check out the V1 touchscreen dial ! Lots of nice features
Another thing I just realized I can do with Aqara H2 … See, my family is used to pressing down on the old-school mechanical switch to turn on the light, and pressing up to turn it off. With Aqara H2 I have settled with the scenario where bottom button is light toggle, while upper button (relay) is service button, of sorts. You click it, it cuts power to smart bulb, and after 5 seconds Home Assistant turns it back on.
I have reason to believe that many years of muscle memory will make my entire family press upper Aqara button in attempt to turn off the light, and naturally the light WILL turn off because relay will cut power. Then Home Assistant will connect the power back to the bulb and here comes the fun part: I saw that IKEA Kajplats bulbs have a setting to boot into “off state” and I will configure them exactly in that way so that when family members believe that they turned off the light by pressing upped Aqara H2 button, the light will really stay off while Home Assistant will connect the power back to the bulb.
I need to sleep on this idea, but I believe it’s good. I have ordered three more of these Aqare switches. I will order 3 more next month after I get paid.
I bought a Shelly relay for my disco ball motor and then realized that Shelly’s approach would actually be a much better Matter fit for my light switches than Aqara.
Alas, I had already bought several Aqara H2 switches. They look great and the basic Matter functionality works well, but the Matter implementation still feels quite limited.
Is there any chance the H2 will receive a Matter firmware update with additional features?
In particular, I would love to see:
Decoupled relay mode over Matter, so pressing a physical button can generate an event without switching power to the smart bulb.
All physical buttons exposed as programmable Matter buttons.
Independent LED control, including per-button enable/disable and ideally brightness control.
Ideally, a local fallback mode where the switch can temporarily control the relay directly if the Matter controller/Home Assistant is unavailable.
A configurable very-long-press action for locally power-cycling the relay would also be extremely useful for smart bulbs.
The hardware already seems capable of most of this, especially since Zigbee mode offers some features that Matter mode currently does not.
I have a new problem. Wife wants me to make the “new switches” work like the old switches did, meaning pressing down turns the light on, pressing up turns it off. I think Aqare can’t do this over Matter.
It’s unfortunate that Matter is so limited here. I think Zigbee would be the better fit for your use case function-wise. As you already noticed, Zigbee offers more features: you can set the operation mode to decoupled, so the relay stays on and you get events for single click, double click, hold and release. Down = on, up = off is then just a simple automation.
Is there a specific reason you want to stay on Matter? The missing features made me go back to zigbee whenever I tried matter. However, fingers crossed for a Matter update that covers your needs!
Yes. I actually started my smart home with IKEA thread devices, so it was necesarry for me to put HA ZBT-2 into thread border router mode. Then I decided to continue building upon the thread network, hence buying six Aqara H2 (3 more soon) was one of the following steps — because it supports thread.
If I want to transform H2 switches into zigbee mode then I need a second ZBT-2 antenna: just for the switches that support thread as well. So it’s a slightly sticky situation, building a whole new zigbee network for one reason only: to decouple the relay of devices that are on my thread network.
I am not entirely against buying a second antenna, but I wish there was more than just one reason to do so. Right now I don’t have that second reason.
Question: is H2 in zigbee mode sending the single click immediately to HA or does it sends the single click AFTER the doubleclick wait time expires? This is important to me, I love how fast H2 single click works in matter mode and I have my own version of doubleclick for my own use case: when my family presses button 5 on H2 the light is turned on to 80% immediately (wife hates 100% of 1050 lumens). But when the second single click is detected after the first one then light gets the lumen upgrade to max. This makes a really good UX and I don’t want to give it up.