History and charts
The camera keeps its own history for every tag in use. Charts on the overlay and the history in the DataBorder therefore need no server, no historian and no database anywhere else.
Stored data
Measurements are kept in three tiers of buckets. Each tier has a fixed number of slots.
| Tier | Period covered |
|---|---|
| One sample every 10 seconds | The last hour |
| One sample every minute | The last day |
| One sample every 10 minutes | The last week |
Each bucket keeps the minimum, the maximum, the last value and the average for its slot. A chart uses the finest tier that covers its window.
State tags are kept as a log of transitions, up to ten thousand of them, together with hourly totals of the time spent in each state over the last week. The state strip, the donut, the state table and the hourly bars all draw from this log.
Strings are kept as a log of changes, up to a thousand entries.
When the next transition arrives, entry 0 is dropped and the rest shift down.
One bar is one hour, so every bar is full height.
Fixed size allocation
Each measurement tag takes about 90 kilobytes of memory, which is allocated once. The history never grows beyond that. When a tier is full, the oldest bucket is overwritten. A camera with a few dozen tags in use keeps a week of history comfortably.
Stored tags
Only tags in use are polled and stored. A tag is in use when it is on the overlay, in the DataBorder, or feeding a derived state. When a tag stops being used, its history is kept for six hours in case you are rearranging the layout, and then dropped. A tag that is deleted from the library is dropped immediately.
Surviving restarts
Closed hours and closed days are written to the camera's flash memory as read-only segments, once each. The open hour and the state and string logs are written every 30 minutes and on a clean shutdown, and only when something has changed. After a restart, the minute and 10-minute tiers are restored from flash, and the 10-second tier refills within the hour.
The Stored data panel shows how full each tier is for every tag, when the history was last saved, and how much memory and flash it uses. See Status and troubleshooting.
Chart windows
Chart and state elements draw over a window that is chosen per element.
- A rolling window covers the last 15 minutes, hour, 8 hours, day or week, and always ends now.
- An anchored window covers this hour, this shift or today. It starts empty at the boundary and fills in. Shift boundaries are the start times you set under Settings → Shifts.
The time axis can show wall-clock times at the ends of the window, or offsets from now.
Full history in the DataBorder
The DataBorder can carry the last 24 hours of state runs, so that a decoded clip starts with context. It can also cycle the camera's full stored history, so that a longer clip reconstructs the charts above from the video alone. Both are options on the DataBorder page.