🎮 ZHA, deCONZ, Zigbee2MQTT - Ikea 5-button Remote Universal blueprint - all actions + double click events - control lights, media players and more with Hooks

Hi @maxwood, thank you for your feedback.

Unfortunately this is not possible due to how the controller is designed: when holding down the center button, first a short press event is fired, then the long press is fired. This does not depend on which integration is used to connect it to HA.
By the way we could implement some virtual events for the buttons (eg. double click events) so that we can extend the controller functionality even more. :+1:

The example provided here in the docs should work for white spectrum lights:
https://epmatt.github.io/awesome-ha-blueprints/blueprints/automation/ikea_e1524_e1810_universal
If that’s what you’re looking for, please let me know if everything runs as expected. :slight_smile:

1 Like

Hey @epmatt thanks so much for taking the time to reply and for all the help!

The example worked perfectly :slight_smile:

That would be a great feature if we could do things like that, unless you can think of another way of doing it as it is currently?

I like to use the remotes as they’re intended for the most part, on/off, brightness and colour temp. But it would be cool if double click was a possibility and opened up a whole other level of customization!

You’re welcome @maxwood! Happy to hear that! :tada:

We’re currently limited to the events the remote provides, so to perform actions we can only hook to the single, hold and release events the remote fires when the buttons are pressed.
But that’s a really good point, adding this feature would allow better customization, with 5 more actions which can be run (1 per remote button).

I’ll definitely take a look at this, and try to find a solution which does not affect users who have already imported the blueprint (that is, without altering the current blueprint inputs).
If you have suggestions on how to implement this feature, I’d be happy to hear back from you.

Thank you so much for the idea! :slight_smile:

1 Like

Hi there!

News for @maxwood and anyone interested in the double clicks feature, I’ve just pushed an update which adds the support for this functionality, plus an optimization which significantly reduces automation runs, which where triggered under the hood for empty and repeated button events. Docs have been updated too to reflect the additional blueprint inputs. :tada:

Please notice that we’re really pushing the limits of this controller here, by implementing virtual double press events. Under the hood, the blueprint relies on the previous button press and a delay.
This means that if you provide an action for a double click event, when a button is pressed the automation will first wait for the second short press event, then, if none is received within the provided delay, the action for the single short press will be executed. This will result in a slight delay between the short press and the action execution.

Moreover, my tests suggest that the controller doesn’t fire the two button press events if the clicks are too close in time. This behaviour happens for all buttons, but it’s more noticeable for the left and right ones. To make sure the double press event is triggered properly, please wait a few moments before clicking the button for the second time. If you still have issues try to increase the value for the Helper - Double Press delay input.

I’d also like to point out that this is not a breaking change: anyone who is currently using the blueprint can safely update it without having to reconfigure the related automations. No performance reductions to existing automations will be caused by these new features.

If you have any suggestions or something is not working as it should with this update, please reach out here, I’d be glad to help. :slight_smile:

Happy automating! :fire:

Hello @epmatt,

Thank you for adding the double click option. This will be very useful.

I do have 1 question for you. I’m also using the TRADFRI on/off switch in the bedroom and I like to add a double click event to that remote as well. Is there a simple way I can tweek your blueprint so it can be used for this switch as well? Or can you maybe take look for me, since you are much more experienced in this stuff.

I hope you will be able to help me with this.

Hi @jimmydwn, thank you very much for your feedback.

I’ve recently developed a blueprint specifically for the TRADFRI on/off switch. You can find it here:

It currently supports only native events (click, hold and release for both the on and off buttons) but in the next days I’ll apply the latest updates to that blueprint, so that the double click feature will be available also for the on/off switch remote.
I’ll let you know as soon as the feature is implemented. :slight_smile:

1 Like

Hi @jimmydwn,

I’m happy to inform you that I’ve updated the blueprint for the TRADFRI on/off switch. The update adds support for double click events, plus implements optimizations which were originally applied to this blueprint. :tada:

If you have any suggestions or you want to leave a feedback about the on/off switch blueprint, we can continue the discussion there. :slight_smile:

1 Like

Hi and thanks for sharing!

I’m trying to use the example RGB Light control with brightness and color setting and I would like to have the light to be warm white and with a % of brightness when I do a single click on center button.
Tu turn the lamp off I would like to use only double click on center button.

What should I use to do it?

Thanks

Hi @woody4165, you’re welcome!

You should be able to set up the automation from the UI as follows:

  • (Optional) Center button - short press input:
    • Click on Add Action
    • In Action Type, select Call Service
    • In Service, select light.turn_on
    • In Service Data, paste the following code:
      brightness_pct: <your_brightness_percent>
      color_temp: <your_color_temp_in_mireds>
      
  • (Optional) Center button - double press input:
    • Click on Add Action
    • In Action Type, select Device
    • In Device, select your light
    • In Action, select Turn off

Please let me know if everything runs as it should. :slight_smile:

1 Like

Grazie @epmatt
The double press on center button does not work for me.

