Hue group dimmer slider always set to zero

I’ve configured about 30 hue lamps in OpenHAB an would like to dim the lamps in groups. For this I’ve created a group like this:

Group:Dimmer:AVG G_DIMM_HUE_ROOM_1 “Alle Lights [(%.1f)]” (G_ROOM_1)
Dimmer DIMM_HUE_1 “Lamp 1” (G_DIMM_HUE_ROOM_1 ) {hue=“17;brightness;30”}
Dimmer DIMM_HUE_2 “Lamp 2” (G_DIMM_HUE_ROOM_1 ) {hue=“18;brightness;30”}
Dimmer DIMM_HUE_3 “Lamp 3” (G_DIMM_HUE_ROOM_1 ) {hue=“19;brightness;30”}
Dimmer DIMM_HUE_4 “Lamp 4” (G_DIMM_HUE_ROOM_1 ) {hue=“20;brightness;30”}

In the sitemap I’ve added a simple slider:

Slider item=G_DIMM_HUE_ROOM_1

With this slider I can now dimm multiple lamps. The problem is that the slider is always set to zero after a few seconds. How can I fix this?

1 Like

Maybe the issue is the AVG. Have you tried using MAX instead? It doesn’t really make sense to me either way.

I’ve alredy tried grouping with MAX that but that also don’t work.

Hi David!

Have you tried not assigning any aggregation function to the group? Just a simple:

Group:Dimmer G_DIMM_HUE_ROOM_1 “Alle Lights [(%.1f)]” (G_ROOM_1)
Dimmer DIMM_HUE_1 “Lamp 1” (G_DIMM_HUE_ROOM_1 ) {hue=“17;brightness;30”}
Dimmer DIMM_HUE_2 “Lamp 2” (G_DIMM_HUE_ROOM_1 ) {hue=“18;brightness;30”}
Dimmer DIMM_HUE_3 “Lamp 3” (G_DIMM_HUE_ROOM_1 ) {hue=“19;brightness;30”}
Dimmer DIMM_HUE_4 “Lamp 4” (G_DIMM_HUE_ROOM_1 ) {hue=“20;brightness;30”}

That seams to work a lot better, but still not always. I suppose that also sometimes events get lost because of the atmosphere bug. I will have to wait for OpenHAB 2 for this to get fixed.

Since I’ve removed the AVG attrbute I’m gettinge a lot of these errors in my log:

2015-11-04 21:27:15.477 [ERROR] [i.internal.GenericItemProvider] - Group function ‘AND’ requires two arguments. Using Equality instead.
2015-11-04 21:27:15.497 [ERROR] [i.internal.GenericItemProvider] - Group function ‘OR’ requires two arguments. Using Equality instead.
2015-11-04 21:27:15.499 [ERROR] [i.internal.GenericItemProvider] - Group function ‘NOT AND’ requires two arguments. Using Equality instead.

Can I ignore those errors or is there a way to set this “Equality” mode in the config file?

I’ve found out why the AVG function sets the slider to 0 in the Android app. The values are normally stored as percent values (0% to 100%) but when the AVG group function is used the value is converted to decimal. (0.000000 to 1.000000) In Android (and also in GreenT) the max value for sliders is hard coded set to 100, so the decimal value doesn’t work.

The question now is if this is an issue in the ui of the Android and GreenT app or if the group functions should handle percent values different.

As you said, the AVG group function will not do what you want in this case. One workaround is to create a rule to calculate the average and update the group-related dimmer item with the percentage. You could also just create an additional item and scale the existing group AVG value by 100 and update an additional group item.

Re: https://github.com/openhab/openhab/issues/3466