Choosing a reset schedule for the accumulator
Download as PDFThe Accumulator virtual sensor calculates the accumulated value of a signal over time by numerical integration — for example the total volume that has passed a flow meter. The Reset schedule setting decides when the accumulated value is reset to zero.
Reset schedule options
Section titled “Reset schedule options”When you edit an Accumulator virtual sensor, choose one of these options in the Reset schedule dropdown:
| Option | When the accumulator resets |
|---|---|
| Hourly | At the start of every hour. |
| Daily | At the start of every day. |
| Weekly | At the start of every week. |
| Monthly | At the start of every month. |
| Custom interval | Every time a fixed time interval has passed. |
| Value-based | Whenever the accumulated value gets larger than a threshold you define. |
| Never (meter) | Never by itself. It keeps accumulating from its last reset, like a meter, and you reset it manually. See Using the accumulator as a meter. |
The time-based schedules (Hourly, Daily, Weekly and Monthly) follow the timezone configured for your project.
Custom interval
Section titled “Custom interval”With Custom interval selected, enter a Reset interval: the time interval at which the accumulator is reset to zero. The interval must be at least 10 seconds.
Value-based
Section titled “Value-based”With Value-based selected, the accumulator is not reset on a time schedule at all. Instead, enter a Reset threshold: the accumulator resets to zero as soon as the accumulated value gets larger than this threshold, and then starts accumulating again from zero.
This produces a repeating “sawtooth” output that ramps up to the threshold and drops back to zero — useful when you want to act on “every time a certain amount has accumulated” rather than “how much accumulated this hour/day”. An accumulated value exactly equal to the threshold does not reset the accumulator; the value has to get larger than the threshold.
The datapoints right before and right after a reset are always logged to the datalog — even on devices that otherwise only log at a fixed interval — so the reset transition is clearly visible when you extract the data.
A value-based accumulator always produces a continuous, gradual output, so the Continuous output option is hidden for this reset schedule.
Continuous output
Section titled “Continuous output”For the time-based schedules and Custom interval, the Continuous output option decides what is written to the output:
- Enabled: the accumulator provides a gradual output over time, which is reset to zero at each accumulation period.
- Disabled (default): the accumulator only provides one value at the end of each accumulation period. If you are in doubt, leave this option disabled.