Replay
Important: This page is the documentation of the new Web Replay feature introduced in v10. Click here to see the Desktop Replay Documentation
Introduction
Web Replay allows the user to go back in the past and replay the data (item changes - see definition below). The experience is the same as using the normal web client (Live data) but the user can:
- Pause at any time.
- Resume at any time.
- Seek to any position. By default, 48 hours of data are recorded (This is configurable).
- And access other functionalities like fast forward etc…
Web Replay is composed of two main entities:
- A service called Sym3 Replay Service (SRS): this service is running on a server (24/7). It is reading the data recorded by Sym3 Operator Service. The recorded data is called ‘item state changes’ (see definition below).
- A Web Replay Client: part of Sym3 Web, it allows the user to replay historical item changes.
Item State Change Definition
A Sym3 project is composed of equipment (Basic Shape, Conveyor, Chute etc…). Each equipment is composed of properties (standard properties and user defined properties). When the properties of an equipment change, this information is sent through the TCP port (default of 20000) and WebSocket port to update the clients (PC or Web clients). This change in the property’s value is an Item State Change.
The Sym3 Replay Service records these Item State Changes, along with the time that they occurred.
Important: Sym3 Replay Service does NOT record changes in the values of tags or Device IOs.
Architecture
A simplified architecture diagram:
- Sym3 Operator Server: records the item state changes and saves them to a disk (local or network).
- Sym3 Replay Server: let the web application play these recordings and to control that playback.
The Web Client and Replay Client are using the same technology, the difference is:
- Web Client: connects directly to Sym3 Operator Server and displays Live values.
- Web Replay Client: connects to the Sym3 Replay Server and displays Historical values (it can display Almost-Live Values).
The Web Replay Client provides a control panel to control the player:
- Pause the player.
- Resume the player (after a pause).
- Seek: to change the current playback time.
- Displays the current playback time.
WebSockets
While the diagram above displays only one Replay Web Client, multiple clients can be open. Each of them playing at a different time. The number of concurrent players is defined by your license. For example, if your license allows a maximum of 4 web replay clients, then a maximum of 4 players will be created for 4 different web pages (4 different users).
While the existing web client (displaying live values) will broadcast the same data to all connected clients, this can’t be done for Replay. Because each player can play at a different time, each player has its own instance on the server and each player has its own WebSocket. The starting port is 25500 (this can be configured). For example, with a license of 4 players:
- The first web replay client will use port 25500.
- The second web replay client will use port 25501.
- The third web replay client will use port 25502.
- The fourth web replay client will use port 25503.
- The fifth web replay client won’t be able to connect because the maximum number of concurrent players have been reached. It will have to wait for another web replay client to disconnect to take the released player slot.
Hence it is important to configure the firewall on the server side to allow a range of port. The range has to be
StartingPort - StartingPort+MaxClientLicense
. Example:25500-25503
for 4 players.
Installation
Sym3 Replay Service (SRS) is included in the Sym3 Operator Installer and is installed with the Server feature.
It is possible to install SRS with the Operator Server and the Alarm Server but also possible to install it on its own server.
Note: the “Sym3 Replay App” is the desktop replay application from v9 and is disabled by default in the installer. It is still possible to install it.
Configuration
There are two ways to configure this service:
- Using the web application (recommended).
- Manual configuration directly on the server side (not recommended, but documented).
Configuration with the web application
Please refer to this page for more information.
Manual Configuration
The configuration file on the server is located here:
C:\ProgramData\Sym3\Sym3 Operator\Sym3ReplayServer.config.xml
The web application reads and writes to this file.
It is XML and looks something like this (this is an example and may not be the latest version):
<?xml version="1.0"?>
<configuration>
<!-- Websocket Settings -->
<websocket enabled="True" starting_port="25500" />
<!-- Record Settings -->
<recorder enabled="True" host="127.0.0.1:20000" max_recording_minutes="2880" />
<recorder_path>E:\\Replay\\Recording</recorder_path>
<!-- REST API Settings -->
<rest_api port="25000" />
</configuration>
WebSocket Settings:
Properties | Type | Description | Default Value |
---|---|---|---|
<websocket> , attribute enabled |
Boolean | To enable/disable the websocket. | True |
<websocket> , attribute starting_port |
Number | The first websocket port to be open. | 25500 |
Recorder Settings:
Properties | Type | Description | Default Value |
---|---|---|---|
<recorder> , attribute enabled |
Boolean | To enable/disable the recorder. Please note: this attribute is not directly used by Replay service but it used by Sym3 Operator Service to know if it needs to record the data or not. |
True |
<recorder> , attribute host |
String | The IP address or host name of Sym3 Operator Server to record from. | 127.0.0.1 |
<recorder> , attribute max_recording_minutes |
Number | Set the maximum number of minutes to record. A recording is a looping cycle. Data older than this time will be automatically removed. The unit is in minutes. | 2880 |
<recorder_path> |
String | Where the data will be saved. It is not recommended (but possible) to save this data on the C: drive. Please note that if the folder doesn’t exist, the recorder will not work and will be automatically disabled. |
“” |
REST API:
The Web Replay Client uses this API to connect and control SRS. Generally you can use the default values and change this only if you have a port conflict.
Properties | Type | Description | Default Value |
---|---|---|---|
<rest_api> , attribute port |
Number | The port used by the Rest API. | 25000 |
Recordings
This is how Sym3 Operator Server (S3OS) is recording the data:
- When S3OS starts, it will get the
recorder_path
(see configuration above) to know where to save the data. - If Empty, S3OS will create a folder called
recording.0
. - Every Sym3 project (.s3o) has a unique identifier (part the project itself).
- If a different project is published (so different Id), S3OS will detect it and create a new recording
recording.1
. - For each new project, a new recording
recording.xxx
will then be created.
IMPORTANT: Sym3 does NOT delete old recordings. This is the user responsibility to decide what to do with old recordings (delete, keep, archive etc…)
When multiple recordings are present in the recording folder, Sym3 Replay Server will play the latest recording (the creation date of the recording folder).
Troubleshoot
The log files are located here:
C:\ProgramData\Sym3\Sym3 Operator\Logs\Replay
The Main.log
is the first log to look at for any issue with the service.
If the service doesn’t start
Here are some common issues:
Issue | Resolution |
---|---|
Error “Sym3 Replay Server is not licensed” | Your license doesn’t give you the right to use this service. Please contact Sym3 support. |
Error “The recorder is disabled in the configuration. Cannot start the service.” | Please enable the recorder (please use the web application to configure the service). |
Error “Path ‘xxxxx’ does not exist. Recorder cannot record.” | The location where to save the data doesn’t exist. Please use an existing folder. The service won’t create the folder. |
Other errors
Issue | Resolution |
---|---|
“Error when reading configuration file: …” | The XML configuration is missing or incorrect, please use the web application to configure the service correctly. |