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.