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:
-
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.
-
500 ms later it sends an ON command, the exact same one sent by the actual ON button, you can see the problem here . Still we don’t know which arrow was.
-
Another 500 ms later, it sends a 0x05 command that you can safely ignore. Again, no clue about which arrow generated the event.
-
One second later (that’s two seconds since the start ), 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.
-
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.