[Solved] OpenHAB-Smartthings - Unable to set brightness of a bulb

Hi,

I am trying to bridge between OH and Smartthings using this binding - https://github.com/BobRak/OpenHAB-Smartthings. I wasn’t sure whether to post here or on the github repo.

I have connected the two and am able to switch the bulb on and off but I am unable to set the brightness of a bulb. In my setup I have the following:

smartthings.things
Thing switch Light_4Switch [ smartthingsName=“Light_4” ]
Thing switchLevel Light_4Level [ smartthingsName=“Light_4” ]

smartthings.items
Switch iSmartthings_Hallway1Switch “Hallway 1 light” { channel=“smartthings:switch:MyHome:Light_4Dimmer:switch” }
Dimmer iSmartthings_Hallway1Dimmer “Hallway 1 dimmer” { channel=“smartthings:switch:MyHome:Light_4Dimmer:level” }

When I try to set the brightness, in events.log I see:
Item ‘iSmartthings_Hallway1Dimmer’ received command 20
2020-10-08 06:40:02.564 [ome.event.ItemCommandEvent] - Item ‘iSmartthings_Hallway2Dimmer’ received command 20
2020-10-08 06:40:02.569 [ome.event.ItemCommandEvent] - Item ‘iSmartthings_Hallway1Switch’ received command ON
2020-10-08 06:40:02.619 [nt.ItemStatePredictedEvent] - iSmartthings_Hallway1Dimmer predicted to become NULL
2020-10-08 06:40:02.641 [nt.ItemStatePredictedEvent] - iSmartthings_Hallway1Switch predicted to become ON

And the light comes on but the brightness does not change. I have tried all sorts of combinations, including enabling the Switch and SwitchLevel items in the ST app, and referencing the switch and switchLevel object in my .things and .items files but no success.

Any help greatly appreciated.

So your things file could look like

Bridge smartthings:smartthings:Home    [ smartthingsIp="192.168.1.12", smartthingsPort=39500 ] {
    Thing switchLevel HallwayLight [ smartthingsName="Light_4" ]
}

You Item would then look like

Dimmer HallwayLight "Hallway Light" <slider> { channel="smartthings:switchLevel:Home:HallwayLight:level" }

364b0639df751f9346f9ea7559d0c03b903c3298

This sort of behaviour is a good clue that the channel definitions (or the Things they link to) are broken

Thank you both. I’d aligned the .things and .items definitions and a clean-cache and a couple of reboots but no change. When I define the items as a Switch they work perfectly, but not as a Dimmer.

just curious, did you know that the Smartthings binding is now part of 2.5.9?

Hi yes, thank for checking. I installed the binding through PaperUI. I hope that means I’m on the latest release.

I returned to this with some fresh eyes and found I was linking to the wrong channel.

WRONG:
Dimmer iSmartthings_Hallway1Dimmer “Hallway 1 dimmer” { channel=“smartthings:switch:MyHome:Light_4Dimmer:level” }

RIGHT:
Dimmer iSmartthings_Hallway1Dimmer “Hallway 1 dimmer” { channel=“smartthings:switchLevel:MyHome:Light_4Dimmer:level” }