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
October 15, 2018

Add Custom Domain and TLS Certificate to Your Secure Cloud App

Secure your cloud app end to end. Use a custom domain with TLS certificate for apps deployed on IBM Cloud Kubernetes Service.

Continue reading

October 12, 2018

Cloud Functions Package Design and Best Practices

Whether they're JARs, libs, Gems, or modules, successful programming languages provide an ability to share and re-use code. IBM Cloud Functions is no different—it enables developer productivity through installable packages. But what makes a good package?

Continue reading

October 5, 2018

Deploying a Microservices-Based Solution to Cloud Foundry Enterprise Environment (CFEE)

With Cloud Foundry Enterprise Environment (CFEE), you can instantiate multiple, isolated, enterprise-grade Cloud Foundry platforms on demand. Instances of the CFEE service run within your own account in IBM Cloud.

Continue reading