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

Tags: #<Tag:0x00007fc40f4b7820> #<Tag:0x00007fc40f4b7000> #<Tag:0x00007fc40f4b6a38> #<Tag:0x00007fc40f4b5db8> #<Tag:0x00007fc40f4b4c60>

This blueprint is part of the Awesome HA Blueprints project.
Read more about it on the related Community Forum topic. :rocket:

Updates will be published on the project’s GitHub repository.

:arrow_down: Get Started

Option 1: My Home Assistant

Click the badge to import this Blueprint (needs Home Assistant Core 2021.3 or higher)

Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.

Option 2: Direct Link

Copy this link if you want to import the blueprint in your installation.

:link: Blueprint URL

:page_facing_up: Description

This blueprint provides universal support for running any custom action when a button is pressed on the provided IKEA E1524/E1810 5-Button Remote. Supports controllers integrated with one of the following integrations: deCONZ, ZHA, Zigbee2MQTT.

Just specify the integration used to connect the remote to Home Assistant when setting up the automation, and the blueprint will take care of all the rest.

In addition of being able to provide custom actions for every kind of button press supported by the remote, the blueprint allows to loop the long press actions while the corresponding button is being held. Once released, the loop stops. This is useful when holding down a button should result in a continuous action (such as lowering the volume of a media player, or controlling a light brightness).

Moreover, automations created with this blueprint can be connected with one or more Hooks supported by this controller.

Hooks allow to easily create controller-based automations for interacting with media players, lights, covers and more. See the list of Hooks available for this controller for additional details.

:closed_book: Full Documentation

Full documentation regarding requirements, inputs and action mappings for the supported Hooks is available here.

Docs provide all the information you need to properly configure this blueprint on your instance.

:electric_plug: Available Hooks

:bulb: Light

This Hook blueprint allows to build a controller-based automation to control a light. Supports brightness and color control both for white temperature and rgb lights.

Light Hook docs

:loud_sound: Media Player

This Hook blueprint allows to build a controller-based automation to control a media player. Supports volume setting, play/pause and track selection.

Media Player Hook docs

:door: Cover

This Hook blueprint allows to build a controller-based automation to control a cover. Supports opening, closing and tilting the cover.

Cover Hook docs

Changelog

  • 2021-02-05: first blueprint version :tada:
    • 2021-02-07: fix an issue which prevented to create automations for ZHA or deCONZ.
  • 2021-02-08: update example, fixed an issue which executed actions twice when the remote was connected via Zigbee2MQTT.
  • 2021-03-18: added example for fully controlling a RGB light (thanks @kks36!)
  • 2021-02-21:
    • add support for virtual double press events
    • block automation runs for empty and repeated messages
    • reduce input_text helper writes
  • 2021-03-03: move the blueprint in the Controllers-Hooks Ecosystem. See announcement here. :tada:
  • 2021-03-25: :warning: Breaking Change: standardize input names across all the Controller blueprints.
    If you plan to update this blueprint, please update the inputs in your automations as follows:
    • remotecontroller_device
    • zigbee2mqtt_remotecontroller_entity
    • action_* inputs → action_button_*
    • helper_last_loop_event_inputhelper_last_controller_event
  • 2021-03-26: add support for the Cover Hook
  • 2021-03-30: Fix event mappings for ZHA and deCONZ
  • 2021-04-19: Fix double press events not being detected with deCONZ

Happy automating to everyone! :fire:

17 Likes

Wow @epmatt, this is a fantastic work for a universal solution for the IKEA 5 button remotes. Thank you for your time and effort you put into this!

I can’t test it yet with my remotes since I am waiting for a new zigbee coordinator (the CC2531 won’t register my remotes with ZHA correctly).

I will definitely post back when I receive it and test your blueprint.

1 Like

I wanted to give this a try, but I cannot get it working. I am testing with a 5-button IKEA remote and an IKEA Tradfri LED bulb E27 600lm, dimmable colour and white spectrum opal white. I create a new automation based on your blueprint and when I press SAVE, nothing happens: no message pops up but also no automation is being created.

This is the YAML when I Edit as YAML:

alias: TEST IKEA 5-button Remote 1
description: ''
use_blueprint:
  path: EPMatt/ikea_e1524_e1810_universal.yaml
  input:
    integration: ZHA
    remote: 2db9252e1f360e9a01449e49cd29db3d
    action_center_short:
      - type: toggle
        device_id: df5cd98c623f1b8049489db1899ede92
        entity_id: >-
          light.ikea_of_sweden_tradfri_bulb_e27_cws_opal_600lm_60ea21fe_level_light_color_on_off
        domain: light
    helper_last_loop_event_input: input_text.ikea_5_button_remote_1

This is in the logs:

