| ID | commands.dispatch |
|---|---|
| Description | An operator issues a command; it is routed, queued by priority and delivered to the device, which acknowledges. |
| Key | dispatch |
| Tags | commands |
Specification
Command dispatch
Commands flow the opposite direction to telemetry: from a human (or an automation) down to a specific device. Because devices are intermittently connected, dispatch is store-and-forward with priority and delivery guarantees rather than fire-and-forget.
Devices are not always online
A command may be issued while the target device is asleep or offline. The Priority Queue holds it until the device reconnects, ordered so safety-critical commands jump ahead of routine ones.
Participants
Command Router
Validates, persists and routes outbound commands.
MQTT Broker
Delivers the command to the device’s session.
Edge Agent
Applies the command and reports the result.
Steps
Issue
An operator issues a command from the dashboard; the Command Router validates it and writes it to the command repository.
Queue by priority
The command is enqueued; safety-critical commands are dispatched ahead of routine configuration changes.
Deliver on connect
When the device has an active session the broker delivers the command to the edge agent.
Acknowledge
The device actuates and the result flows back as a delivery receipt, surfaced
to the operator as applied (or failed).
Steps
| Number | Source | Destination | Description |
|---|---|---|---|
| 1 | Operator | Dashboard | Issue command |
| 2 | Dashboard | Command router | POST command |
| 3 | Command router | Priority queue | Enqueue (priority) |
| 4 | Priority queue | MQTT broker | Dispatch when device online |
| 5 | MQTT broker | Edge agent | Deliver command |
| 6 | Edge agent | Device | Actuate |
| 7 | Device | Edge agent | Result |
| 8 | Edge agent | MQTT broker | Ack |
| 9 | MQTT broker | Command router | Delivery receipt |
| 10 | Command router | Dashboard | Status: applied |