Central Historian

Manual for forwarding the history, alarms, events, audit trail and electronic signatures of an EnvisionSCADA station to a central system.

Updated 16 min read
On this page (14 sections)
  1. Overview
  2. How It Works
  3. Records of a Station on the Central System
  4. Edge Nodes on the Central System
  5. Status Columns
  6. Link to the Central System on the Station
  7. Data Forwarder to the Central System
  8. Authentication and Security
  9. Link Interruptions
  10. Redundant Stations and Central Systems
  11. Live Values and History on the Central System
  12. Relation to Fleet Deployment
  13. Renaming a Station
  14. Config API and MCP

With Central Historian, an EnvisionSCADA station forwards the records of its own Historian to a central EnvisionSCADA system: historian samples, alarms, events, the audit trail and electronic signatures. The station keeps working on its own and keeps its own Historian. The central system stores a copy of every record under the Node Name of the station, so the records of many stations are kept in one Historian and can be viewed with the standard viewers.

The station sends the records itself, over HTTP or HTTPS, to the central system. Each request carries a batch of records of every enabled stream in one compressed (gzip) request. This keeps the number of round trips and the transferred volume low, which suits links with limited bandwidth or high latency such as 4G. The connection is always opened by the station, so the central system does not have to reach the station.

Central Historian is set up in two places:

  • On the central system: an Edge Node for every station, under Configuration > Edge > Edge Nodes. The Edge Node issues the token the station authenticates with.
  • On the station: the Node Name and the link to the central system on the Parameters page, section Node, and a Data Forwarder with Connection ENVISION Central under Configuration > Data Forwarders.

How It Works

The Data Forwarder on the station reads the rows of its local Historian above its last forwarded positions, one position per stream, and sends them to the central system as one batch. The central system checks the token and the Node Name, writes the samples, alarms, events, alarm and event changes and signatures in one database transaction, and only then confirms the batch. The station moves its positions forward only after this confirmation. A batch that was not confirmed is read and sent again in the next cycle.

Acknowledgements, returns and other changes of alarm and event rows that were already forwarded are sent as the current state of the row. The central system updates its own copy of that row; no new row is added.

The central system skips a row it already holds. A batch that is sent again, for example after a lost answer on the link or a restart of the station, is therefore stored once.

Audit trail records are added to the audit trail of the central system and chained with its own hash chain. The record keeps the installation id of the station as its node id. The audit trail of the station stays the original record and is verified on the station. Signatures are stored with user id 0, because a user of the station is not a user of the central system; the user name, full name, meaning and comment are kept.

Time stamps are stored as the station recorded them (UTC). The central system does not convert or replace them.

ItemValue
ProtocolHTTP or HTTPS, as set by the scheme of the Central URL. HTTPS is recommended on every network that is not fully controlled.
PortThe port of the Central URL, which is the web port of the central system (80 or 443 when the URL names none).
DirectionOutbound from the station to the central system. The station needs no inbound port for Central Historian.
RequestsPOST to API/CentralHistorian/Receive (batches) and API/CentralHistorian/Test (Test Connection) on the Central URL.
EncodingJSON, gzip-compressed.
Connect timeout10 seconds per central node.
Request timeout100 seconds.
Maximum batch size64 MB uncompressed. A larger batch is refused with the advice to lower Batch Size on the Data Forwarder of the station.

Records of a Station on the Central System

The central system adds no columns to its Historian. The origin of every record is in its name: the Node Name of the station and a dot are placed in front of every variable name, and the Node Name and a slash in front of every Asset. A record without an Asset gets the Node Name as its Asset.

RecordOn the stationOn the central system (Node Name Site1)
Historian samplePLC1.Pump1.SpeedSite1.PLC1.Pump1.Speed, same time, value, raw value and status
AlarmAsset Line1/Pump1Asset Site1/Line1/Pump1, same Alarm Id, times, message and acknowledge data
Alarm without AssetAsset emptyAsset Site1
EventAsset Line1/Pump1Asset Site1/Line1/Pump1
Audit trail recordAsset Line1/Pump1Asset Site1/Line1/Pump1, node id of the station kept, new hash in the chain of the central system
Electronic signatureUser id of the signerUser id 0, user name, full name, meaning and comment kept

Because of this naming, the existing viewers on the central system show the records of a station without further configuration. An Asset filter Site1 shows the alarms, events and audit trail records of station Site1, and select Site1.PLC1.Pump1.Speed in a trend or in the Historian Viewer to show the samples of that station. Note that an Asset filter such as Line1 no longer matches a record of a station; use Site1/Line1.

Edge Nodes on the Central System

The Edge Nodes page on the central system lists the stations it accepts records from. Open it from the configuration menu, group Edge, item Edge Nodes. The page is available to Administrators and to users whose user group has the Edge Node Edit Right, see the User Groups article. Changes are made on the primary node only.

