[rrd-users] Dynamic Steps
Alex van den Bogaerdt
alex at vandenbogaerdt.nl
Wed Apr 17 18:15:13 CEST 2013
> Everytime one Watt/hour has been consumed, the power meter sends a signal
> to the Raspberry Pi. By measuring the time between two signals, I'm able
> to calculate the actual power consumption:
Are you not overthinking this?
A kWh (or a Wh if you really get thousand signals per kWh) is just a measure
of the amount of Joules.
If you feed Joules to RRDtool, it will store Joules per second, which equals
All you have to take care of is that RRDtool receives at least one update
within the heartbeat time.
Try the ABSOLUTE counter type, feeding 3600 (for Wh) or 3600000 (for kWh)
every time you get a signal.
The resulting graph, without any tweaking, should be your power usage over
time, shown in watt (or kilowatt, and so on)
More information about the rrd-users