The Smart Food Container with Quality and Volume Monitoring with Home Assistant


In the demanding life of a working mother, managing household tasks, work, and parenting is a constant challenge. Evenings, reserved for essential activities like grocery shopping, often become a source of stress due to the recurring issue of forgetting items on the shopping list. The Smart Food Container with Quality and Volume Monitoring is a transformative solution equipped with sensors, and IoT capabilities, and integrated with Home Assistant. This intelligent container becomes a proactive kitchen companion, ensuring you never run out of staples by updating your shopping list automatically and alerting you to potential issues like food spoilage in real-time.

In the broader context of smart homes and IoT innovations, the kitchen is not exempt from technological progress. The blog explores the exciting possibilities of the future of kitchen management through the Smart Food Container with Quality and Volume Monitoring. This innovation aims to go beyond traditional storage, providing intelligent companionship for safeguarding the quality and quantity of essential supplies.

Addressing the global issue of food waste is crucial for economic, environmental, and humanitarian reasons. In addition to causing significant economic losses and perpetuating hunger, food waste is closely linked to global warming. Climate change, driven by factors like greenhouse gas emissions and extreme weather events, disrupts agricultural practices, leading to crop failures and post-harvest losses. Smart food containers play a pivotal role by promoting better inventory management and mindful consumption, contributing not only to Sustainable Development Goal 2 – Zero Hunger but also to the broader goal of building a resilient and sustainable food system in the face of climate change challenges.

The integration of the Smart Food Container with Quality and Volume Monitoring, coupled with Home Assistant capabilities, brings forth a multitude of benefits to kitchen management.

  • Food Safety and Quality Assurance:
    • Early detection of gas emissions ensures prompt action against food spoilage.
    • Machine learning enhances accuracy in assessing food quality.
  • Optimized Storage:
    • Volume measurements assist users in optimizing storage space.
    • Reduces food wastage by facilitating better inventory management.
  • User-Friendly Interface:
    • Home Assistant integration provides a centralized dashboard for monitoring.
    • Alerts and notifications enhance user awareness and prompt action.
  • Convenience in Shopping:
    • Automatic updates to the shopping list simplify the process of replenishing food items.
    • Users can make informed decisions based on the real-time condition of stored food.
Figure 01: Smart food container overview

Prototype version of Smart container

The Xiao ESP32 microcontroller, known for its versatility and IoT capabilities, orchestrates the symphony of sensors within the smart food container. Gas sensors ensure that the stored food is not just measured in quantity but monitored for freshness and safety, with the ability to detect any anomalies in the atmospheric composition.

An ultrasound sensor adds another layer of sophistication by accurately gauging the volume of the food items inside the container. No more guesswork – users can effortlessly track the quantity of rice, dal, or any other kitchen staple in real time. This not only aids in meal planning but also helps in reducing food wastage.

The real magic happens when our smart food container connects seamlessly with Home Assistant, the hub for smart homes. Through MQTT, the collected data effortlessly flows into the Home Assistant ecosystem, offering users real-time information and actionable insights. Picture receiving notifications when your rice is running low or when the quality of your dal needs attention – all at your fingertips.

But the integration doesn’t stop there. By syncing with the Home Assistant shopping list add-on, our smart food container becomes an integral part of your kitchen planning. It not only monitors your food but also assists in creating a shopping list based on what you need, ensuring that your kitchen is always stocked with essentials.

Circuit Overview

Future Work

Integration of tinyML

Future work on enhancing the Smart Food Container involves the integration of tinyML into the ESP32, aiming to sense not only the expiration date but also the consumption patterns of stored items. As data collection is a time-consuming process requiring diverse samples from different households, this aspect is considered for future exploration. The current integration of machine learning already propels the container to new heights, allowing it to learn and adapt to patterns, thereby becoming proficient in assessing the quality of stored food items.

Integrate ammonia sensor

Furthermore, there are plans to incorporate an ammonia sensor, especially beneficial for storing perishable items like fish and meat. The sensor will detect emitted ammonia gas during the spoiling process, providing an additional layer of safety and quality monitoring.

Energy Harvesting mechanisms with dedicated PCB

In the developmental pipeline is a compact version of the container with a dedicated PCB, streamlining the design from its conceptual stage. Additionally, a focus on creating a low-power system with energy harvesting mechanisms is on the horizon, ensuring an extended lifespan for the smart container while aligning with sustainable and efficient energy practices. These future endeavors showcase an ongoing commitment to refining and expanding the capabilities of the Smart Food Container to meet evolving user needs and contribute to the advancement of smart kitchen technologies.


In summary, the Smart Food Container with Quality and Volume Monitoring represents a groundbreaking solution for kitchen management. By leveraging sensors, IoT, and machine learning, it ensures food safety, optimizes storage, and offers real-time insights. Future plans, including tinyML integration and an ammonia sensor, demonstrate a commitment to continuous improvement and addressing diverse user needs. The envisioned compact version with a dedicated PCB enhances scalability. Overall, this intelligent kitchen solution not only transforms daily routines but aligns with global efforts to reduce food waste and promote sustainability, creating a future where technology seamlessly integrates into our lives, enhancing efficiency and convenience in the kitchen.

Home Assistant Devices

When it comes to selecting the ideal hardware to run Home Assistant, Seeed Studio offers a range of products designed to seamlessly integrate with this powerful home automation platform.

reTerminal: a Raspberry Pi all-in-one board with an integrated touchscreen, Wi-Fi, and Linux OS, perfect for various applications including home automation.

reTerminal DM: takes it a step further with a 10.1″ industrial-grade screen and versatile connectivity options for more advanced use cases.

Home Assistant Yellow Kit: simplifies home control with extensive device compatibility and Zigbee support. The reRouter serves as a mini router with Raspberry Pi Compute Module 4.

LinkStar: equipped with powerful networking capabilities, suits both office and entertainment needs.

Home Assistant Green: offers an effortless setup with privacy in mind, storing data locally.

To get started with Home Assistant on these devices, you can follow the comprehensive installation guidelines available in the Home Assistant wiki, ensuring a smooth and user-friendly setup process for your smart home automation needs.

About Author


November 2023