Skip to content

Using the accumulator as a meter

Download as PDF

With the Never (meter) reset schedule, the Accumulator virtual sensor works like a physical meter: it keeps accumulating from its last reset indefinitely instead of starting over every hour, day or month. A typical use is a software water meter that turns a flow sensor (eg. in m³/h) into the total volume that has passed (in m³).

The accumulated value never resets by itself. You decide when it starts from zero by setting its last reset, and you can move that time later.

  1. Create an Accumulator virtual sensor, or open an existing one.
  2. Select the element to accumulate as the input, and set the time unit and scaling factor as for any other accumulator.
  3. In the Reset schedule dropdown, select Never (meter).
  4. Save the virtual sensor.

The meter starts at 0 at the time you save it. To include data from before that, set the last reset to a time in the past.

A meter is always calculated in Consibio Cloud, never on the device, even if the device’s firmware supports accumulators. The value updates when the input data reaches the cloud.

  • Continuous output. The meter produces a new value every time the input gets a new datapoint, so its datalog shows how the total grows over time. The Continuous output option is hidden for this reset schedule, as the output is always continuous.
  • Late data is included. If a device sends buffered data late, eg. after losing its connection, the meter is recalculated from the time of the late data, and all later values are corrected.
  • Data gaps count as nothing. A period where the input has no data, eg. when a device is offline, adds nothing to the meter, and the meter stays flat across it. The meter never guesses the input value for time that was not measured. How long a period without data has to be before it counts as a gap is estimated from how often the input is normally sampled. If your input legitimately reports rarely, you can set the threshold yourself with Maximum data gap under Advanced settings.
  • Nightly check. Every night, the last 7 days of each meter are recalculated from the input datalog, so the meter catches up on anything that was missed along the way.

When the Reset schedule is Never (meter), the virtual sensor’s drawer has a Meter reset section, above Advanced settings. Everyone who can edit the virtual sensor can reset it.

  • Reset now resets the meter to 0 at the current time.
  • Set last reset resets the meter to 0 at the time you pick in the Last reset field. Pick a time in the past to include historical data, eg. the time a physical meter was installed or last read.

Both ask you to confirm first, and show the previous last reset.

When you change the last reset, the meter is recalculated from the new last reset on. Values from before the last reset are kept in the datalog, as the history of the previous meter period.

The meter is recalculated automatically from its last reset when you:

  • change the last reset,
  • change the input, time unit, scaling factor or Maximum data gap, or
  • change the output element.

You can also start a recalculation yourself with Recalculate in the Meter reset section, eg. after input data has been edited or deleted. Deleted input data is only removed from the meter by a recalculation.

A recalculation runs in the background. For a meter with a long history, it can take a few minutes. While it runs, the section shows A recalculation is in progress, and the meter does not update from new data. New data that arrived in the meantime is included once it finishes. Afterwards, the section shows when the meter was last recalculated.

If a recalculation fails, the section says so, and the meter may be partly outdated. Select Recalculate to try again. If it keeps failing, contact support@consibio.com.