somehow this doesn´t work for me:
Items:
…
Group grBaseTEMP_SENSOR
Group grErdgeschossTEMP_SENSOR ( grBaseTEMP_SENSOR )
…
Number temperature_erdgeschossbuerobuero “Temperature [%.1f °C]” (grErdgeschossTEMP_SENSOR,grErdgeschossTEMP_AVERAGE) { knx=“4/1/2+<9.001:4/1/8” }
jdbc.persist
// persistence strategies have a name and a definition and are referred to in the "Items" section
Strategies {
every10Minutes : "0 0/10 * * * ?"
everySecond : "0 * * * * ?"
}
Items {
//grErdgeschossBueroLIGHT* : strategy= everyChange
grBaseTEMP_SENSOR* : strategy= everyChange
//* : strategy= everyChange
}
// vim: syntax=Xtend syntax=openhab
but this does:
// persistence strategies have a name and a definition and are referred to in the "Items" section
Strategies {
every10Minutes : "0 0/10 * * * ?"
everySecond : "0 * * * * ?"
}
Items {
//grErdgeschossBueroLIGHT* : strategy= everyChange
//grBaseTEMP_SENSOR* : strategy= everyChange
* : strategy= everyChange
}
// vim: syntax=Xtend syntax=openhab
Normally with * every Item in that group should get persistet, or am I wrong ?
Strange that your first example doesn’t work… It looks ok
I have a similar setup and it works for me
I have a main group with subgroups and the items are members of the subgroups.
I persist everything within the main group and this captures also the items…
I don’t think the persistence config works recursively. Given your Items above I think your persist config would only save the aggregated state of the Group grErdgeschossTEMP_SENSOR. You would have to either add temperature_erdeschossbuerobuero to grBaseTEMP_SENSOR or add grErdeschossTEMP_SENSOR* to the .persist file.
Personally I recommend creating separate persistence specific Groups and add all Items you want to persist to these special groups in addition to other groups you may have for other purposes. See the following:
That is true but the only “item” in grBaseTEMP_SENSOR is grErdgeschossTEMP_SENSOR. I don’t think is recurses into subgroups.
Could it depend on which persistence-type you’re using?
I’m using JDBC - MySQL, and that’s also having problem when I trying to collect item-data based on a group.
As soon as I’m changing it back to “* : strategy = everyChange, everyDay, restoreOnStartup”, it works perfect.
(But then I start seeing problem in the log about non-unique/dublicate records). |