I am trying to restore previous state of items when openhab starts. As when there are power cuts my raspberry reboots and everything is turned on. so i tried using persistence with this code:
Strategies {
default = everyChange
}
Items {
: strategy = everyChange, restoreOnStartup
}
but nothing is hapening. i have no rule setup. so i need to setup any rule
the strategy looks fine, however you need a persistence service it is applied to.
You might want to read this: https://github.com/openhab/openhab/wiki/Persistence
I’m using MySQL and it is working exactly like you want.
Regards,
-OLI