IKEA Somrig remote E2213 ZHA

Hi Lorenzo, thank you for making this blueprint!

Would it be possible to add the functionality to have long press actions repeated with a certain delay? This would be great to use them for brightness and volume control.

you can use an automation for this (as I do), it is not complicated. like in this tutorial

1 Like

Ciao @cecche

Thanks for sharing this blueprint, it works very well

Do you know a way to rotate colors, eventually also a list of colors, pressing a button?

Thanks again

I have opened the box of a somrig (no firmware upgrade) but it doesnt show up in the blueprints device dropdown. I use zha. Where am i going wrong?


Thanks in advance,

Could you send me more info about your device? it seems like it does not match with the selector:

selector:
  device:
    integration: zha
    manufacturer: IKEA of Sweden
    model: SOMRIG shortcut button
    multiple: false

Have you tried simply rebooting your home assistant instance?

PS. I have the same firmware too

Sorry if I haven’t answered you yet, but I’m in the middle of a university exam session.
I started editing the blueprint the day you wrote it, but it still doesn’t work perfectly.
As soon as I take this next exam on February 12th I’ll get back to it, I promise! :sweat_smile:

By the way, I’m doing it with a solution very similar to the video posted by @kszaboa

Yes
If you wish to have a list of colours, you should make a “selector” helper with each hex color code you wish to rotate through. Next you have to make an automation (or script) to go to the next value input_select.select_next service of the selector and then use a template to adapt the current value of the dropdown to fit in the color input of your light.

Unfortunately I still have no RGB lights in my home at the moment, so i never faced the problem of changing colour “continuously”.

1 Like

hello,

thanks for sharing.

I created an automation (activate a scene on single dot press) based on your blueprint, unfortunately the action is never triggered. Do you have an idea what could be the reason?

I know the scene is working as I have the same automation with a Ikea STYRBAR which works perfectly fine.

Hi,

Well … what can I say? Lorenzo, Olaf and kszaboa you are stars!!
You have saved me sooooo much time.
Thank you very much.

I’ve only been using HA for a month or so. I’ve been moving all my ‘Hive’ devices to HA under ZHA with reasonable success.

During a recent visit to IKEA store I got carried away and bought too many devices. When I got home I got one or two working then started to worry!!!

This is my first Blueprint and along with Ed’s Youtube video I have finally got there. The Somrig controller is working prefectly with a HIve bulb.

Ed’s Youtube video is great but I guess it must be quite old. For anyone else trying to get it working you need to apply all the principles but the menus look quite different now (I guess) so you may need to search for key controls (especially ‘Restart’)

All good. Thank you again guys - especially Lorenzo.

Cheers, George

1 Like

@cecche - Many thanks indeed for putting this blueprint together, it saved me a tonne of time & was super helpful considering this is my 1st venture into Zigbee devices.

Everything works really well, albeit maybe too well :face_with_raised_eyebrow:

I’m noticing a tonne of these events in the automation log, which as you can see are happening once every hour or so:

Screenshot 2024-02-26 at 19.49.12

Which are at the same time as these Checkin events from the Somrig remote log:

I understand the Checkin events are necessary & that interval attribute is from the Zigbee controller (which in my case is a SkyConnect dongle), & while I can change it to an awfully long interval, I’d really like to understand why the blueprint/automation is being fired on these types of events?

Fyi, my automation is currently setup to fire on Single dot (Single press)

Any help would be greatly appreciated :crossed_fingers:

<<<<< UPDATE >>>>>

Tracing the different trigger steps some more, I noticed a different command value between an actual push of the button, & a checkin event:

ACTUAL

this:
entity_id: automation.shower_single_press
state: ‘on’
attributes:
id: ‘1708101752073’
last_triggered: ‘2024-02-26T20:43:14.557337+00:00’
mode: single
current: 0
friendly_name: Shower Traffic Light Timer
last_changed: ‘2024-02-26T07:31:33.465045+00:00’
last_updated: ‘2024-02-26T20:43:14.568842+00:00’
context:
id: 01HQKJGK7W0CPAT66MREPABFPP
parent_id: 01HQKJGK7TW8QWH9MGJWGKPFZ7
user_id: null
trigger:
id: ‘0’
idx: ‘0’
alias: null
platform: event
event:
event_type: zha_event
data:
device_ieee: 28:76:81:ff:fe:3d:24:f8
unique_id: 28:76:81:ff:fe:3d:24:f8:1:0xfc80
device_id: 427f0a936aeadf67ee700769fbab7911
endpoint_id: 1
cluster_id: 64640
command: initial_press
args:
- 0
params:
new_position: 0
origin: LOCAL
time_fired: ‘2024-02-26T21:18:13.752503+00:00’
context:
id: 01HQKMGN7RVQ2520A53NNP9SE7
parent_id: null
user_id: null
description: event ‘zha_event’

