Using the Device Simulator


Users can use the device simulator function for the following purposes.

  • Getting started with EnOS: Users can leverage this function to simulate a device to receive data to understand how to use the capabilities of EnOS.

  • Testing and debugging: In application development, sometimes you need to simulate a device to send a specific value to verify a device function. Real devices rarely sends that specific value. In this case you can use the device simulator to facilitate application development.


This section shows how to create and start device simulators.

Prerequisite

  • Ensure that you have registered the device to be simulated. For information about how to register a device, see Registering a Device.

  • Ensure that you have access to asset management. If not, contact your OU administrator. See Policies, Roles and Permissions.

  • Ensure that you have read the limitations for device simulator. See Limitations.

Limitations

The maximum number of total data samples that can be added under each OU is 300.

Step 1: Add a Device Simulator

  1. Select Device Management > Simulators.

  2. Click New Simulator, and select the device to be simulated in this page.

    The device list shows all the devices that have been created in the current OU. For simulation purpose, users can only select an inactive device. It is impossible to simulate any online or offline device.

  3. Click OK to create a simulator for the selected device.

    In the list of simulators, you can see the simulator you have just created. Next, you need to define the simulation data sample for it.

Step 2: Add the Simulation Data Sample

You can add simulator data samples one by one or add them in batch.

Add Simulator Data Samples One By One

  1. Find the simulator you created in the list of simulators and click edit in the Operation column.

  2. Click Download in the pop-up window.

  3. Input the simulation data sample in the downloaded template.

    The first column timeOfDay is the time from 0:00:00 to 23:59:00 in minutes.

    The header from the second column onwards refers to the names of model points. You just need to enter the name of the model point to be simulated in the header rather than that of all the model points. The content under the header are point values. If the data type is an array, the format is [value1, value2, value3, …]. Leave the cell empty if there is no value at the current time point.

  4. In the pop-up window, click Upload to upload the simulation data.

  5. Click OK.

Add Simulator Data Samples in Batch

  1. Click Batch Define Sample .

  2. Select the product whose devices needs the data sample.

  3. Click Download to download the data sample template.

  4. Edit sample.xlsx and save your change.

    You can add some abnormal values to the sample to trigger an alert.

  5. Click Upload, select the sample to be uploaded and click Next .

  6. Select the devices that needs simulating and click Confirm .

    The existing sample for the selected device will be overwritten.

Step 3: Start the Device Simulator

You can start the simulators one by one or in batch.

Start Simulators One By One

  1. Find the target simulator and click start.

  1. Set the time to end the simulation in the pop-up window.

    The starting time of simulation is the system time when you click start and the ending time of simulation should be within 90 days after the current system time.

Start Simulators in Batch

  1. Select the simulators to be started from the list.

    You can select only those with data samples.

  2. Click More > Batch Start .

  3. Set an end time for all selected simulators.

    The end time of simulation should be within 90 days after the current system time.

    If the selected simulators include simulators that have already started, their end time will be overwritten.

Results

The device simulator starts to simulate and send data. Users can suspend the device simulator, download the data sample, or edit the data sample as needed. Only after suspending the device simulator can users edit or download data samples.