Southbound · MQTT
A topic namespace you can read out loud.
Three levels: the station, the line, and the plant. Payloads are JSON, published on QoS 0 with no retain —
the historian is the memory, not the broker.
| Topic | When | Carries |
| {line}/{station}/status | on state change | state, cycle time, parts produced, fault code |
| {line}/{station}/measurements | per part | one value per characteristic, with nominal and limits |
| {line}/{station}/transaction | per event | operationStart / operationComplete / scrap / rework, with the serial (banknote: spoilage write-offs instead of scrap and rework — see below) |
| {line}/line/buffer | on change | marriage-buffer level, min, max, status |
| {line}/line/summary | every 2 s | output, OEE, FPY, bottleneck |
| mes/{line}/state | every 2 s | line running or stopped, per-station snapshot |
| mes/alerts | on event | breakdown, faultCleared, quality, maintenance, starving, blocked |
| mes/wip | every 2 s | work in progress per station: on board, in queue, queue capacity |
| mes/materials/status | every 2 s | warehouse racks, line stores, AGV missions, shipping |
| mes/operators/state | every 2 s | crews, shift, breaks, per-operator role and state |
Event-driven, with a heartbeat
State changes, measurements, transactions and alerts are published the moment they happen — nothing
is sampled. On top of that a summary tick runs every PUBLISH_INTERVAL_MS — 2 s on this plant (the
code default is 5 s) — so a consumer that connects late gets a complete picture without asking. The client
reconnects on its own every 5 s if the broker disappears.
Banknote works — a line that counts sheets, not parts
The banknote line uses the same station topics as every other line, but what moves is different:
a BNK- serial is the ticket of a counted load of 100 sheets, the unit of account is the
sheet (45 notes), and notes only exist from numbering (B060) onward. A load is never scrapped whole — each
operation writes off some sheets — so this line publishes no scrapPiece, no rework and no
qualityAlert. operationComplete is always PASS and carries the count instead.
| Topic | When | Carries |
| banknote/{station}/status | on state change | the usual status plus unitsProcessed and unitsSpoiled, in sheets |
| banknote/{station}/transaction | per event | operationComplete with unitsIn, units (good sheets out), spoiled, sampleInTolerance — plus notesMarked at B055, serialFrom / serialTo / notesNumbered at B060, notesCut / notesGood / replacements at B070. Write-offs are spoilage transactions: units, reason, cause (process, burst, fault or inspection), totalSpoiled |
| banknote/line/summary | every 2 s | in sheets: totalParts, totalScrap, unit:"sheet", sheetsPerLoad, loadsFinished, goodNotes, OEE, FPY, bottleneck |
| mes/banknote/state | every 2 s | the whole line in one message — see the payload below |
| banknote/line/reconciliation | about every 30 s, and at once on a plate, climate or shipment event | sheet ledger since boot: issued, good, spoiled (by station), in process, unaccounted; status BALANCED or VARIANCE (issued = good + spoiled + in process). Note ledger alongside: numbered = delivered + in process. Also carried as reconciliation in mes/banknote/state |
| banknote/line/climate | same slow cadence | hall temperature and humidity, set-point, allowed band, excursion in progress, waste factor, history[] |
| banknote/line/plates | same slow cadence | one intaglio plate per press (B050 back, B054 front): plate id, impressions, life, wear, status, and the change history[] |
| banknote/line/finishing | same slow cadence | last 12 packs and 6 containers, vault content, recent shipments |
| banknote/line/pack | per sealed pack | packId, notes (1,000), bundles, serialFrom, serialTo, replacements, loads[], containerId, sealedAt |
| banknote/line/container | per sealed container | containerId, packs[] (10), notes, serial range, replacements, sealNo, sealedAt, vault{} |
| banknote/line/shipment | per cash-in-transit departure (20 containers) | shipmentId, containers, notes, first and last container, serial range, departedAt |
# mes/banknote/state — the blocks of one message (quantities in sheets unless named otherwise)
state, active, unit:"sheet", sheetsPerLoad:100, notesPerSheet:45
loads { issued, finished, inProcess, onStations, inQueues }
sheets { issued, good, spoiled, inProcess, yieldPct, perHour }
notes { numbered, cut, good, rejected, replacements, delivered, packed, openPack, yieldPct }
reconciliation sheet ledger + noteLedger, each with its own BALANCED / VARIANCE status
stations[] { id, name, state, partsProduced (loads), cycleTime, sheetsProcessed, sheetsSpoiled, sheetYieldPct }
+ plate { plateId, wearPct, status } on B050 / B054, notesMarked on B055
climate { tempC, rh, status, setpoint, band, excursion, wasteFactor, registerBiasUm, excursions }
plates[] { station, side, plateId, impressions, life, wearPct, remaining, status, changeDue, wasteFactor }
drying { station:"B052", capacity:8, occupancy, dwellS:300, slots[{ serial, sheets, progressPct, remainingS }] }
finishing { packs { sealed, open, last[2] }, containers { sealed, last[1] }, vault, shipments }
Alerts specific to the works arrive on mes/alerts like any other:
spoilage (five sheets or more in one write-off, or any write-off caused by a fault),
plateWear (85 % of plate life), plateChange and plateChangeComplete,
climateExcursion and climateRecovered, and noteShipment.
Banknote works — secure supply, the chain of custody
Upstream of B010 the works publishes its accountable materials the way an auditor reads them. Three
secure stores — strongroom (security paper: sealed pallets of 20 counted reams of 500 sheets),
securityCage (OVI ink, hologram foil, numbering ink) and generalStore (offset ink, intaglio
ink, varnish, banding tape) — are replenished by secure deliveries counted in under dual control, and feed the
presses through controlled issues sealed on AGV-D. Every spoiled sheet ends in a locked waste bin and on a
witnessed destruction certificate. Quantities are in real units: sheets, grams, metres, bands.
| Topic | When | Carries |
mes/banknote/state → supply | every 2 s | compact block for tiles and badges: status (OK / WATCH / ALERT), substrate ledger, cover in hours per material, lowestCover, coverLow[], nextDelivery, openDeliveries, deliveries[], heldReceipts, waitingAtStore, usage, wasteBin |
| banknote/line/supply | about every 30 s, and at once on every delivery, receipt, variance, destruction, hold or demo-hook event | the full snapshot: line, since, status, config, stores[], materials[], substrate, deliveries[], issuesInTransit[], usage[], wasteBin, destruction, counts, recent, hooks, timestamp |
| banknote/line/delivery | on order, on arrival at the dock, on a delay | one secure delivery (SDL-) with its event (ordered / arrived / delayed), advice note, state (INBOUND → COUNTING → closed, or → HELD → closed), eta, etaMin, delayMin |
| banknote/line/receipt | at count-in; a held receipt is published again when booked | one goods receipt (GRN-): advised, counted, variance, countedBy[2], status (RECEIVED / HELD / RECEIVED_WITH_VARIANCE), resolution |
| banknote/line/issue | once per issue, when scanned in at the press | the complete controlled issue (ISS-): who requested, the two who released, AGV trip, tamper seal (TS-), who received, the container or ream range |
| banknote/line/destruction | once per certificate | one destruction certificate (DC-): sheets, notesEquivalent, byStation[], byCause, witnesses[2], trigger (quantity / age) |
| banknote/{station}/materialSetup | when a container is mounted at the press | the existing mount transaction, now with unit, issueId, sealNo, carriedOver; quantity is in real units and includes the carried-over residue |
# mes/banknote/state → supply — compact block (null when the simulator has no banknote line)
{ "status": "ALERT",
"substrate": { "inStrongroom": 64000, "pallets": 7, "heldPallets": 0, "inTransit": 0, "atPress": 2000,
"issued": 18000, "unaccounted": 0, "status": "BALANCED" },
"cover": { "security_paper": 25.4, "offset_ink": 25.2, "ovi_ink": 5.6, "foil_roll": 10.4,
"intaglio_ink": 0.8, "numbering_ink": 17.9, "varnish": 28.3, "banding_tape": 51.1 },
"lowestCover": { "materialType": "intaglio_ink", "coverH": 0.8 }, "coverLow": [ "intaglio_ink" ],
"nextDelivery": { "deliveryId": "SDL-261110-252130", "materialType": "intaglio_ink", "state": "INBOUND", "etaMin": 55 },
"openDeliveries": 1, "deliveries": [ … ], "heldReceipts": 0, "waitingAtStore": "intaglio_ink",
"usage": { "ovi_ink": { "variancePct": 0.43, "status": "IN_BAND" }, "foil_roll": { "variancePct": 0.58, "status": "IN_BAND" } },
"wasteBin": { "sheets": 6, "certificates": 3, "status": "BALANCED" } }
# banknote/line/supply — the blocks of the full snapshot
"config": { leadMin { paperMill, inkMaker, foilMaker, general }, countMin, varianceHoldMin, coverLowH, usageBandPct,
destroyAtSheets, destroyMaxAgeMin, reamSheets:500, palletReams:20, issueReams:10, simSpeed }
"stores": [ { store, label, holds, releasedBy[], materials[] } ] 3 entries: strongroom, securityCage, generalStore
"materials": [ { materialType, label, store, unit, container, containerUnits, countUnit, supplier, supplierClass, accountable,
stations[], atPress { units, stations[{ station, isSecondary, units, mounted, staged[] }] },
inStore { units, availableUnits, heldUnits, containers, available, held, capacity, reorderAt, lot, lots[] },
inTransit, inbound { units, deliveries, next }, consumption { sinceBoot, avgPerH, recentPerH, nominalPerH },
coverH, coverWithInboundH, coverLow, waitingAtStore,
ledger { received, opening, receipts, inStore, inTransit, atPress, consumed, unaccounted, status } } ] 8 entries
"substrate": { unit:"sheet", reamSheets, palletReams, issueReams, received, receivedBreakdown { opening, receipts },
inStrongroom, heldInStrongroom, inTransit, atPress, issued, drawnAtB010, issuedMatchesSheetLedger,
unaccounted, status, pallets, heldPallets,
palletList[{ palletId, reams, sheets, firstReam, lastReam, lotNumber, held, receivedAt }] }
"deliveries": [ open deliveries — the banknote/line/delivery object without event ]
"issuesInTransit": [ issue records with status:"IN_TRANSIT", receivedAt:null, receivedBy:null ]
"usage": [ { materialType, unit, station, stdPerSheet, bandPct, sinceBoot { sheets, theoretical, actual, variancePct },
recent { loads, sheets, theoretical, actual, variancePct }, variancePct, status, overConsumption } ] ovi_ink, foil_roll
"wasteBin": { sheets, notesEquivalent, byStation[], byCause {}, openedAt, ageMin, thresholdSheets, maxAgeMin }
"destruction": { spoiled, destroyed, awaitingDestruction, unaccounted, certificates, status }
"counts": { deliveries, receipts, variances, issues, certificates } since start
"recent": { receipts, issues, certificates } last 3 / 5 / 2 in the message, newest first
"hooks": { delayArmed {}, shortArmed {}, overConsumption[] }
# banknote/line/delivery — ordered
{ "event": "ordered", "deliveryId": "SDL-261110-252075", "materialType": "security_paper", "store": "strongroom",
"unit": "sheet", "supplier": "Security paper mill", "supplierClass": "paperMill", "lotNumber": "LOT-PAPR-20261110-252019",
"advised": { "containers": 2, "units": 20000, "countUnit": "ream", "count": 40 },
"containers": [ { "palletId": "SP-261110-252076", "reams": 20, "sheets": 10000,
"firstReam": "SP-261110-252076-R01", "lastReam": "SP-261110-252076-R20" }, … ],
"orderedAt": "2026-11-10T08:00:00.000Z", "reason": "stockout", "stockAtOrder": 0,
"state": "INBOUND", "eta": "2026-11-10T08:20:00.000Z", "etaMin": 20, "delayMin": 0,
"arrivedAt": null, "receiptId": null, "holdUntil": null }
# every other material lists "containers": [ { "containerId": "OVI-261110-252064", "units": 1000 }, … ] and counts in containers
# banknote/line/receipt — a short receipt, published as HELD at count-in, then again when booked as counted
{ "receiptId": "GRN-261110-252087", "deliveryId": "SDL-261110-252075", "materialType": "security_paper", "store": "strongroom",
"unit": "sheet", "supplier": "Security paper mill", "supplierClass": "paperMill", "lotNumber": "LOT-PAPR-20261110-252019",
"advised": { "containers": 2, "units": 20000, "countUnit": "ream", "count": 40 },
"counted": { "containers": 2, "units": 19000, "countUnit": "ream", "count": 38 },
"variance": { "count": -2, "units": -1000 },
"countedBy": [ { "role": "Vault Custodian", "name": "P. Wagner", "id": "OP-BNK-BR3" },
{ "role": "Shift Supervisor", "name": "U. Solberg", "id": "OP-BNK-BR1" } ],
"orderedAt": "2026-11-10T08:00:00.000Z", "arrivedAt": "2026-11-10T08:20:00.000Z", "countedAt": "2026-11-10T08:23:00.000Z",
"status": "RECEIVED_WITH_VARIANCE", "holdUntil": "2026-11-10T08:33:00.000Z", "bookedAt": "2026-11-10T08:33:00.000Z",
"resolution": { "bookedAs": "counted", "note": "Booked as counted — 2 ream(s) (1000 sheets) short, claimed against the supplier",
"resolvedBy": [ … ], "resolvedAt": "2026-11-10T08:33:00.000Z" },
"containers": [ … as counted … ], "holdsReleased": 6 }
# banknote/line/issue — complete record, published when scanned in at the press
{ "issueId": "ISS-261110-252055", "materialType": "security_paper", "store": "strongroom", "unit": "sheet",
"station": "B010", "isSecondary": false, "quantity": 5000,
"boxId": "SP-261110-252001-R01-10", "lotNumber": "LOT-PAPR-20261110-252001",
"palletId": "SP-261110-252001", "reams": [ "SP-261110-252001-R01", … "SP-261110-252001-R10" ],
"requestedAt": "2026-11-10T06:32:52.000Z", "requestedBy": { "role": "Feeder Operator", "name": "G. Salvatore", "id": "OP-BNK-B01" },
"releasedAt": "2026-11-10T06:33:06.000Z",
"releasedBy": [ { "role": "Vault Custodian", "name": "P. Wagner", "id": "OP-BNK-BR3" },
{ "role": "Shift Supervisor", "name": "U. Solberg", "id": "OP-BNK-BR1" } ],
"agv": "D", "agvTripId": "MTRIP-252002", "sealNo": "TS-831464",
"receivedAt": "2026-11-10T06:33:25.000Z", "receivedBy": { "role": "Feeder Operator", "name": "G. Salvatore", "id": "OP-BNK-B01" },
"status": "RECEIVED" }
# every other material carries "containers": [ "OVI-261110-252012" ] instead of palletId + reams
# banknote/line/destruction — one certificate per witnessed batch
{ "certificateId": "DC-261110-252078", "sheets": 377, "notesEquivalent": 16965,
"byStation": [ { "station": "B010", "sheets": 26 }, { "station": "B020", "sheets": 70 }, … ],
"byCause": { "process": 230, "burst": 62, "inspection": 45, "fault": 40 },
"binOpenedAt": "2026-11-10T06:01:10.000Z", "destroyedAt": "2026-11-10T08:01:10.000Z",
"method": "Witnessed shredding and compaction on site",
"witnesses": [ { "role": "Quality Inspector", "name": "L. Marchetti", "id": "OP-BNK-BR2" },
{ "role": "Vault Custodian", "name": "P. Wagner", "id": "OP-BNK-BR3" } ],
"trigger": "age" }
# banknote/B010/materialSetup — emitted at mount
{ "station": "B010", "workOp": 10, "boxId": "SP-261110-252001-R01-10", "lotNumber": "LOT-PAPR-20261110-252001",
"materialType": "security_paper", "quantity": 5000, "unit": "sheet", "isSecondary": false, "source": "AGV",
"agvTripId": "MTRIP-252002", "issueId": "ISS-261110-252055", "sealNo": "TS-831464", "carriedOver": 0,
"timestamp": "2026-11-10T06:58:36.000Z" }
Three ledgers ride in these payloads and balance at every instant — a non-zero
unaccounted turns the status to VARIANCE: substrate received = inStrongroom + inTransit +
atPress + issued, where issued is the sheet ledger's own figure; every material received =
inStore + inTransit + atPress + consumed; waste spoiled = destroyed + awaitingDestruction.
inTransit is stock released and on AGV-D, not supplier deliveries — those are inbound until booked.
Delivery eta, holdUntil and the lead, count and hold minutes are wall-clock; cover, consumption
rates and waste-bin age are plant time.
| Existing payload | What changed for banknote | Still true |
mes/materials/status → stations.B0xx.primary / secondary | quantity, remaining and lowThreshold are in real units; additive unit, issueId, carriedOver, staged | the fill ratio remaining / quantity; isLow (it now counts staged stock — a bin at 0 with staged > 0 is not empty) |
mes/materials/status → stores.banknote[materialType] | the three secure stores; additive store, container, unit, units, held | boxes (available containers), capacity, lowAt (the reorder point), isLow, isEmpty; no warehouse shuttle runs for this line |
mes/materials/status → vault.banknote | now the strongroom; additive store:"strongroom", sheets, heldPallets, inbound, lastReceiptId | pallets, capacity, reorderAt, receipts, lastReceipt — it moves only with paper issues and receipts |
AGV fleet → fleet.D.materialDelivery | adds issueId, sealNo, quantity, unit once picked; waitingStore: true while parked at an empty store | the mission states; while waiting: state:"LOADING_MATERIAL", progress: 100, boxId: null |
OPC-UA InputMaterialRemaining | in real units (Int32) | node id and data type |
| Alert on mes/alerts | Severity | Raised when — and what it carries besides line:"banknote", message, timestamp |
| deliveryOrdered | INFO | a secure delivery is ordered — deliveryId, materialType, supplier, etaMin |
| deliveryDelayed | WARNING | a delay is applied to an inbound delivery — deliveryId, materialType, delayMin, etaMin |
| goodsReceipt | INFO | a receipt is booked, including after a hold — receiptId, deliveryId, materialType, status, lotNumber |
| receiptVariance | WARNING | counted ≠ advised, delivery held — receiptId, deliveryId, materialType, variance {count, units}, holdUntil |
| usageVariance | WARNING | OVI ink or foil usage leaves its ± band — latched: once per episode, re-armed after 60 s clear, at most once per 5 min per material — materialType, variancePct |
| destructionCertificate | INFO | a waste batch is destroyed — certificateId, sheets |
| coverLow | WARNING | cover of a material falls below 2 h — latched the same way, one key per material — materialType, coverH |
| storeEmpty (existing type) | CRITICAL | AGV-D finds nothing to release in a secure store — materialType |
| starving (existing type) | WARNING | a press is held for material — station |
| Environment variable | Default | Sets |
| BANKNOTE_SUPPLY_LEAD_MIN | 20 | secure supplier lead in wall-clock minutes — paper mill ×1, ink and foil makers ×0.75, general supplier ×0.5 |
| BANKNOTE_COUNT_MIN | 3 | dual-control count-in at the receiving dock, wall-clock minutes |
| BANKNOTE_VARIANCE_HOLD_MIN | 10 | how long a short receipt is held before it is booked as counted, wall-clock minutes |
| BANKNOTE_COVER_LOW_H | 2 | coverLow below this many hours of cover |
| BANKNOTE_USAGE_BAND_PCT | 3 | usage variance band for OVI ink and foil, ± percent |
| BANKNOTE_DESTROY_AT_SHEETS | 600 | the waste bin is destroyed in a witnessed batch at this many sheets… |
| BANKNOTE_DESTROY_MAX_AGE_MIN | 120 | …or when its oldest sheet is this old, plant minutes |
All seven are optional. Identifier formats, the per-material table and the custody endpoint are in the
Banknote Works handbook; the live view is the
Secure Supply page.