Sensor Simulator

Last modified: Dec 5, 2018 @ 14:23

Overview

The Sensor Simulator allows you to test the functionality of a sensor by sending values from a Resource through a Gateway into DDM. The DDM Dashboard displays these values so that you can see changes over time as you manipulate the input variable.

Prerequisites:
  • A Location
  • A Gateway registered to the Location

Create a Simulation Device

Test the simulator by creating a Device that sends telemetry about temperature:

  1. Go to Settings -> Hardware Types -> Device Types and click +Create. Enter the name SimDeviceType and then click +Add Smart Object Type. Add Temperature (3303). Click Add followed by ✓Save.
  2. Open your Location and click +Register Device. Fill in the following fields:

Name: SimDevice
Device Identifier (endpoint): any unique number
Device TypeSimDeviceType
Gateway: choose the one registered to your Location. Click Get more if you Gateway is not in the list. Then Click ✓Register to finalize your Device.

Use the Simulator

Now you have the required (simulated) hardware to send temperature readings to DDM. But before you can send data, the simulator needs a Gateway registration ticket and a Resource URL:

  1. Open the simulator site: https://testng.sensbysigma.com/examples/webgatewaysenml/ .
  2. Go to your Location page and click on its Gateway. Click Actions -> Download Ticket. Open the ticket file with Notepad and copy all of its contents. Paste this into the Registration ticket: field on the simulator site.
  3. Go to your Location page and click on SimDevice. Click the right arrow on the Temperature Smart Object to view its Resources. Click Sensor Value. In the Information panel, copy the URL.
  4. Go back to the simulator site and paste the URL into the Resource Path: field. Select the Data type Numeric and click OK.

Now you can select and send temperature values to DDM. The results are visible on the Sensor Value page for the Temperature Resource; you can also use Pin to dashboard to make this graph available on the dashboard. Try changing the temperature and sending several values to see changes over time on the graph. You can click Clear registration in the simulator window to go back to the simulator main site.