I tried also looking at Node Red output and I always get event 1002, one time if I press it fast, two times if I press it a little bit slower.

Same stuff I press it for a longer time.

Your first suggestion works fine!

Hi @woody4165,

for testing purposes, please try to increase the value of the Helper - Double Press delay input to 10000. This will make the automation wait for 10 seconds for the second press. Then try to slowly click the button twice and see if the double press action is executed.

If this test fails we can exclude a short delay as one of the causes, hence we can try to investigate a different solution.

Thanks!

Just tried, waiting from 1 to 3-4 secs between the two times, but no response…

Hi everyone, I’d like to inform you that @woody4165 and I are still trying to debug and find the causes of this issue, which by the way it seems not to impact all automations generated with this blueprint.

I’ll definitely keep you posted here on further developments. :+1:

Hi there!

I’m happy to inform you that I’ve just updated the Awesome HA Blueprints project with two new blueprint categories: Controllers and Hooks. :tada:

Controllers are blueprints which allow to easily integrate a wide range of controllers (wall switches, remotes, dimmers, etc.) and use them to run a set of actions when interacting with them. They consist of a practical abstraction layer for easily building controlled-based automations without worrying about the handling of raw controller events, and the integration used to connect controllers to Home Assistant (Zigbee2MQTT, ZHA, deCONZ, ZWave, proprietary hubs, etc.).
Most importantly, beside providing action sequences to Controller blueprints to build a custom controller-based automation, you can connect Controllers with Hooks .

Hooks are blueprints which seamlessly integrate with Controllers to enable control of lights, media players and much more, without you ever writing a single line of code.

For further details please read this annoucement post on the Awesome HA Blueprints project thread.

To reflect these changes, this blueprint has now been moved to the Controllers category. The original post on this thread has been updated with new links to docs and blueprint code. Examples have been removed since the functionality can now be implemented with the Light Hook. :+1:

Happy automating to everyone! :fire:

Hi, I have the Ikea RGB TRÅDFRI bulb E27 CWS opal 600lm and I am trying to get the color cycling to work. The example that is linked here on Github (https://epmatt.github.io/awesome-ha-blueprints/blueprints/automation/ikea_e1524_e1810_universal) doesn’t work anymore and with the snippet that is mentioned here I can’t get it to work.

Can anyone show me how to set this up?

Hi @felixkleisen,
thank you for reporting here, I’m sorry for what you’re experiencing with this blueprint.

The example you are pointing to has been deprecated, since this blueprint has been updated and moved to the Controllers-Hooks ecosystem.

You can control a RGB light with the E1524/E1810 controller by using the two following blueprints:

In the docs linked above you’ll find info on how to set up the blueprints on your instance.

This topic now tracks the E1524/E1810 Controller blueprint. Here’s the link to the community topic for the Light Hook blueprint instead:

Please try out those blueprints and let me know if everything runs as it should. If you have any issues with them I’m here to help. :slight_smile:

Hi @epmatt,

That worked. It wasn’t really clear how to setup up left and right button press in the Button blueprint at first, but it works by not filling in anything :sweat_smile:
Thanks!

Hi @felixkleisen,

happy to hear that you managed to configure the blueprints :smiley:.

Just as a feedback, did you find the provided docs unclear regarding the setup process for the Controller and Hook blueprints?

Thanks!

Hi @epmatt,

if I can provide feedback regarding docs. It will be really helpful if you also add one example of using Controller - Hook blueprint.

I was straggling with it for a few hours. What has to be first, then I fill all optional actions in Controller automation and also put Hook and it was hard to find whats wrong. It will be really useful if you put one use case, for example Ikea-5 button remote with light hook and attach pictures of correct automation setup. Of course everyone will have different entities but we will see what we have to fill and what we have to leave empty. Like template. :slight_smile:

Also it was unclear for me that I have to create some input_text entity. First I thought that I have to provide some existing one from Zigbee2Mqtt and I was google-ing why I dont have that for my setup. Then I realized that actually I have to create one.

BTW great work! :slight_smile:

Hi @deadly667, thank you so much for your feedback. :smiley:

It will be really useful if you put one use case, for example Ikea-5 button remote with light hook and attach pictures of correct automation setup.

That’s definitely something I’m gonna add to the documentation. The way these blueprints work is not so straightforward, and given their flexibility and modularity, they require that small procedure when setting them up. Docs should state it clearly, and examples could probably be one of the most helpful resource in this sense.

Also it was unclear for me that I have to create some input_text entity. First I thought that I have to provide some existing one from Zigbee2Mqtt and I was google-ing why I dont have that for my setup. Then I realized that actually I have to create one.

You’re right, different users reported the same misunderstanding in the past weeks, and that’s something I should address in the docs.
Something which I think it’s not currently clear enough is also that you can use multiple Hooks with the same Controller automation, as well as provide custom actions for the Controller blueprint at the same time.

Thanks again for your suggestions, really appreciate it! :+1:

1 Like