Skip to main content
Version: 1.0.0

Data Sources

TwinEdge connects to industrial equipment through various protocols and data sources. This guide covers how to configure and manage your data connections.

Supported Protocols

OPC UA

OPC UA (Unified Architecture) is the most common protocol for industrial communication.

Connection Parameters:

ParameterDescriptionExample
Endpoint URLOPC UA server addressopc.tcp://192.168.1.100:4840
Security ModeConnection securityNone, Sign, SignAndEncrypt
Security PolicyEncryption policyBasic256Sha256, Aes128_Sha256_RsaOaep
AuthenticationUser authenticationAnonymous, Username/Password, Certificate

Example Configuration:

name: Plant PLC
type: opcua
endpoint: opc.tcp://192.168.1.100:4840
security_mode: SignAndEncrypt
security_policy: Basic256Sha256
authentication:
type: username_password
username: opcuser
password: ${OPC_PASSWORD}
Certificate Setup

For secure connections, upload your client certificate in SettingsCertificates. TwinEdge will automatically handle certificate exchange with the OPC UA server.

Modbus TCP

Modbus TCP is widely used for PLCs and RTUs.

Connection Parameters:

ParameterDescriptionExample
HostDevice IP address192.168.1.50
PortTCP port (default 502)502
Unit IDModbus slave address1
Polling IntervalData refresh rate1000ms

Register Types:

TypeCodeAddress RangeAccess
Coils0x00001-09999Read/Write
Discrete Inputs1x10001-19999Read Only
Input Registers3x30001-39999Read Only
Holding Registers4x40001-49999Read/Write

MQTT

Connect to MQTT brokers for IoT sensor data.

Connection Parameters:

ParameterDescriptionExample
Broker URLMQTT broker addressmqtts://broker.example.com:8883
Client IDUnique client identifiertwinedge-prod-001
UsernameMQTT usernametwinedge
QoSQuality of Service0, 1, or 2

Topic Patterns:

# Subscribe to all sensors
sensors/+/temperature

# Subscribe to specific device
devices/pump-001/#

Adding a Data Source

  1. Navigate to Data Sources in the sidebar
  2. Click Add Data Source
  3. Select the protocol type
  4. Enter connection parameters
  5. Click Test Connection
  6. If successful, click Save

Browsing Tags

After connecting, browse available tags:

  1. Click Browse Tags on your data source
  2. Navigate the namespace tree (OPC UA) or register map (Modbus)
  3. Select tags to monitor
  4. Click Add Selected

Tag Configuration

For each tag, you can configure:

SettingDescription
Display NameHuman-readable name
UnitEngineering unit (°C, bar, m/s)
Polling RateHow often to read (ms)
ScalingLinear scaling (y = mx + b)
Dead BandMinimum change to report
Data TypeOverride detected type

Data Quality

TwinEdge tracks data quality using OPC UA status codes:

QualityIconDescription
Good🟢Valid data
Uncertain🟡Data may be stale or inaccurate
Bad🔴Communication error or invalid

High Availability

For critical data sources, configure redundancy:

  1. Click Configure Redundancy on your data source
  2. Add backup server addresses
  3. Set failover timeout
  4. TwinEdge will automatically switch on failure

Data Source Groups

Organize data sources into groups:

  1. Go to Data SourcesGroups
  2. Click Create Group
  3. Drag data sources into groups
  4. Use groups for access control and dashboard filtering

Troubleshooting

Connection Failed

  • Verify network connectivity (ping the device)
  • Check firewall rules for required ports
  • Confirm credentials are correct
  • Review security certificates

No Data / Timeout

  • Increase polling interval
  • Check device is not overloaded
  • Verify tag addresses are correct
  • Monitor network latency

Stale Data

  • Check device clock synchronization
  • Verify polling is enabled
  • Review dead band settings

See Troubleshooting Guide for more solutions.