[OBSOLETE] IKEA Styrbar 4 button remote

Hello.
So got the IKEA Styrbar 4 button dimmer. Decided to take a bite and create a device handler, first one so please be gentle…

Features:
-the four buttons are functionnal
-up/down buttons support press and hold
-left/right (color change) support press only

Future project
Modify a smart app to allow the same functionnality the remote has when paired with bulbs which can’t be replicated in the base Smarthings app., namely cycling the colours with the left/right buttons

2 Likes

https://github.com/scubaandre/SmartThings-Styrbar/blob/main/styrbarDTH.groovy

2 Likes

Why not make it using the new edge drivers?

Sure. Point me in the right direction

1 Like

So long story short. Groovy is going away and edge drivers are the replacement. They use lua and run locally on smartthings hub.

Here are some links.

Fully aware, but there’s a learning curve. I did the heavy lifting with the non standard codes. Well see on the future

Thanks for this, I installed and paired the remote, however I am only getting the battery reporting, no buttons. The IDE also only shows the battery as a state. Have you seen this before? pretty sure I followed the usual steps

Hi.
I have note, I’d ensure that we’re dealing with the exact some model.
manufacturer: “IKEA of Sweden”, model: “Remote Control N2”, deviceJoinName: “IKEA Styrbar remote”

I’ll try to do some more tests at my end to rejoin and see if I’m getting the same results. Not sure why, but many devices, you seem to need to do add, remove, then readd

This is what smartthings reports:

application: 01
endpointId: 01
firmwareImageType: 4555
firmwareManufacturerCode: 4476
manufacturer: IKEA of Sweden
model: Remote Control N2

For reference it is the silver one.

Have re paired a few times, same result

Same version and firmware. I have to step out soon but I could make an extra debug version so we can see what happens

1 Like

Right, I’m getting the same results. If you try to remove and add, and have the live logging window open I am getting this below. This is my first try at a more complex device handler. So I’ll have to do some research.

4de56166-b005-49bd-9822-7bf6bae2ad78 1:28:37 PM: debug Configuring device null
4de56166-b005-49bd-9822-7bf6bae2ad78 1:28:37 PM: error physicalgraph.app.exception.UnknownDeviceTypeException: Device type ‘Child Button’ in namespace ‘scubaandre’ not found. @line 83 (createChildButtonDevices)
4de56166-b005-49bd-9822-7bf6bae2ad78 1:28:37 PM: debug Creating child 1
4de56166-b005-49bd-9822-7bf6bae2ad78 1:28:37 PM: debug Creating 4 children
4de56166-b005-49bd-9822-7bf6bae2ad78 1:28:37 PM: debug Creating 4 children

Getting this myself:

error physicalgraph.app.exception.UnknownDeviceTypeException: Device type ‘Child Button’ in namespace ‘scubaandre’ not found. @line 82 (createChildButtonDevices)
4f0d5b23-c214-46c7-a543-476e47420695 18:42:59: debug Creating child 1
4f0d5b23-c214-46c7-a543-476e47420695 18:42:59: debug Creating 4 children
18:42:59: debug Creating child 1
4f0d5b23-c214-46c7-a543-476e47420695 18:42:59: debug Creating 4 children
719ec322-f867-4ab3-9dd7-4e3bc261a5ad 18:42:55: debug detecting status for d7e1f2d8-4d35-45a6-8657-78671353f726 : true
719ec322-f867-4ab3-9dd7-4e3bc261a5ad 18:42:55: debug updated called
719ec322-f867-4ab3-9dd7-4e3bc261a5ad 18:42:55: debug No devices to add, verified devices: [:]
719ec322-f867-4ab3-9dd7-4e3bc261a5ad 18:42:55: debug detecting status for d7e1f2d8-4d35-45a6-8657-78671353f726 : true
719ec322-f867-4ab3-9dd7-4e3bc261a5ad 18:42:55: trace in ssdpDiscover
719ec322-f867-4ab3-9dd7-4e3bc261a5ad 18:42:55: debug scheduled run, numberOfRuns: 4
719ec322-f867-4ab3-9dd7-4e3bc261a5ad 18:42:55: trace in discovery
dcf6eb36-1246-4eb2-8531-583dfbb6c161 18:42:54: debug Switch 2: ‘on’
dcf6eb36-1246-4eb2-8531-583dfbb6c161 18:42:54: debug Switch 1: ‘on’
dcf6eb36-1246-4eb2-8531-583dfbb6c161 18:42:54: error java.lang.NumberFormatException: For input string: “null” @line 560 (channelNumber)

Not sure if that last error is related

Ok. so did some updates to the code and tested adding the device from the app using the ikea 5 button to get the process started, and also from the online interface and plugging the information manually. Both worked.
@o3scotto Please give it a try again, remove whatever is in there first before you try again.

3 Likes

Brilliant, that works perfectly!

Works great, but not seeing any battery level (Not too fussed as that’s only minor).

Using it to control as an audio remote on an Echo show :slight_smile:

I have several Ikea buttons working just fine although battery status is 0% :grinning_face_with_smiling_eyes:

My Ikea buttons stopped working within 24hrs after new battery is placed, and they show 100%, even that battery died.

Are you talking about the On/Off switches or the Styrbar remotes as mentioned in the title of the topic?

Nice use case, not too sure on the battery. Pretty much just recopied code. Suggest, remove and install

I’ve had that with multiple device. If the devices try to rejoin after loosing connection to the network, they won’t send an updated battery level and the battery will die out trying to rejoin.

1 Like