WOW! thats why influx is killing my RPI3! Thanks.
Is there a way to use default persist every minute and only take away one two sensors.
I want to persist 90% every minute as I graph almost everything with Grafana and it has some problems when the value does not change within the graph window. Setpoints or motion sensors are the most often ofenders that brake the graphs.
Persisting every minute is really not a good idea. You should use everyChange to catch actual changes and maybe everyHour to have support points for only seldomly updated items. As you can see I’m not even doing that for all items. I can’t imagine you really have the need for minutely accurate graphing!?
How do they do that? No change will normally not be of any harm.
As you can see the water setpoint is missing both ends on the graph. last() selector is not fixing that.
fill (previous) is fixing the missing end near the now() (right part) but for the mising part on the left I could not find a fix other then provide more granular data into DB
Also if the value did not change over 24h it will be completely missing from the graph.
I had to open some valves by hand and change the setpoints to make them into the graph as they were totaly omitted despite the fact the metric on the graph was still there.
But I do have much more concerining issue related to the orginal post.
I have croned ruled that on 21:06 should write daily value to the DB. it is simple as possible
rule "Update max daily energy value"
Time cron "0 6 22 1/1 * ? *"
var Number tmp
var Number today_max = B_Power_energy_today_float.state
logDebug("TERMO","---------Daily solar max sent to db:" + tmp )
In the log I see it gets called twice 4ms apart from each other and that results in 2 values in the DB.
2017-01-19 22:06:00.032 [DEBUG] [eclipse.smarthome.model.script.TERMO] - ---------Daily solar max sent to db:5.951
2017-01-19 22:06:00.036 [DEBUG] [eclipse.smarthome.model.script.TERMO] - ---------Daily solar max sent to db:5.951
Ah that… Yes that’s “okay” as in expected. That is why I mentioned to go the middle way and add hourly points. This is the way Grafana draws diagrams and yes, that could be improved but it really doesn’t matter much if you look at the diagram with a range of one day or one week. Here’s an example from my system (hourly values, pay attention to the tiny space at the left):
At the end I believe for your Temperature diagram an hourly rule is okay. For other kinds of data or devices other settings might be beneficial.
Another Example: One of my “sensors” is sending data only periodically every 10 minutes and values in between can be linearly interpolated. I am only using the onChange strategy because a cron based strategy would actually inject false data.
2017-01-20 22:06:00.029 [DEBUG] [eclipse.smarthome.model.script.TERMO] - ---------Daily solar max sent to db:12.539
2017-01-20 22:06:00.058 [DEBUG] [eclipse.smarthome.model.script.TERMO] - ---------Daily solar max sent to db:12.539
This could be a real bug… If we can find the cause we should file a bug report for it.
You are using a RPi3. Which way did you install openHAB and which revision are you on? WHat is the name of your rule file, are there any other rule files present that do not work correctly or empty? Please check the rule file for formatting error or similar…
Stop openHAB, clear out cache and tmp and start again.
I did openhabian on RPI3, this night I updated from 653 to the latest snapshot 743.
I only have single rules.file called default.rules
I only have a single crone rule in the rules file, all other trigger on the sensor or input changes and generaly work ok. I’ll clrear tmp and wait until today trigger at the end of day.
Now That I deleted it I cant check that back. But I’m quite positive it looked like a space. I only edit rules files on the RPI one way. And that is with Notepad++ on the SMB share on the OH2 machine.
I can see that it was set to the Windows style of the line ends CR LF and not to the unix LF only