Skip to content
Ohmstead
Download

Tutorial: wiring software together

Use Ohmstead to draw how services, APIs and workflows connect: services as components, endpoints as terminals, protocols as signal types.

Ohmstead has no idea whether a wire is copper. A project is still two lists: components, each linked to a Codex part with named terminals, and wires that join one terminal to another and say what they carry. That is also how software systems connect. A service exposes endpoints, other services call them, and every link speaks a protocol. Model a system that way and Ohmstead lays it out, routes it, catches mismatches and prints an integration drawing with an interface schedule, just as it does for a control system.

This tutorial builds a small IoT data pipeline from scratch:

  • Field: two Modbus temperature/humidity sensors B1, B2 on an RS-485 bus, read by an edge gateway GW1.
  • Messaging: the gateway publishes readings to an MQTT broker MQ1.
  • Processing: a Node-RED flow NR1 subscribes to the readings, writes them to the database and raises alerts.
  • Storage & Dashboards: InfluxDB DB1 stores the data, and Grafana GF1 queries it.
  • Notifications: Node-RED and Grafana both post alerts to a Slack webhook SL1.

It mixes a physical bus with software links on purpose: most real systems have both, and Ohmstead draws them on one sheet.

In a control project In a software project
Component (K1, PSU1) A service, app, device or workflow step (MQ1, NR1)
Codex part The kind of service: "MQTT broker", "Time-series database"
Terminal An endpoint, port, topic, queue or API route
Wire One integration: a call, a subscription, a webhook
Signal type The protocol or payload: MQTT, HTTP (REST), Webhook
Connector + cable A group of endpoints that travel together, such as a set of MQTT topics
Subsystem A tier or domain: edge, messaging, storage
Bundle Every link between two tiers, drawn on screen as one line with a tag
Wire schedule The interface register: every link, its protocol and its notes

One convention keeps the drawing readable: From is the side that starts the conversation. A client calling an API goes From client To server. A publisher goes From publisher To broker. A subscriber pulling from a broker is drawn From broker To subscriber, in the direction the data flows.

Signal types set what a wire carries and the color it draws in. The built-in set is electrical, so add three for software. Open any signal-type dropdown and choose New signal type… (or add them in the Codex):

Name Category Color Dashed
MQTT Comms Violet Yes
HTTP (REST) Comms Brass Yes
Webhook Comms Magenta Yes

Set the category to Comms on all three. Ohmstead lets a terminal take several comms wires without calling it a fan-out, the same way it treats a daisy-chained bus. That matches software: one webhook URL can receive posts from any number of senders, and no one wants a terminal strip between Grafana and Slack. The RS-485 bus between the sensors uses the built-in Serial (RS-485) type.

Parts are the reusable kinds of thing in your system. Add each of these in the Codex with manufacturer Generic and category Device (the sensors use Sensor). The part number can be the product and major version, such as MOSQUITTO-2.

Part Terminals (connector · pin, signal)
Modbus temp/humidity sensor A, B · Serial (RS-485)
Edge gateway (Modbus → MQTT) RS485_A, RS485_B · Serial (RS-485); X1 male, keying MQTT: pins temp, humidity, status · MQTT
MQTT broker X1 female, keying MQTT: temp, humidity, status · MQTT; X2 male, keying MQTT: the same three pins
Node-RED flow X1 female, keying MQTT: temp, humidity, status · MQTT; INFLUX · HTTP (REST); ALERT · Webhook
Time-series database WRITE, QUERY · HTTP (REST)
Dashboard DATASOURCE · HTTP (REST); ALERT · Webhook
Slack incoming webhook IN · Webhook

The MQTT topics are pins on a connector because they travel together. Publishers have male connectors and the broker's inbound side is female. That is just a convention, but it lets Ohmstead's mating check catch a publisher wired straight into another publisher.

  1. Create a project called IoT Sensor Pipeline from Projects.
  2. On the Groups tab, add five subsystems, all flowing left → right: Field, Messaging, Processing, Storage & Dashboards, Notifications. Left to right is the direction the data travels.

From the Codex panel, add each part under its tag and put it in its subsystem:

Tag Part Subsystem
B1, B2 Modbus temp/humidity sensor Field
GW1 Edge gateway Field
MQ1 MQTT broker Messaging
NR1 Node-RED flow Processing
DB1 Time-series database Storage & Dashboards
GF1 Dashboard Storage & Dashboards
SL1 Slack incoming webhook Notifications

