A question about IoT device management.
Why this device management reboot request manually initiated in IBM Watson Iot Platform:
iotdm-1/mgmt/initiate/device/reboot:{"reqId":"d406d02e-1b5b-4e75-a9b7-1325e31c535a"}
and response:
iotdevice-1/response:{"rc":200,"message":"Reboot initiated","reqId":"d406d02e-1b5b-4e75-a9b7-1325e31c535a"}
are marked as failed?
Please see attached screenshot. Organization ID is y32gkx.
Thank you.
Answer by MikeRobertson (176) | Apr 15, 2018 at 10:39 AM
The request is being marked as failed due to the return code specified in the message. The device management protocol in Watson IoT Platform specifically expects to receive back a 202 (accepted) message in response to the initiate device reboot message.
This response indicates that the device has accepted the reboot request. At this point, the request is still in-progress according to the request status in Watson IoT Platform. The request will be marked complete after the device has rebooted, reconnected and send a new "manage" message.
Example message flow:
IoT Platform publishes initiate message:
iotdm-1/mgmt/initiate/device/reboot:{"reqId":"d406d02e-1b5b-4e75-a9b7-1325e31c535a"}
Device responds with accept message:
iotdevice-1/response:{"rc":202,"reqId":"d406d02e-1b5b-4e75-a9b7-1325e31c535a"}
Device reboots, comes back online and publishes new manage message:
iotdevice-1/mgmt/manage:{"d":{"supports":{"deviceActions":true}},"reqId":"e406d02e-1b5b-4e75-a9b7-1325e31c535b"}
Further details on the device management protocol can be found here: https://console.bluemix.net/docs/services/IoT/devices/device_mgmt/requests.html#device-actions-reboot