Learned addresses, approved by a person
addressingmachine-registrationAddressBookmachineAddressrenderMosquittoAclA 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
{ "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:
{ "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.
Related patterns
The physical world
Broken messages become rows
Under a strict codec a message that breaks the contract is confirmed, never acted on, and shown to an operator as a row.
The physical world
Offline, quiet and alarm rows
A stopping alarm, a dropped machine and a silent one each become a row for the line operator, resolved when the machine recovers.
Resolving from anywhere
Intent on create, outcome on resolve
The row is created with the facets that route it and resolved with the facets that describe what happened. One row answers both questions.
