openHAB Windows Beta App

I’m on OH 3.1.0. and using the Beta windows app.

Hey @cd-tronic,
Have you time to check the issue?

In the last update I implemented a value check for a valid RGB within the SetState function of the ColorWidget control to avoid app crashes. Maybe this could be the reason why the value for the controls are not set.

@elcosomalo Can you check the app log (Settings->View Log) if there is warning entry with the following text: “Item state ‘{rgbString}’ is not a valid RGB value”. It would be good to know what kind of values ({rgbString} is the placeholder for the value) the control tries to parse.

Yes sir, here is it:

Seems “338.260864,27.058825,13.000000” is not a valid RGB Value (0-255).
@elcosomalo What kind of thing and item is configured in OH?

They are 2 RGB lightbulbs and 1 RGB led strip(which is on the back of the TV, this is for better understanding of the data below) :

Things:

    Thing topic RGB           "Lampara RGB 1" {
        Channels:
            Type colorHSB : LampRGB  [ stateTopic="stat/RGBbulb1/HSBColor", commandTopic="cmnd/RGBbulb1/HSBColor" ]
            Type switch : LampSwitch [ stateTopic="stat/RGBbulb1/POWER", commandTopic="cmnd/RGBbulb1/POWER"]
            Type dimmer : LampCT     [ stateTopic="stat/RGBbulb1/CT", commandTopic="cmnd/RGBbulb1/CT", min=153, max=500]
            Type dimmer : LampDimmer [ stateTopic="stat/RGBbulb1/Dimmer", commandTopic="cmnd/RGBbulb1/Dimmer"]    
    }

    Thing topic RGB2           "Lampara RGB 2" {
        Channels:
            Type colorHSB : LampRGB2                     [ stateTopic="stat/RGBbulb2/HSBColor", commandTopic="cmnd/RGBbulb2/HSBColor" ]
            Type switch : LampSwitch2                    [ stateTopic="stat/RGBbulb2/POWER", commandTopic="cmnd/RGBbulb2/POWER"]
            Type dimmer : LampCT2                        [ stateTopic="stat/RGBbulb2/CT", commandTopic="cmnd/RGBbulb2/CT", min=153, max=500]
            Type dimmer : LampDimmer2                    [ stateTopic="stat/RGBbulb2/Dimmer", commandTopic="cmnd/RGBbulb2/Dimmer"]
    }

    Thing topic TV_RGB           "TV LEDS RGB" {
        Channels:
            Type colorHSB : LampRGB3                     [ stateTopic="stat/TV_RGB/HSBColor", commandTopic="cmnd/TV_RGB/HSBColor" ]
            Type switch : LampSwitch3                    [ stateTopic="stat/TV_RGB/POWER", commandTopic="cmnd/TV_RGB/POWER"]
            Type dimmer : LampDimmer3                    [ stateTopic="stat/TV_RGB/Dimmer", commandTopic="cmnd/TV_RGB/Dimmer"]

Items:

Color	LuzRGBHUE     	"Color luces RGB"        	 <colorlight>   {channel="mqtt:topic:local:RGB:LampRGB", channel="mqtt:topic:local:RGB2:LampRGB2", channel="mqtt:topic:local:TV_RGB:LampRGB3"}	
Switch	LuzRGBSwitch    "Switch luces RGB"    	     <lightbulb>	{channel="mqtt:topic:local:RGB:LampSwitch", channel="mqtt:topic:local:RGB2:LampSwitch2"}
Dimmer  LuzRGBCT        "Temp Fria/Calida luces RGB [%d]" <lightbulb>	{channel="mqtt:topic:local:RGB:LampCT", channel="mqtt:topic:local:RGB2:LampCT2"}
Dimmer  LuzRGBDimmer    "Dimmer luces RGB"           <lightbulb>	{channel="mqtt:topic:local:RGB:LampDimmer", channel="mqtt:topic:local:RGB2:LampDimmer2"}

Color	LuzRGBTV     	 "Color luz RGB TV"    <colorlight>      {channel="mqtt:topic:local:TV_RGB:LampRGB3"}	
Switch	LuzRGBTVSwitch   "Switch luz RGB TV"   <lightbulb>	 	 {channel="mqtt:topic:local:TV_RGB:LampSwitch3"}
Dimmer  LuzRGBTVDimmer   "Dimmer luz RGB TV"   <lightbulb>	     {channel="mqtt:topic:local:TV_RGB:LampDimmer3"}

Switch  TodaslaslucesRGB       "Switch todas luces de colores"  
Dimmer  Todaslaslucesdimmer    "Dimmer todas luces de colores [%d]"   {channel="mqtt:topic:local:RGB:LampDimmer", channel="mqtt:topic:local:RGB2:LampDimmer2", channel="mqtt:topic:local:TV_RGB:LampDimmer3"}

I don’t think this is really an RGB Value as i didn’t find Oh working with RGB anywhere.
It’s always HSV.

I will try it tomorrow. Maybe i could find a way to reproduce the issue

Agree seems its HSV values and I implemented the regex with a wrong assumptions, because I interpreted values I got from my HUE lamps as RGB.

So I will adjust the regex like this to allow decimal values.
^(([1-9][.\d])(,)){2}([1-9][.\d])

I’m not shure if this is the right regex for this.
Doesn’t work if i thow it into an regex debugger.
But in fact i’m not that keen on regex but this might be better?
^([0-9]{1,3}[.][0-9]{1,6}[,])([0-9]{1,3}[.][0-9]{1,6}[,])([0-9]{1,3}[.][0-9]{1,6})

Just an update… the error that I was having in the app’s log is gone. I found a rule conflicting with the values… but the problem on the app is still there, it doesn’t update the correct color value on the color picker.