[SOLVED] Using Ikea Tradfri Shortcut Button and Tradfri On/Off switch

So yesterday I bought a shortcut button and an on/off switch from the Ikea Tradfri product line. I was able to pair both devices on first try. They show up correctly, and expose triggers for several button press events.

However, when adding automations, they just wont trigger at all. I found another thread where people said after a while starts working, however I have paired them like 1 hour ago, and still nothing works. I also tried the blueprint someone provided for the shortcut button - no change. Whatever I do, pressing the buttons won’t trigger the automation.

I also went to developer tools → events and listened for zha_event, but when I press the buttons, no events appear. This makes me believe that something is fundamentally wrong here?

I have just upgraded to the very latest version of HA (2022.3.7), but the behaviour did not change.

Are the recent Ikea devices incompatible with HA/ZHA? As dongle I am using a ConBee (I) USB stick.

[edit] I also get this in the logs after starting home assistant:

Mar 24 14:53:51 ceres hass[2139]: 2022-03-24 14:53:51 WARNING (MainThread) [homeassistant.components.zha.core.channels.base] [0x7830:1:0x0008]: async_initialize: all attempts have failed: [DeliveryError('[0x7830:1:0x0008]: Message send failure'), DeliveryError('[0x7830:1:0x0008]: Message send failure'), DeliveryError('[0x7830:1:0x0008]: Message send failure'), DeliveryError('[0x7830:1:0x0008]: Message send failure')]
Mar 24 14:53:51 ceres hass[2139]: 2022-03-24 14:53:51 WARNING (MainThread) [homeassistant.components.zha.core.channels.base] [0x7830:1:0x0006]: async_initialize: all attempts have failed: [DeliveryError('[0x7830:1:0x0006]: Message send failure'), DeliveryError('[0x7830:1:0x0006]: Message send failure'), DeliveryError('[0x7830:1:0x0006]: Message send failure'), DeliveryError('[0x7830:1:0x0006]: Message send failure')]

Could this be related?

1 Like

I know I had to update the firmware on my conbee II stick before it worked with some of the IKEA remotes.
It had the same symptoms.

Thanks for the hint. Following Update deCONZ manually · dresden-elektronik/deconz-rest-plugin Wiki · GitHub, I have updated the firmware to deCONZ_Rpi_0x26400500.bin.GCF from august 2021.

After restarting HASS, the Tradfri on/off switch now works. The shortcut button however still refuses to work and does not produce any ZHA events.
Any idea?

That is as much as I can help.
I don’t have any shortcut buttons.

Perhaps the conbee I is too old?

ConBee I should have the same functionality as ConBee II, the new one is just smaller.
I use a ConBee II with ZHA and don’t have any problems with multiple Ikea switches and buttons.

Have you tried removing it from ZHA and repairing?

If that still doesn’t fix it, maybe a firmware update of the button helps. OTA Device Firmware Updates · zigpy/zigpy Wiki · GitHub

I’d recommend a firmware update of the shortcut buttons anyway. All the shortcut buttons I bought had an old firmware preinstalled that produced multiple events per press (which makes it impossible to use the “double press” trigger). A firmware update fixes that.

1 Like

Hmm good hint, I would try, however I don’t have any OTA option in lovelace after adding the relevant part to configuration.yaml and restarting HASS. Are those instructions outdated?

Where does the OTA wiki page say something about an UI option? I don’t think there is one.
You either have to wait until the device does an update check by itself (can take a very long time) or use the image_notify cluster command.

And you have to monitor the log file for progress.
Note: The update will take some time! If I remember correctly it was something around 1 or 2 hours.

Or for IKEA devices, you can go Config > Integrations > ZHA > Device > OTA Cluster > image_notify command to ask them to check in.

I thought I should see something in the settings then, but I don’t.

I have just triggered it manually by calling the service, lets see what happens. I have increased loglevels for zha and zigpy, however, at least directly after firing the service, I fail to find any logmessage which contains the word OTA.

But adding to this, I just found that I have this in the logs:

2022-03-25 15:43:35 INFO (MainThread) [zigpy.ota.provider] TrÄdfri: OTA provider enabled
2022-03-25 15:43:35 DEBUG (MainThread) [zigpy.ota.provider] TrÄdfri: Finished downloading firmware update list

So it seems like the OTA feature is indeed there and enabled. I’ll just wait a while then I guess.

The “OTA Cluster > image_notify command” is available in the UI. Click on “manage clusters” on the device page.

You have to press the shortcut button immediately after sending the image_notify command. That is needed to wake it up.

Just for your info, when you do get it working properly, disable the OTA firmware update, reason being with it enabled the battery in the on off switches was only lasting a couple of weeks.
Since ive disabled the OTA the batteries are still going strong 5 months later.

