I have strange problem with default charts. I use rrd4j db with strategy every minute and restore on startup for all items which I need a chart.
One chart is for switch, which represents heating on /off, which is fine:
It is simpe 1 or 0, but on second chart I have two items: current temperature (red) and heating setpoint (green):
Problems are those triangles
This item is twice a day changed on particular time from night temp and day temp + can be change if I changes it from GUI. Except one day when I changed it other days should reach just two values, why is it extrapolated ?
Can I changed it ?
Is it any other simple way to generate charts, but viewable on mobile devices ?
Extrapolation is how rrd4j works. It didnāt save every value. Instead it saves the average over a certain time period. Iām not certain that is the problem here but it would not surprise me if it were.
Rich, but it has no sense, look, on both charts. On this above is one item (Grzanie) which is registered exactly in same time as green line on second chart. So usually when red is ā1ā (heater is on), green is 20.7C (daily temp), when red is ā0ā, green is 19.5C (night temp). Red is not interpolated, but green it is (same frequency of change, same time).
I think it is a problem in charting algorithm and it is due to second line on this chart, but this just my thinking ā¦ as I understand I donāt have any influence on it, am I right ?
Do you know other, easy to use chart methods, which can be use on mobile ?
It looks same, but I found that my log file (events.log) doesnt log this var.
Probable, because I just used following assignment (twice per day): Heating_setpoint.state = Heating_setpoint_Night.state as DecimalType
but for others (which I add later) I started use postupdate.
Can it reflect on persistence ?
Yes, you must make state changes to an Item using sendCommand or postUpdate. Just setting an Itemās state using ā=ā will not propagate through the event bus to the rest of the system.
I have changed it, so now I am able to see values in a log, but still no change on chart .
Same triangles, on chart with temperature and on chart with only set points.
For some reason it is acting like there are only a few data points to graph instead of the one per minute which it should be. But with rrd4j charting usually doesnāt work at all if you donāt store once per minute. So I have no idea what is going on. The only recommendation I can make is try a different DB and see if that helps.
I generated separate charts and result is same.
Config is simple:
Items:
Number Heating_setpoint_Day "Zadana temperatura dzieÅ [%.2f Ā°C]" <temperature> (Temp_Chart)
Number Heating_setpoint_Night "Zadana temperatura noc [%.2f Ā°C]" <temperature> (Temp_Chart)
Number Heating_setpoint "Temp zadana" <temperature> (Temp_Chart)
Rules:
rule "Enabling heating"
when
Time cron "0 0 4 * * ?" or
Time cron "0 0 14 * * ?"
then
if (hvacMode.state.toString == "Auto") {
postUpdate(Heating_setpoint, Heating_setpoint_Day.state as DecimalType)
}
end
rule "Disabling heating"
when
Time cron "0 0 10 * * ?" or
Time cron "0 0 19 * * ?"
then
if (hvacMode.state.toString == "Auto") {
postUpdate(Heating_setpoint, Heating_setpoint_Night.state as DecimalType)
}
end
So its a simple assignment 4 times per day. Of course both day and night temp are editable via GUI, but lets say Iām not touching them.
I have started log Heating_setpoint, using persistence historic state, so every 30minute I log current, -10min, -20min, -30min and those values are constans (if there was no change). So it looks that persistance DB has correct values.
Problem is chart function ā¦ probably.
If I will change DB, so I understand I can not use std charting function
There are two charting methods. rrd4j has a charting capability built into it and there is a charting servlet which works with other queryable persistence stores (e.g. db40, MySQL, etc). If you use the servlet it will work.
Rich I have read your older posts and wiki, but still I dont understand what does it mean ādefault chartā.
So I can use rrd charting (via image link)- does it mean that it is a default ?
What I need to do to use other chart servlet (default ?) like this example from wiki http://localhost:8080/chart?groups=Heizung&period=W&random=1&h=800&w=1200
Does it mean that I need to config i.e db4o with everyminute strategy + change default servlet to db4o in config ?
Can both rrd and db4o coexists ?
Yes. That is how you interact with the charting servlet rather than the rrd4j charting.
This wiki page covers the basics for persistence. you can have as many persistence types running as you want so db4o can run along side of rrd4j. I do not know if you need set db4o as the default.
The every minute strategy is only required to deal with a limitation/feature of rrd4j. However, if you donāt save the value more frequently than every change I suspect your chart will still be spikey.