On the Connections tab, one row per link. The signal fills in from the From terminal. Use the Note column for what a reader needs to know about the link: the route, the query or the trigger.

From To Signal Note
B2:A B1:A Serial (RS-485) Modbus addr 2
B2:B B1:B Serial (RS-485)
B1:A GW1:RS485_A Serial (RS-485) Modbus addr 1, 9600 8N1
B1:B GW1:RS485_B Serial (RS-485)
NR1:INFLUX DB1:WRITE HTTP (REST) POST /api/v2/write, bucket sensors
GF1:DATASOURCE DB1:QUERY HTTP (REST) Flux query, 30 s refresh
NR1:ALERT SL1:IN Webhook temp > 30 °C for 5 min
GF1:ALERT SL1:IN Webhook Grafana alert rule "Sensor offline"

The sensors are daisy-chained, so B1:A carries two wires. Both are comms, so it isn't flagged. The same goes for SL1:IN with its two senders.

Typing the Grafana alert row into the wiring schedule
Typing GF1:ALERT → SL1:IN. The signal fills in as Webhook from Grafana's terminal, and the magenta wire routes on the canvas.

Topics travel as a group, so draw them as cables. Choose Add cable above the wiring schedule:

  • W1: from GW1:X1 to MQ1:X1, spec mqtt://mq1:1883 · QoS 1 · site/line1/#
  • W2: from MQ1:X2 to NR1:X1, spec subscribe site/line1/#

The pins share names on both sides, so they map 1:1 (temp → temp). Each cable draws as one line labelled with its spec. The wire schedule and the PDF still list every topic on its own row. When a new topic shows up, add a pin to each connector and open the cable's pin map.

W1's pin map: three MQTT topics
W1's pin map: the gateway's three topics land 1:1 on the broker, each one an MQTT conductor. On the canvas the cable draws as one violet line labelled with its spec.

Ohmstead's checks were written for copper, but they mean something here too:

  • Signal clash: a net that mixes signal types. In software terms, something speaking HTTP is wired to something expecting MQTT. Fix the wire or the part. Don't just pick Use for all.
  • Mating check: a cable whose ends have the same gender or different keying. Here it means two publishers wired together, or an MQTT cable plugged into a connector that isn't MQTT.
  • Missing terminal: a wire to an endpoint the part doesn't have. Add it to the part in the Codex so every project that uses the part gets it too.

The finished project should have no warnings.

Collapse the five subsystems for a one-line system overview: Field → Messaging → Processing → Storage & Dashboards, with Notifications off the processing and dashboard tiers. Double-click any subsystem to work inside it. Clean up (⌘U / Ctrl+U) tidies a view after you move things.

The five subsystems collapsed into a system overview
The finished pipeline with every subsystem collapsed: MQTT cables (violet) run Field → Messaging → Processing, HTTP (brass) runs to Storage & Dashboards, and webhooks (magenta) run to Notifications.

On the Sheet tab, fill in the title block, then export the PDF. You get an integration drawing per page and a wire schedule that works as an interface register: every link, its protocol, both endpoints and its note. Hand it to whoever runs the system, or put it in a design review.

A workflow is a system whose components are steps and whose wires are handoffs. Take a purchase approval:

  • Components: REQ1 request form, APR1 manager approval, FIN1 finance review, ERP1 ERP, MAIL1 notification.
  • Signal types for what changes hands: Purchase request, Approval, PO, Notification.
  • Wires: REQ1:SUBMIT → APR1:IN (Purchase request), APR1:APPROVED → FIN1:IN (Approval), APR1:REJECTED → MAIL1:IN (Notification), FIN1:RELEASE → ERP1:CREATE_PO (PO).
  • Use the note for the rule on each handoff ("over $5,000 only"), and subsystems for departments or swimlanes.

Signal clashes now catch a handoff that passes the wrong document, and the wiring schedule becomes a list of every handoff in the process.

  • Ohmstead documents a system. It doesn't run, deploy or monitor it.
  • Codex categories are electrical. Use Device for services and steps, and the description for what the part really is.
  • Software parts are ordinary Codex parts. On Pro and Student they stay private until you publish them, and you can reuse them in every project.