New service calls and sensors for shopping list component

Thank you Flovie
Yes that helped me, i have it all working now.
Ran into more problems with gmail thoo, they have beefed up their security and default setting is Not to allow unsecure apps to e-mail. I logged into my gmail and under “security…” there was an option to turn off the setting for unsecure apps.

thanks again

Hi guys.

I would like to add an item to the shopping list with snips but i am getting errors.

  addShoppingListItem:
    action:
      - service: shopping_list.add_item
        data_template:
          name: {{ shopping_item }}

This gives me this error:

Tue Jan 01 2019 15:19:43 GMT+0100 (Mitteleuropäische Normalzeit)

invalid key: "OrderedDict([('shopping_item', None)])"
  in "/home/homeassistant/.homeassistant/intent_script.yaml", line 167, column 0

check line 167 in your file intent_script.yaml
There must be an error there.

Thank you for your answer. line 167 is

name: {{ shopping_item }}

Any ideas to integrate with the google shopping list (home)?

not sure about google home. but i manage to sync the shopping list with alexa shopping list using IFTTT. Whenever Alexa shopping list is updated (i.e. item added or remove), IFTTT will update my HA shopping list via webhook.

“Add” and “Check Off” are now services, but the only way I know of to delete the checked items is to use the Lovelace card.

Would be nice to have a third service, “Delete” to actually remove a shopping list item.

There is several good ideas on this thred.

I would like to get a easyer way to have a inventory list for all my food storages. Eg one for the freezer and a other food storages like the dry cabinets and the fridge.
Now I use google shopping lists: https://shoppinglist.google.com
With google home I can use voice to add items to my primary list and all family members can do the same.
With NFC stickers I can open a spesific inventory list for the cabinet. This could also be done with QR code and camera on the phone (just opens a url).

But for a better user experience it would be good to be able to scan the barcode on my item as I put it in the trashcan, then it would be removed from my inventory list and added to the main shopping list.
Same if I put a new item into the freezer I culd just scan the barcode with the phone and it would update the inventory for the freezer.

So my wishlist for the shopping list is:

  1. The ability to add/remove items with a QR/barcode scanner for a spesific list.
  2. A sensor for lookup the barcode data e.g. from openfoodfacts.org
  3. Integration/syncronisation with my primary google shoppinglist.
1 Like

You are probably looking for something like https://grocy.info?

Thanks @cgtobi it looks like grocy.info ticks off many of my wishes.
And as it is open source, it will be possible to any thing with time and resources. I will create a account and test:)

Is there any way to sort the shopping list items? My list grew a bit large, I keep all items checked and I uncheck those that I need to buy at any given moment. So alphabetic sorting would make it easier to find the items to be unchecked.

For the record- the Grocy addon has since been introduced to HASS.

I think external database support is still currently lacking, but I was able to scan a product and manually input it’s information to a HA-acccessible local database.

1 Like

Thx, I stumbled upon this. My plan is to scan a barcode before throwing away the packaging and have the product added to a shopping list automatically. I have no idea how to do it but it’s good to know it is possible and sooner or later I’ll archive it :slight_smile:
I wonder if we could use the smartphone to scan the barcode or does it have to be a dedicated barcode scanner?
Also, current state is that the scanned barcode has to be manually linked to a product? Or is there some way to browse a db for the barcode to get the product automatically?

I’m kinda in the same boat as you… knowing it’s possible I was able to back-burner it while I get the rest of my system up to that level.

Without going back and looking- I think using a cell phone camera and external database are both things that were being worked towards, but I paid both limited attention as I have a wireless/wired barcode scanner I impulse bought from Amazon and a desire to review the items in my database both to make sure everything is configured properly (locally available brands of milk are all identified as ‘milk’) and to keep my local database to a reasonable size.

(also- the technical details of someone providing a free UPC database make me reluctant to invest too much time and effort into dependency on one source… that’s a lot of data to move and there is a reason paid databases have hefty price tags.

I didn’t even know the name of those barcodes. I found https://devs.upcitemdb.com/ and they offer free api access for 100 requests per day. Do you think this could be inteterated/connected to grocy somehow?
I mean this website probably is more for american items, I guess. I’d need sth. with european stuff.

This sounds good: https://github.com/grocy/grocy-pyscanner
Edit: oh…did you write this? :smiley:

Oh, no… I’m not affiliated with Grocy in any way… just a potential user that was happy to see there was functionality out there to handle what I consider to be an important part of my future ‘assistive human habitat’. …I’m the kind of shopper… ‘Ya know… I haven’t bought q-tips in a while’… next thing I know- I have 6 tubes of toothpaste in my bathroom closet… 9 sticks of deodorant… 6 boxes, totaling 7,500 q-tips…

…I haven’t bought shower gel in 3 years. Still have at least 2 in the closet.

Sorry… went off on a tangent… as far as database/api calls… whether 100/day is enough… depends on, well… how many things you buy when you go shopping and how the program handles lookups… if it checks the local database first or if it sends every call to the service provider.

That said- if shopping days are light in your house or your product selection… it’d be pretty hard to exceed 100/day, really…

also: …it looks like Grocy addon ‘BarcodeBuddy’ might be headed in the direction you’re looking to go.

Thx for teh addon link. 100/day is more than enough, I just need to find a database with free api calls that has products specifically sold in austria :smiley:

Eh… give building your own database a go. I briefly played with it when I found the addon and had a workflow that went something like 'go shopping>take a picture of each item I buy using my phone camera>using the browser on my phone- create basic item records, add item pictures>move over to my laptop and review/revise the item records there>adjust and tweak accordingly.

That said- I used my wireless barcode scanner via my laptop for that part of the process. your mileage may vary.