I’m trying to have a group to persist values at startup, sadly it’s not working (nothing gets persisted, no line in logs even with “log:set TRACE org.openhab.persistence.mapdb” in karaf console).
and my item definition :
Switch testSwitch “testSwitch [%s]” (gMyOpenHABeveryChange)
==> as I wrote, it gets NOT persisted. But if in the persistence config I set a specific item to persist this test item ( “testSwitch : strategy = everyChange, restoreOnStartup”) … this one gets logged.
Am I doing something wrong ? is the “group*” persist broken ?
If you don’t get any other response, file an Issue in github. It should work and I can confirm it was working at least with InfluxDB. My OH is broken right now so can’t test.
If I remember correctly, MapDB never did log anything out when it persisted an Item.
Using latest OH of Dec’17 and JDBC (mysql), Items do not systematically get persistence. I think that it boils down to the persistence strategy (everyUpdate vs everyChange - see https://github.com/openhab/openhab1-addons/wiki/Persistence) and to the autoupdate flag, which introduces another issue. See below.
Fresh restart after erasing tables in MySQL server.
I changed the strategy to everyUpdate, and it logs all items in gPersist but the electricity* items.
A careful analysis shows that there are the only ones with autoupdate=false. When changing to autoupdate=true, the item gets persistence.
So it solves the matter for persistence, but it creates an issue with the KNX binding echoing commands once too much to the KNX bus (see thread KNX binding repeats commands).