IoT

Internet of Things on Bluemix

IoT SensorTag @ home
IoT SensorTag @ home

Internet of Things on Bluemix

By 2020 there will be 50 billion Internet of Things (IoT) devices, it’s a very huge number and I’m very happy to belong to the IBM’s Internet of Things division. In this article I’m showing you how to manage an IoT device on IBM Bluemix cloud platform.

In details I’m showing you how to connect my Texas Instrument SensorTag to the cloud , the SensorTag devices allows quick and easy prototyping of IoT devices. I connected my sensor to the cloud in ten minutes. In this image there are the main features of SensorTag,  so I am able to catch the environment temperature, the environment light and the air pressure:

Texas Instruments sensorTag
Texas Instruments sensorTag

My SensorTag has only Bluetooth wireless technology therefore I used my smart phone as wi-fi hotspot to send the sensor data in the cloud. By TI android application I am able to send sensor data to IBM IoT Cloud service, using the service quickstart:

TI SensorTag Cloud Setup
TI SensorTag Cloud Setup

After configured my IoT device I worked on Bluemix to manage the sensor data. I used the node-RED application to handle the data flow from real-life environment. Get started with my Internet of Things project:

TI SensorTag on Bluemix with node-RED
TI SensorTag on Bluemix with node-RED

In node-RED environment I created a simple flow to fetch data from the sensorTag device. By a debug node I displayed the raw data on the debug window, by a web dashboard node I displayed the data in a cool panel.

To get input from IoT device I used as input node the IBM Internet of Things Foundation node:

IBM Internet Of Things input node
IBM Internet Of Things input node

To match the service cloud configured on sensorTag, the authentication in the IoT node is quickstart type and the Device Id is my sensorTag id. The IBM Internet of Things Foundation is a fully managed, cloud-hosted service that makes it simple to derive value from IoT devices. When you start with your device, be it a sensor, a gateway or something else, using this node to get it connected and start sending data securely up to the cloud using the open, lightweight MQTT messaging protocol. From there, you can setup and manage your devices using your online dashboard or our secure APIs, so that your applications can access live and historical data fast.

The input node receives events sent from devices, receive commands sent to devices, or receive status updates concerning devices or applications. It produces an object called msg and sets msg.payload to be a string containing the payload of the incoming message. I wired the input node with a debug node to check in real-time the data sent from my device:

IoT node-RED debug node
IoT node-RED debug node

In this way I able to see the JSON associated to my msg.payload, It was hot in my house: 22 Celsius !

To display the data on a web dashboard I wired the input node to the freeboard node:

IoT node-RED freeboard node
IoT node-RED freeboard node

Freeboard is damn-sexy, it is an open source real-time dashboard builder for IoT and other web mashups. Freeboard is not available with standard Bluemix node-RED, so I installed manually the freeboard node package in my environment. It’s very simple to install new nodes in Bluemix node-RED, just to import the node’s zip and to modify the package.json file by DevOps Services associated node-RED:

node-RED freeboard
node-RED freeboard installation

Freeboard node enables a web real-time dashboard on your node-RED application. In my environment at the dashboard URL:

http://thethinredline.mybluemix.net/freeboard/

During the freeboard configuration you can use the datasource that match with the freeboard node used in the node-RED flow:

IoT freeboard datasource
IoT freeboard datasource

Here the sensor data (in real-time) at the end of the configuration:

Freeboard real-time web dashboard
Freeboard real-time web dashboard

The combination of cloud computing and IoT it’s very interesting, moreover Internet of Things on Bluemix it’s very very cool.

I think I will have fun with these technologies 🙂

Your Feedback is Welcome.

 

Tags

Related Articles

Back to top button
Close