[Edge] IKEA STYRBAR Button Edge Driver (FW 2.4.5 compatible, full arrow support)

New STYRBAR buttons found at stores are not compatible with existing drivers due to breaking changes in the included firmware 2.4.5. I’ve made a driver that you can find below.

A bit of history first, I’ve purchased the button in the picture just for fun after reading these comments. Got a 2339 revision and indeed comes with 2.4.5. 23 is the year, it’s standard IKEA codes for manufacturing date. 21xx are old models. For old models there are at least two other drivers here and here but they’re no longer supported.

How to install

Driver channel (mocelet-shared): https://bestow-regional.api.smartthings.com/invite/Kr2zNDg0Wr2A

Install the Styrbar Button Tweaks driver from the channel above. There’s also another driver for the more recent RODRET, SOMRIG and SYMFONISK Gen 2 buttons (post here) so the full line of new IKEA buttons with rechargeable batteries is covered.

Pairing instructions

Install the driver, press the pairing button at the back four times so it starts blinking red, place it near the hub, wait four or five seconds and scan devices. Always has paired at first try.

It should be recognized as “STYRBAR Button”, otherwise it is not loading this driver. Uninstall non-working drivers first in that case.

Unique features

  • Works with modern versions (2.4.5 firmware). May or may not work in old ones.

  • Emulates double-tap up to 6x multi-tap, exposes Toggled Up on release and can auto-repeat the Held event to use as dimmer or volume control.

  • All buttons properly support pushed/held events, even arrows! Note they need really loong presses. Fixes the weird sequence of events generated when holding arrows, like ghost ON events.

  • Added “Any Arrow” component to eliminate the 2-second “held” needed for the individual arrows. That one will trigger much earlier so, if you don’t mind which arrow was long-pressed, at least you have an extra “held” action that is useful.

Hope you enjoy it!

If you’re already using another driver for the old version, you can just change the controller without having to re-add the device to see if you prefer the new key handling and extra available actions.

Credits and implementation details (the weird stuff)

The keys to support 2.4.5 firmware are explicit bindings in doConfigure to Level, OnOff and Scenes clusters (that’s why non-updated drivers won’t register presses). Groups are no longer supported (that’s why others won’t work either). Also, battery level is reported the standard way (value of 200 is full battery, in the old version it was 100).

Holding arrows is a messaging feast, or a nightmare, depends on who you ask. It’s been discussed in comments of existing drivers and looks like the sequence in 2.4.5 is slightly different. One long-press of an arrow generates five messages:

  1. It first sends a Scenes 0x09 command to notify a “held” but it won’t tell which arrow (why?!). This is where my Any Arrow component fires the event so you can run an action as soon as possible.

  2. 500 ms later it sends an ON command, the exact same one sent by the actual ON button, you can see the problem here :sweat_smile:. Still we don’t know which arrow was.

  3. Another 500 ms later, it sends a 0x05 command that you can safely ignore. Again, no clue about which arrow generated the event.

  4. One second later (that’s two seconds since the start :scream:), as long as you keep holding the arrow, a 0x08 command, this time with payload to know which arrow was held (first byte is 0x00 or 0x01). Still there? Here the individual component of each arrow will fire the held event.

  5. That’s not all! Not happy with that, it will send a final 0x09 command on release, like the one at the start but seems to always have a non-zero payload whereas the starting one is all zeros.

To fix the main issue (the ON ghost), this driver follows the strategy of the Herdsman converter. It saves the timestamp of the first “held” event (Scenes command 0x09 with payload 00 00) in a transient device field (using socket.gettime()) and, when the ON command is received, measures the elapsed time. If it’s less than 700ms it’s probably the auto-generated ON and will be suppressed.

Edit: Added more detail to the arrow hold sequence. I believe it’s slightly different to the one in the old models.
Edit 2: Minor editing to update features that were added later.

10 Likes

Very nice work! :sunglasses:

Tagging @posborne just because he’s always interested in solutions like this.

2 Likes

Great work @mocelet

