Dkoi
A schema-first industrial IoT simulator — declarative device models exposed as REST, WebSocket, MQTT, webhooks, and contract exports from one core engine.
Problem
IoT integration testing usually means stubbing one protocol at a time. REST mocks do not speak MQTT; Modbus maps live in spreadsheets; scenario failures are manual. Teams test adapters in isolation and miss cross-surface drift.
dkoi defines devices, signals, controls, and failure scenarios once, then runs a virtual fleet through adapter-oriented outputs — OpenAPI, AsyncAPI, OPC UA node maps, Prometheus metrics, and more.
Simulator core
- YAML project schemas with devices, telemetry, units, alarms, and site/area/line placement
- Deterministic runtime settings — tick interval, seed, scale, and manual stepping
- Scenario timelines with set, ramp, spike, and dropout actions plus CI assertions
- Replay from captured JSONL and CSV traces
- Plugin registration for generators, transports, codecs, exporters, and storage backends
PROJECT_FILENAMES = ("dkoi.yaml", "dkoi.yml", "project.yaml", "project.yml")
def read_yaml_mapping(path: Path) -> dict[str, Any]:
with path.open() as f:
raw = yaml.safe_load(f) or {}
if not isinstance(raw, dict):
raise ValueError(f"'{path}' must contain a YAML mapping")
return raw