When a device request is received for a specific simulated device, it is sent to the user application to generate the appropriate response. Once obtained, the user application sends it to the Digi IoT Device Simulator to upload it as a response to the received request.

To include device requests support in your simulation you must:

  1. Add the user_app object to the simulation.json file. See Simulation configuration.

  2. Include the device_requests_id value in the corresponding profile file inside the profiles directory of your simulation. See Device profiles definition.

  3. Create a *.json file named as the value of the device_requests_id property inside the device_requests directory of your simulation.

  4. Include the request targets supported in this file. See below.

  5. Create the required Python custom code in the simulation.py file located inside your simulation. See Custom code implementation.

Files inside the device_requests directory of the simulation include sets of requests supported by devices using a specific profile.

Each device request set can be used by one or more profiles defined in the profiles directory. They are identified by the file name without extension in the device_requests_id property of profiles. The file name must have a maximum on 100 characters between letters, numbers, dash, underscore, and period, ^[\w\.-]+$.

Device requests requires the implementation of custom code to process received requests from Digi Remote Manager. See Custom code implementation.

{
    "test": {
        "timeout": 5
    },
    "device_info": {
        "timeout": 10
    },
    "display_warning": {
        "timeout": 15
    },
    [...]
}

Each device request block from a file like the above requires to configure:

  1. The target of the request, specified as the name of each block, for example device_info.

  2. timeout: The maximum timeout in seconds to quit the execution of the command to avoid deadlocks.

{
    "device_info": {
        "timeout": 10
    },
    [...]
}