Regarding your comment about groups not working, I had seen on some of the newer firmwares that group wasn’t working. However direct binding did work.

Do you know if direct binding would work with the newer devices/firmware (Binding the remote directly to a bulbs network id). The main reason I added group and direct binding is I really like silky smooth IKEA intended behaviour ( i.e no popcorn affect, and smooth group dimming)

2 Likes

Thanks! Honestly I have no idea because all my lights are Matter over WiFi and only use zigbee for the IKEA buttons.

By the way, I rarely experience popcorn effect with Matter, SmartThings did a great job there, but every now and then there’s a stray bulb that will take a bit more time (I believe that’s on WiZ firmware though).

1 Like

You probably saw this coming :sweat_smile: Now you can trigger 28 different actions in STYRBAR! (30 actually counting Toggled-Up and the Any-Arrow short held). The more the merrier!

The update is already live, will take few hours to auto-update.

Like I did for the RODRET, it’s a fully configurable 6X multi-tap emulation for double-tap, triple-tap, etc. with custom waiting window too.

I was afraid of missing taps or timers being delayed or even the weird arrows messaging-feast handling getting in the way (well, of course it did, each IKEA button has its subtleties). Has been working great so far.

Hope it’s useful for you!

Have to admit I’m only using four actions, most of the time I don’t even remember the actions of each button :rofl:.

A double-tap always comes in handy, I would use multi-tap for related things, like switching multiple scenes or setting multiple brightness or colors, that way you don’t need to remember 6 actions, just that more taps means more something be it brightness, color temperature or whatnot.

1 Like

I have Inovelli and Zooz Dimmers and Switches that have multi-tap 6x-9x functionality but never used more than double tap. It is hard to remember, besides most important factor “wife” who wants only simple functions: press, held and double tap. Everything else is overkill.

3 Likes

Agree, double-tap is useful, maybe even triple-tap for rare actions. More is even a hassle to perform the taps.

The algorithm is the same for 3 taps or 300 so I just went for the full customization, SmartThings limit is 6X. It updates the tap count every time it receives a tap and resets a timer that waits for the next. When the timer is over it notifies the amount to SmartThings.

By the way, I’ve noticed my STYRBAR doesn’t handle fast taps very well (the RODRET is sooo good at this), if you’re too fast with the double-tap it will recognize just one single-tap. Talk about debouncing!

1 Like

BTW you mentioned that we could use some of these functionality for dimming. My current work around is ”held" O/I or ./: with @Mariano_Colmenarejo MC zigbe light drivers. His driver let you set increase/decrease light level or White Temperature for setting specified value. It does require to "hold” button for each increase/decrease.
That is what I use on Zooz Zen32 controler, and now on these new Ikea remotes.

1 Like

My example was using multi-tap so, depending on the number of taps, you would assign certain brightness (like in the screenshot).

With the hold and Toggle-Up on release maybe there’s a virtual driver that can generate more events. I know there are virtual timers, maybe you can start them on hold and stop them on release and let them generate the intermediate actions every second for instance (I don’t really know if they’re able to do that).

Edit: Looks like you can’t use what I was thinking of, which is counter_utility/README.md at main · toddaustin07/counter_utility · GitHub , the minimum time to update for automations is 10 seconds.

Maybe there’s a virtual dimmer switch that can be started and stopped? Probably not, that would be useful too for most buttons that don’t send periodic presses while held.

This is not function of the switch or remote. This functionality of Mariano’s Zigbee Light driver. He added increase/decrease capabilities for Light level and White Temperature.
Only thing that I do is set up actions for buttons like shown below. Each push of the button increases/decreases light level by 10% or changes White Temperature by 100K.
Zooz controller:

Button actions:




I am now doing same with Ikea buttons for different lights.

3 Likes

This is for example your Ikea button assigned to action


And these are all available actions

1 Like

New update just published:

  • The driver checks the firmware version to detect if it’s the old one or the new one and apply the correct battery level calculation (new ones send 200 for full battery, old ones 100). There is still a setting to force the fix if it’s not detecting an old model correctly, after all I don’t have the old model to test it.
  • Added features from the rodret driver, like enhanced Toggled-up tweak so the release action can be triggered for individual buttons and not just Main.

