One thing I always wanted to do was to use HA to track what I have in my pantry. My pantry is in the cellar, and it’s a pain to go down, look for something, and realize you don’t have what you want, or buy something and find out you’re already fully stocked.
So I was looking for extensions/components that could use the camera on my phone to scan the barcodes, and store the info.
I was really excited to find the extensions BeepBasket, which is really great. Here it is: BeepBasket - Barcode scanning directly to your shopping list
However, I could not get it to work with my phone, the camera never worked. The only thing to do was to fork it, and see what I could do. In honor of the great work of the original dev, I named my forked component BeepPantry.
I am not a developer, so I used Claude to help me I confess, and together, we came up with what I consider improvements:
- re-adjusted the components to become a pantry/stock manager (BeepBasket purpose was to add an item you throw away in a shopping list)
- more controls on the camera
- possibility to adjust zoom, focus, select camera, etc…
- still possible to use a barcode scanner entity (one to add a product in your stock, one to remove a product once used)
- possibility to add a threshold value before adding an item in a shopping list
- and some more, detailed in the README
The biggest improvement in my mind is the control you have on the camera. You can select the camera you use (by default, my phone used the wide angle lens, which is really not great for barcode scanning). And you can adjust the focus, the zoom, use autofocus (if the camera/lens allows it, you can see the debug detail of the camera).
It stills uses OpenFoodFacts, but the latest version of the API (3.6), so it only works with food.
I still have a few things to iron out (overflowing of the card, some formatting in the Edit Product window), but the component is functional, and can be installed via HACS (add https://github.com/abesnier/beeppantry as a repo)
I hope this could as useful to someone else as it is to me.
And thanks again to m_wynand for the original BeepBasket.
Cheers
Antoine