Blueprint IKEA E1524/E1810 5-button Remote - Universal Support generated invalid automation with inputs OrderedDict([(‘integration’, ‘ZHA’), (‘remote’, ‘2db9252e1f360e9a01449e49cd29db3d’), (‘action_center_short’, [OrderedDict([(‘type’, ‘toggle’), (‘device_id’, ‘df5cd98c623f1b8049489db1899ede92’), (‘entity_id’, ‘light.ikea_of_sweden_tradfri_bulb_e27_cws_opal_600lm_60ea21fe_level_light_color_on_off’), (‘domain’, ‘light’)])]), (‘helper_last_loop_event_input’, ‘input_text.ikea_5_button_remote_1’)]): Entity ID is an invalid entity id for dictionary value @ data[‘entity_id’]. Got None

Is there some error on my part?

I am running hass.io with core-2021.2.1 and supervisor-2021.01.7.

I’m getting the same error as well

Hi @ribbonofblack @kks36,

Thank you for reporting here, I’m sorry for what you experienced. I’ve just updated the blueprint, this issue should be fixed now.

The problem was on how triggers were defined. The state trigger which was used only for Zigbee2MQTT required a valid entity_id, but this is not provided when using ZHA or deCONZ. I moved this to an event trigger which targets state_changed events for the provided remote. Of course if the input is empty, no event will be caught. This is the best fix I came up with, but if anyone has a better solution I’d be happy to hear your voice.

Please reload the blueprint into your HA installation, and let me know if everything runs smoothly. :slight_smile:

Thank you. I saw you had just changed the code on github so I was already testing your new version. Now I can save my automation, but when I push buttons on the remote, the automation is never triggered.

I have another automation (frenck/zha-ikea-five-button-remote-for-lights.yaml). When I enable that automation, it is triggered by my IKEA remote. When I disable that automation and I enable the automation based on your blueprint, that automation never gets triggered by your blueprint.

Thank you for reporting. Could you please try to change these lines in the blueprint and see if it works?

- platform: event
  event_type: '{{ event_type }}'
  event_data:
    device_id: !input 'remote'
- platform: event
  event_type: zha_event
  event_data:
    device_id: !input 'remote'

Maybe the issue is that the template is not rendered at all, with the result of the trigger being invalid.

Where do I edit the blueprint? I can only create automation or delete it in Configuration > Automations > Blueprints.

Hi @123,

thank you for the suggestion. In the beginning I thought that was the cause, but while I was trying to come up with a solution for the issue I tested a working config both with and without the line-continuation character with a similar action, and the automation seemed to work properly.

You need access to your raw configuration files and edit yaml, for example with the File Editor addon, but no need to do this just to test this blueprint. So don’t worry, I’ve just updated the blueprint on GitHub with the fix, so you can try to reload it and see if it works. :slight_smile:

You’re correct. I just confirmed it by creating a simple automation with a Device Action:

  - type: turn_on
    device_id: fe920d69040743c090d79d0cc00e8c4e
    entity_id: light.hue_color_lamp_4
    domain: light

and manually changed it to this:

  - type: turn_on
    device_id: fe920d69040743c090d79d0cc00e8c4e
    entity_id: >-
      light.hue_color_lamp_4
    domain: light

and it passed Check Configuration and Reload Automations (and the automation worked).

I’ve deleted my previous post to prevent misleading anyone.

Still not working. I am now editing the blueprint directly (/config/blueprints/automation/EPMatt/ikea_e1524_e1810_universal.yaml) and I get an exclamation mark in the editor:

unknown tag !<!input> at line 150, column 36:
      integration: !input 'integration'
                                       ^

[edited]…but maybe that is only a false positive.

Thank you @kks36,
that should not be a issue though, I think that’s a false positive.

Could you please check with the newest version I’ve published on GitHub? Just delete the blueprint and import it again from the UI.

Perfect, thank you for looking into this @123, really appreciate your feedback. :slight_smile:

@ribbonofblack and anyone interested in using this blueprint with ZHA,

@kks36 and I finally managed to find out what the issue was with ZHA. The blueprint has been updated, now it should be working fine. :tada:

Kudos to @kks36 for spending lots of time and energy into this! Without his help I would not have been able to understand where the problem was. Thanks!

1 Like

Perfect. All working now. Thanks for a great blueprint!

1 Like

Got everything working with zigbee2mqtt, remote and Ikea LED bulb, except color change. Zigbee2mqtt logs say “No converter available for ‘color_temp’ (50)”. Any ideas?

Hi @Tomas_Kibirkstis, thank you for reporting here.
Which Ikea bulb are you using? If you can provide an identifier or model number, that could be helpful to try to solve this issue.

Nice to hear that everything runs smoothly now. You’re welcome @ribbonofblack! :slight_smile:

Hi

I just try on deCONZ device and it is working smoothly thank you for your work!

1 Like