Control multiple lights individually with IKEA Trådfri remote control, simulate double tap?

I’ve got the IKEA Trådfri remote control that I’d like to be able to control multiple lights individually with. What I’m thinking is that it should be possible to store the “active light” in an input component, and map one of the buttons on the controller to iterate a predefined list of lights and change the current active light.

Anyone done a similar setup and have scripts/automations in place?

I’ve just looked at it briefly, but I’m able to trigger automations by listening to deconze_event, long press, short press and hold for four of the buttons and simple press for the on/off button. So unless I’m told otherwise I think it should be possible.

Anyone know if it’s possible simulate or trigger “double tap” on a button using scripts or automations? The remote control doesn’t send double tap events itself, but unless Home Assistant scripts/automations aren’t too limiting it should be possible to simulate this behavior.

I was wondering the exact same…
Did you manage to do it?

I saw @Robban mentioning his app daemon scripts for remote controls in some other thread shortly after I created this thread. They pretty much covered the base functionality I wanted for both the IKEA remote and the Hue Dimmer Switch so I’ve been using them.

They’re pretty self explanatory and well structured so I had no problems expanding them with the custom functionality I wanted that wasn’t already in place.

1 Like

That is in fact how I use my Tradfri remote control. With some difference though. First: I’m using zigbee2mqtt – so you have to adapt the trigger in the automation. Second: I’m using a single tap on the left arrow button to iterate the list of lights (and the right arrow button to iterate a list of predefined colors). But the mechanics should be visible.

The list of lights are an input_select (only two at the moment but the number of lights should be limited only by useability:

    name: tradfri_remote_gesteuerte_lampen
      - light.vorzimmerdeckenlampe
      - light.huego
    initial: light.vorzimmerdeckenlampe

The automation action when selecting another lamp (single tap the left arrow button) consists of two parts. First is to select the next light in the defined input_select. Second is to make the selected light blink that the user can see, which lamp is selected currently:

  - alias: "Tradfri Remote: Lampe wechseln"
    initial_state: 'on'
      platform: mqtt
      topic: 'zigbee2mqtt/tradfriRemote'
      condition: template
      value_template: "{{ 'arrow_left_click' == trigger.payload_json.action }}"
      - service: input_select.select_next
          entity_id: input_select.tradfri_remote_controlled_lamp
      - service: light.toggle
          entity_id: "{{ states.input_select.tradfri_remote_controlled_lamp.state }}"
          transition: 0
      - delay:
          milliseconds: 100
      - service: light.toggle
          entity_id: "{{ states.input_select.tradfri_remote_controlled_lamp.state }}"
          transition: 0

(The trigger/condition phrase above is just the zigbee2mqtt variant to recognize the button press.

This won’t help you with your deconz question but it fully works for me this way without any double tap.

… Oh – just realizing, that you already solved your problem. Hope, that my code will maybe help somebody else …

1 Like

That’s cool @tok !
Exactly what I was thinking of.

Now I need to figure out why my Ikea remote does not pair with zigbee2mqtt.

Do you recall how you paired them?
I keep pressing 4 times the link button, nothing happens…

Oh yes, I do. It was as weird as it was fun. I had to build a zigbee network sniffer and listen the zigbee network traffic with wireshark to get the required data.

But this is long time ago. Nowadays it should be much simpler. Maybe you have to update your coordinator software as well as the zigbee2mqtt itself.

Like @tok said in the reply above, it is a lot easier nowadays. I actually paired my IKEA remote control yesterday with the instructions described here.

IKEA TRADFRI remote control (E1524)

Pair the remote to Zigbee2mqtt by holding it close to the coordinator and pressing the button next to the battery 4 times. The red light on the remote will now flash a few times.

In order for this to work I had to flash at least version 1.2.0 on the CC2531 USB stick. The current version is 1.2.1 (I currently have this version), but the version that made this pairing method possible is 1.2.0 as can be seen here.

Besides that I also updated my zigbee2mqtt Docker container to the latest version, but I’m not sure whether this was required. If you’re not using Docker you might need to update zigbee2mqtt itself in another way.

1 Like

I have setup Ikea trådfri remote with Zigbee2MQTT and can on/off light with trådfri remote. How can i adjust brightness and choose colour with trådfri remote.

- id: '1564076446387'
  alias: Table lamp trådfri switch
  - platform: mqtt
    topic: zigbee2mqtt/0x000d6ffffe1c9df9
  - condition: template
    value_template: '{{ ''toggle'' == trigger.payload_json.action }}'
  - data:
      entity_id: light.light1
    service: light.toggle
  initial_state: 'on'

this is great, i can pair the ikea remote with home assisant via zibee2mqtt but how do i get zigbee2mqtt to pait with the led-controller so that i can control the under-counter lights from home assistant

You don’t. If the IKEA remote has been paired with Home Assistant through zigbee2mqtt and the lights have been paired with Home Assistant as well, all you need is an automation to control the lights with the remote.

There are a couple examples in this thread on how to do that.

I have created a AppDaemon app that allows controllers to control lights and media players for zigbee2mqtt, deconz and zha. You can download it from HACS. Here you have some details:

Let me know if you have any questions!

1 Like