Simplifying the IoT Realization Process with IBM Bluemix and Raspberry Pi

The age of the Internet is transforming into a new age of devices and sensors. With 5 Billion connected devices available today, experts expect the total to go up to 50 Billion by 2020. From Retailers to Manufacturers, Utilities to Financial Firms, the Enterprise is seeing a shift towards the Internet of Things for delivering digital experiences to their consumers. The Internet of Everything is here!

The advent of connected products such as Philip Hues Bulbs and Smart TVs is showing Enterprises a new path to interact with their consumers. Retailers want to make their stores more interactive, automotive giants want to make their vehicles smarter and homes want to have a mind of their own.

The dream of having the capability to close the garage door from your office, (or) have your refrigerator order your milk is truly here today.

IBM Bluemix and IoT


The Internet of Things describes a network of interconnected smart devices that are able to communicate with each other for a certain goal. But how easy is the process to realize IoT within your Enterprise?

Understanding Device Level Programming, Communication Protocols and establishing a platform for your IoT dreams is sometimes difficult, costly and time taking. IBM Bluemix is an implementation of IBM’s Open Cloud Architecture, based on Cloud Foundry, that enables you to rapidly create, deploy and manage cloud applications.

Bluemix further optimizes the time you spend creating cloud applications. You no longer have to be concerned about installing software or having to deal with virtual machine images or hardware. With a few clicks or keystrokes, you can provision instances of your applications with the necessary services to support them. This streamlining translates countless hours of setting up, configuring, and troubleshooting into time spent rapidly innovating and reacting to never-ending requirement changes. For organizations, Bluemix provides a cloud platform that requires very little in-house technical know-how as well as cost savings. Bluemix provides the rapid development environment organizations need to react to users’ demands for new features. The Bluemix platform and the cloud provide the elasticity and capacity flexibility organizations require when their applications explode in popularity.

Bluemix allows developers to quickly tap into existing frameworks and services using their favorite runtimes to develop and deploy applications.

Internet of Things Foundation


The IBM Internet of Things Foundation allows apps to communicate and consume data collected by connected devices, sensors, and gateways. You can connect your sensors using simple recipes, with pre-written recipes available for devices like Raspberry Pi and BeagleBone.

You can then allow your apps to use this data via APIs and build your required business logic around the device data that is collected.

Technology Used


From devices to cloud applications, numerous technologies were used to realize the complete flow of an IoT scenario. Some of them are,

  • IBM Bluemix and IoT Foundation Service
  • Cloudant = NoSQL DB
  • Twilio and Twitter Service on Bluemix
  • Node.JS Runtime for Mobile Application
  • Raspberry Pi
  • NodeRed for Orchestration
  • Texas Instruments Sensor Tag

IoT for a Cold Storage Facility


A Cold Storage facility is used for storing refrigerated items that need to be maintained at a particular temperature and humidity. Produce, Ice Creams and Beverages can all be lost if the facilities are not monitored properly. So how can a cold storage facility manager innovate with technology?

Our team came up with a simple solution, which enables the facility to transmit data back to the manager to ensure that he is on top of its maintenance needs. With the solution, the manager can,

  • Check Temperature and Humidity related data from anywhere through Mobile/Web Apps
  • Get notified of changes in conditions where ever he is in the world
  • Take action and control the thermostat over the Internet from virtually anywhere
  • Store data in a NoSQL DB for further analytics and dashboarding
  • Apply Predictive Analytics to the collected sensor data to predict maintenance needs of the cold storage facility

Flow of Data


The starting point of the data would be the sensors, with a Mobile App, a NoSQL DB (or) a Twitter Feed being the end result of the data flow.

  • The TI Sensor Tag acts as the Temperature/Humidity Sensor inside the Cold Storage Facility Storage
  • The Raspberry PI acts as a gateway to the Internet and collects data from the sensors via Low Energy Bluetooth
  • The Raspberry PI is registered with IBM Bluemix using its MAC ID and transmits all sensor data to the Internet of Things Foundation Service
  • The data then flows in two directions as mentioned below
Notifications for Facility Manager

One of the most important use cases of the sensor data would be to inform the Facility Manager of any anomalies in the facilities conditions. This is achieved by taking the data into NodeRed and creating an orchestration to test the data and notify the manager.

  • NodeRed takes the data and executes a defined test on the temperature and humidity data coming from the sensors
  • When an anomaly is detected the data is passed to a Bluemix Service such as Twilio (or) Twitter
  • These services then take the data and send a defined message to the Facility Manager about the anomaly
  • The Facility Manager can then see this as a Push Notification, Email, Twitter Feed (or) Twilio Message and act accordingly
  • Simultaneously the notification and anomaly data is also sent over to a NoSQL DB such as Cloudant for Persistence
Dashboarding, Persistence and Analytics

Even though anomaly notification is vital, historical sensor data is equally important for dash boarding and analytics. The second use case would be to take this sensor data and persist it into a data store to enable the Facility Manager to do the following,

  • Query the NoSQL DB and check historical data and anomalies
  • Apply Analytics to the data to check for patterns and predict outcomes
  • Dashboard real-time sensor data for monitoring of the facility

Using Bluemix and its Node.JS Runtime, developers can create Mobile Apps that Facility Managers can use to check for notifications, real-time data feeds and also take action by controlling facility equipment.

The Internet of Everything provides numerous opportunities for the Enterprise to innovate in order to reduce costs, create new business channels and improve end user experience. Are you being the IoT disruptor in your industry?

About the author

Avatar
Manasa Brahmateja Sutapalli

Enthusiastic about technology, I’m a professional in the space of IoT. Chatbots and other innovative technologies intrigue me. At the end of the day reading books and solving puzzles helps to rejuvenate me.

Add comment

Welcome to Miracle's Blog

Our blog is a great stop for people who are looking for enterprise solutions with technologies and services that we provide. Over the years Miracle has prided itself for our continuous efforts to help our customers adopt the latest technology. This blog is a diary of our stories, knowledge and thoughts on the future of digital organizations.


For contacting Miracle’s Blog Team for becoming an author, requesting content (or) anything else please feel free to reach out to us at blog@miraclesoft.com.

Who we are?

Miracle Software Systems, a Global Systems Integrator and Minority Owned Business, has been at the cutting edge of technology for over 24 years. Our teams have helped organizations use technology to improve business efficiency, drive new business models and optimize overall IT.

Recent Posts