Feature

Connections & Protocol Behavior

Expose MQTT, Modbus, OPC UA, BACnet, and KNX communication as part of the running twin instead of a separate static mock.

From model state to protocol traffic

A running SPX model holds the device state and behavior. Its protocol adapter maps that state to protocol messages, addresses or topics, so your client can interact with a virtual device and observe its response.

Alongside the device protocols, SPX Server provides an HTTP API for controlling the simulation itself. The SPX UI, the spx-python client and your own HTTP tools can inspect and control instances through this API.

Connection architecture

Two ways to work with the same simulation

Simulation control

SPX UI · Python client · HTTP tools

Create instances, change values and inspect state.

HTTP API

Docker · SPX server

HTTP API ↔ running model

The SPX Server container controls the live simulation.

Device communication

Your client or system

Test an app, controller or protocol client.

Device protocol

Same SPX Server container

Protocol adapter ↔ running model

Modbus, OPC UA and BACnet clients can connect directly to the adapter.

Example · MQTT via a broker

MQTT client

Topics

MQTT broker

Separate Docker service or external

Topics

MQTT adapter

Inside SPX Server

The broker is a separate service; both the MQTT client and the SPX adapter connect to it. Other protocols may use their own server or gateway.

Both channels reach the same model in SPX Server. A separate broker or gateway is used only when the protocol requires one; Setup controls service selection and port exposure.

What runs where

  • SPX server: runs your models and their built-in protocol adapters. A Modbus, OPC UA or BACnet client connects to the corresponding reachable endpoint.
  • Simulation control: the SPX API v3 and Python client let you inspect state, change attributes and invoke available methods. API operations require your product key; use the address and published port configured for your environment.
  • Optional service containers: SPX Setup can include services such as a Mosquitto MQTT broker, Leshan LwM2M server or KNX gateway. MQTT devices and clients exchange messages through a broker.
  • Your environment: clients and other systems connect through published ports. You can also use your own reachable broker or gateway instead of a local service.

Configure connections during setup

Choose the protocols, models and supporting services in SPX Setup. During Network exposure, review how each offered service should be reached:

  • Local only: keep the default to restrict the service to the SPX host (127.0.0.1).
  • Local network: choose to expose the service, then select the host interface and private IPv4 address your client can reach. Review the published host port and any network or firewall rules.

Choose whether to start the stack after configuration. With AI Agent setup, describe the network access you need and review the proposed services, bind addresses and port mappings before approving the plan.

The model defines its protocol-specific mappings and settings. In SPX, open the instance’s Communication tab to inspect the active adapter and endpoint. Connect using the host address and published port reachable from your client; an adapter listening on 0.0.0.0 is not itself a client destination. Exact roles, ports and security settings depend on the protocol and model.

Common use cases

  • Validate client software before physical devices are available.
  • Test protocol communication alongside changing device behavior.
  • Reproduce integration issues with a controllable simulation.

Related protocol examples

Related quickstarts