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

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

First of all, huge shoutout to @epmatt for this super usefull blueprints. Saves everyone a lot of hassle of manually figuring out all ZHA event IDā€™s etc. Thanks a lot for your work!

I just setup the blueprint and the single click events all work very smoothly! However, I have trouble getting the loop-on-hold function to work properly. I want the light to slowly dim up or down if I hold the up/down button. However, nothing happens if I do so.

Has anyone else had similar problems or knows a fix?

I use the following blueprint setup:

alias: TEST - Standing lamps + remote control
description: For debugging. Based on IKEA E1524/E1810 5-Button Remote
use_blueprint:
  path: EPMatt/ikea_e1524_e1810.yaml
  input:
    integration: ZHA
    remote: e21faa55947c8bc5370c6a92d1d7b0cc
    action_up_short:
      - service: light.turn_on
        data:
          entity_id: light.desk
          brightness_step_pct: 20
    action_down_short:
      - service: light.turn_on
        data:
          entity_id: light.desk
          brightness_step_pct: -20
    button_up_long_loop: true
    button_down_long_loop: true

(I realize there is something I can do with including hooks, but I actually like this way of confuguration since I still have the feeling I understand the commands that are given :slight_smile: )

What have I tried myself?
I have looked to zha_events, and if I hold the up button, there is a special event triggered on the start and stop of long pressing:
Start event:

{
    "event_type": "zha_event",
    "data": {
        "device_ieee": "00:0b:57:ff:fe:af:32:68",
        "unique_id": "00:0b:57:ff:fe:af:32:68:1:0x0008",
        "device_id": "e21faa55947c8bc5370c6a92d1d7b0cc",
        "endpoint_id": 1,
        "cluster_id": 8,
        "command": "move_with_on_off",
        "args": [
            0,
            84
        ]
    },
    "origin": "LOCAL",
    "time_fired": "2021-03-19T13:31:03.401822+00:00",
    "context": {
        "id": "8708d82088a88dd574b8288b428300ed",
        "parent_id": null,
        "user_id": null
    }
}

Stop event:

{
    "event_type": "zha_event",
    "data": {
        "device_ieee": "00:0b:57:ff:fe:af:32:68",
        "unique_id": "00:0b:57:ff:fe:af:32:68:1:0x0008",
        "device_id": "e21faa55947c8bc5370c6a92d1d7b0cc",
        "endpoint_id": 1,
        "cluster_id": 8,
        "command": "stop",
        "args": []
    },
    "origin": "LOCAL",
    "time_fired": "2021-03-19T13:31:03.974525+00:00",
    "context": {
        "id": "3f60129a2a796b4cd6b01107d5f2db9b",
        "parent_id": null,
        "user_id": null
    }
}

Further, if I single press a button there is a ahb_controller_event triggered. I am not exactly sure what this is, but I got the feeling that it was related to the blueprint since It uses the same phrasing:

{
    "event_type": "ahb_controller_event",
    "data": {
        "controller": "e21faa55947c8bc5370c6a92d1d7b0cc",
        "action": "button_up_short"
    },
    "origin": "LOCAL",
    "time_fired": "2021-03-19T13:32:04.013243+00:00",
    "context": {
        "id": "5c28b26faa998d225cbd237ea1e6954f",
        "parent_id": "761cbd6bdfe8a4ff30e513d3f60d743a",
        "user_id": null
    }
}

But if I hold the buttons, there is no ahb_controller_event triggered after the zha_event. Could this be the cause? If so, what would a fix be?

Hi @WiiiLDFARMER,
thank you for your feedback!

The recommended way to control lights using one of the supported Controllers is with the Light Hook :slight_smile:

but if you want, you can also manually specify actions for each of the events exposed by the controller, as you did for the action_up_short and action_down_short.

Your blueprint setup is lacking the action_up_long and action_down_long sequences, which will be activated when holding the up and down buttons, as well as a valid input_text entity for the helper_last_loop_event_input input. The reason why this text input is required is explained in the docs here.

With these 3 inputs correctly provided to the blueprint, your automation should run as expected.

Yeah, that event is fired by the Controller blueprint whenever an event occurs. Thatā€™s the way Controllers and Hooks are able to link with each other and build controller-based automations together: Hooks simply listen for these events with the specified controller name, and whenever a relevant event is fired, they activate the action corresponding to that specific event. :+1:

Iā€™m aware that as of today docs for the Controllers-Hooks ecosystem arenā€™t clear on how the whole system works and how to setup controller-based automations. Iā€™m working on them to improve their general quality, as well as provide examples and better explanations on how things work under the hood. This project definitely needs better documentation. :slight_smile:

Please let me know if providing the missing inputs fixes the issue.
Thanks!

Hi there!

to @WiiiLDFARMER , @felixkleisen, @deadly667 and anyone interested in this.

In the past days I worked on improving documentation for the Controllers-Hooks Ecosystem; Iā€™ve just completed the update.

You can read docs for Controllers and Hooks here. Iā€™ve also included some usage examples, as well as different configuration scenarios for controller-based automations.

I hope docs are able to address many doubts regarding the setup of such blueprints. If not, please report it here, Iā€™d be happy to help, or to simply hear your opinion on the new documentation. :slight_smile:

Thanks Matteo, this solved my problem!

If anyone else encounters this ā€˜issueā€™ (or actually, misunderstanding):

  • I misunderstood the ā€˜button_up_long_loop: trueā€™ part as it looping the single click action upon long press. But it keeps looping the longpress action untill longpress is released, makes sense!
  • I also misunderstood the helper, I interpreted it as being only needed when using double press actions AND zha. However, it is needed for double press actions OR zha :slight_smile:

For reference, my working automation yaml now looks like this:

alias: living room ceiling remote
description: ''
use_blueprint:
  path: EPMatt/ikea_e1524_e1810.yaml
  input:
    integration: ZHA
    remote: 8505acac8ce230dc94bc9e45fddc6a47
    action_up_short:
      - service: light.turn_on
        entity_id: light.ceiling_living
        data:
          brightness_step_pct: 20
          transition: 0.7
    action_up_long:
      - service: light.turn_on
        entity_id: light.ceiling_living
        data:
          brightness_step_pct: 10
          transition: 0.1
    action_down_short:
      - service: light.turn_on
        entity_id: light.ceiling_living
        data:
          brightness_step_pct: -20
          transition: 0.7
    action_down_long:
      - service: light.turn_on
        entity_id: light.ceiling_living
        data:
          brightness_step_pct: -10
          transition: 0.1
    action_center_short:
      - service: light.toggle
        data: {}
        target:
          entity_id: light.ceiling_living
    button_left_long_loop: false
    button_right_long_loop: false
    button_up_long_loop: true
    button_down_long_loop: true
    helper_last_loop_event_input: input_text.zha_ikea_remote_helper_living_ceiling

The helper was created as a simple text input via the ā€˜Helperā€™ panel in homeassistant.

I did not use Hooks because I like to have some control myself on what happens, so if you do want to use Hooks check the docs of Matteo :slight_smile:

1 Like

Very nice of you to add additional docs :smiley:

I am not using hooks, but browsing scanning your docs it is already much clearer than before. The block diagrams in combination with the example configurations make it much more understandable.

Great work on these blueprints!!

1 Like

Hi @WiiiLDFARMER, thank you so much for your nice feedback!
Iā€™m happy that docs helped you to better understand how the whole ecosystem works. :slight_smile:

Thank you for your example post on this topic too, that will certainly help future users a lot.

Again, Iā€™m always glad to receive feedback and Iā€™m really interested in making the docs as clear as possible, so if you have any suggestion or idea on how to improve them, Iā€™d be happy to hear your voice. :smiley:

Happy automating!

To use this with zigbee2mqtt I require to activate ā€œHome Assistant legacy triggersā€ in Z2M->Settings->Advanced?
After trying to modify another zigbee2mqtt blueprint and looking around other z2m blueprints, and comparing with my automations I created with devices and z2m, it seems currently they only work with ā€œentityā€ tiggers and not ā€œdeviceā€, is this correct?

Hi,
I have played around with this blueprint and the Hook Light blueprint.
Iā€™ve also just read the docs but Iā€™m missing somethingā€¦
I successfully created an automation based on the main blueprint of this thread (Ikea 5-button switch, Deconz, LIFX bulbs)
It works fine : toggle on/off with the center button, increase/decrease brigthness with up/down buttons (single and long presses) all within the ā€œEPMatt/ikea_e1524_e1810.yamlā€ blueprint :ok_hand:

2 questions :

  • I donā€™t know how to configure the white temperature cool/warm on the left/right arrows :thinking:
  • Would I need the Hook Light blueprint for that ? Because I havenā€™t had to use it so far so Iā€™m not sure what itā€™s for :man_shrugging:

Thanks for your help and/or any examples of such a scenario !

[EDIT] Nevermind, I figured out my mistake. I had badly configured the Hook.
Both brigthness and color temperatrure work :smiley:
Here is its setup :

1 Like