DIY Smart Fridge - Home Automation - DIY Chatroom Home Improvement Forum
Advertisement


Go Back   DIY Chatroom Home Improvement Forum > Do It Yourself > Home Automation

CLICK HERE AND JOIN OUR COMMUNITY TODAY...IT'S FREE!

Like Tree8Likes
Reply
 
Thread Tools
Display Modes
Old 03-04-2020, 12:17 AM   #1
Newbie
 
Join Date: Mar 2020
Posts: 2
Rewards Points: 4
Default

DIY Smart Fridge


[font=Georgia][size=3]So, I've been working on a solution to the inventory management problem in my kitchen. Basically a barcode-enabled DIY smart-fridge.

So far I have a Raspberry Pi mounted to my fridge door that views a webpage hosted locally on a Debian server. I have a cheap barcode scanner off amazon, they connect into the USB port and output the barcode value just like a keyboard. So, I'm able to pass the barcode up to the server through a form that looks like this,


[hr]

The backend is written in PHP and connects to the free API at upcitemdb.com. There is usually a photo available along with an accurate description and a lot lot of other stuff. The UPC barcode is a unique identifier for a specific product, but it doesn't say anything about whether it is a 0.5 oz bottle or a 1 lb case of them. So, the script skims the descriptions (I learned regex for this!) to find possible unit sizes and lets the user pick the correct one. I went through my kitchen and scanned a dozen or so items in just a few minutes. Scan, use the touchscreen to confirm the size, select the amount left (in increments of 25%), and submit.

What the fridge interface looks like IRL:




Screenshot of the front-end in a browser:




Screenshot of the inventory list after scanning for 2 minutes:



[hr]

The big picture here started with me wanting to be able to grocery shop by picking recipes and then use the pickup service offered by my local grocery store (Mariano's). Think of like a DIY Blue Apron / Hello Fresh sort of deal. Inventory management fit into this because I want to be able to prioritize recipes that use ingredients I already own.

So, the other arm of this was automating the grocery selection process. I built an excel spreadsheet with ten recipes all itemized out and linked every item up to specific items on Mariano's website. That spreadsheet can take the number of servings of each recipe you want to make and spit out an aggregated list of ingredients. An Excel macro spits out a csv, which I upload to the server where a python script converts it into a javascript array (shoppingList.js). Then, Tampermonkey (Chrome addon) detects when I'm on Mariano's landing page and injects two links to scripts hosted on my server. One is the list of items, and the other is the "shopper" that opens a new tab and starts picking out items. It's not perfect yet, the script still misbehaves sometimes, but you can see it in action here,




I also have another cog in this wheel that is technically complete but I'll just describe instead of clogging this up with more screenshots. Mariano's has a cool feature where if you use your rewards# then your receipts become visible when you log in to your account. So, I have a script that scrapes these as well. The front-end UPC search will pull up items in that list too if it matches whatever was scanned.


Anyway, I'd love to hear some opinions. What do you all think?
[/size=3][/font=Georgia]


ps - the default font was clashing with the screenshots, hope it looks okay for you
adamz likes this.
mkriegs is offline   Reply With Quote
Sponsored Links
Advertisement
 
Old 03-04-2020, 08:19 AM   #2
Member
 
Join Date: Aug 2011
Location: Washington, DC area
Posts: 3,032
Rewards Points: 2,728
Default

Re: DIY Smart Fridge


Formatting is a little wonky, but it looks like an interesting project.
huesmann is offline   Reply With Quote
Sponsored Links
Advertisement
 
Old 03-04-2020, 08:54 AM   #3
Still learning every day!
 
F250's Avatar
 
Join Date: Feb 2018
Location: Charlotte, NC
Posts: 434
Rewards Points: 868
Default

Re: DIY Smart Fridge


I wouldn't have shared this, but you asked for opinions....

Interesting, perhaps. Truly useful, though? Aside from bragging rights, I just don't see where the real value lies. To each his own, though.
__________________
Pete

Bark less, wag MORE, and Show Compassion to everyone you meet!
F250 is offline   Reply With Quote
Sponsored Links
Advertisement
 
Old 03-04-2020, 09:19 AM   #4
Member
 
Join Date: Sep 2012
Posts: 11,647
Rewards Points: 4,290
Default

Re: DIY Smart Fridge


While designing smart, consider including a smart filter that changes itself when it's full of those dust / lint bunnies that swirl around on the floor and get into the cooling fins.We were once able to clean those with a vacuum/compressed/air and or a brush but nearly impossible with some of today's smarter units.
ajaye likes this.
SeniorSitizen is online now   Reply With Quote
Old 03-04-2020, 09:27 AM   #5
Hammered Thumb
 
Join Date: Dec 2018
Location: SuburbanIL
Posts: 1,759
Rewards Points: 1,282
Default

Re: DIY Smart Fridge


It's more of a "kitchen inventory" than just the ref contents, maybe you can expand to toiletries and personal care from another store too (I'm guessing you shop at bullseye). The % left might mislead you, because you don't have a default "count" listed so you know % of what (1 gallon milk is self-explanatory, but do you always keep 2 dozen eggs or do you always buy the same six-pack of soda or once in a while a 2 liter).

