HSBType automatically resets to 0

Dear Openhab Experts,
I got an issue with a LED strip that is connected via a Conbee 2 Zigbee Stick using the DeconZ and Hue binding. Unfortunately it seems that setting a color via HSBType does absolutely not work and does not get accepted by the strip when executing my rule.
When I change the color etc in “Phoscon App”, everything works fine but not in OpenHab
Example when I change the color in Phoscon App (Zigbee Gateway) as you can see it keeps the status:

2020-12-14 00:56:39.141 [vent.ItemStateChangedEvent] - BettRechts_Color changed from 258,100,46 to 11,100,46

2020-12-14 00:56:40.141 [vent.ItemStateChangedEvent] - BettRechts_Color changed from 11,100,46 to 137,100,46

2020-12-14 00:56:42.905 [vent.ItemStateChangedEvent] - BettRechts_Color changed from 137,100,46 to 137,100,55

2020-12-14 00:56:43.907 [vent.ItemStateChangedEvent] - BettRechts_Color changed from 137,100,55 to 137,100,73

My configuration is as follows:

The Item is a “Color”-Type called “BettRechts_Color”

My Rule looks like this:

    rule "Bewegung Bett rechts"
    when
        Item BewegungssensorBettRechts_Presence changed from OFF to ON
    then
        val hsb_color = new HSBType(new DecimalType(260), new PercentType(100), new PercentType(10))
        val hsb_off = new HSBType(new DecimalType(0), new PercentType(100), new PercentType(0))
        BettRechts_Color.sendCommand(hsb_color.toString)
        Thread::sleep(45000);
        BettRechts_Color.sendCommand(hsb_off)
    end

And thats what happens in the Log (no matter if I send the command hsb_color.toString or just hsb_color):

2020-12-14 00:29:17.067 [vent.ItemStateChangedEvent] - BewegungssensorBettRechts_Presence changed from OFF to ON

2020-12-14 00:29:18.825 [ome.event.ItemCommandEvent] - Item 'BettRechts_Color' received command 260,100,10

2020-12-14 00:29:18.853 [nt.ItemStatePredictedEvent] - BettRechts_Color predicted to become 260,100,10

2020-12-14 00:29:18.891 [vent.ItemStateChangedEvent] - BettRechts_Color changed from 0.0,100,0 to 260,100,10

2020-12-14 00:29:18.904 [vent.ItemStateChangedEvent] - BettRechts_Color changed from 260,100,10 to 259.995422293431,100,10

2020-12-14 00:29:21.147 [vent.ItemStateChangedEvent] - BettRechts_Color changed from 259.995422293431,100,10 to 0.0,100,10

Maybe anyone has an idea why the HSB is always set back to 0.0,100,10?
Thanks a lot in advance

Please use code fences! Your code is basically unreadable.

2020-12-14 00:56:39.141 [vent.ItemStateChangedEvent] - BettRechts_Color changed from 258,100,46 to 11,100,46
2020-12-14 00:56:40.141 [vent.ItemStateChangedEvent] - BettRechts_Color changed from 11,100,46 to 137,100,46
2020-12-14 00:56:42.905 [vent.ItemStateChangedEvent] - BettRechts_Color changed from 137,100,46 to 137,100,55
2020-12-14 00:56:43.907 [vent.ItemStateChangedEvent] - BettRechts_Color changed from 137,100,55 to 137,100,73

My Rule looks like this:

rule “Bewegung Bett rechts”
when
Item BewegungssensorBettRechts_Presence changed from OFF to ON
then
val hsb_color = new HSBType(new DecimalType(260), new PercentType(100), new PercentType(10))
val hsb_off = new HSBType(new DecimalType(0), new PercentType(100), new PercentType(0))
BettRechts_Color.sendCommand(hsb_color.toString)
Thread::sleep(45000);
BettRechts_Color.sendCommand(hsb_off)
end
2020-12-14 00:29:17.067 [vent.ItemStateChangedEvent] - BewegungssensorBettRechts_Presence changed from OFF to ON
2020-12-14 00:29:18.825 [ome.event.ItemCommandEvent] - Item ‘BettRechts_Color’ received command 260,100,10
2020-12-14 00:29:18.853 [nt.ItemStatePredictedEvent] - BettRechts_Color predicted to become 260,100,10
2020-12-14 00:29:18.891 [vent.ItemStateChangedEvent] - BettRechts_Color changed from 0.0,100,0 to 260,100,10
2020-12-14 00:29:18.904 [vent.ItemStateChangedEvent] - BettRechts_Color changed from 260,100,10 to 259.995422293431,100,10
2020-12-14 00:29:21.147 [vent.ItemStateChangedEvent] - BettRechts_Color changed from 259.995422293431,100,10 to 0.0,100,10
1 Like

Given the timestamps in your events.log, this will be the target device telling openHAB its “current” state. Depending on the details of your device, it may respond to a command with “current” state as from before actioning command, during actioning command,or after actioning command. That’s beyond openHAB’s control.

For an overview of the various steps visible in your events.log, see here - in particular the “jitter” section.

You’ll probably have to dig into the detail of how and when device status is obtained - is this from a poll? Does that need different timing? etc.

Thanks, I’ll check the jutter section. It’s not a poll, that happens when I try to set a color to the light strip. However the color does never show up and it always gets plain white. Maybe the autoupdate can fix it; I need to figure out how I can set this in Paper UI as I was not able to configure the items with an *.items file

By “poll” I am talking about how some report of device status arrives at openHAB. Does the device send it unsolicited? When? Or are you looking at Deconz idea of what the device status is? I don’t know, know little about how that works.

Fiddling with autoupdate will not fix this -the event you complain about is coming in from the binding. Understanding autoupdate is just about seeing why the state first becomes what you expected (via autoupdate) but then later becomes something else (external actions).

So it is not sent unsolicited, only when I perform an update and try to set a color or any other HSB setting it starts jumping around. Maybe someone else has an idea if you tell me autoupdate will not fix it. Anyways I will carefully read the article you sent as it seems to be an interesting one. Thanks a lot

Edit: btw. I have the same behavior at another LED light strip that works with another (WiFi LED) Binding.

Update:
Veto on Autoupdate prevented the “Jitter” behavior but still the color does not really get transmitted:

2020-12-14 20:18:34.313 [vent.ItemStateChangedEvent] - BettRechts_Color changed from NULL to 199.9981689173724,90,60

2020-12-14 20:18:35.560 [vent.ItemStateChangedEvent] - BettRechts_Color changed from 199.9981689173724,90,60 to 0.0,100,60

Nobody else got an idea :frowning: