Docs
/
Devices
/

Device Introduction

Devices

A device in Koios represents a connection to an external data source — a PLC, an OPC-UA server, a sensor gateway, a database, or an API. Devices handle the communication layer: each device maintains a persistent connection to its data source and scans its tags on a configurable cycle.

What Devices Do

Each device maintains a persistent connection to its data source and performs two core operations on a configurable scan cycle:

  • Read — collect current values from the device's tags (inputs)
  • Write — push computed values back to the device's tags (outputs)

The scan cycle repeats at the device's scan rate (configurable from 0.1 to 3,600 seconds). Between scans, Koios monitors the connection health and automatically retries on transient failures.

Supported Protocols

Koios supports several industrial and data protocols — OPC-UA, Modbus TCP, EtherNet/IP, SOAP, REST, and Microsoft SQL. Each protocol defines how Koios communicates with the device and what configuration is required.

See Protocols for a full breakdown of each protocol, when to use it, and links to protocol-specific configuration guides.

Device Lifecycle

A device moves through a simple lifecycle from creation to active data collection:

  1. Create — choose a protocol, provide connection details, and set a scan rate
  2. Enable — activate the device so the data collector begins scanning
  3. Running — the device connects, reads/writes tags on each scan cycle, and streams live data
  4. Stopped / Failed — a device stops when disabled, or enters a failed state if it encounters persistent connection errors

Device Status

Every device has a real-time status that reflects its current health:

StatusMeaning
RunningActively scanning — connection is healthy, tags are being read/written
StoppedNot scanning — the device is disabled or the service has not started it
FailedAn error has occurred — the device attempted to connect or scan and encountered a problem

When a device fails, Koios records an error code, error message, and error detail to help you diagnose the issue. The device will automatically retry up to three times before entering a persistent failed state.

Tags

Device tags are the individual data points on a device — a temperature sensor reading, a motor speed setpoint, a database column value. Each device tag belongs to exactly one device and inherits its protocol.

Tags have a usage that determines how Koios interacts with them:

  • Input tags are read from the device on each scan
  • Output tags are written to the device (e.g. AI model predictions sent back to a PLC)

For a deeper look at tags, see the Tags section.

Device Sets

For scenarios requiring redundancy, devices can be grouped into a device set. A device set contains multiple devices of the same protocol, ordered by priority. If the active device fails, Koios automatically switches to the next device in the set.

Tags marked as redundant read from whichever device is currently active in the set, providing seamless failover without manual intervention.

Key Concepts

ConceptDescription
Scan rateHow often Koios polls the device for new data (seconds)
HeartbeatA toggling counter that external systems can monitor to verify Koios is running
On-demand scanningAllows AI models to trigger an immediate device read outside the normal scan cycle. See On-Demand Scanning for device settings and On-Demand Inference for the full picture
Log levelPer-device log verbosity (Debug, Info, Warning, Error) for troubleshooting

What's Next