I want to write presistence values to rrd4j every 5 minutes.
Settings:
Strategies {
everyMinute : “0 * * * * ?”
every5Minutes : “0 0/5 * * * ?”
everyHour : “0 0 * * * ?”
everyDay : “0 0 0 * * ?”
This one is working:
Temperatur : strategy = everyMinute
I tried this one, but it does not write anything
Temperatur : strategy = every5Minutes
If I use “0 0/5 * * * ?” in a rule it is working as expected, does something every five minutes.
What is going wrong? Is the cron syntax different in rules and presistence?
Dim
(Angelos)
May 22, 2017, 11:00am
2
shouldn’t this be (not sure):
every5Minutes : "0 */5 * * * ?"
In the cron documentation it is written, that this should work.
http://www.quartz-scheduler.org/documentation/quartz-2.1.x/tutorials/crontrigger
This cron syntax x/y tells to run starting at x every y.
I’ve tested it with a rule and the rule was triggered every 5 min starting at minute 0.
I can use every5Minutes : “0 5,15,25,35,45,55 * * * ?” should work, I will check this
your suggestion every5Minutes : “0 */5 * * * ?” has the same syntax that my original one, but I will test it too
sihui
(SiHui)
May 22, 2017, 11:27am
4
I guess you won’t be happy with that, see the docs:
http://docs.openhab.org/addons/persistence/rrd4j/readme.html
All item- and event-related configuration is done in the file persistence/rrd4j.persist. The strategy everyMinute must be used, otherwise no data will be persisted (stored).
2 Likes
ok, now it is clear, that only this will work, thanks.
Also as a small side note: Depending on your goal you might want to hop on to a more powerful persistence solution right from the beginning. See here as an example:
Store your openHAB item states in an InfluxDB time-series datastore and create highly customizable diagrams with Grafana . These diagrams can in return be included in your sitemap as images.
[image]
Following this guide, you will install InfluxDB and Grafana, make openHAB store data in an InfluxDB database, make Grafana fetch data from the InfluxDB database and draw diagrams. Finally you can include these diagrams in your openHAB sitemap.
Table of Content
Starting Point
InfluxDB Installation…
wow, cool, I will test it.
Depending on your goals, a two vendor strategy could be interesting…
MapDB for switches and binary sensors,
Influx dB for values.
Tell us your goals…
This is exactly what I want to do. store presistence in mapdb, store charts in rrd4j or Influx dB