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.
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:
- Log into IBM Bluemix account and access the Catalog
- Choose to click on the Internet of Things Platform Starter service
- Provide a unique App Name, which shall be any custom name to your application
- Select a plan of choice for SDK for Node.js, Cloudant NoSQL DB and IoT Platform
- Click on Create, provided on the bottom-right corner of the screen, to go ahead and deploy the Starter service
- The deployment process takes couple of minutes to complete.
- Post successful deployment, you should see your application with an Up & Running status along with the Application URL
- Parallelly, you should also get to see your Application listed under All Apps section of your Bluemix Dashboard.
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.
- Steps #7 and #8 in the previous section, provided you with option to launch the IoTP Starter Application, using the application URL
- 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
Click on Next to continue
- 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.
Click on Next to continue.
- 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
- The last step in the configuration process summarizes your selections & choices. Click on Finish to complete the Application configuration
- The Configuration choices made shall take couple of moments to be applied to your current Application environment
- 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.
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.
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.
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.
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:
- Configuring Boards & Cards in the new Watson IoT Dashboard – Helps create the Boards and Cards in the Watson IoT platform to build custom dashboards for your IoT solutions
- DeviceList card to monitor data from multiple devices â€“ Helps monitor specific status and data of a given device, from a list of multiple devices, using various visualization options with a click of a button
- Visualize Historian data in Watson IoT Platform â€“ Helps to visualize the device data stored in Historical DB using Line Chart Card.
- Real-time data analytics in Watson IoT Platform â€“ Showcases how to create rules and actions to monitor assets in real-time.
Please share your Feedback/Questions in the Comments section of this IoT Recipe