Skip to content

Quick start — demo plant

This walks through the demo plant: a simulated factory (rw-sim) that drives a CNC cell over Modbus and OPC UA plus three plain-MQTT “retrofit sensor” emulators, so you can see signals flow end to end without any real hardware.

  • Docker with Compose v2 (docker compose version)
  • A clone of this repository
  • uv to run the rw command-line tool

From the repository root:

Terminal window
docker compose --profile demo up -d --wait rw-broker rw-historian rw-sim rw-edge rw-ingest

This starts the message broker, the historian database, the simulated plant, the edge reader (Modbus + OPC UA + MQTT), and the ingest service that writes validated samples into the historian. --wait blocks until every container reports healthy.

2. Migrate the database and load the demo site

Section titled “2. Migrate the database and load the demo site”
Terminal window
uv run rw db migrate --dsn "$RW_DSN"
uv run rw site load deploy/demo/site.yaml --dsn "$RW_DSN"

rw db migrate applies the schema and the row-level-security policy. rw site load upserts the demo site’s areas, lines, cells, assets and signal registry — this is what lets the operator app show named assets instead of raw topic strings. Both commands are safe to re-run.

Terminal window
docker compose --profile demo up -d --wait rw-app

Open http://localhost:4441 (or 127.0.0.1:4441). The app binds to 127.0.0.1 only by default — it is not exposed to the network unless you change RW_APP_BIND.

4. Optional: camera feed and local inference

Section titled “4. Optional: camera feed and local inference”

A synthetic camera feed and the local inference server are separate profile services, each with their own setup step documented at the top of the relevant compose fragment (deploy/compose/vision.yaml, deploy/compose/infer.yaml). They are not required to see the core sensor/detector flow above.

Terminal window
docker compose down

Three different OT protocols (Modbus, OPC UA, MQTT) landed in one historian under one signal registry, through the same read-only edge path a real site uses. The only thing that changes for a real plant is what rw-edge’s config points at — see Adapters and Install.