InfluxDb: Openhab2 does not store everyHour, but everyChange

Tags: #<Tag:0x00007f212e85bca8> #<Tag:0x00007f212e85bb68>

(Marc) #1


I’ve got an issue with the influx persistence on openhab2.
I followed this very good tutorial InfluxDB+Grafana persistence and graphing and
as long as I get constantly different values from the sensor it works like a charm, but when a value is constant over a longer period of time openhab does not save the value every hour as defined.

	everyHour : "0 0 * * * ?"

	NUM_TEMP_Room,NUM_CISTERN_FILL_Percent,NUM_CISTERN_FLOW : strategy = everyChange, everyHour

I also checked the logfile but could not find a related error.
Does anybody have an idea what I could have done wrong?

(SiHui) #2

From other persistence problem posts I know that sometimes creating a default solves a lot of problems, maybe worth a try:

default = everyHour

(Marc) #3

Hi @sihui,

thanks for your fast reply. I’ll give it a try and see if it helps.

( ) #4

Hey @fog,
not sure of the cause of your problem but your question motivated me to update the example configuration in the InfluxDB tutorial :thumbsup:

@sihui a default is not needed, at least I don’t have one. See

( ) #5

Persistence files seem to be pretty strict regarding their style. May sound silly but could you please try moving the braces back at their original positions?

Did you check openhab.log for influxdb related log lines?

(Marc) #6

Hi @ThomDietrich,

thank you for the response. I really appreciated you tutorial and it helped a lot.
Here is my latest config, I’ll get back to you tomorrow with the results.
Fingers crossed.

Strategies {
    everyHour : "0 0 * * * ?"
	default = everyHour

	NUM_TEMP_Room,NUM_CISTERN_FILL_Percent,NUM_CISTERN_FLOW : strategy = everyChange, everyHour

( ) #7

If in doubt, use this one, then add your items.

Besides I think your file looks okay. I’d expect the error in the connection or something related. Check the openhab.log and try the sine wave example from the tutorial.

(Marc) #8

Hi @ThomDietrich,

as I said it works in general, only the save everyHour strategy was not working. So I don’t think that the issue is related to influx or grafana.

( ) #9

Ah right, sorry. you mentioned it clearly above. Has been a long day :wink:

(Marc) #10

Just rebooted openhab and checked the log for problems. Seems to be okay.
So lets see.

(Marc) #11

Hi @ThomDietrich and @sihui,

again thanks for your help, the latest config file works fine now.
What is interesting though is the fact that openhab seems to be only strict on the strategies syntax part of the config.

PS: How to flag the topic as solved?

(SiHui) #12

Left most checkbox …

( ) #13

@Kai any chance someone could look into this? At least a parsing error should be logged in case of syntax problems

(Kai Kreuzer) #14

What exactly was the problem? Position of the brackets?
Should be possible to address, best file an issue at as a first step!

(Marc) #15

I’ll remove the default statement when I’m home to check if this makes a difference.
If it then still works I suspect that the position of the opening bracket in the strategies part was the root cause of the effect.
I’ll keep you posted.

( ) #16

Hello @fog,
turns out all we discussed was not actually of concern. Anyhow it’s great your setup is working now.


For you or whoever is experiencing similar issues: Always check the openhab.log for possible errors.