An Edge Node is not a user account. It does not appear on the Users page and is not subject to the password policies.

To add a station:

  • Press Add in the toolbar.
  • Enter the Name. Use the Node Name the station has, or will have, on its Parameters page.
  • Optionally enter a Description and leave Enable switched on.
  • Press Create. The dialog Token for shows the new token. Press Copy, keep the token for the station, and press Done.
SettingDescriptionExampleUnits / Format
NameName of the station. Equals the Node Name parameter of the station. Everything the station sends is stored under this name. Unique.Site1Letters, digits and underscore
DescriptionFree text description for documentation purposes.Pumping station northText
EnableOff: the requests of the station are refused. The station keeps its records and retries. Default on.trueBoolean
TokenIssued by the central system when the Edge Node is created, or with Regenerate Token. Shown once, stored as a hash. The Token section shows when the current token was issued (UTC).Text

The token is shown once. The central system stores only a hash of it and cannot show it again. When the token is lost, open the Edge Node with the Settings icon and press Regenerate Token in the Token section. The current token stops working at once, and the new token is shown once in the same way. Until the new token is entered on the station, the station keeps its records and retries.

Every create, change, token regeneration and delete of an Edge Node is recorded in the audit trail of the central system. Deleting an Edge Node stops its token at once; the history already stored is kept.

Status Columns

Besides its settings, every row on the Edge Nodes page shows the status of the station for Central Historian in the columns below. The columns Edge Project, Desired, Running, Deploy Status, ENVISION Version and Certificates on the same page belong to Fleet Deployment and to the certificates the central system delivers, see the Fleet Deployment article and the Managing Certificates article.

ColumnDescription
Last ReceivedTime of the last batch the central system stored from this station. Never when no batch was received since the central system started.
Rows ReceivedNumber of rows stored from this station since the central system started.
InstallationInstallation id of the station that sent the last batch. Hover over the cell for the full id.
Last ErrorTime and text of the last refusal or storage error. Empty after a successful batch.
These four columns are kept in memory on the central node that received the batches. They start empty after a restart of the central system. Press Refresh to update the page.

Data Forwarder to the Central System

The records are sent by a Data Forwarder on the station. Open Configuration > Data Forwarders, press Add, and select ENVISION Central under Connection. ENVISION Central is always listed first; it is not a Database Connection, because the link is the one on the Parameters page, section Node. With ENVISION Central selected, the dialog hides Mode and every query field, and shows the read-only field Sent as with the Node Name of the station.

Select the streams to forward with the Forward switches. The other settings work as for every Data Forwarder, see the Data Forwarders article. The Reset icon on the row sets the last forwarded positions, for example to send the history again from an earlier point; the central system skips the rows it already holds.

SettingDescriptionExampleUnits / Format
ConnectionENVISION Central.ENVISION CentralSelection
Forward DataForwards the historian samples.trueBoolean
Forward AlarmsForwards alarm records and their later changes (return, acknowledge, suppression).trueBoolean
Forward EventsForwards event records and their later changes (acknowledge).trueBoolean
Forward Audit TrailForwards the audit trail records, each with the signature it references.trueBoolean
Forward SignaturesForwards the electronic signature records.trueBoolean
IntervalTime between two forwarding cycles.5000ms
Batch SizeMaximum number of rows per stream in one request.100Integer
Verbose1 or higher writes a line per batch to the System Log, for example Sent to central as Site1: 240 rows (240 stored).0Integer

In one cycle, the forwarder reads up to Batch Size rows of every enabled stream and sends them as one request. While a stream returns a full batch, it sends the next batch at once, up to 20 requests per cycle, and continues in the next cycle. A backlog is therefore sent at the speed of the link.

A forwarder with Connection ENVISION Central on an installation without a Central URL or without a Node Name waits with the state No central link. This allows a template project for Fleet Deployment to carry the forwarder while each station brings its own link.

StateMeaning
ForwardingA cycle is running.
IdleThe last cycle ended without error; the forwarder waits for the next one.
ErrorThe last cycle failed. The reason is in the System Log, for example a refusal of the central system. The positions did not move; the same rows are sent in the next cycle.
No central linkCentral URL or Node Name is not set on the Parameters page.
StandbyThis station is the standby node of a redundant pair. The primary node forwards.
DisabledEnable is off.

Authentication and Security

The station authenticates with the token of its Edge Node, sent as a Bearer token in every request, together with its Node Name. The central system accepts a request only when the token belongs to the Edge Node with that name and the Edge Node is enabled. A station therefore cannot store records under the name of another station. No user account or password is involved.

The token is generated by the central system (prefix ecn_, 192 random bits) and stored there as a SHA-256 hash only. On the station it is stored in the parameter CentralToken. The Parameters page and the Config API return ???????? instead of the token; writing that mask back keeps the stored token.