In a previous update I added auto-fire too, so the button automatically repeats the Held event to use as a dimmer as long as the light driver supports increasing brightness by steps like in the examples in posts above.

It will auto-update in few hours. I guess people with older versions of STYRBAR are already using other drivers but, out of curiosity, has anyone used this driver in old versions? Does it pair correctly? Buttons work as expected like long-pressing arrows? (the events are different in old and new versions too!)

I’ve updated the driver with some fixes regarding arrows.

The AnyArrow component will only show Held action to avoid confusion. Its purpose is exposing the held of any arrow so you can run an action quickly before waiting the required 2 seconds for the individual arrows to trigger. The Pushed action would clutter the history and also was not compatible with multi-tap, which frankly is more useful in arrows than long-pressing them given how they work.

Also, looking at the history, I realized the Main component was triggering twice when holding an arrow or pushing it. Small issue I guess, but now it only triggers once as it is supposed to do.

1 Like

New Smartthings user here, Thanks for making the driver!
How do I set holding the button to dim the light? Don’t see an option for it

Got 3 IKEA tradfri bulbs if it matters (1055 lumens, dimmable and 3 temp levels).

Unfortunately, SmartThings does not support that with these kind of buttons. But! Since you have IKEA bulbs you may be able to use this driver for lights and set an automation so with hold it starts changing the brightness and on release (you can enable the Toggle-Up on settings) it pauses.

1 Like

New update, will take few hours to auto-update:

  • Removed the manual setting to fix the battery level in old versions where the reported value does not follow the standard. The driver should detect the version correctly and I’m quite confident everything lower than version 02xxxxxx is old, in fact I believe there are only two versions for this button right now, 00010024 and 02040005.

I’d like to stop publishing the styrbar driver as standalone, but first I need total confirmation that it works with old models too, including the binding. Don’t want the driver to mess with people using other drivers for the old versions.

2 Likes

Great work! Now I can finally replace all of my Tapo S200!

One minor inconvenience: when I try to configure a button, it wants me to select all devices in “devices to use”. Is there a way to evade that?

ezgif-6-b9a159f548

1 Like

That’s a SmartThings thing that never understood. It won’t let you set button actions if there are hidden devices. Makes no sense.

Creating explicit routines from the routines section has an advantage though. Say you remove a device because it’s broken or want to replace it. In a normal routine it will warn you with a red exclamation and offer to pick another device for the routine. If you create it directly as a button action it will just disappear.

3 Likes

I ran into the hidden devices problem today. I agree, it makes no sense.

1 Like

Hi,

Firstly thanks for the help in developing these drivers. I bought the STYRBAR Button recently without researching much and the hopes I would find customer drivers like this so great that it’s been done.
I have FW 2.4.5 so I’ve used the mocelet-shared to make it work, now I’m not sure this comes from the button driver or not so will post the question/concern here

I’m using the button to manage a yeelight lightbulb that can change colors and dim the light.
For dimming I could just not undertanding the setting to dim + fading period, and I’ve tried using it without really seeing any dimming happening so ended up creating routines that if the brightness is within a certain range, then move to the next % and so on…
I was initially using the Up/Down Held options for this, but it does really take forever so I changed to just the press function instead. All good here

Now I wanted to use the left/right <> buttons to change colors, and I was going to create similar routines. Something like if pressed and it was red, then change to purple. If it was purple, change to blue and so on…
Unfortunately when I go to create the routines, as a pre-condition it only allows me to use the Color Temperature and not the Saturation+Hue setting. I tried finding some sort of translation from RGB to color temp, but there isn’t really anything as such. The temperature just refers to the tone of the light, and not the color.
So I’m stuck at the moment and hoping that this is a driver setting that can be updated/fixed?

At the moment I had to just manually program the Press and Held to a specific color for each direction, so I’m sort of making it work but not really how I intended it to work.

Thanks
Juan

1 Like