I’m running openHAB 2.5.6-2 on my rasberry pi 2 B. Some Items are stored using rrd4j persistance and data history is displayed in a chart on my sitemap. This works pretty well.
My Problem is that everytime I reboot the system all the charts are empty - so the data seems to be lost. After that new data will be stored again according to the code in the rrd4j.persist file. The chart will be updated with the new data accordingly.
Some people on the forum seem to have similar issues - but honestly I didn’t get the solution which fits for me reading their posts.
I’m rebooting the system by sending a ‘sudo reboot’ to the pi via putty. Pretty brutal…?
To show you some of the other code I used for storing the data:
addons.cfg
A comma-separated list of persistence services to install (e.g. “persistence = rrd4j,jpa”)
persistence = rrd4j
runtime.cfg
################ PERSISTENCE ####################
The persistence service to use if no other is specified.
org.eclipse.smarthome.persistence:default=rrd4j
I’ve not used REST API so far so I will need some time to get into it. But my understanding at the moment is that charting itsself is working fine and the issue is with the data. I belive this cause after a reboot the chart will suddenly be without any data line but a minute later (strategy = everyMinute !) it is starting to build up a new line based on the next data coming in.
Ok and permissions of the data log files:
-rw-rw-r-- 1 openhab openhab 28280 Jul 25 23:44 humid_N00.rrd
-rw-rw-r-- 1 openhab openhab 28280 Jul 25 23:44 tempe_N00.rrd
Yes OH3. I have deactivated the Zram for persistence in the /etc/ztab config and the data was stored after reboot. Afterwards I have activated it again and data between was lost again. So definitely something wrong with the reboot and Zram persistence.
I will keep deactivated but maybe somebody knows how to solve that issue.
I had a fresh installation and no migration.
Please don’t ping people. Most users feel annoyed by that and so do I.
Current ZRAM code works and is reboot safe. There have been issues lately though so if you have problems on your system first thing is to ensure you run the latest code.
Uninstall and reinstall ZRAM from the menu.
I have the same issue. Pi 4 with OpenHabian, OH2.5 still, but the same, losing all RRD4J data. I tried to enable/disable ZRAM via the openhabian-config, but i get the following error:
OK, maybe the config tool error is nothing… after i tried a couple of times to enable ZRAM, but got the above error, i rebooted the Pi to see if that helped. Much to my delight, the rrd4j data was saved… so i guess it changed something, even though it gave the error!
I’ve been able to have the rrd4j data persist throughout reboots, but a power failure still resulted in data loss. Now I just moved persistence away from ZRAM entirely.
How many times? Because once is obviously not enough.
I did read this topic, and did reinstall ZRAM already. I was happy to get from a place, where persistence was not persisted at all, to where it could survive a programmatic reboot. Then the power outage happened and I lost the persistence records again.
I am aware this will increase the wear on my SD card. I’m thinking of switching to a cloud based
(DynamoDB most likely) persistence to avoid that.