Leverage the Watson Factory & Virtual Device Simulator nodes to build a Simulator, that simulates Elevator operations. Consolidate the data on Watson IoT Platform for real time monitoring and analytic's. Node-RED defines ease of IoT Solution Development
This cookbook (authored by Einar Karlsen, Prasanna A Mathada, Sathiskumar Palaniappan, and Rene Meyer) 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 Cloud 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, IBM Watson Analytics and IBM Cognos Analytics. In this scenario, if you increase the motor temperature beyond 200 degrees Fahrenheit, 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 Cloud 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 Cloud.
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 Cloud Platform for server-less and event-based computing.
Obtaining the Events from the Elevator(s) on to the WIoTP formed the first step. It's now time to Analyze the data. Learn various methods to carry out real time monitoring, generating alerts, showcasing graphs & gauges on visualization UI and much more.
Watson IoT Platform has integrated options to perform Real-time Analytics. IBM OpenWhisk provides event-driven computing using a serverless architecture. Integration will open up the possibilities for Event-driven Analytics and On-Demand execution
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 Db2 Warehouse on Cloud service (“Create data warehouse for reporting on Elevator device data using DB2 Warehouse on Cloud“). 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 Cloud and show you various options for storing data in IBM Cloudant and for populating the IBM Db2 Warehouse on Cloud data warehouse with device data.
This recipe will show you how to store IoT device data in Cloudant NoSQL DB using triggers, extensions and Node-RED. You will see how the data is stored, thus enabling you to choose the best option later on for a given data processing or analytic task.
This recipe will demonstrate how you can create a data warehouse using DB2 Warehouse on Cloud, IBM Cloudant Warehouse and Node-RED for subsequent reporting by analytic tools such as IBM Watson Analytics and IBM Cognos Analytics.
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.
In this recipe you will go through a typical scenario of a data scientist and generate statistics over IoT event data by connecting to a database, prepare the data for analysis with Python and finally generate diagrams using matplotlib.
This recipe will show you how to use IBM Watson Analytics to analyze elevator device data stored in a Db2 Warehouse on Cloud Data Warehouse by creating dashboard and a few status and trend reports.
Fourth set of recipes
This set of recipes shows you how to build a dashboard for monitoring elevator status and trend using IBM Cognos Analytics. The recipe “Monitor Elevator events using IBM Cognos Analytics” will shows how to create Cognos data models and dashboards. The dashboards will give the Business Analyst a clear picture â€“ near real time â€“ whether the elevators are running or not, which elevators have been impacted by maintenance stops over time as well as average and maximum motor temperatures on a daily basis. For this recipe we will use the data that was stored in the data warehouse by the second set of recipes as a basis for reporting, and then define database views to retrieve the last status or the average/maximum motor temperatures per day.
However, this fast path approach to reporting means that reporting is done using very detailed time series information as a basis. The approach allows experimentation with the dashboards and a fast iteration cycle whenever the dashboards need to be changed. In real life one would not duplicate information 1-1 from the landing zone to the data warehouse, rather the data in the data warehouse would be aggregated or filtered to fit the reporting needs. The recipe “Aggregate Elevator event data using IBM Data Science Experience” will show you how to create Extract-Transform-Load jobs to store the average and maximum motor temperature in the data warehouse on a daily basis using Data Science Experience, Spark, Jupyter notebooks and Python as programming language. The third recipe titled “Processing Elevator device data using the Watson IoT Platform and Node.js Consumers” will show you how to read current IoT event data directly from the Watson IoT Platform and then save it in the DB2 Warehouse on Cloud database using a Node.js consumer application. This recipe will also introduce you to the Continuous Delivery Toolchain and its constituent DevOps tooling in form of the Eclipse Orion Web IDE, Git on IBM Cloud and the Delivery Pipeline.
This recipe introduce the steps necessary to create IBM Cognos Analytics dashboards for IoT event data stored in a DB2 data warehouse on Cloud. You will learn how to create aggregated views, reporting data modules, dashboards and visualizations.
This recipe shows how to extract event data from Cloudant NoSQL DB, transform it into an aggregated form and finally load the aggregated data into a data warehouse using Apache Spark, Jupyter and Python under the hood of IBM Data Science Experience.
This recipe - co-authored with Rene Meyer - shows how to process device data from the Watson IoT Platform and subsequently store it in a DB2 Data Warehouse using a Node.js consumer that runs locally or as a Cloud Foundry application in the IBM Cloud.
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 Cloud by training the IBM Watson Visual Recognition service to distinguish between clean and dirty elevators.
Elevators fitted with IoT Device along with camera to periodically capture the elevator floor pictures and feeding to Watson Visual Recognition Service to get the score to determine the presence of dirtiness on elevator floor.
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 Cloud 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!