IoT Event Monitoring and Analytics cookbook

Posted: 10 February 2017 Modified: 28 March 2017

This cookbook (authored by Einar Karlsen, Prasanna A Mathada, and Sathiskumar Palaniappan) is a collection of developerWorks recipes that demonstrates IoT event monitoring in an end-to-end integrated cognitive IoT and analytics scenario that uses an elevator simulator to generate IoT device data. The recipes in this cookbook demonstrate how you can use several services of the IBM Bluemix Platform and IBM Marketplace.

Using the elevator simulator, you can direct the elevator to travel to a specific floor, set the load, and open and close the elevator doors. The simulator also allows you to control internal metrics, such as the motor and cabin temperature. All the device data is sent to the Watson IoT Platform, and from there to a data lake for persistent storage and later analysis by IBM Data Science Experience and IBM Watson Analytics. In this scenario, if you increase the motor temperature beyond 200 degrees, the elevator is automatically put into maintenance mode by the IBM Watson IoT Platform. These abnormal situations that cause the elevator to go out of function for a period of time are of course of special interest for retrospective analysis. This scenario also integrates visual recognition. Using the Watson Cognitive services of the IBM Bluemix platform, combined with a camera, it is possible to use machine learning techniques to detect when the floor of an elevator needs to be cleaned.

As you work through the recipes in this cookbook, you must take on several roles in addition to IoT developer, such as data engineer, data scientist, business analyst and software engineer. The figure below shows a high-level architecture of the devices, simulator, apps, and services from this end-to-end scenario.

First set of recipes

The first few recipes show you how to create the elevator simulator (“Simulate an elevator – All using Node-RED nodes“) and how to monitor events in the elevator (“Monitor elevator events in real time to take corrective actions using Watson IoT Platform“) using the IBM Watson IoT Platform service and Node-RED running on the IBM Bluemix.

In these 2 recipes you take on the role of an IoT Developer and manage devices, transform event data, create dashboards to monitor the elevators in real time, and define rules that trigger actions to the controlled devices, thus setting up a closed loop control system. You also use the simulator to trigger that the elevators will go into maintenance mode by increasing the motor temperature beyond 200 degrees Celsius. The alerts trigger emails, but they also serve as a basis for further analysis using analytic tools. An optional recipe (“Create a rule to monitor elevator events in Watson IoT Platform and trigger an Openwhisk action“) shows how to use rules to trigger an action in OpenWhisk, which is the IBM Bluemix solution for server-less and event-based computing.

Second set of recipes

The next set of recipes show you how to store the IoT device data persistently in the landing zone of the data warehouse using the IBM Cloudant NoSQL database service (“Store elevator device data and alerts in Cloudant NoSQL DB“) and how to make the data available for analytics tools in a data warehouse that is implemented using the IBM DashDB service (“Create a dashDB data warehouse for reporting on elevator device data“). In these two recipes, you take on the role of Data Engineer, creating a data lake and configuring the appropriate data movement jobs. Both recipes use the services on IBM Bluemix and show you various options for storing data in IBM Cloudant and for populating the IBM DashDB data warehouse with device data.

Third set of recipes

These recipes introduce you to analytics using the device data that was captured in the data lake. One recipe (“Analyze elevator device data using IBM Data Science Experience“) shows you how to use IBM Data Science Experience and Jupyter notebooks to perform statistics on the device data. You take on the role of a Data Scientist and create a connection to a database of historic data in IBM Cloudant, transform the data using Python so that it becomes suitable for analysis, and finally generate a few archetypical matplotlib statistical diagrams to gather new insights. In another recipe (“Analyze elevator device data using IBM Watson Analytics“), you take on the role of a Business Analyst and create a connection to the dashDB data warehouse, refine the data (using IBM Data Connect under the hood), discover relevant reports, and finally combine these reports into dashboards using IBM Watson Analytics and its capabilities for self-serve and natural language reporting.

Last recipe

Last but not least, in the last recipe (“Automating elevator floor maintenance with cognitive visual recognition and Watson IoT“), you take on the role of IoT developer and Cognitive Software Engineer to use the cognitive capabilities of IBM Bluemix by training the IBM Watson Visual Recognition service to distinguish between clean and dirty elevators.

Stay tuned for more recipes!

The current set of recipes in this IoT Event Monitoring cookbook are built around an end-to-end IoT, cognitive and analytics scenario that use IBM Bluemix and IBM Marketplace offerings. We intend to provide additional recipes in the weeks and months to come, possibly covering topics such as streaming analytics, API management, chatbots, predictive maintenance, and enterprise integration (and business intelligence) solutions. So, stay tuned for more to come!

developerWorks recipes

This cookbook is a collection of developerWorks recipes that demonstrates IoT event monitoring and analytics in an end-to-end IoT scenario using an elevator simulator.

View other IoT recipes.

Author Information

Einar Karlsen, Prasanna A Mathada, and Sathiskumar Palaniappan