IBM Watson Internet of Things (IoT)

IBM Watson Internet of Things (IoT) is the course for beginners and professionals want to build IOT based product and do real time analytics with IBM Watson

3 STUDENTS ENROLLED
  • Profile photo of kaniza islam
  • Profile photo of jamie rahman
  • Profile photo of vivek Kalyanarangan

Node-RED is a tool for wiring together the Internet of Things in new and interesting ways, including hardware devices, APIs, and online services. It is built on top of Node.js and takes advantage of the huge node module ecosystem to provide a tool that is capable of integrating many different systems. Its lightweight nature makes it ideal to run at the edge of the network as well, such as on the Raspberry Pi, and other hack-friendly platforms.

Node-RED contains the following Watson IoT nodes that helps you to connect your devices, gateways and applications to Watson IoT Platform and create IoT solutions quickly.

  • Watson IoT Node – A pair of nodes for connecting your device or gateway to the IBM Watson Internet of Things Platform. A device or gateway can use these nodes to send events and receive commands from the application.
  • IBM IoT App Node – A pair of nodes for connecting your application to Watson IoT Platform. An application can use these nodes to receive device events and send commands back to the device.

In this course, you will learn the following,

  • How to configure the Watson IoT Output node to send device events to Watson IoT Platform.
  • How to configure the IBM IoT App In node to receive the device events.
  • How to configure the IBM IoT App Out node to send commands back to the device when the readings cross the threshold.
  • How to configure the Watson IoT Input node to receive the commands from the application

Course Curriculum

Setup Watson IoT Platform and Node-RED service on Bluemix
One can install Node-RED locally on the laptop or any devices like Raspberry Pi to send sensor readings to Watson IoT Platform. 00:00:00
Access the Node-RED application
Access the Node-RED application by clicking on the View App option available, post deploying your application and then choosing the option Go to you Node-RED flow editor, to access the editor. 00:00:00
Include Watson IoT Nodes into Node-RED
access the Git repository that is associated with this Node-RED application, 00:00:00
Choose package.json file and click on Edit to add the following line and have the Watson IoT node installed. “node-red-contrib-ibm-watson-iot”:”0.x” 00:00:00
Going through the IBM Watson IOT code and changes requried 00:00:00
Commit the changes 00:00:00
Once the changes are Pushed through Commit operation, the Build & Deploy process gets initiated. 00:00:00
Once the deploy operation is successful, open the Node-RED application (refresh if its opened already) to see the Watson IoT input and output nodes. 00:00:00
Register your Device
In order to send events to the Watson IoT Platform, you must first register your device on the platform. 00:00:00
Generate API Key and Token of Watson IoT Platform
n order to connect the Node-RED application to IBM Watson IoT Platform to receive device events and send commands, we need to generate the API key and token first.Lets go through it 00:00:00
Simulate a Temperature Device
we will configure the Watson IoT Out Node to send a temperature reading every second to Watson IoT Platform.We will now demonstrate with device’s Node-RED application 00:00:00
Add a Watson IoT Output node and configure it
Connect as Device in Registered mode Add wiot-credentials by providing credentials obtained in the previous step Set the Event type to temp 00:00:00
Wire the output of the function node to the Watson IoT Output node. Also, attach a debug node to the output of the function node to view the payload in the debug panel. The complete flow should look like the following, 00:00:00
Add a Node-RED application to receive events from the device
With events now being sent to Watson IoT, the next step is to create an application in Bluemix to receive the events. 00:00:00
Create a simple flow to start receiving the device events 00:00:00
Drag-n-Drop a function node, double click and paste the following code in the body to to extract the temperature value from the payload. 00:00:00
Connect the output of ibmiot node to the input of function node. 00:00:00
Attach the debug node to the function node as shown below to print the extracted temperature value in the debug panel. 00:00:00
Click Deploy to deploy the flow in Node-RED and observe that the temperature readings are printed in the console. 00:00:00
Analyze temperature data
Drag-n-Drop switch node from the function pane and create rules as shown below. 00:00:00
it creates 2 rules based on the temperature value. Temperature value equal to or below 30 flows through route 1 and temperatures above flows through route 2. 00:00:00
Drag-n-Drop a template node, double click and add the following message to format the output message, Temperature ({{payload}}) within safe limits 00:00:00
Connect the 1st route (safe temperature route) of the switch node to this new template node as shown below, 00:00:00
Drag-n-Drop another template node for the abnormal temperature route, double click and add the following message to format the output message, Temperature ({{payload}}) critical 00:00:00
Connect the 2nd route(abnormal temperature route) of the switch node to this new template node. Drag-n-Drop the debug node and connect the output of both template nodes 00:00:00
Click deploy and observe the temperature status in the debug panel as the device event is received. In this step we have successfully analyzed the temperature data and classified them as safe or unsafe 00:00:00
Send commands to your device 00:00:00
Drag-n-Drop a function node to configure the “shutdown trigger“. And connect it to the second output ofclassify node. Paste the below code to send the command to the device when the temperature rises above 30 degrees. msg.payload=JSON.stringify({“data”:”Shutdown”}); return msg; 00:00:00
Drag and drop ibmiot node from the output pane. Configure it with the same api keys and device Id. Set the Output type as Device Command. And connect it to the shutdown trigger 00:00:00
Click deploy to deploy the flow and it sends the command to the device whenever the temperature crosses the threshold. 00:00:00
In this step, we saw how to send a command to the device when the threshold crosses a threshold. 00:00:00
In this recipe, we learnt the following, How to configure the Watson IoT Output node to send device events to Watson IoT Platform. How to configure the IBM IoT App In node to receive the device events. How to configure the IBM IoT App Out node to send commands back to the device when the readings cross the threshold. How to configure the Watson IoT Input node to receive the commands from the application As a next step, go through the recipe Connecting a Sense HAT to Watson IoT using Node-RED to connect your Sense Hat to Watson IoT Platform. 00:00:00
Real-time data analytics in Watson IoT Platform
Registering the iotsensor with Watson IoT Platform 00:00:00
Connect the iotsensor to the Watson IoT Platform 00:00:00
Optional step: Create a board and some cards 00:00:00
Create an iotsensor_device Schema 00:00:00
Create iotsensor rules and actions 00:00:00
Activate the rule and send some data to test the rule 00:00:00
View the dashboard alert and the email alert 00:00:00

Course Reviews

4

4
3 ratings
  • 5 stars0
  • 4 stars0
  • 3 stars0
  • 2 stars0
  • 1 stars0

No Reviews found for this course.

TAKE THIS COURSE3 SEATS LEFT
  • $450.00 $400.00
  • 30 Days
  • 6 SEATS

Book for a Free Demo Session





Course Categories

© Sniffer Search. All rights reserved.

Setup Menus in Admin Panel