IKEA somrig shortcut (IKEA E2213) Z2M

Thanks @amorfinv !

Just 1 question - why asking for the name of the device instead of its id or the entity id? The name is very likely to change, which would break the automation.

Thanks anyway, it works!
For people stumbling on this: at the time of writing (jan 2024), the SOMRIG remote is only recognized in Z2M, not in ZHA (yet).

Hi @h0rnsUp,

Thanks for trying it out. My initial goal was to use a blueprint selector for the device. However that returns the device id and not the name. If I understand correctly, Zigbee2MQTT is using the device name for the MQTT topic. I tried to use some templating to get the device name from the id. But I could not figure it out because of a “limited template” when declaring variables in the blueprint.

I saw some other blueprints using the entity instead of the device but I found that a bit clunkier.

If you figure that out, I am happy to update the blueprint.

-Andres

This works for me, but the short presses take about 2-3 seconds to register. This is much longer compared to the TRADFRI remote, but if this can’t be fixed then that’s okay

Hello @IceBotYT . I am unsure why that happens to you. Mine are registering pretty much instantaneously in Z2M. Could it be something with your ZigBee network?

I don’t know… What should I be looking for? I changed my hue ZigBee channel so it’s off of that… what else do I do?

Not sure. I would first check the Zigbee2Mqtt logs to see if it’s a ZigBee issue or a home assistant issue.

If the presses are slow in the Z2M logs then I would troubleshoot it as is stated in docs :

If only this device has issues in your network then perhaps something is up with the device.

I am also experiencing much longer response times then my other Ikea remotes. Have not been able to find a cause as of yet.

Interesting. Have you checked the Z2M logs?

I don’t have them yet, but I think the longer response is due to double press. Other Ikea buttons have only long presses or single presses. The device is waiting for the second press, thus the delay.

That does make sense, but it would be nice if we could configure that delay

I cannot confirm if this is delay is actually the problem. My somrig device registers the double click without any noticable delay. Can you share the logs from z2m when performing a single click and a double click?

Here is how my z2m logs looks for a single press:

Info 2024-02-19 12:37:16MQTT publish: topic 'zigbee2mqtt/bathroom_fanremote', payload '{"action":"1_initial_press","battery":88,"linkquality":104,"update":{"installed_version":16777248,"latest_version":16777248,"state":"idle"},"update_available":null,"voltage":1300}'
Info 2024-02-19 12:37:16MQTT publish: topic 'zigbee2mqtt/bathroom_fanremote', payload '{"action":"","battery":88,"linkquality":104,"update":{"installed_version":16777248,"latest_version":16777248,"state":"idle"},"update_available":null,"voltage":1300}'
Info 2024-02-19 12:37:16MQTT publish: topic 'zigbee2mqtt/bathroom_fanremote/action', payload '1_initial_press'
Info 2024-02-19 12:37:16MQTT publish: topic 'zigbee2mqtt/bathroom_fanremote', payload '{"action":"1_short_release","battery":88,"linkquality":108,"update":{"installed_version":16777248,"latest_version":16777248,"state":"idle"},"update_available":null,"voltage":1300}'
Info 2024-02-19 12:37:16MQTT publish: topic 'zigbee2mqtt/bathroom_fanremote', payload '{"action":"","battery":88,"linkquality":108,"update":{"installed_version":16777248,"latest_version":16777248,"state":"idle"},"update_available":null,"voltage":1300}'
Info 2024-02-19 12:37:16MQTT publish: topic 'zigbee2mqtt/bathroom_fanremote/action', payload '1_short_release'

And this is for a double press:

