Overview

Skill Level: Beginner

Get introduced to the Bluemix services; Watson IoT Platform, Cloudant NoSQL DB & Node-RED

When you want to get started on IoT application development but reduce learning curve, then having a sample application or sample illustration, comes very handy. The IoTP Starter service does just that by providing ready to use services & sample IoT flow.

Ingredients

Step-by-step

  1. Introduction

    IBM Bluemix Catalog provides you with over 140 services that shall help manage various aspects of your IT requirements. However, a developer would be interested in a service or set of services that shall expedite the process of configuring the IoT Application Development & deployment environment.

    The Boilerplates section within the Bluemix Catalog, offers you with set of ready to use one or more services, that are binded together with an Application of choice. In the scope of this IoT Recipe, let us understand what Internet of Things Platform Starter service has, in the offering.

  2. Deploy Internet of Things (IoT) Platform Starter service

    The IoT Platform Starter service helps you deploy SDK for Node.js as your Application, with Watson IoT Platform service and the Cloudant NoSQL DB service binded to your IoT Application. Here, the Device and Gateway specific IoT events shall be managed and handled on the IoT Platform, while the Cloudant NoSQL DB acts as the default DB for your IoT requirements. Node-RED shall be the default User Interface and is considered one of the fastest means to begin your IoT Application development.

    Following set of steps details out on the deployement of the IoT Platform Starter service:

    1. Log into IBM Bluemix account and access the Catalog
    2. Choose to click on the Internet of Things Platform Starter service

      WIoTP_Service

    3. Provide a unique App Name, which shall be any custom name to your application

      WIoTP_Service_1

    4. Select a plan of choice for SDK for Node.js, Cloudant NoSQL DB and IoT Platform

      WIoTP_Service_2

    5. Click on Create, provided on the bottom-right corner of the screen, to go ahead and deploy the Starter service
    6. The deployment process takes couple of minutes to complete.
    7. Post successful deployment, you should see your application with an Up & Running status along with the Application URL
      WIoTP_Service_3
    8. Parallelly, you should also get to see your Application listed under All Apps section of your Bluemix Dashboard.

      WIoTP_Service_4

  3. Getting started with IoTP Starter sample application

    In this section you shall be introduced to the set of steps that help you get started with the IoTP Starter Application.

    1. Steps #7 and #8 in the previous section, provided you with option to launch the IoTP Starter Application, using the application URL
    2. As the Application launches, it prompts you to complete couple of steps: Secure the Node-RED Editor and optionally, allows you to Browse available nodes

      WIoTP_Service_5

      Click on Next to continue

    3. To secure your Node-RED Editor and the flows associated with it, configure the credentials with a custom User ID and Password of your choice. Optionally, choose to grant access public in Read-Only mode or grant Write permission to all.

      Node-RED_Starter_6

      Click on Next to continue.

    4. The next screen displays a set of Node-RED nodes that are publicly available, whose services you can plan to leverage as part of your current application. Choose to include them or you can do so at a later stage

      Node-RED_Starter_7

    5. The last step in the configuration process summarizes your selections & choices. Click on Finish to complete the Application configuration

      Node-RED_Starter_8

    6. The Configuration choices made shall take couple of moments to be applied to your current Application environment

      Node-RED_Starter_9

    7. Post applying your Configuration settings, you are now good to start with your Node-RED editor. Click on the Go to your Node-RED flow editor to launch the editor and get started with your first flow.

      Node-RED_Starter_10

    Thus, you’ve successfully configured your IoTP Starter environment and have launched the Node-RED Editor, to begin with your IoT Programming, using a simple action of Drag-n-Drop of Nodes.

  4. Understading the sample flow (default flow)

    As the Node-RED Editor launches successfully, you will get to see a default flow that has been pre-loaded as part of the Application deployment. The intention is to help you get started with a sample flow and you can build on top of it, from here on.

    As mentioned earlier, the Cloudant NoSQL DB and the IoT Platform service are binded to the Application. The flow depicts the use of both IBM IoT In & Out nodes, responsible for data write and data read to & from Application. Should you choose to start a new flow, then click on the + sign on the top – right corner of the canvas as shown.

    The sample flow illustrates a scenario where in, you are capturing data from Sensor devices and of all the data, you are particularly interested in Temperature data, coming in from a Temperature sensor. Monitoring the temperature data, you set thresholds to identify, whether the incoming data is within the Safe limits or not and publish the same, for further actionable analytics.

    Click on the Inject node to initiate the flow. The values for sensors are picked up from the Simulator and are sent to IoT Platform. The data being sent can been seen in the Debug log as provided on the right hand side pane. Analyzing the value of the sensor (in the scope of this IoT Recipe, a Temperature sensor), the Node-RED Application categorizes the value as Safe or Danger, accordingly.

    WIoTP_Service_6-1

    The sample Node-RED flow mentioned here, depicts, how the data from devices is pushed into the IoT Platform and then analyzed using other Node-RED nodes, thus showcasing, how simple and easy it is, to get started with your own IoT Application, within minutes.

  5. Conclusion

    The IoT Recipe Deploy Internet of Things Platform Starter service on Bluemix successfully demonstrated on the set of steps to deploy and configure your IoT Platform Starter environment along with the Node-RED Application.

    As a next step, you can plan to try the Data Visualization IoT Recipes:

    Please share your Feedback/Questions in the Comments section of this IoT Recipe

Join The Discussion