Skip to content

Data Recording

CONNECT can write selected signals to an InfluxDB 2.x database and serve the recorded ranges back to realvirtual WEB. The viewer then shows a signal not only as a current value but as a curve over time — next to the machine it belongs to.

Recording is optional and off until an InfluxDB is configured. Nothing is recorded implicitly.

Recording is a per-signal decision: set the Record flag on the signals you care about. This works for the flat signal list of any interface and for the signals of an MQTT process image.

Choose deliberately. A production line has thousands of signals, and the interesting ones are usually a few dozen: cycle counters, temperatures, speeds, states.

The historian section of the CONNECT settings: recording switch, URL, organisation and project

  1. Install or point to an InfluxDB 2.x instance. It can run on the same PC or anywhere the gateway can reach.
  2. Provision the buckets — the gateway’s deploy/influxdb/ scripts create them, their downsampling tasks and a project-scoped token.
  3. Enter URL, organisation and token in the gateway’s configuration.
  4. Set the Record flag on the signals you want and check the Historian panel in the viewer.

The token is stored in the gateway configuration and never handed to the browser. All history requests go through the gateway, which is what keeps the database credentials out of the client.

The first four options are what you set to get recording running. The rest tune how much data ends up in the database and only need attention if the defaults do not fit your machine — see How writing behaves for what they actually do.

OptionDefaultWhat it does
EnabledfalseTurns recording and history queries on. Nothing is recorded while this is off.
Urlhttp://localhost:8086Base URL of the InfluxDB 2.x instance.
OrgrealvirtualInfluxDB organisation name.
Token(empty)Project-scoped token. Never returned by the REST config API and never sent to the browser.
Project(empty)Names the bucket set, so several machines can share one database. Falls back to the AI diagnosis project, then to a default.
FloatDeadbandPercent0.5Minimum relative change of a float, in percent, before it is written. Raise it if a noisy analogue value fills the database.
MinIntervalMs100Shortest interval between two writes of the same signal. Raise it for very fast signals.
MaxIntervalMs5000Latest a heartbeat is written for an unchanged signal — this is what proves a value stayed constant rather than the recorder having stopped.
BatchSize500Points per write request.
FlushIntervalMs1000Longest a partly filled batch waits before it is sent.
ChannelCapacity65536Size of the write queue. When it is full, the oldest points are dropped and counted rather than blocking the machine connection. Raise it only if the Historian panel reports dropped points during normal operation.

These live under InfluxDb in the configuration file — see the configuration file reference.

A project uses three buckets with increasing retention and decreasing resolution:

BucketResolutionRetention
<project>_rawas recorded7 days
<project>_1mone minute1 year
<project>_1hone hour10 years

When a chart is requested, the gateway picks the bucket that fits the time range and limits the answer to roughly 5,000 points per signal — a week-long range therefore answers as fast as a one-hour range.

The writer takes an initial snapshot when it starts and then applies two rules that keep the database small without losing the shape of the data:

  • a deadband, so a value that only jitters is not stored;
  • a minimum interval, so a fast-changing value is not stored more often than useful;
  • a heartbeat at a maximum interval, so a constant value still proves it was constant.

Points are batched through a bounded queue. An InfluxDB outage never blocks a protocol interface: the machine connection keeps running, the oldest queued points are dropped and counted, and the writer reconnects on its own. The Historian panel shows the connection state and the number of dropped points, so a silent gap is visible as a number.

The Historian panel lists which signals are currently recording and which ones exist in retained history, and it draws the ranges you select. Record flags can be changed from there without touching the configuration file.