#Device Commands (ISDU)

iolinkmaster2mqtt exposes device commands over MQTT. Any client can send a command by publishing to the command topic; results are returned on a paired result topic. Rules can also issue commands as actions by publishing to the same param/<command> topics.

#Topic layout

<topic_prefix>/<device_name>/param/<command>           # send command (publish here)
<topic_prefix>/<device_name>/param/<command>/result    # response (subscribe here)
<topic_prefix>/<device_name>/param/commands            # retained: available commands

Example with defaults: iolink/vibration1/param/reset_alerts, iolink/vibration1/param/reset_alerts/result.

#Discovering commands

At startup, a retained message is published to each device's param/commands topic listing all available commands. The discovery message at <discovery_prefix>/<topic_prefix>/<device_name> also includes a topics.commands entry pointing to this topic.

Subscribe to <topic_prefix>/<device_name>/param/commands to get:

[
  {
    "name": "reset_alerts",
    "desc": "Reset all present alerts (SystemCommand 229)"
  },
  {
    "name": "select_profile",
    "desc": "Select process data value profile (a-rms, v-rms, x-axis, y-axis, z-axis, user)",
    "params": { "profile": "string" }
  },
  {
    "name": "find_me",
    "desc": "Flash LED for device identification",
    "params": { "enable": "boolean" }
  }
]

Each entry has:

Field Description
name Command identifier — used as the last segment of the command topic.
desc Human-readable description.
params Optional. Parameter names mapped to type hints (string, number, boolean). Absent if the command takes no parameters.

#Sending a command

Publish a JSON object to <topic_prefix>/<device_name>/param/<command>:

Topic:   iolink/vibration1/param/select_profile
Payload: {"profile": "v-rms"}

For commands with no parameters, publish {}:

Topic:   iolink/vibration1/param/reset_alerts
Payload: {}

No special QoS or retain flags required. Fire-and-forget (QoS 0) is fine.

#Receiving results

Subscribe to <topic_prefix>/<device_name>/param/<command>/result. The response is published after the ISDU operation completes.

#Success (write command)

{ "ok": true }

#Success (read command)

{
  "ok": true,
  "current": 45,
  "max_all_time": 52,
  "min_all_time": 18,
  "max_since_reset": 48,
  "min_since_reset": 22
}

Read commands return "ok": true plus decoded fields. Field names and types depend on the command.

#Error

{
  "ok": false,
  "error": "sick_mpb10: unknown profile \"foo\""
}

Errors are returned for: unknown device, unknown command, invalid parameters, ISDU read/write failure, or decode failure.

#SICK MPB10 commands

Command Params Type Description
select_profile profile: string write Set process data profile: a-rms, v-rms, x-axis, y-axis, z-axis, user
read_profile read Current profile name
read_temperature read Temperature: current, max, min (all-time and since reset)
reset_temp_peaks write Reset temperature min/max values
set_temp_limits high: number, low: number write Set temperature alert limits (signed int8, °C)
reset_accel_peaks write Reset acceleration peak values
trigger_acquisition write Trigger manual vibration data acquisition
reset_rms_minmax write Reset RMS statistical min/max values
read_vrms read V-RMS X/Y/Z/Magnitude
read_arms read A-RMS X/Y/Z/Magnitude
read_severity_zone read Current severity zone (0–4)
find_me enable: boolean write Flash LED for device identification
configure_user_slot slot: number (0–3), measurement: string write Assign measurement to user profile slot
read_user_slots read Current user profile slot assignments
reset_alerts write Reset all present alerts

#Notes

  • Commands are not authenticated beyond MQTT broker ACLs. Any client with publish access to the topic can send commands.
  • Results are not retained. Subscribe to the result topic before sending the command.
  • The commands listing topic is retained and republished on MQTT reconnect.
  • Write commands that change driver state (e.g., select_profile) automatically update the driver's internal decoding, so subsequent process data reflects the new configuration.