Posting an update to a color item in blockly

OH 3.0.2 on Raspi4, 4GB

I use the “post update” block to send a color to an item…

Bildschirmfoto 2021-05-06 um 20.03.16

… but the item does not update with the color. It always stays white.

Bildschirmfoto 2021-05-06 um 20.04.40

What am I missing?

Edit: I am getting this in the log:

2021-05-06 20:10:19.603 [WARN ] [e.automation.internal.RuleEngineImpl] - Fail to execute action: script

java.lang.IllegalArgumentException: The argument ‘state’ must not be null.
(continues with a very long message over several lines)

postUpdate and sendCommand expect strings for the state parameter. With respect to these functions, this error usually means that the state parameter is not a string. It looks like blocky is not properly converting the color block value to a string for use in the function. Blocky integration is not 100% complete so it is not too surprising to find issues like this.

If you replace the color block with a text block that says 0, 100, 100 I think you will find that it works.

openHAB expects HSB, not RGB. Solid red in HSB would be something like 0,100,100.

255,0,0 in HSB is basically black because the third coordinate, B for brightness, determines how light or dark the color is.

2 Likes

D’oh! That was a quite a slip. Good catch. Fixed.

1 Like

Hi,
I got a similar problem:
I want to post an update to a coloritem, but the log says, that it cannot be parsed…
That is the command from blockly:
Bildschirmfoto 2021-08-14 um 13.31.17

And this is the Log:

2021-08-14 13:25:49.010 [WARN ] [internal.defaultscope.ScriptBusEvent] - State '41,100,100' cannot be parsed.

What am I missing?

Thank you, for your help!

Hi,
maybe you are posting a color (41,100,100) to a switch (on/off) item? Please check if LEDDecke has a separate color item which should be used for changing the color.