I'd like to make a joke about having too much time instead of a girlfriend, but instead I'll say this is the essence of the DIY spirit, so good start!

P.S. Mariano's is overpriced
ajaye likes this.
3onthetree is offline   Reply With Quote
Old 03-04-2020, 07:14 PM   #6
Newbie
 
Join Date: Mar 2020
Posts: 2
Rewards Points: 4
Default

Re: DIY Smart Fridge


Cool!

Quote:
Originally Posted by huesmann View Post
Formatting is a little wonky, but it looks like an interesting project.
Posted to another forum first and apparently these boards don't support the same markup, and it won't let me edit since it's my first post, this is awkward :|


Quote:
Originally Posted by F250 View Post
Interesting, perhaps. Truly useful, though? Aside from bragging rights, I just don't see where the real value lies. To each his own, though.
I honestly agree. I've done all this in a vacuum, so I'm hoping at this point that there might be some established tools for me to make use of.


Quote:
Originally Posted by SeniorSitizen View Post
While designing smart, consider including a smart filter that changes itself when it's full of those dust / lint bunnies that swirl around on the floor and get into the cooling fins.We were once able to clean those with a vacuum/compressed/air and or a brush but nearly impossible with some of today's smarter units.
Hmmm, I'm thinking about water cooled condenser. Eliminate the exposed surface area, but where to sink the heat...
mkriegs is offline   Reply With Quote
Old 03-05-2020, 12:11 AM   #7
Member
 
Join Date: Nov 2019
Location: NY and FL
Posts: 890
Rewards Points: 1,784
Default

Re: DIY Smart Fridge


If I had a smart fridge I would expect it to do my taxes. No thanks.
Dave Sal and lenaitch like this.
Old Thomas is offline   Reply With Quote
Old 03-05-2020, 06:57 AM   #8
Member
 
Join Date: Sep 2012
Posts: 11,647
Rewards Points: 4,290
Default

Re: DIY Smart Fridge


Quote:
Originally Posted by mkriegs View Post



Hmmm, I'm thinking about water cooled condenser. Eliminate the exposed surface area, but where to sink the heat...



If it's smart it'll store it to be released in the winter months.
SeniorSitizen is online now   Reply With Quote
Old 03-05-2020, 07:18 AM   #9
Member
 
Join Date: Feb 2016
Posts: 2,395
Rewards Points: 546
Default

Re: DIY Smart Fridge


