Docs · Safety and teams
Connection roles and production safety
OTDeck is an engineering and diagnostics tool, not a SCADA, HMI or safety system. It must not be used for process control. What it does to keep a live plant safe while you work on it:
Roles
Every connection has a role, chosen in the connection dialog under Role:
| Role | Meant for | What OTDeck does |
|---|---|---|
| Lab | test benches and simulators | no extra guard |
| Staging | shared test systems | an amber marker; writes allowed |
| Production | a live plant | a red frame around the window, starts read-only, every write asks for the connection name |
Red and amber are used only for these states, never for decoration, so they keep their meaning (ISA-101 style).
Read-only
The Read-only switch in the connection dialog makes the backend refuse every write on that connection: MQTT publish (also a repeat and the Sparkplug B edge node), Modbus coil and register writes, OPC UA node writes, method calls and alarm acknowledgements, BACnet present value writes, relinquishes, property writes (limits, Out_Of_Service, names, notification classes, Recipient_List) and alarm acknowledgements. A new production connection is created read-only and the switch cannot be turned off while creating it. To write, save it first, then edit it and turn Read-only off deliberately.
The refusal happens in OTDeck’s Go backend, which checks the stored connection, not only in the user interface.
Typed confirmation
On a production connection that is not read-only, every write and every MQTT publish opens a confirmation where you type the connection’s name. The backend checks the typed name against the stored profile, so a script in the window or a stray click cannot skip it.
What a write can do
- Modbus: functions 05 (one coil), 06 (one register), 15 (coils), 16 (registers). There is no bit write inside a holding register.
- OPC UA: scalar values of the node’s own data type. Arrays and structures are not written.
- OPC UA method calls: the method’s own arguments, built-in types and one-dimensional arrays of them (OPC UA guide). A method can do anything the server lets it do, so a call counts as a write.
- OPC UA alarms: Acknowledge and Confirm with a comment; also writes.
- BACnet: the Present_Value of one object at one priority (WriteProperty), or NULL at that priority (relinquish). Priorities 1–8 are refused by default: 1 and 2 are manual and automatic life safety, 3–8 are reserved for critical equipment control, and a value written there overrides every normal command until it is relinquished. The connection setting Allow priority 1–8 lifts the refusal for one device, deliberately; the backend refuses such a write otherwise, in the app and for agents alike. Writes are sent once (no retransmission): when the device does not answer, read the value to see whether it was applied (BACnet guide).
- BACnet alarms: AcknowledgeAlarm of one transition with the device’s own time stamp; also a write.
- BACnet properties other than Present_Value: only a fixed list (High_Limit, Low_Limit, Deadband, Limit_Enable, Event_Enable, Time_Delay, Time_Delay_Normal, Notify_Type, Out_Of_Service, COV_Increment, Object_Name, Description; a Notification Class’s Priority, Ack_Required and Recipient_List), each through the same guard as a present value write: the confirmation with the old and the new value read from the device just before, the typed name on production, the write log, a read-back after the write. Out_Of_Service = true disconnects the point from the field (its Present_Value no longer follows the sensor or drives the output) and the confirmation says so. A Recipient_List change that only adds or only removes entries goes as AddListElement / RemoveListElement; any other change replaces the whole list and is refused when the list on the device changed since the confirmation (the head-end’s change would otherwise be lost) (BACnet guide).
- MQTT repeat and the Sparkplug B edge node: the typed name is asked once when they start; they stop when the connection closes (MQTT tools).
- The point checkout’s command test (Point checkout) is one of these writes: the same guard, the typed name on production, the write log with old and new; putting the point back (the old value, or a BACnet relinquish at the test’s priority) is another write, guarded and logged the same way. One point at a time, never automatic, never for agents.
- Modbus, OPC UA and BACnet writes (present values and the other BACnet properties), method calls and acknowledgements need Pro, as does the edge node. MQTT publish, templates and repeat are free.
AI agents
otdeck-mcp reads on its own; its five write tools (publish,
write_registers, write_nodes, call_method, ack_alarm) only ask: every
one opens the approval window in OTDeck and nothing reaches a device until
you allow it there (AI agents (MCP)). write_nodes may ask for the BACnet
properties above with property, never for a Recipient_List; the window
shows the old and the new value and the same warnings as the editor. On production connections it is
slower on purpose: one Modbus request (at most 125 registers) or 25 OPC UA
nodes or BACnet objects per call, with at least 500 ms between device
reads (a BACnet trend-log or alarm read may still page through up to 200
ReadRange or 50 GetEventInformation requests within that one call). Every call is logged to
logs/otdeck.log in the app directory. A team policy can hide production
connections, or all team connections, from agents. For a sensitive plant, share only
lab or staging connections with agents: what an agent then sends to its AI
provider is up to that agent, not OTDeck.
Find devices
Find devices (the radar button in the top bar, Discover devices in
the sidebar) first runs only safe lookups: the built-in simulator, OPC UA
FindServers on localhost:4840 and on discovery servers you name, and an
mDNS query for _opcua-tcp._tcp, _mqtt._tcp and _secure-mqtt._tcp.
Scan subnet is separate and runs only when you press it. Scanning a
plant network can disturb fragile devices, so use it on lab or staging
networks. It opens a TCP connection to ports 502, 4840, 1883 and 8883 of
each address of one IPv4 range (a /24 or smaller) and closes it at once,
without sending protocol bytes, at most 8 at a time with a pause between
hosts; it never probes outside the range and can be cancelled. A device
added from the results starts with the Lab role. otdeck-mcp has no
discovery or scan tool: agents cannot scan networks.
Untrusted data
Everything a broker, PLC or server sends is treated as untrusted: MQTT packets above Settings → General → Max payload kept, KB close the connection before they are read, stored messages and histories are capped, Modbus, OPC UA and BACnet reads are bounded (object lists, segmented answers, alarm and trend-log pages included), strings are cleaned of control characters, and the decoders (Modbus types, OPC UA values, BACnet values, Sparkplug B, JSON) are fuzz-tested.
OPC UA certificates
A server certificate is trusted only after you accepted its thumbprint once
(kept in pki/trusted in the app directory). If a server’s certificate
changes, OTDeck asks again instead of connecting silently. OTDeck’s own
client certificate is created on first use in pki/own; servers that check
clients need it in their trusted list (Troubleshooting).
Shared projects (Team)
Connections from a team file are read-only in the app’s editor. The file’s
role and read-only switch apply; with the team policy productionReadOnly
every production team connection is read-only on every member’s computer. A
personal connection to the same device (a personal copy, or the address
typed by hand) gets at least the team connection’s role and read-only
switch, checked by the backend on every write, and the policy can keep AI
agents away from production or from all team connections
(OTDeck for teams).
Write log
Every write, method call, alarm acknowledgement and MQTT publish (a repeat and an edge node as one line for the start and one for the end), and every one the guard refuses, is appended to a local, hash-chained log (Settings → Write log, OTDeck for teams).