I’ve been using the JDBC persistence service with OH2 since I migrated from OH1 to OH2. Restore on startup worked for me on OH1 but has never worked in OH2. Data is logged to MySQL but upon restarting OH all item values are blank. This hasn’t been an issue up to now but now that the heating is on I would like the thermostat setpoints to be restored to their previous values after a restart. My jdbc.persist file is as follows:
// persistence strategies have a name and a definition and are referred to in the "Items" section
Strategies {
// if no strategy is specified for an item entry below, the default list will be used
everyMinute : "0 * * * * ?"
every5Minutes : "0 */5 * * * ?"
everyHour : "0 0 * * * ?"
everyDay : "0 0 0 * * ?"
default = everyChange
}
/*
* Each line in this section defines for which item(s) which strategy(ies) should be applied.
* You can list single items, use "*" for all items or "groupitem*" for all members of a group
* item (excl. the group item itself).
*/
Items {
// persist all items once a day and on every change and restore them from the db at startup
* : strategy = everyChange, everyDay, restoreOnStartup
}
Any suggestions? I can’t see why restore on startup won’t work.