Skip to content

Data Recording

CONNECT can write selected signals to an InfluxDB 2.x database and serve the recorded ranges back to realvirtual. The viewer shows the signal’s current value and a curve over time next to its machine.

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.

Select signals that you need to review. A production line has thousands of signals, but usually only a few dozen are relevant: 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 sent to the browser. All history requests go through the gateway, keeping database credentials out of the client.

Set the first four options to enable recording. The remaining options control how much data is stored. Adjust them only if the defaults do not suit your machine. See How writing behaves for details.

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.
MaxIntervalMs5000Maximum interval between heartbeat writes for an unchanged signal. This confirms that the value stayed constant and the recorder was still running.
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:

Recording and history query data flow Only signals with the Record flag enter the writer. It writes an initial snapshot, then samples each signal using a float deadband of 0.5 percent, a minimum interval of 100 milliseconds and a heartbeat maximum interval of 5000 milliseconds by default. The heartbeat writes unchanged values again. The bounded queue holds 65,536 points by default. When full, it drops and counts the oldest points without blocking interfaces. Batches enter the project's raw InfluxDB bucket, retained for seven days. Downsampling writes one-minute means from raw to the 1m bucket, retained for 365 days, then one-hour means from 1m to the 1h bucket, retained for ten years. The Historian panel queries through CONNECT, which selects one bucket by the age of the range start: raw within seven days, 1m within 365 days, or 1h for older starts. Results are limited to about 5,000 points per signal. Write path InfluxDB buckets: <project> + suffix Signals with Record Writer deadband min interval heartbeat Queue bounded drops oldest _raw7 d mean1 min _1m1 y mean1 h _1h10 y Query path Historianpanel CONNECT Picks one bucket by the age of the range start: within 7 d → _raw; within 365 d → _1m; older → _1h Limits results to ~5,000 points per signal Writer defaults: deadband 0.5 % · min 100 ms · heartbeat 5000 ms · initial snapshot at start Queue (65,536 points) full: oldest points dropped and counted; interfaces never block.
Recorded points flow through the queue into three retention buckets. You query one bucket based on how far back the range starts.
BucketResolutionRetention
<project>_rawas recorded7 days
<project>_1mone minute1 year
<project>_1hone hour10 years

When you request a chart, CONNECT picks the bucket by how far back the range starts: within 7 days uses <project>_raw, within 365 days uses <project>_1m, and older starts use <project>_1h. It limits the answer to roughly 5,000 points per signal.

The writer takes an initial snapshot when it starts and then applies three 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 automatically. The Historian panel shows the connection state and dropped-point count so you can identify gaps in the recording.

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.