[rrd-users] Intermittent data causing stepped graphs
simon at thehobsons.co.uk
Thu Jul 27 21:21:20 CEST 2017
jamiedg <jamie at dg12.co.uk> wrote:
> Recently though I've hit a problem that maybe someone can help with;
> My temp sensors would normally save data at least once a min which worked
> fine, but to extend battery life the newer sensors are only transmitting
> data when the temp changes or at most every hour. This causes intermittent
> data causing the charts to sometimes have a stepped output.
> When I post the same data to the cloud service EmonCMS I get a more smoothed
The obvious observation is that the latter is wrong FOR THAT DATA. The data you are feeding in doesn't have the data to show a sloping line, so drawing a straight line between the points is strictly speaking incorrect FOR THAT DATA.
Your real problem is that the data itself is stepped. When you say that the sensor only sends data when the temperature changes, it presumably has some quantisation - it appears to be reporting to a resolution of 0.1˚. I suspect that the older sensors are reporting to a higher resolution - eg if it reports to 0.01˚ then you'd not see the steps as they'd be smaller than the pixels on the graph, both in the Y axis due to the resolution, and in the X axis due to the frequent reports.
Do you still have any of the old sensors ? If so then I'd suggest comparing the raw data. My guess is that the old ones report to a higher resolution, which combined with frequent updates will give you a smooth graph. The new ones are almost certainly quantising to a much lower resolution (otherwise there'd be little or no battery saving) which is what's giving you your problem.
> If the data is Undefined I use the Prev value (sen3,UN,PREV,sen3,1,*,IF)
That is probably wrong as well. You are explicitly telling RRD to draw a flat line there.
> Can anyone please offer any suggestions or help to smooth the stepped graph
Fix the input ?
More information about the rrd-users