Command Definitions
Define commands on asset templates to specify what actions can be performed on your equipment.
Command definitions are created at the template level. They declare what commands are available for assets of a given type — for example, "Start Turbine", "Set Power Setpoint", or "Reset Fault". When you instantiate an asset from the template, a command instance is automatically created for each definition.
Where to create definitions
Command definitions live on a specific version of an asset template. To add them:
- Navigate to Templates and open the template you want to configure
- Select the template version you want to add commands to
- Open the Commands tab
- Click Add Command
Command definitions are versioned along with the template. Adding or changing commands on a new template version does not affect assets created from older versions until they are migrated.
Definition fields
| Field | Required | Description |
|---|---|---|
| Name | Yes | Human-readable name displayed in the UI (for example, "Start Turbine") |
| Key | Yes | Unique machine-readable identifier used in APIs and bindings (for example, start_turbine). Auto-generated from the name. Cannot be changed after creation. |
| Command Type | Yes | Either Value Write or Method Call. Cannot be changed after creation. |
| Category | No | Organizational category: Operational, Diagnostic, Emergency, or Configuration. Defaults to Operational. |
| Risk Level | No | Low, Standard, High, or Critical. Defaults to Standard. Controls the confirmation flow when executing. |
| Description | No | Free-text description of what the command does. |
| Timeout | No | Maximum time to wait for a response from the edge, in seconds. Defaults to 30 seconds. Minimum is 1 second. |
| Expected Duration | No | Estimated time the command takes to complete, in seconds. Informational only. |
| Requires Confirmation | No | Whether to prompt the user for confirmation before executing. Defaults to yes. Always enabled for High and Critical risk levels. |
| Confirmation Text | No | Custom message shown in the confirmation dialog. |
Command types
Value Write
A value write command sends a value to a specific data point on the device. Use this for setting setpoints, changing operating modes, or toggling flags.
For example, writing true to a "run" node to start a motor, or writing 75.0 to a power setpoint register.
Method Call
A method call command invokes a method exposed by the device. Methods can accept input parameters and return results. Use this for operations that involve logic on the device side, such as starting a calibration sequence or executing a controlled shutdown.
Categories
Categories help organize commands by their purpose:
| Category | Description |
|---|---|
| Operational | Day-to-day operational commands (start, stop, set setpoint) |
| Diagnostic | Diagnostic and troubleshooting commands (read status, trigger self-test) |
| Emergency | Emergency actions (emergency stop, fault reset) |
| Configuration | Configuration changes (update parameters, set thresholds) |
Categories are used for grouping in the bulk execution wizard and for filtering in command history.
Risk levels
Risk levels control the confirmation behavior when a command is executed:
| Level | Confirmation Behavior |
|---|---|
| Low | Simple confirmation dialog with a single click |
| Standard | Confirmation dialog showing command details and badges |
| High | Confirmation dialog with an amber warning banner. Confirmation cannot be disabled. |
| Critical | Confirmation dialog with a red warning banner. The user must type the command name to confirm. Confirmation cannot be disabled. |
Choose risk levels carefully. A critical risk level requires the operator to type the full command name before execution, which prevents accidental triggers of dangerous operations. Commands that could cause equipment damage, safety hazards, or data loss should be marked as High or Critical.
Parameters schema
Command definitions can optionally include a parameters schema — a JSON Schema object that describes the input parameters the command accepts. When a user executes the command, the UI renders input fields based on this schema.
For example, a "Set Power Setpoint" command might define a parameter for the target power value:
{
"type": "object",
"properties": {
"targetPower": {
"type": "number",
"title": "Target Power (kW)",
"description": "Enter the desired power output in kilowatts"
}
}
}The parameter values are included in the execution request and forwarded to the edge agent.
From definitions to instances
When you instantiate an asset from a template, the platform automatically creates a command instance for each command definition on the template version. Instances inherit all properties from the definition (name, type, category, risk level, timeout, and parameters schema).
Command instances can be individually enabled or disabled on a per-asset basis. Disabling an instance prevents it from being executed without removing the configuration.
Each command instance needs a command binding before it can be executed — the binding maps the command to a specific protocol address on a connector.