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, 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.
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 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.
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 IBM dashDB Data Warehouse using IBM Cloudant Warehouse or 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 IBM dashDB Data Warehouse by creating a dashboard and a few status and trend reports.
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.
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 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!