DEVELOPERS BLOG

Securely reporting data with Spark Communication SDK

Picture this: you own a food factory and your business is regularly signing new clients, adding profits, and gaining customer loyalty. You get a new order, package up the item, and send it out for delivery. But the thought of your food going bad during transportation is driving you crazy! If only you could monitor its temperature on its way to the customer, then you might be able to save the order in case things go wrong. At the same time, you have many questions like:

  • Can I remotely access environment variables such as temperature/ humidity of the delivery truck?
  • Will the data be reliable and not intercepted or tampered with?
  • Will readings be visually displayed to me on a dashboard?
  • Can I access readings from the past few hours to evaluate the time they started to drift from their expected values?
  • Will I receive a notification on the time of such incidents for auditing purposes?

Using BlackBerry Spark Communications Services, you can build a solution that answers all these questions.

In our new sample app, IoT Analytics demo, we demonstrate new use-cases where IoT monitoring is important. This sample can be useful for developers working on solutions in food, pharmaceutical, and manufacturing industries and at any other places where IoT monitoring is imperative. It uses reliable communications technology provided by BlackBerry Spark Communications Services.

On a high-level, this project is divided into 2 sides: client and server. The client side, (in this case, the raspberry pi) communicates with ESP8266 through MQTT in order to receive temperature and humidity from DHT 22 sensor installed on the ESP8266. Then the data is sent securely to a Node server using BlackBerry Spark Communications Services SDK Messenger API.  Then, the server provides the user with real-time data visualizations of the collected data. Furthermore, BlackBerry Spark Communications Services SDK Messenger API is used to collect old data for analytics purposes. Finally, if values drift from the specified range, the user will be notified with a customized AtHoc alert.

Below is a high-level architecture diagram of this project:

Here are some of the visualizations from the application:
The real-time view of temperature and humidity readings at server
Graphical view of temperature for the last hour

Visualization of temperature readings for past 12 hours

 

For all other questions and comments, check out the BlackBerry Forums.
Azin Taqizadeh

About Azin Taqizadeh

Enterprise Solutions Development Student - IoT


Gurjit Ghangura

About Gurjit Ghangura

Enterprise Solutions Developer, Love BlackBerry, Developer at Heart.