Use an https Central URL so the token and the records are encrypted on the link. By default the station checks the certificate of the central system against the certificates trusted by the operating system and the Trusted Certificates of the station. A certificate of a plant certificate authority is trusted by adding the authority under Configuration > Certificates on the station, see the Managing Certificates article. The certificate must be issued for the address in the Central URL, and for the Secondary IP when one is set. A certificate for another address is refused even when its issuer is trusted. Allow Untrusted Certificates skips the check and is meant for a self-signed certificate on a closed network.

Refusals of the central system are shown by Test Connection, written to the System Log of the station by the forwarder, and shown in the Last Error column of the Edge Node on the central system.

MessageCause
Unknown node Site1. Add it on central under Edge Nodes.No Edge Node with the Node Name of the station exists on the central system.
Central refused the token for node Site1.The Token on the station does not belong to this Edge Node, for example after Regenerate Token.
Edge Node Site1 is disabled on central.Enable is off on the Edge Node.
Node Name is empty or invalid. Set it under Parameters > Node on the edge.The Node Name of the station is empty or contains other characters than letters, digits and underscore.
Central is a standby node.The answering central node is the standby node of a redundant pair. The station tries the other node.
The certificate of central was refused: ...The certificate of the central system is not trusted, not issued for the address used, expired or revoked. The message names the reason.

Redundant Stations and Central Systems

A redundant station forwards from its primary node only. The standby node shows the state Standby and follows the forwarded positions of the primary node, so after a failover the new primary continues where the old one stopped, with the same Node Name and token. Both nodes appear on the central system as one Edge Node. See the Redundancy article.

On a redundant central system, only the primary node accepts batches; the standby node answers that it is a standby. Enter the address of one node as Central URL and the IP address of the other node as Secondary IP. The station sends to the node that answered as primary last, and moves to the other node when the request fails or the node answers as standby. The System Log of the station then shows Central primary is now .... The standby node of the central system receives the stored rows through the normal historian replication of the pair.

After a failover of the central system, rows that the old primary had confirmed but not yet copied to its standby are missing on the new primary. The station does not send them again. In normal operation this replication lag is a few seconds.

Live Values and History on the Central System

Central Historian forwards history. Live values of a station reach the central system through MQTT, for example an MQTT Publisher on the station and an MQTT client device on the central system, see the MQTT Publishers article. For a trend on the central system to show live values and forwarded history as one pen, name the central variable as the forwarded history is named: the Node Name, a dot and the variable name of the station, for example Site1.PLC1.Pump1.Speed.

The central system does not log a variable whose name starts with the name of an Edge Node and a dot, whatever its Historian setting. The history of such a variable comes from the station, complete after a link interruption, and a second series from the live values would mix two series under one name. This allows one UDT definition with Historian on to serve the station and the central system. Create the Edge Node before the station starts publishing live values, otherwise the central system logs those values until the Edge Node exists.

As an alternative for the samples, an MQTT Publisher with Publish History can send the historian samples of the station over MQTT. Then switch Forward Data off on the Data Forwarder and keep it for alarms, events, audit trail and signatures. With both on, a sample can be stored twice.

Relation to Fleet Deployment

Central Historian and Fleet Deployment use the same Edge Node and the same link under Parameters > Node. A linked station checks in with the central system about once a minute over this link, with or without a Data Forwarder, and the central system deploys projects to it by its Node Name. The Edge group of the configuration menu also holds Edge Projects and Site Parameters for this purpose. See the Fleet Deployment article.

A deploy keeps the Node Name and the link of the station. A Data Forwarder in the deployed project continues from the forwarded positions of the station, so the central system does not receive the history again.

Renaming a Station

The Node Name is part of every name the central system stores. When a station is renamed, change the Name of its Edge Node on the central system and the Node Name on the station together. New records are stored under the new name; records already stored keep the old name.

Config API and MCP

Edge Nodes and the link of a station can also be configured without the GUI, through the Config API or the MCP configuration tools. Over MCP, Edge Nodes is the configuration entity EdgeNodes and requires Administrator rights.

WhereInterfaceDescription
Central systemGET /API/Config/EdgeNodesLists the Edge Nodes with their settings and the read-only fields TokenIssued, LastReceived, LastError, RowsReceived and Installation.
Central systemPOST /API/Config/EdgeNodesCreates Edge Nodes (Name, Enable, Description). The generated token is answered once, in results[].token.
Central systemPUT /API/Config/EdgeNodesChanges Edge Nodes by Id. RegenerateToken true issues a new token, answered once; the previous token stops at once.
Central systemDELETE /API/Config/EdgeNodesDeletes Edge Nodes. Their tokens stop at once; stored history is kept.
StationPOST /API/Config/ParametersSets NodeName, CentralUrl, CentralSecondaryIp, CentralToken and CentralAllowUntrustedCertificates.
StationData Forwarders entityA Data Forwarder with Connection EnvisionCentral sends to the central system.
Something missing or wrong in this article? Contact us