Smart Fridge

For our end-project for school we (Vincent & I) wanted to create something awesome, something with lights, buttons, Raspberry Pi, thermal printer and an app. We wanted to make something smart and eventually we got the idea:

smart-fridge

A Smart Fridge!

And we made it. It was a lot of work and it took too many hours, but it was all worth it!

We used a lot of online resources, from StackOverflow to the Raspberry Pi forum, so we want to share it with you, to thank the community. We first want to show the project and then explain how you can create your own Smart Fridge and finally we’ll show you some of the tricks we did to make it.

What is the Smart fridge

The smart fridge is a fridge that knows what is in your fridge. It uses a Raspberry Pi in the fridge to send the changes to the a server that holds the changes and serves the information to the app.

App

The app is (currently) the only method to view the contains of the fridge and the only way of controlling the fridge. On the homescreen you can see which items and how many items are in your fridge. There are two counters: open and closed, the open counter is for the opened packages and the closed counter is for the untouched items. With the switch you can switch between the items that are in the fridge and all items(the items that were in your fridge at some time, but are not in there at the moment). You can also see whether the fridge is online or offline. If the Raspberry Pi hasn’t send a message to the server in 10 minutes, it is presumed offline.

On the jobs page you can create a job(shutdown, restart, print a text or a barcode). These jobs are send to the server and the Raspberry Pi will do it.

The log page is the page where you can see what happened, from making or creating a job to which item was added or removed from the fridge, even at what time. With this feature you can get to know when the cookies were stolen.

The shopping list page shows you what you need to buy to fill the fridge to the highest amount since resetting the list. With the left button you can print the shopping list and it will come out of the fridge in less than 10 seconds (depends on WiFi and other jobs).

 Smart Fridge

Raspberry Pi

The Raspberry Pi sends a request whenever you scan something with the barcode scanner. With the buttons you can set the direction of the to be scanned item (red=out, green=in, blue=open in). The Raspberry Pi has no database, so it doesn’t matter for the app if the fridge is offline. The thermal printer prints whatever you want to print.

HINT: Don’t turn the fridge on, because it won’t do good to the electronics.

Server

The server saves the data send from the Raspberry Pi and the App and serves them to the devices. It logs everything that happens, logging in, downloading the contains, creating a job. Also the errors are logged in a table. The whole documentation of the server/API can be seen at https://arendjan.github.io/slate/.

Create it yourself!

All our code is available on our Github and can be downloaded to be installed on your Raspberry Pi, server or Android Phone, but that is not necessary.

Software

Before installing you need to obtain an userId, this is a secret string that identifies your fridge from the other fridges on our/your server. Go to http://pws.svshizzle.com/generateUserId and fill in your email address (we won’t spam you, but when you spam our server, we will send you a message). You will then get your userId.

The only thing you need to do(software) is download the installer script (https://github.com/ArendJan/pws/blob/master/install.py) and run it twice. You need to run it twice, because it installs a Python package and it is not loaded the first time, only the second time. We also created a sh script, but we haven’t tested it yet.

Read More:  Smart Fridge

Scroll to Top
Scroll to Top
Read previous post:
Atmel SAM D09 Development board
Atmel SAM D09 Development board

Introduction The Atmel SAM D series of 32-bit microcontrollers includes several devices, each with a long list of features at...

Close