Skip to content

Learned addresses, approved by a person

The physical worldMQTTDashboardaddressingmachine-registrationAddressBookmachineAddressrenderMosquittoAcl

A station learns its machine from first contact; any later disagreement becomes a registration row a person approves or rejects.

The situation

Machines get commissioned, moved between stations and replaced. Editing the line file each time is slow, and silently accepting whatever claims a station is unsafe.

The recipe

/etc/line.json
{
"siteId": "site-1",
"lineId": "line-1",
"addressing": "learned",
"machines": [
{ "machineId": "cut-01", "process": "cut" },
{ "machineId": "bond-01", "process": "bond", "address": "7f3c9a2e-5b1d-4e8a-9c0f-2d6b8e1a4c73" }
]
}

Every message carries the machine’s address (its topic level, tied to its certificate) and the station it says it is. A station with no address is bound to the first address that claims it, and its waiting work goes out. A station that declares address keeps it, and claims on it are ignored.

A claim on a station already bound to another address, or by an address bound to another station, raises one machine-registration row on the operator role. Resolve it to settle the claim:

resolver payload
{ "decision": "approve" }

The guarantee

Until a person approves, the claimant’s messages have no effect and get no receipt. Approval binds only a claim the gateway has heard from that address since it took the line; any other approval is logged and changes nothing. Bindings live on each station’s bot account as the user property machineAddress, and a replica taking the line reads them back before it sends anything. See Machines.