Skip to main content

IEC 104 Connector

What Is It?

The IEC 104 Connector makes your IoT sensor data available to industrial control systems (SCADA). It acts as a server that SCADA clients can connect to in order to read real-time process data — such as temperatures, voltages, or switch states — using the widely adopted IEC 60870-5-104 standard.

In short: the IEC 104 Connector is the outbound gateway that delivers your data to control rooms and monitoring systems.

How It Works

  1. The connector reads data points from the central data store.
  2. It listens for incoming connections from SCADA clients on a configurable TCP port.
  3. When a client connects, it can request all current data points or receive live updates as values change.
IoT Sensors → MQTT → Data Store → IEC 104 Connector → SCADA Client

The connector continuously monitors the data store for changes and pushes updates to all connected clients automatically.

Connection Details

SettingDefault
ProtocolTCP/IP
Port2404
Port Range2404–2420
ModeServer (clients connect to it)
Max ClientsUp to 100 simultaneous connections

The connector only operates as a server. It does not connect to other IEC 104 systems as a client.

IEC 104 Addressing

Every data point in the IEC 104 protocol is identified by two addresses:

AddressWhat It MeansRange
CASDUStation address — identifies a group or location0–65,535
IOAData point address — identifies a specific measurement0–16,777,215

The combination of CASDU and IOA must be unique across the system. Think of CASDU as the "building" and IOA as the "sensor" within that building.

Example:

  • CASDU 150, IOA 100 → Temperature in Transformer Room 1
  • CASDU 150, IOA 101 → Pump Status in Transformer Room 1
  • CASDU 200, IOA 100 → Temperature in Transformer Room 2

Supported Data Types

The connector supports the following IEC 104 data types:

Monitoring types (inbound data):

TypeNameUsed ForExamples
Type 1Single PointOn/off statesDoor open/closed, alarm active/inactive
Type 3Double PointTwo-bit statesBreaker open/closed/transit/invalid
Type 13Measured NormalizedNormalized measurementsProportional values, percentages
Type 30Single Point with TimestampOn/off states with timeSwitch state changes with exact time
Type 31Double Point with TimestampTwo-bit states with timeBreaker state changes with exact time
Type 32Step Position with TimestampTransformer tap positions-64 to 63
Type 36Float with TimestampMeasurementsTemperature, voltage, current, humidity

Command types (outbound control):

TypeNameUsed ForExamples
Type 45Single CommandOn/off commandstrue/false
Type 46Double CommandOpen/close/stop commands03 (not permitted, off, on, not permitted)
Type 47Regulating Step CommandStep up/down commands03 (not permitted, lower, higher, not permitted)
Type 50Set-point NormalizedAnalog set-point valuesFloating-point set-points

Recommendation: Use Type 36 for analog measurements and Type 30 for binary states. Both include a timestamp for traceability.

Configuration

The connector is configured in two ways:

  1. Management UI / API — The primary method. When you create an IEC 104 connector in the Management UI, the configuration (network settings, protocol parameters, linked mappings) is stored in the database and automatically pushed to the connector via the data store.
  2. Command-line / TOML file — For initial startup parameters (connector ID, data store connection, log level). A TOML configuration file can be generated with the config-gen subcommand.

Startup Parameters

These parameters are passed via command line or TOML file when starting the connector:

ParameterDescriptionRequiredDefault
--idUnique connector ID (from the Management UI)Yes
--log-levelLog verbosity (trace, debug, info, warning, error, critical, off)Noinfo
--configPath to a TOML configuration fileNo

Redis subcommand — Connection to the data store:

ParameterDescriptionDefault
--hostData store host (with optional port, e.g., datastore:6379)127.0.0.1
--portData store port (overrides port in --host)6379
--pwdData store password

Managed Settings (via Management UI)

The following settings are configured through the Management UI and pushed to the connector automatically. You do not need to set them manually.

Network Settings:

SettingDescriptionDefault
HostWhich network interface to listen on (0.0.0.0 = all)0.0.0.0
PortTCP port the server listens on2404
Max ConnectionsMaximum number of simultaneous client connections1

Protocol Timing Parameters:

SettingDescriptionDefault
T1Timeout for sent messages awaiting acknowledgment15 seconds
T2Timeout for sending an acknowledgment10 seconds
T3Idle timeout before a test message is sent20 seconds
KMaximum number of unacknowledged messages12
WNumber of received messages before an acknowledgment is sent8

In most cases, the default timing parameters do not need to be changed. Only adjust them if your SCADA system vendor recommends specific values.

Dynamic Configuration Updates

When you change a connector's settings or linked mappings in the Management UI, the backend pushes the updated configuration to the data store. The connector detects the change and automatically restarts its services with the new configuration — no manual restart required.

Configuration Error Handling

The connector includes robust error handling for configuration issues:

  • Invalid configuration — If the connector receives an invalid configuration from the data store, it logs a detailed error message and continues running with the previous valid configuration.
  • Partial failures — Network interruptions or malformed data are handled gracefully without crashing the connector.
  • Recovery — Once a valid configuration is published, the connector automatically picks it up and reconfigures itself.

Check the connector logs for specific error details when troubleshooting configuration issues.

Data Store Integration

The connector reads data points from the central data store. The backend publishes connector configuration and mapping data to the data store under:

connectors:{CONNECTOR_ID}:config     — connector settings (including stream configuration)
connectors:{CONNECTOR_ID}:mapping — linked mapping definitions

The connector's data streams (input, output, error) are configured via the Management UI and included in the published configuration. The input stream is used to receive data point updates from other connectors.

Process image data points are stored under:

process:image:casdu:{CASDU}:ioa:{IOA}

When a value changes in the data store, the connector automatically pushes the update to all connected SCADA clients.

Client Interaction

Initial Data Request

When a SCADA client connects and sends a "General Interrogation" request, the connector responds with all current data points. This gives the client a complete snapshot of the current system state.

Live Updates

After the initial data dump, the connector sends updates whenever new data is written to the data store. Each update is forwarded to all connected SCADA clients immediately.

Cause of Transmission (CoT)

The connector forwards the Cause of Transmission (CoT) from the original data point. For example, if a data point was written with CoT "spontaneous", that same CoT is sent to the SCADA client. This preserves the semantic meaning of each update through the entire data pipeline.

Connection Monitoring

The connector and connected clients exchange periodic test messages to verify the connection is still alive. If a client disconnects, its session is cleaned up automatically.

Tested Compatibility

The IEC 104 Connector has been tested with the following SCADA systems and devices:

  • Siemens RTU A8000 (ETI4)
  • Vivavis HIGHLEIT
  • PSIcontrol

Connector Health Reporting

The connector publishes its operational state to the central data store, enabling the Management UI to display real-time health information:

StateMeaning
StartingThe connector is initializing and loading configuration
RunningThe connector is connected and processing data normally
ErrorConfiguration loading failed or a critical error occurred
StoppedThe connector is shutting down gracefully

The connector also reports its software version at startup, which is visible in the Management UI.