Fridge Mounted Label-maker built with Python, Kivy, and Raspberry Pi
Read the blogpost at wmcda.de/fridgr
fridgr is a fridge mounted label maker and inventory system running on a Raspberry Pi. The program provides a GUI built in Python3 and Kivy, utilizes the Open Food Facts live JSON API for UPC (barcode) lookup, and prints labels using the Brother QL package to interface with a Brother QL 700 label printer.
Fridgr is intended to be used in a household with a cavernous fridge in which the many household members forget items to expire, use items that aren't theirs, or a combination of the two. Fridgr seeks to provide a solution to this.
Fridgr lets users quickly scan and print labels as they file items away in the fridge, optionally set expiry times and reminders, and even lookup the history of certain individual items in the local database.
Even though fridgr is built to run on a Raspberry Pi 3b+, with minor tweaks, the package can run on any machine capable of running Kivy and brother_ql.
The original implementation of the fridgr system has the following build:
Item | Price |
---|---|
Raspberry Pi 3b+, 1 GB RAM, Ethernet Connection | $30-$40 |
Raspberry Pi Touch Display | $73 |
Brother QL-710 Label Printer | $40-$100 Used, $400 New? |
Handheld, Wired 2D Barcode Scanner | $20-$50 |
Total | ~$160-$260 |
At the moment I only have access to a Raspberry Pi 3b+ to run the system on. The installation instructions below are for installing the prerequisites on the Raspiberry Pi 3b+.
The packages being installed are mainly Kivy prerequisites. Install Kivy 1.1.0 according to their installation instructions for your system and you should be set. Everything else is installed through pip, shown below.
This is a TL;DR of the Kivy docs Installation on Raspberry Pi page. Check there if you run into any issues.
This was my specific installation on a headless Raspberry Pi 3b+ running Raspberry Pi OS.
- Install dependencies
sudo apt update
sudo apt install pkg-config libgl1-mesa-dev libgles2-mesa-dev \
libgstreamer1.0-dev \
gstreamer1.0-plugins-{bad,base,good,ugly} \
gstreamer1.0-{omx,alsa} libmtdev-dev \
xclip xsel libjpeg-dev
- Install more dependencies (SDL2 in my case)
sudo apt install libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev
- Update dynamic libraries
sudo ldconfig -v
For Raspberry Pi Touch Display Only
- Edit the file
~/kivy/config.ini
and add this to the [input] section
mouse = mouse
mtdev_%(name)s = probesysfs,provider=mtdev
hid_%(name)s = probesysfs,provider=hidinput
Installing fridgr and its dependencies
- Clone the repo
git clone https://github.com/wilsonmcdade/fridgr
- Create a virtual environment
python3 -m venv venv
- Enter virtual environment
source venv/bin/activate
- Install required files with pip
pip3 install -r requirements.txt
- Move to src/ directory
cd src/
- Run the app and enjoy
python3 main.py