I’m using the quite simple so far item configuration to get temperature from a one-wire sensor :
Number loftTemperatureSensor "Combles nord [%.1f °C]" <temperature> (gTemperatures, gHome, gLoft) ["28-000005cfcb1d"]
Group gTemperatures (gSensors)
Group gLoft (gHome)
It’s working, meaning I have my temperatures in sitemaps. But if I look in logs, each update trigger group cascade update like this :
2017-06-01 00:40:03.280 [GroupItemStateChangedEvent] - gTemperatures changed from 18.375 to 18.062 through loftTempe$
2017-06-01 00:40:03.299 [GroupItemStateChangedEvent] - gLoft changed from 18.375 to 18.062 through loftTemperatureSe$
2017-06-01 00:40:03.311 [GroupItemStateChangedEvent] - gSensors changed from 18.375 to 18.062 through gTemperatures
2017-06-01 00:40:03.342 [GroupItemStateChangedEvent] - gHome changed from 18.375 to UNDEF through loftTemperatureSen$
2017-06-01 00:40:03.350 [GroupItemStateChangedEvent] - gHome changed from UNDEF to 18.062 through gLoft
Actually I’m surprised you get some ‘sensible’ values. Where you actually want a group Item to hold a Number value, it would be best to define it that way.
plus you’d probably want to define MAX or AVG or something if you intend using the value. Of course, you might not be interested in group value at all, so it should not matter here.
Note that loftTemperatureSensor belongs to groups gTemperatures, gHome, gLoft, and gSensors (via membership of gTemperature) and also gHome again (via membership of gLoft).
Openhab will iterate through the membership of each group when an update occurs, to calculate new group value.
OH should sort out multiple memberships okay, but I note that the UNDEF report is associated with gHome - the one that effectively has the item twice at different nesting levels.
I suspect the report is a harmless artifact of the way the group value calculations are handled.
Thank you for this detailled answer. I’m quite new with groups, and perhaps my design pattern here isn’t flawless.
What I want to achieve so far is quite simple : just prepare other sensors and locations next arrival in my system.
Therefore, I got several “taxonomies” handled here by groups. I want to be able to reach all items per group later on. My goal is not to assign sensible value to a group like I would do with an item.
Would you confirm this approach matches my design?