If you persist on every change, why do you need it every minute?
Let‘s do it the other way round. What do you want to achieve?
I also recommend the GUI supported way of adding persistence. Go to Settings - Persistence
If you select “everyUpdates” that includes “everyChange”.
This means if the item value is 5 and the new value 5, then “everyChange” will not do anything as the value hasn’t changed.
“everyUpdate” will create a new record in your persistency DB as the value has been updated (regardless if the value changed or not).
Not sure if something was wrong with your persistency. But if the temperature hasn’t changed it probably hasn’t created a new record (as described above).
rrd4j needs everyMinute to work at all, that’s essential, because rrd4j is a round robin database with multiple sections of data.
The older the data gets, the less data points per time span are stored, so, e.g. for the last four hours you will get (max) one datapoint per 10 seconds, but for the same time span last month you will only get four datapoints per hour (I’m too lazy to check the correct values, but you got the point anyway).
Now, old data is shifted out of the bucket as new data is stored. And each bucket has to store data periodic, therefor it needs valid data at least once a minute to be able to calculate the average value.
As there maybe was missing data at some point, the rrd file may be broken. Best option to fix it is to delete the rrd file and start over.
When everyMinute is set as strategy, this should result in a clean rrd file which will give you persisted data up to ten years to the past (in ten years from now…)
everyUpdate will result in immediate storage of data for each item update, this will result in more accurate time stamps (but only for the last four hours). everyChange will result in immediate storage of data for each item change. In most cases, this is sufficient, so default strategy is everyChange, everyMinute.
Please be aware that a stopped openHAB system may result in broken data, too, as in consequence, there are missing datapoints to calculate the average values for the long term buckets.
It not the connection. Its the persistance. In my old Pimatic everything has been persisted while in RRD4j were breaks. So I can ensure its not the connection. So I decided to go with Influx DB and now the persistance is working like I expect it.