Info 2024-02-19 12:38:54MQTT publish: topic 'zigbee2mqtt/bathroom_fanremote', payload '{"action":"1_initial_press","battery":88,"linkquality":248,"update":{"installed_version":16777248,"latest_version":16777248,"state":"idle"},"update_available":null,"voltage":1300}'
Info 2024-02-19 12:38:54MQTT publish: topic 'zigbee2mqtt/bathroom_fanremote', payload '{"action":"","battery":88,"linkquality":248,"update":{"installed_version":16777248,"latest_version":16777248,"state":"idle"},"update_available":null,"voltage":1300}'
Info 2024-02-19 12:38:54MQTT publish: topic 'zigbee2mqtt/bathroom_fanremote/action', payload '1_initial_press'
Info 2024-02-19 12:38:54MQTT publish: topic 'zigbee2mqtt/bathroom_fanremote', payload '{"action":"1_double_press","battery":88,"linkquality":248,"update":{"installed_version":16777248,"latest_version":16777248,"state":"idle"},"update_available":null,"voltage":1300}'
Info 2024-02-19 12:38:54MQTT publish: topic 'zigbee2mqtt/bathroom_fanremote', payload '{"action":"","battery":88,"linkquality":248,"update":{"installed_version":16777248,"latest_version":16777248,"state":"idle"},"update_available":null,"voltage":1300}'
Info 2024-02-19 12:38:54MQTT publish: topic 'zigbee2mqtt/bathroom_fanremote/action', payload '1_double_press'

You can see that in both cases the message is received in the same second of the initial press.

However, this is very dependent on your zigbee network.

Sure, here’s a revised version with improved grammar:

Hey, I just installed this blueprint but noticed that after mapping a button to a light and leaving it on toggle, the light turns on. Then, after about 5 seconds, it turns off again, and then after another 5 seconds, it turns back on and stays on.

Has anyone else experienced this issue?

Log below:

Info 2024-04-26 19:18:37MQTT publish: topic 'zigbee2mqtt/Kitchen Button', payload '{"action":"1_initial_press","battery":100,"linkquality":255,"update":{"installed_version":-1,"latest_version":-1,"state":null},"update_available":null}'
Info 2024-04-26 19:18:37MQTT publish: topic 'zigbee2mqtt/Kitchen Button', payload '{"action":"","battery":100,"linkquality":255,"update":{"installed_version":-1,"latest_version":-1,"state":null},"update_available":null}'
Info 2024-04-26 19:18:37MQTT publish: topic 'zigbee2mqtt/Kitchen Button/action', payload '1_initial_press'
Info 2024-04-26 19:18:38MQTT publish: topic 'zigbee2mqtt/Kitchen Button', payload '{"action":"1_short_release","battery":100,"linkquality":255,"update":{"installed_version":-1,"latest_version":-1,"state":null},"update_available":null}'
Info 2024-04-26 19:18:38MQTT publish: topic 'zigbee2mqtt/Kitchen Button', payload '{"action":"","battery":100,"linkquality":255,"update":{"installed_version":-1,"latest_version":-1,"state":null},"update_available":null}'
Info 2024-04-26 19:18:38MQTT publish: topic 'zigbee2mqtt/Kitchen Button/action', payload '1_short_release'
Info 2024-04-26 19:18:38MQTT publish: topic 'zigbee2mqtt/Office Light', payload '{"brightness":254,"color_mode":"color_temp","color_options":{"execute_if_off":false},"color_temp":250,"color_temp_startup":250,"linkquality":255,"power_on_behavior":"previous","state":"OFF","update":{"installed_version":69635,"latest_version":69635,"state":"idle"},"update_available":null}'
Info 2024-04-26 19:18:44MQTT publish: topic 'zigbee2mqtt/Kitchen Button', payload '{"action":"1_initial_press","battery":100,"linkquality":255,"update":{"installed_version":-1,"latest_version":-1,"state":null},"update_available":null}'
Info 2024-04-26 19:18:44MQTT publish: topic 'zigbee2mqtt/Kitchen Button', payload '{"action":"","battery":100,"linkquality":255,"update":{"installed_version":-1,"latest_version":-1,"state":null},"update_available":null}'
Info 2024-04-26 19:18:44MQTT publish: topic 'zigbee2mqtt/Kitchen Button/action', payload '1_initial_press'
Info 2024-04-26 19:18:47MQTT publish: topic 'zigbee2mqtt/Bedroom Sensor', payload '{"battery":100,"identify":null,"illuminance":15314,"illuminance_lux":34,"linkquality":255,"occupancy":false,"update":{"installed_version":16777303,"latest_version":16777303,"state":"idle"},"update_available":null}'
Info 2024-04-26 19:18:47MQTT publish: topic 'zigbee2mqtt/Kitchen Button', payload '{"action":"1_initial_press","battery":100,"linkquality":253,"update":{"installed_version":-1,"latest_version":-1,"state":null},"update_available":null}'
Info 2024-04-26 19:18:47MQTT publish: topic 'zigbee2mqtt/Kitchen Button', payload '{"action":"","battery":100,"linkquality":253,"update":{"installed_version":-1,"latest_version":-1,"state":null},"update_available":null}'
Info 2024-04-26 19:18:47MQTT publish: topic 'zigbee2mqtt/Kitchen Button/action', payload '1_initial_press'
Info 2024-04-26 19:18:47MQTT publish: topic 'zigbee2mqtt/Kitchen Button', payload '{"action":"1_short_release","battery":100,"linkquality":229,"update":{"installed_version":-1,"latest_version":-1,"state":null},"update_available":null}'
Info 2024-04-26 19:18:47MQTT publish: topic 'zigbee2mqtt/Kitchen Button', payload '{"action":"","battery":100,"linkquality":229,"update":{"installed_version":-1,"latest_version":-1,"state":null},"update_available":null}'
Info 2024-04-26 19:18:47MQTT publish: topic 'zigbee2mqtt/Kitchen Button/action', payload '1_short_release'
Info 2024-04-26 19:18:47MQTT publish: topic 'zigbee2mqtt/Office Light', payload '{"brightness":254,"color_mode":"color_temp","color_options":{"execute_if_off":false},"color_temp":250,"color_temp_startup":250,"linkquality":255,"power_on_behavior":"previous","state":"ON","update":{"installed_version":69635,"latest_version":69635,"state":"idle"},"update_available":null}'
Info 2024-04-26 19:18:51MQTT publish: topic 'zigbee2mqtt/Kitchen Button', payload '{"action":"1_short_release","battery":100,"linkquality":255,"update":{"installed_version":-1,"latest_version":-1,"state":null},"update_available":null}'
Info 2024-04-26 19:18:51MQTT publish: topic 'zigbee2mqtt/Kitchen Button', payload '{"action":"","battery":100,"linkquality":255,"update":{"installed_version":-1,"latest_version":-1,"state":null},"update_available":null}'
Info 2024-04-26 19:18:51MQTT publish: topic 'zigbee2mqtt/Kitchen Button/action', payload '1_short_release'
Info 2024-04-26 19:18:51MQTT publish: topic 'zigbee2mqtt/Office Light', payload '{"brightness":254,"color_mode":"color_temp","color_options":{"execute_if_off":false},"color_temp":250,"color_temp_startup":250,"linkquality":255,"power_on_behavior":"previous","state":"OFF","update":{"installed_version":69635,"latest_version":69635,"state":"idle"},"update_available":null}'

