I have an Azure IoT Device in an IoT Central application. We don't want it to execute offline commands. Is there any way to switch off this offline commands execution capability.
Asked
Active
Viewed 172 times
0
-
Could you elaborate more? What constitutes as an offline command? – Matthijs van der Veer Aug 07 '20 at 11:53
-
If we send a command when the device is not connected with Azure central then the commands start getting piled up and all of them executes once the device comes online. If the commands doesnt execute in 1 minute i want that it must not execute if the device comes online. – Farrukh Qamar Aug 09 '20 at 00:19
-
What is your Command type (Sync or Async)? – Roman Kiss Aug 09 '20 at 05:52
1 Answers
0
Based on my test (sync command), the behavior of executing "offline command" is working well. In the case, when the device is disconnected from Azure IoT Central App, the error Not Found is returned back after 30 seconds, see my example:
{
"error": {
"code": "NotFound",
"message": "Could not connect to device in order to send command. You can contact support at https://aka.ms/iotcentral-support. Please include the following information. Request ID: cic9xs38, Time: Sun, 09 Aug 2020 05:08:00 GMT.",
"requestId": "cic9xs38",
"time": "Sun, 09 Aug 2020 05:08:00 GMT"
}
}
and the following screen snippet shows a command history in the IoT Central App:
Note, that in the present version there is no feature such as re-executing (retrying) a sync or async command on the re-connected device. If the device is not connected, the command is completed with a failed status = NotFound, in other words, the command is invoking in the sync manner, see more details here.

Roman Kiss
- 7,925
- 1
- 8
- 21
-
In my case if the device is not connected the error does come but when the device comes online the sent commands are then executed which i dont want. – Farrukh Qamar Aug 11 '20 at 09:43
-
Could you post your device template or just only the command interface? – Roman Kiss Aug 11 '20 at 11:31
-
-
For IoT Central App version 3 (no legacy app): Select your device template and then **Export**. Your device template will be downloaded locally to the file system. – Roman Kiss Aug 29 '20 at 08:15
-
actually I have downloaded it but I cannot find a place to upload here – Farrukh Qamar Aug 31 '20 at 11:14