Having discussed the advantages of using Data Model simulation in developing in Part 1 and suggested JSON object structure as output, it is now time to discuss how such a JSON simulator can be implemented.

The Nature of IoT Data

IoT data reflects reality as reported by IoT devices whether in the form of data values (temperature, pressure, motion, location ……), events (moving, accelerating, loading, charging, starting …..), states (on, off, normal, abnormal, operating, stalled ……..) or any other representation that can be represented in numerical, ASCII or any values that can be represented in a code that can be transmitted from or to the IoT device.

In a simulator, this real IoT date is replaced by values, events, states or any other with information generated by the simulator. As reality is often reflected by numbers that have statistical variations using randomly generated values with well-defined statistical characteristics. For data and event values a good start is to use normally distributed values with a standard deviation around a defined mean value. Incorporating a minimum and maximum value enforces operational characteristics mimicking reality of operational parameters. States are a bit more difficult to simulate as transition between states are driven by different behavior than normal distributions. A way to start is to represent possible states with ASCII values and then transition between states using a random number generator. A more refined model uses a state machine with state transfer probability functions. From a simulation perspective time in state can be modeled using exponential distributions (which reflect time between events) with a programmable transfer probability moving to other states.

A General JSON Simulator

Using the approach discussed above, Triotos has developed a General JSON simulator designed to be hosted in the cloud and provisioned by customers using our AWS based platform as a physical device.

Through an easy-to-use web interface, the user creates a simulator version of the real device they are using creating the same data items and events that their real IoT devices generate.

Once created, the simulator is saved as another virtual device type, in this cane MX-456L-1, that can be provisioned in the same way as a real physical device. It can then be ‘deployed’ just like these and associated with customers, sites or locations.

Using the Cloud to PC option, the JSON simulator can also be used to generate serial JSON data output that can be sent from a laptop via a serial/USB interface to a physical IoT device or gateway. This feature allows for parallel development of both hardware, edge computing software and all applications associated with the IoT implementation.

Finally, once everything is operational and deployed, this type of simulator can be used for enhancements and new devices to simplify development and introduction of new capabilities and releases.

Part 3 of this blog will describe how the JSON simulator is provisioned and deployed on virtual and real sites IoT locations and sites.

At Triotos, we focus on providing IoT solutions that meet your needs. Using ready built reference solutions and products we can deliver the IoT you need in months instead of years and for <$100k instead of $ millions. To find out more, go to www.triotos.com.

About the Author

Mats Samuelsson

Mats Samuelsson is the Chief Technology Officer for Triotos. In this role, he is responsible for the development, integration, and deployment of Triotos technology initiatives.