ZHA - IKEA five button remote for lights

I now have issues with the long-press not working. I use long-press to toggle a table lamp on/off but now long-press only change the color temperature on the main lamp.

When testing a bit more it seems like the short-press is also behaving a bit weird when it comes to color temperature. I can also see that the correct color temperature is not reported back to HA.

I created a v2 of this blueprint fixing the brightness problem. As soon as frenck updates the official one I will delete mine to avoid confusion.

Blueprint Code v2

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

5 Likes

Thanks for this! Question, since I haven’t done a great deal with Blueprints, if I update the Blueprint file with this one will the automations that use that Blueprint need to be deleted and re-coded or will they be dealt with automatically?

Just load the new blueprint, go to your existing automations created with the old blueprint, click the 3 dots on the right corner, select edit YAML and change the blueprint path to:

path: gmlupatelli/zha-ikea-five-button-remote-for-lights-v2.yaml
2 Likes

Works great, thank you!!

I finally got around to trying this but when I hit save after changing the blueprint path I get an error:

Message malformed: Missing input light

Please share the yaml version of your configuration (open your automation, click on the 3 dots on the top corner and select edit in yaml).

While you are there, check if you have a light entity selected, if yes try a different one. I always select a entity so I don’t know if selecting the device or area will work.

This is the old blueprint version:

alias: Living Room 5 button remote automations
description: ''
use_blueprint:
  path: wormie_dk/zha-ikea-five-button-remote.yaml
  input:
    remote: 8fa8d29218bc3e22e8d6b8ffa63e9616
    button_on_off:
      - service: light.toggle
        data: {}
        target:
          entity_id: light.living_room_downlights
    button_left_short:
      - type: toggle
        device_id: b4053bc323244b218bb5fac65e1917c5
        entity_id: light.living_room_downlight_1
        domain: light
    button_brightness_up_short:
      - service: light.turn_on
        data:
          brightness_step_pct: 5
        entity_id: light.living_room_downlights
    button_brightness_down_short:
      - service: light.turn_on
        data:
          brightness_step_pct: -5
        entity_id: light.living_room_downlights
    button_brightness_up_long:
      - service: light.turn_on
        data:
          brightness_pct: 100
        entity_id: light.living_room_downlights
    button_brightness_down_long:
      - service: light.turn_on
        data:
          brightness_pct: 5
        target:
          entity_id: light.living_room_downlights
    button_right_short:
      - type: toggle
        device_id: b91d7946c3034c40817a7db86e6203b9
        entity_id: light.living_room_downlight_3
        domain: light
    button_left_long:
      - type: toggle
        device_id: c3c0011718d711eb914c4961cc5ee0b3
        entity_id: light.moon_lamp
        domain: light

So I do have a couple of light entities selected for the various button options.

I don't know the wormie_dk version of the blueprint it has a pretty different yaml configuration. I always used one from frenck, and this is actual configuration that is working right now:

alias: Master Bedroom - Lamp Controller
description: ''
use_blueprint:
  path: gmlupatelli/zha-ikea-five-button-remote-for-lights-v2.yaml
  input:
    remote: xxxxxxxxxxxxxxxxxxxxxxxxxxxxx-removed
    light:
      entity_id: light.master_bedroom_lamp
    force_brightness: true
    button_left_short:
      - type: toggle
        device_id: xxxxxxxxxxxxxxxxxxxxxxxxxxxxx-removed
        entity_id: light.master_bedroom_bedside_lamp_left
        domain: light
    button_right_short:
      - type: toggle
        device_id: xxxxxxxxxxxxxxxxxxxxxxxxxxxxx-removed
        entity_id: light.master_bedroom_bedside_lamp_right
        domain: light

Try remaking the automation using this blueprint:

It is a temporary fork from frenk original blueprint fixing the brightness issue.

I dont get why my bulb won’t show up when I’m trying to select “Chose device” I light sections… I have added 1x Ikea Remote and 1x Ikea Bulb via ZHA and I’m able to toggle light on/off via simple automation but for some reason my bulb not showing up as light source… Any idea?

Edit: It turned out I had an old light bulb (2016-2017) Updating the fw and adding the light bulb again fixed the problem.

2022.08.01 has the following Problem:

WARNING (MainThread) [homeassistant. helpers.template] Template variable warning: 'dict object' has no attribute 'param1' when rendering '{{ trigger.event.data.params.param1 }}'

Do you have any suggestions?

No idea. Let me do some tests here. I am not using it anymore as I am waiting for a new ZigBee coordinator because of battery issues

Fixed. Just delete the blueprint and import it back again the warning should be gone.

