Persistence and restoreOnStartup

I finally got some time to spend on this and my OpenHab configuration is proceeding nicely. I’ve got items created for all the things I care about, and am getting ready to start in on moving my rules.

I did have general question, though, regarding configuring persistence.

Is is necessary and/or best practice to enable restoreOnStartup for the MiOS items, or will the binding automatically get and update all of the ones I have configured when it starts?

Any other tips for using persistence with the MiOS binding?

I’m going to use both MySQL and rrd4j for persistence, with MySQL being the default and only using rrd4j for the things I want to chart and need to persist once a minute.

Thanks,

Doug

In my config I persist everything, but also author my Rules to handle the UnDef values they’re sometimes presented.

Upon binding restart, the MiOS binding will reload all the data from Vera, but there are still cases where restoreOnStartup will give you an extra safety net.

Things like editing an item file, without restarting, benefit from that safety net.

I use RRD as my primary persistence so not all data types are persisted. At some point I’ll cutover to th Key-value store (no historic data) to get those handled correctly.

One caution is that persistence stores need IO, and not all small form factor boards have fast IO… So sometimes they can be slow. In my case I have the eMMC module on my Odroid C1’so it’s not an issue, but using MicroSD cards can be a problem if you’re persisting a lot,of Items.

In my config I persist everything, but also author my Rules to handle the UnDef values they’re sometimes presented.

Ok. That sounds like a plan. I may also look at using mapdb for just for the restore-on-startup stuff.

I’ve got an old laptop, dual core CPU with 4 G RAM and an SSD, to run OpenHab on so I think performance should be OK even with MySQL.

Any worries about race conditions between restore-on-startup and the MiOS binding reload of values? For example, could the restore-on-startup overlay the actual current value from the Vera?

Thanks,

Doug

Probably enough to run several instances ;). I run MQTT and a few other things on mine, and there’s still room left over.

Any worries about race conditions between restore-on-startup and the MiOS binding reload of values? For example, could the restore-on-startup overlay the actual current value from the Vera?

I haven’t noticed any, but then again I haven’t looked too close at the startup sequence lately… I run in DEBUG logging permanently (part of why you want fast disks) so I can always look if i need to.

I also just bought an external USB/mSATA SSD drive for long term data retention (energy monitoring). This drive is tiny, even with its enclosure, so I’ll offline stuff there eventually.

MQTT is on my list of things to do, but I’m not sure when I actually get to it. So many projects…

OK. I’ll put that one in the “don’t worry about it” pile.

Thanks,

Doug