How-tos

IoT application that monitors your food pantry

Share this post:

What goes together better than the Internet and food? But there’s more to this delicious combination than just posting photos of last night’s meal on Instagram. Continuing our theme around the “Internet of Things,” we present another possibility from this game-changing tech. In this post, we’re going to use IBM Bluemix and PubNub to build an application that will transform any dumb kitchen by enabling automatic inventory tracking. You’ll never run out of bacon again!

Project Overview

This application relies on sensing the weight of a kitchen storage container to track food consumption. This data can provide valuable insights around consumption patterns and help chefs predict and replenish their inventory just in time. There are three components of this application:

  • Inventory Tracking Server (ITS): Monitors all the kitchen containers and records daily consumption and replenishment statistics
  • IoT hardware: Detects the weight changes in containers and connects them to ITS
  • Mobile app: Provides an easy interface to see the current state of inventory and also offers analytics to view inventory history for the last seven days.

The reference architecture of the entire application is show below:

Communication between the components of this application is handled by PubNub’s realtime Data Stream Network.

ITS is a Python-based application server running on Bluemix. In order to keep track of the inventory records, this application provisions a dashDB instance, which is IBM’s in-house data warehousing service on the Bluemix cloud. The mobile interface is a Cordova & JavaScript-based Android app.

The hardware is powered by a combination of Arduino UNO and Mediatek Linkit ONE. For sensing the weight of kitchen storage containers, two piezoelectric load cells are used.

In order to produce the desired strain for determining the container’s weight, the load cell needs to be mounted between two flat surfaces (such as plywood) with the help of the two threaded holes on each side of it. Once mounted, the flat surface can act as a scale for measuring the weight of a storage container.

Application Use Cases

For a restaurant or large hotel, tracking kitchen inventory is one of those tasks that’s crucial to their business. It can be quite inefficient and error prone due to human intervention. In such cases, having such inventory tracking application makes perfect sense. There are three main use cases of this application:

  • Track inventory – Provide automatic, realtime updates about the current availability of inventory
  • Expiration Notification – Notify the user in case of expiration of food
  • Analytics – Access historical inventory usage data for better prediction and planning.

Conclusion

That’s it for this post. To continue from idea to implementation, see the second part of this project where we discuss and present the detailed setup and internal workings of this application.

More How-tos stories
August 13, 2018

CI/CD Pipeline for OpenWhisk Functions Using Whisk Deploy

The article presents a technique for developing a CI/CD pipeline in IBM Cloud for OpenWhisk functions using Whisk Deploy configuration cataloged in GitHub.

Continue reading

August 8, 2018

Creating A Microservice Data Lake With IBM Cloud Object Storage and IBM SQL Query

Is your application's data a stream trickling into a puddle or a rising tide overwhelming the levees? Either way, IBM has you covered with tools to store, retrieve, query, and gain insights from data of any size.

Continue reading

August 2, 2018

Connecting to IBM Cloud Object Store in Kubernetes

Operationalizing IBM SQL Query: Part 2. In this article, we'll take a look at the best practices for connecting to IBM Cloud Object Storage from docker containers deployed in the IBM Cloud Kubernetes Service.

Continue reading