Hello all,
Platform information:
- Hardware: Raspberry Pi 3 Model B Plus Rev 1.3
- OS: OpenHabian
- openHAB version: openHAB 3.4.2
Issue of the topic
A couple of weeks ago all my rules sending commands to Hue lightbulbs using HSBType variables converted to string stopped working. I don’t know if the Hue Bridge received an update.
The logs don’t show abnormal messages.
Items configuration
Color Toilettes_C "Toilettes" (gToilettesEtage, gLCouleur) {channel="hue:0210:00XXXX:bulb7:color", expire="2m,command=0"}
DSL Rules code related to the issue
Rule to define HSB value depending of time of day:
import org.openhab.core.library.types.HSBType
rule "lumiere dimmer nuit"
when
Item Pr_Mode_Nuit received command
then
var h = 0
var s = 100
var b = 1
if(Pr_Mode_Nuit.state == OFF)
{
h = 32 // 60
s = 20 // 73
b = 30 // 30
}
else
{
h = 0
s = 100
b = 1
}
var DecimalType hue = new DecimalType(h) // 0-360; 0=red, 60=yellow, 120=green, 240=blue, 360=red(again)
var PercentType sat = new PercentType(s) // 0-100
var PercentType bright = new PercentType(b) // 0-100
var HSBType light = new HSBType(hue,sat,bright)
Pr_Dimmer_Light.sendCommand(light.toString)
end
Rule sending HSBType value to Hue lightbulb:
rule "lumière toilettes"
when
Item HuePresence received update
then
if (HuePresence.state == ON)
{
var HSBType light = new HSBType(Pr_Dimmer_Light.state.toString)
Toilettes_C.sendCommand(light.toString)
}
end
Log output
2024-08-04 18:06:53.503 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'Toilettes_C' received command 0,0,1
2024-08-04 18:06:53.518 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Toilettes_C' predicted to become 0,0,1
2024-08-04 18:06:53.526 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Toilettes_C' changed from 0,0,0 to 0,0,1
Do you have an idea why this is happening?
Is there a work around?
Thanks in advance,
Ludovic