Hi, first of all thanks for the blueprint.

I noticed that the buttons for changing the brightness aren’t working anymore. This is the log entry for the remote device:

IKEA Remote Step With On Off event was fired with parameters: {'step_mode': 0, 'step_size': 43, 'transition_time': 5}

The remote automation looks like this:

alias: Remote Lounge
description: ""
use_blueprint:
  path: frenck/zha-ikea-five-button-remote-for-lights.yaml
  input:
    remote: abcdef
    button_left_short:
      - service: script.lounge_scene_toggle
        data: {}
    button_right_short:
      - service: script.lounge_scene_toggle
        data: {}
    light:
      device_id:
        - ghijk
        - lmnop

Any idea where to look for more information? HA Core Log shows nothing.

@engeles20 @Tykwondo1 @nstrelow @SAGV @Indianb0y016
Did any of you ever fix the left & right button not working on ikea 5 button remote (not firing any ZHA_Event). I enabled OTA udates and have now run into the same issue.
I think I should be able to force a firmware downgrade if I can find the previous firmware file - but wondered if there is a better way.

1 Like

hi, thanks for putting my mind at rest a little. i recently got a ikea 5 button remote and found that the left / right buttons do not work, no event showing at all for the left / right buttons. i thought maybe my remote was faulty but reading your post i guess it is a known issue for this remote that i hope will be addressed in an update soon. :slight_smile:

Since posting I found a bug filed for this issue on the zha device handlers github ([BUG] Issues with TRADFRI remote control and latest firmware 24.4.5 · Issue #2139 · zigpy/zha-device-handlers · GitHub) and was fixed and merged into the dev branch of zigpy 3 days ago (TRADFRI remote control - add fw support v24.4.5 by stickpin · Pull Request #2156 · zigpy/zha-device-handlers · GitHub). SO I guess we just need to be a little patient til it ends up in production and gets rolled out to ZHA.

1 Like

got notification of a HA core update this morning and got all excited but its not fixed the ikea remote yet, will just have to be a bit more patient. and on another topic i just had to re-do all my tuya devices / automations after my tuya service expired, i got it extended for 6 months now but had to re-vamp all the automations etc. now im looking to change all my tuya switches, bulbs and sensors to zigbee, or sonoff or anything thats NOT tuya before i have the same problem again in 6 months time lol.

@murtoz @alerton123

do you have a folder in your config named custom_zha_quirks?

if not add this to your config

zha:
custom_quirks_path: /config/custom_zha_quirks/

and create a new folder named custom_zha_quirks — create a sub folder inside named ikea and add this in filename fivebtnremotezha.py

https://pastebin.com/raw/mfmkkZNw

restart

Hi @engeles20, thanks for your suggestion. I have just tried this but it hasn’t made a difference. Just to be sure I completely removed the remote from zha and then re-added it (after having applied your changes) but situation remains the same, remote works fine except for left and right buttons which simply do not get detected.

When i go to developer tools → events and listen to zha_event. I can see all the various button presses, but when i press left and right arrows it sees nothing.

The only place I can see that the remote is still sending something when pressing these buttons is to go to integrations → zha → add device, then click show logs top right. Then when I press left button, it capturs this zigbee packet but doesnt know how to decode it:

Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x226E), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), dst_ep=1, source_route=None, extended_timeout=False, tsn=0, profile_id=260, cluster_id=5, data=Serialized[b'\x05|\x11"\x07\x01\x01\r\x00'], tx_options=<TransmitOptions.NONE: 0>, radius=28, non_member_radius=0, lqi=108, rssi=None)
[0x226E:1:0x0005] Received ZCL frame: b'\x05|\x11"\x07\x01\x01\r\x00'
[0x226E:1:0x0005] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.CLUSTER_COMMAND: 1>, is_manufacturer_specific=True, direction=<Direction.Server_to_Client: 0>, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False, *is_reply=False), manufacturer=4476, tsn=34, command_id=7, *direction=<Direction.Server_to_Client: 0>, *is_reply=False)
[0x226E:1:0x0005] Unknown cluster command 7 b'\x01\x01\r\x00'
[0x226E:1:0x0005] Received command 0x07 (TSN 34): b'\x01\x01\r\x00'
[0x226E:1:0x0005] No explicit handler for cluster command 0x07: b'\x01\x01\r\x00'

Almost identical to the right press except one byte is different:

[0x226E:1:0x0005] Received command 0x07 (TSN 35): b'\x00\x01\r\x00'

I’ve had a quick look at your custom quirks file but cannot figure out how to add this in. Any help would be welcome!