Anylist shopping list + HASS Shopping list - Assistance needed

Our family is using Anylist to manage shopping lists, I do not wish to switch to a different platform. Anylist is also synced with Alexa, and that works fine to add/remove items using voice commands to Alexa.
I’m looking for a way to display the shopping list on the Home Assistant dashboard, an existing Anylist integration does not exist. There also does not seem to be an existing solution to integrate the Alexa shopping list into Home Assistant.
I’ve found a nodeJS project, which I was able to set up and it works great:

With this package I’m able to read my shopping list, add or remove items. This works great.
I’m looking for a way to integrate this into Home Assistant’s shopping list integration. So an item that’s added to my shopping list will be automatically added to the Home Assistant shopping list, same for removals of items. This will allow me to use the existing Home Assistant shopping list integration and UI.
What should be the next step here? Is someone interested in picking this up and creating an integration for this use case? There are a lot of discussions on the forum with people asking for something like that, I think this nodeJS package is the closest we have so far.

Any help will be highly appreciated…

5 Likes

I’ve created a custom addon and integration that integrates Anylist with Home Assistant. It currently supports service calls and home assistant intents but with the new 2023.11 release I’m looking to implement todo list support soon.

The addon is here GitHub - kevdliu/hassio-addon-anylist: Home Assistant addon for Anylist
and the integration is here GitHub - kevdliu/hacs-anylist: Home Assistant integration for Anylist

3 Likes

I’ll check it out soon, this is amazing! Can you give an example to a Lovelace card that shows the items? I didn’t quite understand what you do with the list of items.
What I have discovered since making the original post is that I can link both anylist and todoist in the Alexa app settings, and they don’t interrupt each other. So we have a paid membership to anylist, mainly for the family sharing, and Alexa then also syncs everything to the free todoist account I created. And todoist have a built in integration in home assistant. So every item I add with Alexa gets added to both anylist and todoist and it syncs with the hass shopping list. Removing an item in Hass removes it from todoist, syncs with Alexa which then removes it from anylist. It only sounds complicated, but it really only means setting up a free account on todoist.

Your solution, @kevdliu is superior because it retains the categories from anylist, which the built in shopping list doesn’t seem to have (yet).

In either case, and with either solution, I’m struggling a bit with lovelace, I’m looking for a way to show the items in a way that will save me space on the tablet screen. I love the layout that’s in bring! Shopping list, where it’s a grid of items. I was thinking of a bunch of “chips”, I tried to get some assistance here but didn’t get far:

I just released a new version of the integration that supports the new to-do list UI introduced in Home Assistant 2023.11.0. 2023.11 To-do: Add release title - Home Assistant

You’ll be able to add lovelace to-do list cards to display and manage your Anylist lists. I don’t think it supports displaying items in a grid like you mentioned though.

1 Like

Right, I’m looking for ways to create the grid look, I can’t find any card that can do that right now.

I started a new post thread just for the design of the card. I was able to get close with an entity card, but not sure what to do next…

Thank you for your work on the anylist intregration @kevdliu ! I am trying to set it up, but I am running into some difficulties: the services are not showing up for me.

Steps I took:

  1. Install AnyList addon, configure anylist information and choose port.
  2. Start AnyList addon, verify I can go to http://homeassistant.local:1234/ (I chose port 1234 in addon), this returns a page, so it is found ‘Cannot GET/’
  3. Install AnyList intregration
  4. Restart HA: integration did not prompt for any addon server address as is described in the github readme
  5. Go to config/custom_components/anylist and edit ‘Strings.json’ to use:
    "server_addr": "http://127.0.0.1:1234"
    and
    "default_list": "Shop"
  6. Restart HA again
  7. Not working, not getting the service calls, and not seeing any extra lists in my ToDo either.

In my home assistant logs I don’t see anything going wrong, I only see the following logging:

2023-11-08 10:16:39.593 DEBUG (MainThread) [custom_components.hacs] <Integration kevdliu/hacs-anylist> Getting repository information
2023-11-08 10:16:40.075 DEBUG (MainThread) [custom_components.hacs] <Integration kevdliu/hacs-anylist> Running checks against v1.2.0

Am I missing anything?

After installing the integration via HACS, you have to add it to Home Assistant. The steps are the same as a normal integration and Anylist should show up in the list.

Okay that makes sense, I feel stupid now :sweat_smile:Works like a charm now though, thanks for the quick help!

Thanks for this. I’ve been using AnyList for a while because it was easy to use with my Google speakers to add items to a shopping list, until Google cancelled the api that allowed this to work earlier this year.

I have one Amazon speaker that I can still use to add items via voice command. Hopefully this will give me some more options to manage AnyList.

@kevdliu That’s great integration!. Cannot yet make it work with Assist (intent not found), but I will debug it. I wanted this for so long!

One question: why add-on, and not clean integration? Some restrictions on network, or library cannot be included? It would be much easier without add-on, so I’m sure you were considering this option…

Edit: got assist working - should have read docs more carefully, it’s just basic intents. Will extend similar to ToDo, to accept list name. Overall it’s beautiful job, thanks again!

Glad you got intents working! For whatever reason the built-in shopping list intents are hardcoded to only work with the built-in shopping list integration. Hopefully they’ll change this in the future. In the meantime we’ll have to handroll our own solution using either automations or the custom_sentences templates.

Regarding the addon, there’s really no technical besides simply laziness :sweat_smile:. When I was first trying to create the integration, I ran across an existing anylist api library (GitHub - codetheweb/anylist: 📋 a wrapper for AnyList's API (unoffical, reverse engineered)) written in javascript. Home assistant integrations are written in python, so I decided it was easier to create an addon that bridges the nodejs library and the python integration instead of rewriting the whole library from scratch in python.

I’m currently working on packaging the nodejs server in the addon into a standalone executable that the integration can execute so hopefully in the future the addon won’t be needed anymore.

Cool job! I thought there’s python lib for Anylist - now I get it. :slight_smile:

Yeah, I moved my custom_sentences to Anylist services - looks like Todo list has no service to list items. What a shame. But your integration has, and I actually don’t need anything besides those lists for now.

Thanks again for the integration.

If you are still looking to use google home you can still integrate everything via gkeep-list-sync.

The workflow is long and involved but it does work haha
Voice command to GH → Google keep note → gkeep-list-sync via an automation to sync every x mins → automation to take even of a todo being added to the shopping list to then add it via the anylist integration/add on

This is fantastic! Are there any plans for integrating the meal plan / recipes into Home Assistant as well? Our family uses the entire app daily, including while cooking. I’ve been trying to figure out how to make HA a one-stop shop for our kitchen tablet, and would LOVE to be able to!

1 Like

This is wonderful. Thank you for putting this together. My family and I use Anylist and really like it as well.

Do you have any plans to release this as a stand-alone Docker for folks like me who run HA as a Docker and can’t use add-ons? Any advice on getting this going would be most appreciated!

I don’t use the meal plan / recipes feature myself so no concrete plans to implement it at the moment. If someone creates a pr that adds the feature I would be happy to review and merge it though. Out of curiosity, how do you use the meal plan / recipes feature in home assistant?

Yeah I’m currently working on creating a generic docker image for the addon so that it can be used with regular docker installations.

1 Like

FYI I updated the repo with docker instructions

Works great! Thanks for your work on this project and creating the Docker version as well!