CHECKIN

this:
entity_id: automation.shower_single_press
state: ‘on’
attributes:
id: ‘1708101752073’
last_triggered: ‘2024-02-26T19:48:22.089180+00:00’
mode: single
current: 0
friendly_name: Shower Traffic Light Timer
last_changed: ‘2024-02-26T07:31:33.465045+00:00’
last_updated: ‘2024-02-26T19:48:22.103323+00:00’
context:
id: 01HQKFC3Y8Z4G9PT6E46001XH5
parent_id: 01HQKFC3Y6ZV9Q4J5J5V2MY9A2
user_id: null
trigger:
id: ‘0’
idx: ‘0’
alias: null
platform: event
event:
event_type: zha_event
data:
device_ieee: 28:76:81:ff:fe:3d:24:f8
unique_id: 28:76:81:ff:fe:3d:24:f8:1:0x0020
device_id: 427f0a936aeadf67ee700769fbab7911
endpoint_id: 1
cluster_id: 32
command: checkin
args:
params: {}
origin: LOCAL
time_fired: ‘2024-02-26T20:43:14.554870+00:00’
context:
id: 01HQKJGK7TW8QWH9MGJWGKPFZ7
parent_id: null
user_id: null
description: event ‘zha_event’

cluster_id is also different. Adding either cluster_id: 32 or command: checkin as a NOT condition in the main blueprint should supress the triggering of this automation

@cecche - Is there any chance you could please take a look at the above change, as I wouldn’t know where to start :disappointed: Thank you!

Hello

I would like to use your blueprint. I have a IKEA Somrig E2213 ZHA. I connected it to my HA successfully but after pressing the button nothing happens. I get the error message Error: UndefinedError: ‘dict object’ has no attribute 'event. Cab someone help me please?

Just got hold of a couple of these devices and am having issues getting them into HA. I’ve managed to get one to pair but get nothing more than the battery and one other entity.

I’d like to use this blueprint but I’ve not had to do this before and I’m not sure quite how to do it. I’d like to get these working but if I can’t they’ll have to go back to Ikea for a refund.

Thanks so much for this Blueprint - it’s really helpful. I’ve finally gotten a Somrig remote and have set this up. Is it possible to add looping events for holding down the buttons?

I am only able to use the single dot. Two dots does nothing. I have the SLZB-06 zigbee dongle connected to my HA. I’ve tried reconfiguring, but to no avail. Any ideas?

I have the same issue unfortunately:


What kind of information do you need specifically?

Thanks for your help!

Hi, I had the same issue with my somrig remote. What worked for me in the end was:

  • I had to first start the search for new Zigbee devices in Home Assistant.
  • Than I pushed the pairing button on the somrig remote 4 times, so that it starts flashing red.
  • When HA finds the device, I waited till the interview was complete and HA starts the configuration.
  • Lastly I pushed and held the pairing button on the somrig remote for 10 seconds. HA than finished the configuration (the window turned green) and finally both buttons worked.

I aslo held the somrig remote really close to the Zigbee gateway during the process.

It could be possible that the procedure did nothing and it just started work somehow, but I have tried for some time and after I did the above it worked :slight_smile:

@cecche thank you for creating this Blueprint :slight_smile:
I added some things I find usefull. If you find them usefull too, you can update your blueprint with it.

Because the single_press event has a native delay, I added the initial_press event as an alternative since it is send by the remote first without delay on any type of press. This also means if an action is provided for initial_press and single_press/long_press/long_release/double_press, both are going to be executed. For that I added an option, which lets you choose wether or not you want to execude the initial_press action only, without having to remove your already defined actions for the other events, if you change your mind later.

I also added cluster_id: 64640 so that the automation only triggers for button presses and not the checkin events.