First off great choice of hot sauce. I like that one better then all of them. I would really like to have our groceries delivered. But creating and maintaining the list in order to get the correct brands, sizes etc to me would be cumbersome without some type of help. I wouldnít want to sit in front of a computer for 30 minutes to create one. I would just go pick them up instead. Your start of the program is definitely a step in the right direction. The local Walmart will have everything boxed and bagged and meet you at your car but doesnít deliver. But Iím one of those hard headed guys that spends all my money at the local grocer and drive right by Walmart to get there. The local grocers here donít deliver or offer any type of service so I guess Iím going to keep up the old ways. Hats off to your project. Hope it works out for you!


Sent from my iPhone using Tapatalk
BayouRunner is offline   Reply With Quote
Old 03-05-2020, 08:07 AM   #10
Usually Confused
 
lenaitch's Avatar
 
Join Date: Feb 2014
Location: Central Ontario, Canada
Posts: 5,855
Rewards Points: 1,270
Default

Re: DIY Smart Fridge


Cool DIY project exercise but it seems like a solution looking for a problem in a typical household.
We have a magentic-mounted paper pad on the fridge door.
huesmann likes this.
__________________
_________________________________________
Pro patria
lenaitch is offline   Reply With Quote
Old 03-06-2020, 04:57 PM   #11
adam
 
Join Date: May 2018
Posts: 92
Rewards Points: 184
Default

Re: DIY Smart Fridge


That spreadsheet can take the number of servings of each recipe you want to make and spit out an aggregated list of ingredients. An Excel macro spits out a csv, which I upload to the server where a python script converts it into a javascript array (shoppingList.js). Then, Tampermonkey (Chrome addon) detects when I'm on Mariano's landing page and injects two links to scripts hosted on my server. One is the list of items, and the other is the "shopper" that opens a new tab and starts picking out items. It's not perfect yet, the script still misbehaves sometimes, but you can see it in action here

You can do all the above with PHP on the server without excel. You would need your PHP code to accept the "recipe" into a textbox on the web page, then click Submit, then a web page appears with your grocery list.


This is an example of a PHP form: https://www.w3schools.com/php/php_forms.asp
The basic idea is the same, except your PHP code would output more stuff



Pretty cool stuff on your part :-)
adamz is offline   Reply With Quote
Old 03-10-2020, 06:40 PM   #12
Member
 
Missouri Bound's Avatar
 
Join Date: Apr 2011
Location: Almost Arkansas
Posts: 3,154
Rewards Points: 2,780
Default

Re: DIY Smart Fridge


Alexa makes up my lists. I tell her what I want and when I am ready to shop I print it.
And a smart fridge would open and close the door on command.
__________________
Do you want it your way or the right way?
Missouri Bound is offline   Reply With Quote
Old 03-13-2020, 08:50 AM   #13
Member
 
Join Date: May 2019
Location: Canadia, Ontario
Posts: 161
Rewards Points: 320
Default

Re: DIY Smart Fridge


The only thing I want in a smart fridge, is for bringing me an ice cold one, my current product WiFEE 2.0 is broken and wont do this anymore
ajaye is offline   Reply With Quote
Old 03-13-2020, 12:02 PM   #14
Member
 
Missouri Bound's Avatar
 
Join Date: Apr 2011
Location: Almost Arkansas
Posts: 3,154
Rewards Points: 2,780
Default

Re: DIY Smart Fridge


Quote:
Originally Posted by ajaye View Post
The only thing I want in a smart fridge, is for bringing me an ice cold one, my current product WiFEE 2.0 is broken and wont do this anymore
.....and from experience, telling her you are going to trade her in isn't the best course of action.
ajaye likes this.
__________________
Do you want it your way or the right way?
Missouri Bound is offline   Reply With Quote
Old 03-13-2020, 12:10 PM   #15
Member
 
Join Date: May 2019
Location: Canadia, Ontario
Posts: 161
Rewards Points: 320
Default

Re: DIY Smart Fridge


yeah, I was kinda working on "getting" the newer model first then telling her she gone !

Quote:
Originally Posted by Missouri Bound View Post
.....and from experience, telling her you are going to trade her in isn't the best course of action.
ajaye is offline   Reply With Quote
Sponsored Links
Advertisement
 
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





Top of Page | View New Posts