Resources / DeviceCommand
DeviceCommand
An imperative command issued to an MCU Device to update firmware or configuration parameters (spec 0044).
Overview
| API | devices.etorm.com/v1alpha1 |
| Resource | devicecommands (cluster-scoped inside its cluster) |
| Short names | dcmd |
| Available in | project clusters only |
| Status | written by a controller through /status |
Minimal example
apiVersion: devices.etorm.com/v1alpha1
kind: DeviceCommand
metadata:
name: example
spec:
deviceRef:
name: "<name>"
action: update-firmware
Spec
| Field | Type | Required | Default | Allowed | Description |
|---|---|---|---|---|---|
deviceRef | reference to Device | yes | Target Device to receive this command. Immutable after creation. | ||
action | string (one of) | yes | update-firmware, update-config, inspect, vxlan-probe, reboot | Command action: update-firmware, update-config, inspect, vxlan-probe, or reboot. Immutable after creation. | |
firmware | object | Firmware update payload (required when action is update-firmware). | |||
firmware.version | string | up to 64 characters | Target firmware version string. | ||
firmware.url | string | up to 512 characters | HTTP or HTTPS URL of the firmware binary. | ||
firmware.sha256 | string | up to 71 characters | Expected SHA-256 hex digest of the firmware binary. | ||
config | object | Configuration parameter update payload (required when action is update-config). | |||
config.pollIntervalSecs | integer | Kubernetes API polling interval in seconds (5-3600). | |||
config.ntpServer | string | up to 128 characters | SNTP time synchronization server hostname. | ||
config.maxTxPowerDbm | integer | Maximum Wi-Fi transmit power in dBm (2-20). | |||
config.logShipIntervalSecs | integer | Real-time monitoring log shipping interval in seconds (1-300). |
Status
| Field | Type | Required | Default | Allowed | Description |
|---|---|---|---|---|---|
phase | string | Pending, Dispatched, Running, Succeeded, or Failed. | |||
message | string | Human-readable status or error message from the controller or device. | |||
observedGeneration | integer | Generation of the DeviceCommand observed by the controller. | |||
dispatchedAt | string | RFC 3339 UTC timestamp when the command was dispatched. | |||
completedAt | string | RFC 3339 UTC timestamp when the device completed the command. | |||
reportedFirmwareHash | string | Firmware SHA-256 reported by the device after command execution. | |||
conditions | list of object | Standard status conditions. | |||
conditions[].type | string | Condition type. | |||
conditions[].status | string | True, False, or Unknown. | |||
conditions[].reason | string | Machine-readable reason. | |||
conditions[].message | string | Human-readable message. |
Columns in listings
| Column | From |
|---|---|
| Device | .spec.deviceRef.name |
| Action | .spec.action |
| Phase | .status.phase |
| Message | .status.message |