blueprint:
  name: ZHA - IKEA Somrig remote dot-buttons control
  description: Fully customisable dot-buttons, with options for single, double and
    long press for each one.
  domain: automation
  input:
    remote:
      name: Remote
      description: IKEA Somrig remote to use
      selector:
        device:
          integration: zha
          manufacturer: IKEA of Sweden
          model: SOMRIG shortcut button
          multiple: false
    single_dot_initial_press:
      name: Single dot (Initial press)
      description: Action to run on any single dot press. 
        Runs first on any type of press. 
        Does not have the delay of a single press.
      default: []
      selector:
        action: {}
    single_dot_initial_only:
      name: Single dot (Initial press only mode)
      description: Choose whether or not to only execute the provided fast initial press actions 
        and not the single, double, long and long release. 
        Limits the single dot button, to one type of press.
      default: false
      selector:
        boolean: {}
    single_dot_single_press:
      name: Single dot (Single press)
      description: Action to run on single dot press
      default: []
      selector:
        action: {}
    single_dot_double_press:
      name: Single dot (Double press)
      description: Action to run on single dot double press
      default: []
      selector:
        action: {}
    single_dot_long_press:
      name: Single dot (Long press)
      description: Action to run on single dot long press
      default: []
      selector:
        action: {}
    single_dot_long_release:
      name: Single dot (Release after long press)
      description: Action to run on releasing after a long press on the single dot
      default: []
      selector:
        action: {}
    double_dot_initial_press:
      name: Double dot (Initial press)
      description: Action to run on any double dot press. 
        Runs first on any type of press. 
        Does not have the delay of a single press.
      default: []
      selector:
        action: {}
    double_dot_initial_only:
      name: Double dot (Initial press only mode)
      description: Choose whether or not to only execute the provided fast initial press actions 
        and not the single, double, long and long release. 
        Limits the double dot button, to one type of press.
      default: false
      selector:
        boolean: {}
    double_dot_single_press:
      name: Double dot (Single press)
      description: Action to run on double dot press
      default: []
      selector:
        action: {}
    double_dot_double_press:
      name: Double dot (Double press)
      description: Action to run on double dot double press
      default: []
      selector:
        action: {}
    double_dot_long_press:
      name: Double dot (Long press)
      description: Action to run on double dot long press
      default: []
      selector:
        action: {}
    double_dot_long_release:
      name: Double dot (Release after long press)
      description: Action to run on releasing after a long press on the double dot
      default: []
      selector:
        action: {}
  source_url: https://community.home-assistant.io/t/ikea-somrig-remote-e2213-zha/668671
mode: parallel
max_exceeded: silent
trigger:
- platform: event
  event_type: zha_event
  event_data:
    device_id: !input remote
    cluster_id: 64640
action:
- variables:
    single_dot_initial_only: !input single_dot_initial_only
    double_dot_initial_only: !input double_dot_initial_only
    command: '{{ trigger.event.data.command }}'
    cluster_id: '{{ trigger.event.data.cluster_id }}'
    endpoint_id: '{{ trigger.event.data.endpoint_id }}'
    args: '{{ trigger.event.data.args }}'
- choose:
  - conditions:
    - '{{ command == ''initial_press'' }}'
    - '{{ endpoint_id == 1 }}'
    sequence: !input single_dot_initial_press
  - conditions:
    - '{{ not single_dot_initial_only }}'
    - '{{ command == ''short_release'' }}'
    - '{{ endpoint_id == 1 }}'
    sequence: !input single_dot_single_press
  - conditions:
    - '{{  not single_dot_initial_only }}'
    - '{{ command == ''multi_press_complete'' }}'
    - '{{ endpoint_id == 1 }}'
    sequence: !input single_dot_double_press
  - conditions:
    - '{{  not single_dot_initial_only }}'
    - '{{ command == ''long_press'' }}'
    - '{{ endpoint_id == 1 }}'
    sequence: !input single_dot_long_press
  - conditions:
    - '{{  not single_dot_initial_only }}'
    - '{{ command == ''long_release'' }}'
    - '{{ endpoint_id == 1 }}'
    sequence: !input single_dot_long_release
  - conditions:
    - '{{ command == ''initial_press'' }}'
    - '{{ endpoint_id == 2 }}'
    sequence: !input double_dot_initial_press
  - conditions:
    - '{{ not double_dot_initial_only }}'
    - '{{ command == ''short_release'' }}'
    - '{{ endpoint_id == 2 }}'
    sequence: !input double_dot_single_press
  - conditions:
    - '{{ not double_dot_initial_only }}'
    - '{{ command == ''multi_press_complete'' }}'
    - '{{ endpoint_id == 2 }}'
    sequence: !input double_dot_double_press
  - conditions:
    - '{{ not double_dot_initial_only }}'
    - '{{ command == ''long_press'' }}'
    - '{{ endpoint_id == 2 }}'
    sequence: !input double_dot_long_press
  - conditions:
    - '{{ not double_dot_initial_only }}'
    - '{{ command == ''long_release'' }}'
    - '{{ endpoint_id == 2 }}'
    sequence: !input double_dot_long_release

This effectively reduces the number of button press types to one per button in exchange for a fast single press (initial_press). Since you can set this seperatly for the single and double dot buttons of the remote, it is possible to combine both.
E.g. the single dot button as a fast light switch and the double dot button for other actions that aren’t that time sensitive.

Do you use ZHA or Z2M?