HSBType without brightness

Hi, i have a Hue Light Bulb and want to send some colorinformation to it. Unfortunately it does not let me do it without a brightness value.

Dimmer light_dimmer //name and channel stuff
Color light_color //name and channel stuff

I am increasing and decreasing the brightness with

//rule stuff

But when i am trying to send a HSBType color information to it, it wants a brightness state.

//rule stuff
    light_color.sendCommand("275,100,<brightness>") //this works perfectly
    light_color.sendCommand("275.100") //does not work, as its not a HSBType anymore

I cannot use the brightness state of the light_dimmer item, because it takes to long to update. When i send the INCREASE command, it takes up to 5 seconds for the item to update to its current dimmer state. Thats to long for what i am trying to rule.

Is there a way to send a HSBType to a color item without sending a brightness valure OR without updating the current brightness?

Okay, so make it into an HSB type.

You can extract the existing brightness part of the Item state and assemble a new value from old + new parts.

myNewHSBstring = "275,100," + (myHSBItem.state as HSBType),.getBrightness

This is not going to work, as the item state takes to long to update to its real brightness. Thats too slow for my rule purpose.

From what? I thought you just wanted to change the colour.

Yes, i only want to change the color in THIS rule. I am changing the brightness with a different rule.
I am changing the brightness with .sendCommand(INCREASE) but it takes too long for the item in openhab to update to its real brightness state.

So when i am changing the brightness and afterwards i want to change the color, perhaps the old brightness is still saved in the item and so the wrong brightness gets pushed in the HSBType.

openhab brightness state is set to 40%, real lights brightness is also 40%
i am increasing the brightness (.sendCommand(INCREASE))
light brightness changes from 40% to 70% (the openhab item is not updated yet)
i am changing the color through openhab to (100, 100, +itembrightness)
openhabs sends (100, 100, 40)
item brightness updates to 70% (real brightness is now 40%)
some seconds go by
item brightness updates to 40%

i hope you see what problems i am encountering. So there is no way for me to send the brightness state in the HSBType, as its not updating fast enough. Somehow i need to ignore the brightness state when sending the HSBType

As i wanted the brightness to be 70%, after changing the color the brightness goes back to 40%

It’s the other way around; there is no way to command a HSB without the B part.

You’ve got some choices, but not many.

You could predict the B part - “did I just send an INCREASE - then I can estimate the target B”
You could set the B to what new value you want - seems to be 70%
You could send the HSB before sending an INCREASE

i am not able to predict the brightness and theres also now way to send the new brightness i want.

Looks like i have to stick with

.sendCommand(“100,100,” + light_color.state)

Thanks for your help anyway. Maybe sometime someone gets a nice working solution…

You can, but it’s difficult to code, you’d need to simulate in openHAB and in realtime the ramping effects of your light.

It’s difficult to see why you don’t just command one HSB with both the desired color and brightness instead of using INCREASE DECREASE

I am using a philips hue remote (added via zigbee binding) to control a Hue Light Strip (added via hue binding)

I use the buttons DimUp and DimDown to INCREASE and DECREASE the dimmer state.
I am using the ON-Button to change between different colors.

So if i decrease the brightness and change the color directly after it, the old brightness state is used.for the updated color.

This light is used by my girlfriend. I want her to use the dimmer as she is used to.

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.