Aggregation & rolling windows
Raw streams can be noisy or too fast to plot usefully. Aggregation rolls points into one value per interval.
- Set an aggregation function (
avg,min,max,sum,count,last) and an interval on a widget's source. The interval is a duration —30s,5m,1h. - The widget keeps a rolling window one interval long and shows the aggregate of the readings in it, refreshing every interval or every 10 seconds, whichever is shorter — so a 5-minute average updates every 10 s, not every five minutes.
- One aggregate of the loaded history is shown immediately so the widget isn't blank on load.
- When the device goes quiet, readings age out of the window and the widget stops updating, so it shows no recent data rather than a frozen number.
Scaling is applied after aggregating: the tag's scale factor applies to every function, its offset to all but sum (an offset per reading would be added once per reading), and a count is a number of readings, not a reading, so it is not scaled at all.
Use a longer interval to smooth trends; use max to catch spikes you'd otherwise miss between samples. For long ranges, combine with the rs485-query source for server-side bucketing — or, for a chart over the whole dashboard range, use the time-axis line chart.