the past days I struggeled with my presence detection and got it now working in a way I think is fine for me.
Therefore I one group with type switch and OR-function for every person with switches in it that check for WLAN and BT availablity of the smart phones. One overall group holds all the items that should be used to check for presence in a rule:
In the rules and sitemaps it works as expected but I also wanted to visulaze it in a chart and tried to persist all items that are in gPresenceCheck group:
gPresenceCheck* : strategy = everyChange
Unfortunately I can only see the real switches in my mysql database but the state of gHand1 and gHandy2 is never persisted.
I’m not 100% sure but think this was working in openhab 1.x
Is this intended behavior or am I doing something wrong?
I noticed the same when setting up group based persistence. (Design Pattern: Group Based Persistence) It seems that groups need to be individually specified in the .persist file. Don’t know if it’s intended behavior or if it’s a bug, but I haven’t found another way around it.
I think it is intended behavior. Because Items can be members of multiple groups and subgroups and it is possible to create circular group dependencies, supporting persistence of subgroups could be more difficult to implement than one might expect.