Hey @CurtisB123 . The issue doesn’t seem related to Home Assistant. This appears more like an issue with the device or Z2M, due to sending duplicate messages. if you delete the device from home assistant is it still sending many commands after clicking it just once? Might want to try repairing it.

Hey, I’m new to setting up a smart home/ home assistant.

Would the Home Assistant SkyConnect dongle work for setting this up?

Thanks :slight_smile:

Hello, I personally have not tried it with that dongle, but I guess it should work.

I am not sure if you are asking in the right place. I assume you are using ZHA. If yes, then you might want to look at this other blueprint.

Thanks, I hadnt set up with ZHA yet, but with that blueprint I did, appreciate your help.

One issue could be that the x_short_release needs a bit (around a second) as it has to wait if the button isn’t pressed twice ( to register a x_double_press ) .
This can’t be fixed, it’s a delay introduced by the internals of the E2213.
The x_initial_press and the x_double_press reacts instantly here. (z2m, running over several gateways to the concentrator).

1 Like

Could this be fixed for the new Zigbee2MQTT update that doesn’t use actions any more?

Hi @ThaDuhFeez. I am planning to fix this eventually for the new Z2M update. However, I won’t have time until next week. I suggest you enable the actions and I will send an update when it is ready.

Hello, I have just updated the blueprint. It should now work with Zigbee2MQTT v2.0 since it uses mqtt device triggers. I noticed that it was slightly faster.

I am not sure if updating directly from home assistant will work. Therefore, you may have to delete and add the blueprint.

Also, I have not personally migrated to Zigbee2MQTT v2.0 so please report if it actually works.