Hi,
I installed a Shelly RGBW2 yesterday to replace a Gledopto RGBW controller. The Gledopto worked nicely in conjunction with a Conbee II stick inside openHAB but it dropped off from the Zigbee network in a non-reproduceable way so I decided to go for a WiFi solution.
Now, I made some observations from which I am not sure if they are even bugs:
1. Sending HSB value whereas B=1%
When sending a command like that to the RGB channel:
val String hsb = ("29,74,1")
Farbe_Bett_RGB.sendCommand(hsb)
with the item
Color Farbe_Bett_RGB
"Farbe Bett RGB"
(Bett_RGB)
{ channel ="shelly:shellyrgbw2-color:<ID>:color#hsb",
homekit="Lighting.Hue, Lighting.Saturation, Lighting.Brightness" }
The light does not turn on although even the web page shows it is switched on:
It turns visibly on when sending a brightness value higher than 10:
val String hsb = ("29,74,11")
However, I can use the slider on the shelly web page to put the RGB channel brightness to 1% and then it works.
With deconz it was not problem using values like 1% brightness. Is there maybe an issue in the API of Shelly?
2. Reducing brightness of color channel to 0%
When I reduce the brightness of the colored light via the slider inside the homekit the color changes also and when switching on the light again it is set to a weird value:
Situation before dimming to 0% brightness in homekit
Then I put the brightness with the slider 0% and then bring it up again. This is now what I see in homekit:
The events.log shows:
2023-01-25 09:25:07.205 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Farbe_Bett_RGB' changed from 0,100,49 to 0,100,0
2023-01-25 09:25:07.231 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'Farbe_Bett_RGB' received command 0,100,0
2023-01-25 09:25:07.232 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Farbe_Bett_RGB' predicted to become 0,100,0
2023-01-25 09:25:07.566 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Farbe_Bett_RGB' changed from 0,100,0 to 0,0,0
(...)
2023-01-25 09:25:26.973 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'Farbe_Bett_RGB' received command 0,0,49
2023-01-25 09:25:26.974 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Farbe_Bett_RGB' predicted to become 0,0,49
2023-01-25 09:25:26.978 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Farbe_Bett_RGB' changed from 0,0,0 to 0,0,49
Why is not the previous red light?
3. When setting brightness to 0 in the white channel and the color channel was switched off, the color channel is switching on
So, when I only have the white channel switched on and I turn down the brightness to 0 sometimes the colored light switches on to maximum brightness based on the previous color.
Is this maybe due to the fact that the RGBW2 handles both channels (white and color) whithin one power channel?
In deconz both light types were handled as two different lights. A white light and an RGB light which I could also handle separately in openHAB and thus also inside homekit.
The fact that the power channel is for both lights makes the handling it a bit weird.
In case both lights are turned on, how can I turn off one without turning off the other one?
I tried some synchronization mechanism but it does not really work as expected:
Switch Bett_LED_OnState // Shall only be switched off if both lights have been switched off
{ channel ="shelly:shellyrgbw2-color:<ID>:control#power" }
Group:Switch:OR(ON,OFF) gBett_OnState
Switch OnState_Bett_RGB // This is used to show the state of the RGB light in homekit
(Bett_RGB, gBett_OnState)
{ homekit="Lighting.OnState"}
Color Farbe_Bett_RGB
"Farbe Bett RGB"
(Bett_RGB)
{ channel ="shelly:shellyrgbw2-color:<ID>:color#hsb",
homekit="Lighting.Hue, Lighting.Saturation, Lighting.Brightness" }
Switch OnState_Bett_Weiss // This is used to show the state of the white light in homekit
(Bett_Weiss, gBett_OnState)
{ homekit="Lighting.OnState"}
And the syncing rule:
rule "Lichter-Schlafzimmer: OnState synchronisieren"
when Member of gBett_OnState changed
then
val command = if(gBett_OnState.state == ON) ON else OFF
if(Bett_LED_OnState.state != command) {
Thread::sleep(500)
Bett_LED_OnState.sendCommand(command)
logInfo("Lichter-Schlafzimmer: OnState synchronisieren", "gBett_Onstate changed to " + gBett_OnState.state)
}
end
I am using openHAB 3.4.1 Release Build and would really appreciate your support here.
Many thanks,
Oliver