History and charts

Automatic tag history and charting.

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

The camera keeps measurements in three tiers of buckets. Each tier has a fixed number of slots.

TierPeriod covered
One sample every 10 secondsThe last hour
One sample every minuteThe last day
One sample every 10 minutesThe 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.

One sample every 10 seconds360 buckets · 13% of the block · the last hourOne sample every minute1,440 buckets · 51% of the block · the last dayOne sample every 10 minutes1,008 buckets · 36% of the block · the last weekONE MEASUREMENT TAG · 90 KB, ALLOCATED ONCEWithin a band the squares run oldest to newest. When a band is full the oldestbucket is overwritten, so the block never grows.
Bucket average low to high Each square keeps a minimum, a maximum, a last value and an average.
The memory one measurement tag reserves, cut into the three tiers. One square is one bucket, so each band's area is its share of the block. Sample values.

The camera keeps state tags 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.

The camera keeps strings as a log of changes, up to a thousand entries.

State tag · Welder 3 state10,000 entries
#enteredstate held0Mon 05:58:12.340Idle0:31:48oldest1Mon 06:30:00.115Running1:42:062Mon 08:12:06.402Blocked0:04:123Mon 08:16:18.610Running2:11:574Mon 10:28:16.077Down0:18:33⋮  9,993 entries not shown9,998Sun 22:58:41.902Blocked0:01:079,999Sun 22:59:48.335Runningstill opennewest

When the next transition arrives, entry 0 is dropped and the rest shift down.

Hourly totals per state, from the same log168 bars · one per hour
MonTueWedThuFriSatSun60 min0

One bar is one hour, so every bar is full height.

String tag · Body VIN1,000 entries
#changedvalue held0Mon 06:31:11.204TMBJJ7NE5J01421180:02:36oldest1Mon 06:33:47.905TMBJJ7NE5J01421190:02:352Mon 06:36:22.417TMBJJ7NE5J01421200:02:41⋮  995 entries not shown998Sun 21:04:38.220TMBJJ7NE7K01438840:03:14999Sun 21:07:52.641TMBJJ7NE7K0143885still opennewest
running blocked idle down
The two logs and the hourly totals they feed. Sample entries from a welding line.

Fixed size allocation

Each measurement tag takes about 90 kilobytes of memory, allocated once. The history never grows beyond that. When a tier is full, the newest bucket overwrites the oldest.

A camera with a few dozen tags in use keeps a week of history.

Stored tags

The camera polls and stores only tags in use. 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, the camera keeps its history for six hours, in case you are rearranging the layout, and then drops it. Deleting a tag from the library drops its history at once.

Restarts

The camera writes closed hours and closed days to its flash memory as read-only segments, once each. It writes the open hour and the state and string logs every 30 minutes and on a clean shutdown, and only when something has changed. After a restart, it restores the minute and 10-minute tiers 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 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.