Okay so I just came home after 3hrs, and the button has not been updated. I can see from the logs that HASS updated the firmware of my IKEA bulbs, however no sign of activity for the shortcut button.

Since I didn’t press the button after sending the command, I have now repeated this, this time using the GUI thanks @cremor for pointing to the dialog.

Again no sign of activity for the button, but it also seems like its continuing to update my IKEA bulbs (while I was away it updated 2 E27 bulbs and just now started updating a GU10 bulb).
Are those updates queued? Could it be the button will be due for update some time later?

Multiple devices can receive OTA firmware updates in parallel, so this shouldn’t be a problem.
Really weird that it doesn’t work for you. Maybe the button is simply defect? Have you tried paring it directly with a bulb to see if it works?

Okay so I removed the device, resetted it (I hope, since there is actually no instructions for resetting), and paired it again.
It now gets detected correctly with also battery level (battery level previously showed as “unknown”), and the firmware update just started. Also, the button correctly fired events when pressing, so it already works.

Both remotes now seem towork. I will reset & update the on/off switch also, since it seems like it is also only partly working (while the button press works, e.g. battery level is also missing).

Thanks all for the support :slight_smile:

How did you reset it?
I have 3 shortcut buttons that don’t work and two that do.
I also can’t get the 4 button Styrbar working, I have two that don’t do anything

Today I found out that my two shortys start to work after i pressed the pairing button for a long time. Everything was already set up. They were paired and there were test automations. Pressing thepairing button first the button started to light up. After several seconds the button flashed a few times and afterwards it just worked. I didn’t even pair them again. All the automations I set up with the blueprint worked. I needed 6 months for this solution but now I’m really happy it functions now as intended.

1 Like

Now there is another problem. Pressing the button 10 seconds is the pairing procces. Even though there had been enough distance two bulbs are connected to the button. Everytime my automation gets triggered these bulbs turn on. Next task to figure out: How to dissconect.

Edit: Pressig the button for 10 s in a range of 5 cm (IKEA manual) worked for one of the lights (not IKEA → MĂŒller Licht). My IKEA light just don’t want to disconnect this way. Therefore I had to reset the IKEA bulb.

Updating firmware solved the problem!

I am having some trouble updating my Shortcut buttons. They appear with the battery percentage but I cannot get any reading when the button is pressed.

I have tried following the instructions below and get a green checkmark after hitting ‘Issue Zigbee Command’.

manage zigbee device , select OTA cluster (id: 0x0019), click commands , select image_notify (id: 0x0000), and mark payload_type : QueryJitter and move the query_jitter slider so its not being at default zero.
Click Issue Zigbee command

However, in the logs it shows the error:

Error executing service: <ServiceCall zha.issue_zigbee_cluster_command (c:01GRHRVTP9F95G7EBQD2JQA8QC): ieee=2c:11:65:ff:fe:be:c4:08, endpoint_id=1, cluster_id=25, cluster_type=out, command=0, command_type=client, params=payload_type=QueryJitter, query_jitter=173>
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/core.py", line 1805, in catch_exceptions
    await coro_or_task
  File "/usr/src/homeassistant/homeassistant/core.py", line 1824, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 756, in admin_handler
    await result
  File "/usr/src/homeassistant/homeassistant/components/zha/api.py", line 1336, in issue_zigbee_cluster_command
    await zha_device.issue_cluster_command(
  File "/usr/src/homeassistant/homeassistant/components/zha/core/device.py", line 728, in issue_cluster_command
    response = await getattr(cluster, commands[command].name)(
  File "/usr/local/lib/python3.10/site-packages/zigpy/zcl/__init__.py", line 358, in reply
    return await self._endpoint.reply(
  File "/usr/local/lib/python3.10/site-packages/zigpy/endpoint.py", line 256, in reply
    return await self.device.reply(
  File "/usr/local/lib/python3.10/site-packages/zigpy/device.py", line 384, in reply
    return await self.request(
  File "/usr/local/lib/python3.10/site-packages/zigpy/device.py", line 297, in request
    await self._application.request(
  File "/usr/local/lib/python3.10/site-packages/zigpy/application.py", line 690, in request
    await self.send_packet(
  File "/usr/local/lib/python3.10/site-packages/bellows/zigbee/application.py", line 807, in send_packet
    raise zigpy.exceptions.DeliveryError(
zigpy.exceptions.DeliveryError: Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>```

Try to press the shortcut button immediately after sending the Zigbee command. This is needed to wake the button so that it can process the command.

If this still doesn’t work, check if you get any events if you listen on the zha_event event in the dev tools. You should see events when you press the button. If this doesn’t work, I would completely remove and re-pair the button.

Thanks for the tip, that helped me get it to work.

Took a few times deleting and re-pairing it but it finally started to update. At around 70% complete, the button disconnected so after deleting and restarting the update, I clicked the button every 15 minutes or so to make sure it stayed connected.