This page contains information about the different actions you can perform in the Digi IoT Device Simulator Command Line Interface (CLI) to manage the simulation process.

Start the simulation

If you didn’t provide the simulation path in the application execution or if you have stopped the simulation, the first thing you need to do in order to interact with the simulation is to start it.

To do so you need to execute the start command followed by the path to the simulation.

simulator> start <simulation_path>

Where:

  • <simulation_path> is the relative or absolute path to the simulation directory.

After some seconds, the simulation starts and the application returns the prompt.

For example, this line starts a simulation using the configuration files located at samples/gs-sample:

simulator> start samples/gs-sample
Starting simulation... This process may take a while depending on the number of devices to simulate.
Parsing simulation files...
Registering and connecting simulated devices to account '<user>'...
All 5 Simulated Devices are online!
Refreshing data streams...
Starting IPC services to communicate with the user app...
Communication with user app has started.
Scheduling data sample and upload processes, if configured...
Starting maintenance window recurring tasks on all devices...
Simulation started.
simulator> 

Now you are ready to proceed with other commands that monitor or modify the behavior of the simulated devices and groups.

Stop the simulation

If the simulation is already running, you can perform a clean shutdown by executing the stop command in the CLI of the IoT Device Simulator.

simulator> stop

After some seconds, the simulation stops and all the simulated devices are disconnected from Digi Remote Manager.

Stopping simulation...
Simulation stopped.
simulator> 

Purge the simulation

To clear (unregister and remove) all the simulated devices and groups from your account in Remote Manager, you need to perform a purge operation by executing the purge command. This is the syntax of the command:

simulator> purge [<option>]

Where:

  • [<option>] is an optional parameter that determines if the command removes just the simulated devices or just the data streams associated to those devices:

    • --devices. Removes just the simulated devices.

    • --streams. Removes just the data streams of all simulated devices.

You must stop the simulation before executing the purge command.

This example performs a complete purge (removal) of all the simulated devices and data streams associated to the simulated devices from your Remote Manager account.

simulator> purge
Note that this command removes any simulated artifact from your account and, after that, you must start a new simulation.