Virtual slider not updating status - Philips Hue and OH2

Hi,

I have been searching the web for 3 days and I don’t get it. I’m using one virtual slider to control a group of two lights and it works perfectly in one way. The problem is when I change HUE lights with other application or Philips wall switch the slider is not updating to same percent% of brightness as is actual.

If I add two more sliders on SiteMap the two sliders connected directly to items are updating automaticly. Also in log file the level of brightness is logged for the two bulbs.

Below is my configuration. And if anyone has an Idea how to update the Light_Dimmer based on Light_1_Dimmer brightness please advise. I guess it should be some kind of rule but I can’t get the slider to move with anything I tried.

Config
—SiteMap file -----

Slider    item=Light_Dimmer		icon="light"

—Items file----

Dimmer Light_Dimmer       "Dimming [%d %%]"             (gDimmer)
Dimmer Light_1_Dimmer	"Light_1_Dimmer [%d %%]" (gDimmer) {channel="hue:0220:1:brightness"}
Dimmer Light_2_Dimmer	"Light_2_Dimmer [%d %%]" (gDimmer) {channel="hue:0220:2:brightness"}

----Rules file----

rule "Dimmer"
 when
   Item Light_Dimmer received command
 then
   var value = Light_Dimmer.state as PercentType 
   sendCommand(Light_1_Dimmer,value)
   sendCommand(Light_2_Dimmer,value)
end
1 Like

I have this problem too. Groups are going to UNDEF instead of the value they should have. This also happens with the NOT dimmable hue lights and a switch item.

You don’t need a rule for sending command to the dimmers, all members of Light_Dimmer should received the command when the Light_Dimmer item changes regardless. At least it does with my z-wave lights…

What happens if you try without the rule? Does the Light_Dimmer item get updated with the correct dimmer value?

Not for me. The state of the group (or) goes UNDEF.

Ah, I read the items file a little to fast, the “light_dimmer” item should not be needed, only the gDimmer.

Change to something like this:

Group:Dimmer  gDimmer   "Dimming [%d %%]"
Dimmer Light_1_Dimmer	"Light_1_Dimmer [%d %%]" (gDimmer) {channel="hue:0220:1:brightness"}
Dimmer Light_2_Dimmer	"Light_2_Dimmer [%d %%]" (gDimmer) {channel="hue:0220:2:brightness"}

And no rules defined…only send commands to the gDimmer item.

I’ve not tried this with dimming only switches, but the functionality should not be that far between.

Huh… It looks like this option is working :smile:

Here is my full config with switch, dimm, color and color temperature if it helps anyone.
The only issue is now when one of the bulbs is set at different brightness/colorTemp, the dimer and/or ColorTemp sliders are going to 0%. But I guess it is logical.

Group:Switch:OR(ON, OFF) gLivingRoom	"Power [(%d)]"
Group:Dimmer gLivingRoomDimmer		    "Dimming]"
Group:Color gLivingRoomColor			"Color"
Group:Dimmer gLivingRoomColorTemp   	"Color temp"

Switch	Light_GF_LivingRoom_1			"Light_GF_LivingRoom_1"				(gLights, gLivingRoom)	{channel="hue:0210:3:color"}
Dimmer	Light_GF_LivingRoom_1_Dimmer	"Light_GF_LivingRoom_1_Dimmer"		(gLivingRoomDimmer) 	{channel="hue:0210:3:color"}
Color	Light_GF_LivingRoom_1_Color		"Light_GF_LivingRoom_1_Color"		(gLivingRoomColor) 	[ "Lighting" ]	{channel="hue:0210:3:color"}
Dimmer	Light_GF_LivingRoom_1_ColorTemp	"Light_GF_LivingRoom_1_ColorTemp"	(gLivingRoomColorTemp) 	{channel="hue:0210:3:color_temperature"}

Switch	Light_GF_LivingRoom_2			"Light_GF_LivingRoom_2"				(gLights, gLivingRoom)	{channel="hue:0210:1:color"}
Dimmer	Light_GF_LivingRoom_2_Dimmer	"Light_GF_LivingRoom_2_Dimmer]"		(gLivingRoomDimmer) 	{channel="hue:0210:1:color"}
Color	Light_GF_LivingRoom_2_Color		"Light_GF_LivingRoom_2_Color"		(gLivingRoomColor) 	[ "Lighting" ]	{channel="hue:0210:1:color"}
Dimmer	Light_GF_LivingRoom_2_ColorTemp	"Light_GF_LivingRoom_2_ColorTemp"	(gLivingRoomColorTemp) 	{channel="hue:0210:1:color_temperature"}


Switch	Light_GF_LivingRoom_3			"Light_GF_LivingRoom_3"				(gLights, gLivingRoom)	{channel="hue:0210:2:color"}
Dimmer	Light_GF_LivingRoom_3_Dimmer	"Light_GF_LivingRoom_3_Dimmer"		(gLivingRoomDimmer) 	{channel="hue:0210:2:color"}
Color	Light_GF_LivingRoom_3_Color		"Light_GF_LivingRoom_3_Color"		(gLivingRoomColor) 	[ "Lighting" ]	{channel="hue:0210:2:color"}
Dimmer	Light_GF_LivingRoom_3_ColorTemp	"Light_GF_LivingRoom_3_ColorTemp"	(gLivingRoomColorTemp) 	{channel="hue:0210:2:color_temperature"}

Frame label="Livingroom" { 
		Switch		item=gLivingRoom mappings=[OFF="Off", ON="On"]
		Slider 		item=gLivingRoomDimmer		icon="light" 	visibility=[gLivingRoom==ON]
		Colorpicker item=gLivingRoomColor		icon="light"	visibility=[gLivingRoom==ON]
		Slider 		item=gLivingRoomColorTemp	icon="light"	visibility=[gLivingRoom==ON]
1 Like

Oh… and when changing group stuff in OH2 I always need to restart the OH service.

Welcome to the club of frequently restart openhab2.service. To test a config is a pain with OH in a hughe setup.