I am using openhabian 2.3 on a raspi.
I am using several counters which I want to persist on JDBC/SQLite-persistence. These counters will be reset at midnight, but before I want to make sure that they are persisted in my db.
Any idea how to do this just in the rule. Currently I am using 2 cron jobs to do this (one in jdbc.persist and the other in rules).
Would like to have only one job for better Control.
Thanks for any hint.
I do not know if I understand your problem correctly but why dont you create a new rule that updates some counterPersistence items at midnight with your counters.
And for this counterPersistence item you define a “everychange persistence”.
number counterp1 (Counter)
rule "save counters"
Time cron "55 23 * * * ?"
Counter* : strategy = everyChange
I thought there might be something simple.
Is there a list of all Methods for ITEMS etc. I was searching but haven’t find it.
Have a great evening.
The best approach I’ve found is to use VSCode with the OH extension, type in the name of an Item with a . and use the arrow keys to browse through the list that will pop up.
You can also go to https://www.eclipse.org/smarthome/documentation/javadoc/index.html and browse to the Class you care about, but that route requires you know a bit more about what type you are working with.