Ever opened the fridge only to find that something had expired before you had a chance to eat it? Maybe it was a forgotten tub of yogurt, a half-used sauce, or a snack pushed to the back of the shelf. This small fridge-door tracker is designed to replace that daily guesswork with a quick scan and a clear answer.
This project turns an M5Stack CoreS3 SE and a Module13.2 QRCode into an expiry tracker that lives on the fridge door. Scan a barcode, pick when it expires, and the screen always shows what to eat first. It names products in Chinese or English.

Project Overview
This project turns an M5Stack CoreS3 SE and a Module13.2 QRCode into an expiry tracker that lives on the fridge door. Scan a barcode, pick when it expires, and the screen always shows what to eat first.
- Scan a barcode and save a product with an expiry date.
- See the soonest expiry first, with red and yellow countdowns.
- Open an existing item by scanning it again.
- Swipe to delete and switch between several pantries.
- Manage the list in a browser and build reminders in Home Assistant.
Hardware
The tracker uses three stacked hardware parts. You also need a computer that stays on for the server, and Home Assistant if you want reminders.
![]() |
![]() |
![]() |
|
Hardware |
Function |
|
Runs the tracker, with the touch screen and Wi-Fi. |
|
|
Reads 1D and 2D barcodes and stacks under the CoreS3 SE. |
|
|
Adds a 110 mAh battery for power. |
What it can do
Scan a product
Tap “SCAN NOW” and hold the barcode about a hand's width from the scan window. The screen glows red while the scanner looks for a code.
The tracker then shows the product's name, brand, size and photo. Most products come from Open Food Facts, which covers food sold around the world. China Mainland Products require a GS1 Account separately.
Set the expiry with the arrows under Days, Weeks and Months, then tap “SAVE”.
![]() |
![]() |
Scanning a drink and saving it. Expiry picker with Days, Weeks and Months.
See what to eat first
The home screen lists the pantry with the soonest expiry at the top. The count turns red within a day of the date and yellow within a week.
Scan again to open it
Scanning something that is already on the list opens it instead of adding it twice. From there you can check the date or delete it.
Swipe to delete
Swipe an item from right to left and tap the red bin. Swipe from left to right anywhere to go back.
![]() |
![]() |
Keep several pantries
Tap the Pantry button to switch between pantries, such as Fridge, Freezer or Cupboard, or to create a new one.
Control center
Tap the status button at the top right for the beep switch, screen brightness and battery level. The house icon turns green when the tracker is connected to Home Assistant.
![]() |
![]() |
Browser and Home Assistant
Manage it from a browser
The same list is on a web page. You can add items by barcode, rename them and organise pantries from a computer or a phone. A small badge shows where each name came from.

Reminders in Home Assistant
Each pantry appears in Home Assistant by itself, with its item count, what is expiring soon and the next item to expire. Every scan, add and delete also fires an event. You can use this to build your own automations.

System Architecture
The tracker handles the screen and the scanner. A Docker container on your home network does the rest. It stores the list, looks up barcodes, caches product photos and publishes everything to Home Assistant over MQTT.

System overview: tracker, pantry server, product lookups and Home Assistant.
Composition of nodes
Pantry tracker: CoreS3 SE with the Module13.2 QRCode on a battery base
Pantry server: Local Docker service for the item list, product lookups, image cache and MQTT
Product data: Open Food Facts for global products; GS1 China for mainland China barcodes
Home Assistant: Receives pantry sensors and events for dashboards, alerts and automations
System Diagram

From barcode to saved item
1. Tap SCAN NOW
The scanner switches to auto mode.
2. Read the barcode
The barcode returns over UART.
3. Check for duplicates
The tracker asks the server whether the item is already saved.
4. Look up the product
The server checks its cache, Open Food Facts and GS1 China.
5. Return product data
Name, brand, size and thumbnail are sent to the tracker.
6. Pick the expiry date
Set Days, Weeks and Months, then tap SAVE.
7. Save and publish
The server stores the item and publishes sensors and events over MQTT.
Setup
Step 1: Set the QRCode module
On the QRCode module, slide the interface toggle to UART and set both the TX and RX DIP blocks to switch 2. Then stack the three parts.

Step 2: Start the server
Download the docker file from this site. Set TZ in docker-compose.yml to your time zone and run ./install.sh on a computer with Docker.
./install.sh
Step 3: Connect the tracker
Turn the tracker on, scan the QR code on its screen with your phone, and enter your Wi-Fi and the server address.
Step 4: Switch the scanner to serial mode
Tap “SCAN NOW” and scan this code once. It switches the scan engine from USB to serial.

Setting code 21424000, Serial Communication.
Step 5: Connect Home Assistant
In Home Assistant, add the MQTT integration with the server's IP address and port 1883.
Step 6: Enable China Mainland barcodes
For Chinese barcodes, add a free gds.org.cn account under Settings on the server's web page and sign in once.
Conclusion
The tracker handles the screen and the scanner. A Docker container on your home network does the rest. Scan a barcode, pick when it expires, and the screen always shows what to eat first. The same list remains available in the browser and in Home Assistant.
To use this application, download it from M5Burner Web and follow the setup steps above.
Whether you are managing a busy family kitchen, looking for a simple way to reduce food waste, or simply want to stop checking expiry dates one package at a time, the Pantry Expiry Tracker makes everyday kitchen organisation easier and more reassuring.
About M5Burner Web
M5Burner Web is a browser-based firmware discovery, sharing, review, and device flashing platform for makers and developers. It lets you browse firmware for supported M5Stack devices, review project details, and flash compatible builds directly from a web browser. Discover. Flash. Create.
Open M5Burner Web at burner.m5stack.com.
About M5Stack
M5Stack is a leading provider of modular, open-source IoT development solutions. We offer an integrated platform combining easy-to-use hardware, intuitive software, and customization services, empowering developers and businesses to rapidly prototype and deploy innovations across IIoT, smart retail, home automation, AI-powered applications, and STEM education.








