Perform action

Run an action defined on the device model.

TopicDirection
things5-production/v1/devices/{device_id}/cmd/perform_action_reqThings5 → device
things5-production/v1/devices/{device_id}/cmd/perform_action_resDevice → Things5

Things5 → device: cmd/perform_action_req

This topic can be used to request a device to perform an action

things5-production/v1/devices/<device-id>/cmd/perform_action_req

Payload

{
  "request_id": "UUID",
  "name": "start_recipe",
  "parameters": [{
    "name": "name",
		"value": "chicken"
	}]
}
namedescriptionexample
request_idthe id to send back in the response
namename of the action
parametersprovide optional parameters

Device → Things5: cmd/perform_action_res

This topic can be used to request a device to perform an action

things5-production/v1/devices/<device-id>/cmd/perform_action_res

Payload

{
  "request_id": "UUID sent during perform action request",
  "errors": []
}
namedescriptionexample
request_ida random UUID created by things5 during perform action request
errorslist of strings. Empty if no errors