CalDAV restore after reboot

I have several calendars working via the Caldav binding. However everytime I do a reboot of OpenHAB I “loose” all the next events etc. in my Sitemaps. The Items are stored in the DB hwoever they’re not restored.
How can I restore them or tell caldav to do that?

Here is one of the itme

String	CalDavPersFranziArbeitName		"Termin [%s]" 	<calendar>	{ caldavPersonal="calendar:franzi type:EVENT eventNr:1 value:NAME filter-name:'Frühdienst|Spätdienst'" }

Use MapDB.

Install persistence service and create mapdb.persist in conf/persistence with the following content:

Items {
	gMapDB* : strategy = everyChange, everyDay, restoreOnStartup
}

Then add CalDavPersFranziArbeitName into Group gMapDB

thx but I might found the problem.
I had to delete the *.config files in the userdata\config\org\openhab folder so that after the next restart the new *.cfg files from the conf\service folder were imported.
After OpenHAB restarted and the binding got loaded the calendar was also updating the Items and now its working again…

That file is generated from the contents of the .cfg file so unless you made a change in the .cfg you shouldn’t need to delete anything from .config. Next time you reboot try stopping OH and cleaning the cache before the reboot and see if that makes a difference.

I know but even if I changed something im the cfg files it wasn’t added to the config file. I still don’t know why. Restarting etc. didn’t helped either…
So the only solution I knew was deleting the config file and restarting and after that caldav was working again without any Problems…

Maybe you know more why this can happen

If you reboot again does the problem come back?

nope not yet.

But I think when I change a thing in the cfg file save it and do this several times in a “short” period it stops working again.

Maybe try using the console to restart the binding after making a change and see if that helps. If not you may need to clean the cache so anything old is removed then a reboot should work without an issue.

rebooting the binding didn’t helped either but clearing the cache might have done the trick. But for now its working so maybe later when it “crashes” again I will do a cache swipe

Cleaning the cache is one of the first troubleshooting step I use when OH starts acting up and I usually follow that with a reboot after OH is fully restarted. Over the past few years doing the above has always worked for me so keep that in your notes if experiencing odd issues or logs in OH. :wink:

If you think the issue is solved please click the square box on the post that provided the solution to mark the topic as solved.

Thanks