Wednesday, October 30, 2019

MIMIC MQTT Simulator integrates with Alibaba IoT Platform

We have added MIMIC MQTT Simulator integration with the
Alibaba IoT Platform for getting started, evaluation, development,
testing and proof-of-concept on this platform.

Here a simulated sensor is updating its device shadow:

Thursday, October 17, 2019

Dynamic, real-time, predictable testing of Amazon Greengrass

Efficient testing of Amazon IoT Greengrass with lots of devices is difficult to
achieve, unless you use simulation techniques as everywhere else in

We setup a lab of 100 simulated sensors in MIMIC MQTT Simulator
publishing telemetry in real-time to one instance of Greengrass, simulating
an IoT edge scenario where telemetry is processed at the edge, without
needing to go to the cloud. Most of the telemetry is uninteresting, unless an
anomaly occurs, such as a temperature value above a certain threshold.

In this 2-minute Youtube video 10 of those sensors are started, and monitored
by a subscriber application based on NODE-RED. You can see how it
tracks the temperature and light values of the sensors. We dynamically
and predictably create the anomaly in a matter of seconds.

Then we expanded the number of active sensors to 100, but the NODE-RED
application would not easily show the number of sensors on the graph
(even 10 cannot be definitively shown, and 100 hung the app).

So, we wrote a small Python MQTT subscriber client, which monitors each
sensor reported at the Greengrass local shadow, and displays the number
of sensors detected, and whether any of them exceeds the arbitrary
threshold (our anomaly).

This 2-minute Youtube video shows the interesting parts of the setup,
and the successful completion of the test.

When testing with Greengrass, make sure to use MQTT simulation to
verify your application.

Monday, October 14, 2019

Anomaly detection scenario with Google IoT Core

The traditional anomaly detection scenario involves detecting unusual
behavior in a vast sea of normal data. To empirically test your anomaly-
detection IoT application requires you to setup a large environment of
sensors sending data to your Google Pubsub application.
To do this in real-time to verify response time constraints is specially hard
to do.

To demonstrate how simulation can simplify this task, we improved on the
Google Cloud IoT Core End-to-end example tutorial by making 10 lines of
code change to their pubsub Python server code.

The changes merely count the number of devices detected (by their
serial number), and the anomaly is detected if any temperature value
exceeds the threshold, printing a WARN message.

When we start 10 simulated sensors in MIMIC MQTT Simulator configured
to connect to Google IoT Core, they are detected by the listening Pubsub
application. We can then change in real-time the temperature of one of them,
causing the pubsub application to detect the exceeded threshold.

This 1-minute Youtube video shows the entire demo in real-time.

We then used their Python manager client to define 90 more devices for
a total of 100. Then we ran the same scenario again. Notice the lag between
when the event occurred and the detection by the Pubsub application.

Here we show the entire demo in this 1-minute Youtube video