- 5.1 General Message Structure
- 5.2 Common Header Fields
- 5.3 Modifications to VDA5050 Standard
- 5.4 Message Types
- 5.5 Action State Lifecycle
- 5.6 Error Structure
- 5.7 Load Structure
- 5.8 CCU-Specific Messages
The APS uses a modified VDA5050 protocol transmitted as JSON payloads over MQTT.
- Protocol Format: Strictly JSON (UTF-8 encoded).
- Timestamps: ISO 8601 format (
YYYY-MM-DDTHH:mm:ss.sssZ) is mandatory. - Unique IDs: UUIDs (
headerId,orderId,actionId) ensure traceability. - Sequence Numbers:
headerIdandorderUpdateIdenforce message ordering. - State Machines: Actions follow defined VDA5050 state transitions.
- Error Reporting: Structured error arrays with severity levels.
Most messages include standard header fields:
| Field | Type | Required | Description |
|---|---|---|---|
headerId |
Integer | Optional | Incrementing sequence number for this device |
timestamp |
Date (ISO 8601) | Yes | When the message was created |
serialNumber |
String | Yes | Unique identifier of the device |
manufacturer |
String | Optional | Device manufacturer (e.g., "fischertechnik") |
version |
String | Optional | Software version of the device |
{
"headerId": 42,
"timestamp": "2024-12-08T10:30:00.000Z",
"serialNumber": "MILL001",
"manufacturer": "fischertechnik",
"version": "1.2.3"
}The APS extends and modifies VDA5050 in several ways:
Standard VDA5050: Designed for AGVs (Automated Guided Vehicles) only
APS: Applied to all production modules (MILL, DRILL, OVEN, etc.)
QoS Strategy:
- QoS 2 (exactly once): Critical commands (orders, instant actions, settings)
- QoS 1 (at least once): State updates, layout, stock information
- Rationale: Ensures command reliability while optimizing state update performance
Retained Message Usage:
- State topics:
connection,factsheet,state- retained for UI persistence - CCU topics:
active_orders,completed_orders,stock,layout,config- all retained - Purpose: UI can display current state even after page reload without waiting for next update
- Implementation: Published with
{ qos: 2, retain: true }for critical data
Standard VDA5050: State messages sent periodically (typically every 30 seconds)
APS:
- State messages are event-driven only - sent only on state changes
- No periodic 30-second refresh
- Retained messages ensure state persistence without repetition
- Reduces MQTT traffic significantly
Added Actions:
DRILL- Drilling operationMILL- Milling operationFIRE- Oven heating operationCHECK_QUALITY- Quality inspectionPICK- Pickup workpieceDROP- Drop workpiece
Standard VDA5050: AGV-specific topics
APS Additions:
ccu/*- Factory-wide control topics- Calibration topics
- Stock management topics
- Factory layout topics
Standard VDA5050: Limited instant actions
APS Additions:
- Calibration actions (
startCalibration,stopCalibration, etc.) - Storage management (
SET_STORAGE) - Status LED control (
setStatusLED) - Initial positioning (
findInitialDockPosition) - Note: Order cancellation (
cancelOrder) is NOT an instant action - useccu/order/canceltopic instead
Custom metadata types:
DurationMetadata- Production durationStoreMetadata- Storage informationDeliveryMetadata- Workpiece history for NFCCalibrationMetadata- Calibration parameters
Addition: Complete workpiece lifecycle tracking with:
- Unique workpiece IDs
- Processing history
- NFC position codes
- Quality status
Standard VDA5050: Uses nodeId and edgeId fields
APS:
NodeStateandEdgeStateare empty type definitions- Navigation uses simplified
idfield instead ofnodeId/edgeId - Node IDs correspond to module serial numbers for docking positions
Standard VDA5050: Basic action status tracking
APS Extensions:
id: Unique action identifiertimestamp: Action state update timestate: Current state (WAITING, INITIALIZING, RUNNING, PAUSED, FINISHED, FAILED)command: The command type being executedresult: Optional result data (PASSED, FAILED, metadata)metadata: Command-specific parameters
Orders are sent from CCU to devices to initiate actions.
Topic: module/v1/ff/<serial>/order
{
"timestamp": "2024-12-08T10:30:00.000Z",
"serialNumber": "DRILL001",
"orderId": "order-abc-123",
"orderUpdateId": 1,
"action": {
"id": "action-def-456",
"command": "DRILL",
"metadata": {
"duration": 5
}
}
}Fields:
timestamp: When the order was createdserialNumber: Target module serial numberorderId: Unique order identifierorderUpdateId: Sequence number for this orderaction: The action to performid: Unique action identifiercommand: Action type (enum:ModuleCommandType)metadata: Optional action-specific data
Topic: fts/v1/ff/<serial>/order
AGV orders are more complex, containing navigation paths with nodes and edges. (Detailed structure omitted for brevity; see AGV-specific documentation.)
Devices continuously publish their state to inform the CCU of their status.
Topic: module/v1/ff/<serial>/state
{
"headerId": 42,
"timestamp": "2024-12-08T10:30:05.000Z",
"serialNumber": "DRILL001",
"type": "DRILL",
"orderId": "order-abc-123",
"orderUpdateId": 1,
"paused": false,
"actionState": {
"id": "action-def-456",
"timestamp": "2024-12-08T10:30:05.000Z",
"state": "FINISHED",
"command": "DRILL",
"result": "PASSED"
},
"errors": [],
"loads": [
{
"loadId": "workpiece-789",
"loadType": "WHITE",
"loadPosition": "MODULE"
}
],
"operatingMode": "AUTOMATIC"
}Key Fields:
headerId: Increments with each state messagetype: Module type (enum:ModuleType)orderId: Current order being executed (empty string if idle)orderUpdateId: Must match the order's sequence numberpaused: Whether the module is pausedactionState: Current action status (ornullif idle)errors: Array of errors (see Error Structure below)loads: Current workpieces on the moduleoperatingMode:AUTOMATICorTEACHIN(calibration mode)
Topic: fts/v1/ff/<serial>/state
{
"headerId": 15,
"timestamp": "2024-12-08T10:30:10.000Z",
"serialNumber": "AGV001",
"orderId": "order-abc-123",
"orderUpdateId": 2,
"lastNodeId": "MILL001",
"lastNodeSequenceId": 3,
"nodeStates": [],
"edgeStates": [],
"driving": false,
"waitingForLoadHandling": true,
"paused": false,
"batteryState": {
"charging": false,
"percentage": 85,
"currentVoltage": 12.5
},
"errors": [],
"load": [
{
"loadId": "workpiece-789",
"loadType": "WHITE",
"loadPosition": "2"
}
],
"actionState": {
"id": "action-xyz-999",
"timestamp": "2024-12-08T10:30:10.000Z",
"state": "FINISHED",
"command": "DOCK"
}
}Key AGV Fields:
lastNodeId: Serial number of the module the AGV is at or has leftlastNodeSequenceId: Sequence of the node in the current orderdriving: Whether the AGV is currently movingwaitingForLoadHandling: AGV is waiting for PICK/DROP operationbatteryState: Battery informationload: Up to 3 loads (positions "1", "2", "3")
Instant actions are commands that can be executed immediately, often overriding normal operation.
Topic: module/v1/ff/<serial>/instantAction or fts/v1/ff/<serial>/instantAction
{
"serialNumber": "MILL001",
"timestamp": "2024-12-08T11:00:00.000Z",
"actions": [
{
"actionType": "startCalibration",
"actionId": "instant-abc-123",
"metadata": {
"position": "HOME"
}
}
]
}Common Instant Action Types:
factsheetRequest- Request device capabilitiesreset- Reset the devicestartCalibration- Enter calibration modestopCalibration- Exit calibration modesetCalibrationValues- Update calibration parametersclearLoadHandler- Clear AGV load handling statefindInitialDockPosition- Initialize AGV positionSET_STORAGE- Set HBW storage contentssetStatusLED- Control status LEDs
Connection messages use Last Will and Testament (LWT) to detect disconnections.
Topic: module/v1/ff/<serial>/connection or fts/v1/ff/<serial>/connection
Online Message (published on connect, retained):
{
"headerId": 1,
"timestamp": "2024-12-08T09:00:00.000Z",
"version": "1.2.3",
"ip": "192.168.0.100",
"manufacturer": "fischertechnik",
"serialNumber": "MILL001",
"connectionState": "ONLINE"
}Offline Message (LWT, published automatically on disconnect):
{
"headerId": 1,
"timestamp": "2024-12-08T09:00:00.000Z",
"version": "1.2.3",
"ip": "192.168.0.100",
"manufacturer": "fischertechnik",
"serialNumber": "MILL001",
"connectionState": "OFFLINE"
}Factsheets describe device capabilities, published once on startup.
Topic: module/v1/ff/<serial>/factsheet or fts/v1/ff/<serial>/factsheet
{
"headerId": 1,
"timestamp": "2024-12-08T09:00:00.000Z",
"version": "1.2.3",
"manufacturer": "fischertechnik",
"serialNumber": "MILL001",
"typeSpecification": {
"seriesName": "FutureFac tory 24V",
"moduleClass": "MILL"
},
"protocolFeatures": {
"moduleActions": [
{
"actionType": "PICK"
},
{
"actionType": "MILL",
"actionParameters": {
"parameterName": "duration",
"parameterType": "number",
"parameterDescription": "Milling duration in seconds"
}
},
{
"actionType": "DROP"
}
],
"moduleParameters": {
"clearModuleOnPick": true
}
}
}Actions follow a defined state machine:
stateDiagram-v2
[*] --> WAITING
WAITING --> INITIALIZING
WAITING --> PAUSED
INITIALIZING --> RUNNING
INITIALIZING --> FAILED
RUNNING --> PAUSED
RUNNING --> FINISHED
RUNNING --> FAILED
PAUSED --> RUNNING
PAUSED --> WAITING
FINISHED --> [*]
FAILED --> [*]
| State | Description | Next States |
|---|---|---|
WAITING |
Action created but not started | INITIALIZING, PAUSED |
INITIALIZING |
Preparing to execute | RUNNING, FAILED |
RUNNING |
Currently executing | FINISHED, FAILED, PAUSED |
PAUSED |
Temporarily stopped | RUNNING, WAITING |
FINISHED |
Completed successfully | N/A (terminal) |
FAILED |
Error occurred | N/A (terminal) |
{
"id": "action-uuid", // Unique action ID
"timestamp": "2024-...", // Time of this state change
"state": "FINISHED", // Current state (enum)
"command": "DRILL", // Action type
"result": "PASSED", // Optional: result for multi-outcome actions
"metadata": {...} // Optional: additional data
}For actions with multiple outcomes (e.g., quality check):
| Action | Possible Results |
|---|---|
CHECK_QUALITY |
PASSED, FAILED |
| Most other actions | Not set (success implied by FINISHED state) |
Errors are reported in a structured array:
{
"errors": [
{
"errorType": "DRILL_ERROR",
"timestamp": "2024-12-08T10:31:00.000Z",
"errorLevel": "FATAL",
"errorReferences": [
{
"referenceKey": "sensor",
"referenceValue": "light_barrier_blocked"
}
]
}
]
}WARNING: Non-critical issue, operation can continueFATAL: Critical error, action failed
| Module | Error Type | Description |
|---|---|---|
| All | PICK_ERROR |
Failed to pick up workpiece |
| All | DROP_ERROR |
Failed to drop workpiece |
| DRILL | DRILL_ERROR |
Drilling operation failed |
| MILL | MILL_ERROR |
Milling operation failed |
| OVEN | FIRE_ERROR |
Heating operation failed |
| AIQS | CHECK_QUALITY_ERROR |
Quality check failed |
| AGV | COLLISION |
Collision detected |
| AGV | ACTION_DISMISSED |
Action cancelled |
Loads represent workpieces currently on a device:
{
"loads": [
{
"loadId": "workpiece-123",
"loadType": "WHITE",
"loadPosition": "MODULE",
"loadTimestamp": 1702034700
}
]
}Fields:
loadId: Unique workpiece identifier (UUID or null)loadType: Workpiece color (WHITE,BLUE,RED, or null)loadPosition: Where the load is located- Modules:
"MODULE"or null - AGV:
"1","2", or"3"(loading bay)
- Modules:
loadTimestamp: Unix timestamp when loaded (optional)
Topic: ccu/order/request
{
"type": "WHITE",
"timestamp": "2024-12-08T10:00:00.000Z",
"orderType": "PRODUCTION"
}or for storage:
{
"type": "BLUE",
"timestamp": "2024-12-08T10:00:00.000Z",
"orderType": "STORAGE",
"workpieceId": "workpiece-123"
}Topic: ccu/order/response
{
"orderType": "PRODUCTION",
"type": "WHITE",
"timestamp": "2024-12-08T10:00:00.000Z",
"orderId": "order-abc-123",
"productionSteps": [
{
"id": "step-1",
"type": "NAVIGATION",
"source": "START",
"target": "MILL",
"state": "ENQUEUED"
},
{
"id": "step-2",
"type": "MANUFACTURE",
"moduleType": "MILL",
"command": "PICK",
"dependentActionId": "step-1",
"state": "ENQUEUED"
}
],
"state": "ENQUEUED",
"receivedAt": "2024-12-08T10:00:00.500Z"
}Topic: ccu/order/active (retained)
[
{
"orderId": "order-abc-123",
"type": "WHITE",
"orderType": "PRODUCTION",
"state": "IN_PROGRESS",
"startedAt": "2024-12-08T10:00:01.000Z",
"productionSteps": [...]
}
]Topic: ccu/order/cancel
Important: Only orders in ENQUEUED state can be cancelled. Once an order reaches IN_PROGRESS (first module command sent), cancellation is no longer possible.
["order-abc-123", "order-def-456"]Behavior:
ENQUEUEDorders: Cancelled immediately, moved toccu/order/completedwith stateCANCELLEDIN_PROGRESSorders: Cancellation request ignored, order continues execution- No error or confirmation is sent for ignored cancellation requests
Use Case: Cancel queued production requests before they start execution.
See AGV Module Documentation for complete details.
Topic: ccu/state/stock
{
"ts": "2024-12-08T10:00:00.000Z",
"stockItems": [
{
"workpiece": {
"id": "workpiece-001",
"type": "WHITE",
"state": "RAW"
},
"location": "HBW",
"hbw": "1-1"
}
]
}- See Module Documentation for command examples
- Review Calibration for instant action details
- Check Manual Intervention for important warnings