DIY Home Improvement Forum banner

1 - 18 of 18 Posts

·
Registered
Joined
·
2 Posts
Discussion Starter #1
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
 

·
Still learning every day!
Joined
·
502 Posts
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.
 

·
Registered
Joined
·
13,595 Posts
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.:biggrin2: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.
 

·
Hammered Thumb
Joined
·
3,495 Posts
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
 

·
Registered
Joined
·
2 Posts
Discussion Starter #6
Cool!

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 :|


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.


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.:biggrin2: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...
 

·
Registered
Joined
·
3,819 Posts
If I had a smart fridge I would expect it to do my taxes. No thanks.
 

·
Registered
Joined
·
2,658 Posts
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
 

·
Usually Confused
Joined
·
7,244 Posts
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.
 

·
adam
Joined
·
164 Posts
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 :)
 

·
Registered
Joined
·
4,880 Posts
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.
 

·
Registered
Joined
·
448 Posts
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
 

·
Registered
Joined
·
4,880 Posts
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.
 

·
Registered
Joined
·
3,257 Posts
My grandpa was right, "You're gettin' a little too smart for your own good." He told me that a lot! :vs_laugh:
 
  • Like
Reactions: ajaye
1 - 18 of 18 Posts
Top