Alexa List API to be deprecated July 1st 2024

Hi, you may be aware that Amazon will shut down their List API on July 1st 2024. This is bad as the Echo devices serve as a convenient endpoint to add stuff to all sorts of lists including integrations with Todoist, Bring and therefore HA.

Any way around this?

2 Likes

Also interested in new solutions for this

Same. It’s going to be super disruptive for our household as we use alexa for shopping list integration…

You can use Bring, but you have to relearn yourself to say “ask Bring to add X to the list”. It has a HA integration and is unaffected by the list API deprecation.

We used to use Bring with Google home before they shuttered their lists, but the Bring Alexa skill isn’t available in my country even though I’ve asked them for it many many times. We shifted to anylist.
Trying to convince my partner to say “ask to add X to the shopping list” is going to be near impossible given I can’t even convince them to say “alexa, turn the lights on” using plural “lights” instead of singular “light” because alexa doesn’t recognise the singular word.

it definitely sucks. We’re still coasting on the default Alexa lists thing and relearning will be a bitch

In the same boat as many others. We were using the Alexa list API to sync a grocery list into any list so that we had a usable front end. I had plans to display that on a HA dashboard too, but it looks like that’s not going to happen. No way the family will use a new skill that requires the user to evoke an integration first.

Since the API is shut down, it seems it will be impossible to connect HA to the built in Amazon lists. I was starting to look into replacing Alexa as a voice assistant entirely. I really only use them for timers and Spotify now that this is happening.

Amazon’s annoying decisions like this are why I moved away from them for smart home management in the first place.

ok, with some trepedation here is what I have done to make it work:

I am using node to scrape the amazon website - mainly to get through the three login screens before the list appears.

There is some mucking around using 1password as I have a OTP password on my amazon account and I needed to handle that in the script.

2 Likes

Great job! I tried it and it works (I replaced the urls with the Italian ones), but I have a few suggestions:

  • running the standalone container results in HA Supervised becoming “unsupported”, the project should be converted to a HA add-on/integration
  • I would like other methods for MFA, as 1Password is not free
  • I had to remove the listItem html tags

Nevertheless, this is a good starting point :smiley:

grazie, I missed cleaning out the list item tag will do that now! i will look at what it would take to make it work as a HA addon.

What MFA do you use?

1 Like

Great to hear! For the MFA I tinkered a little and it seems that otpauth works without external apps. I went to the 2FA page in the Amazon account and scanned the QR code to retrieve the otpauth URL, then I changed these files:

in dockerfile:

RUN npm install puppeteer ... otpauth

in script-otp.js:

const OTPAuth = require("otpauth")

async function getOTP() {
    return new Promise((resolve, reject) => {
      const totp = OTPAuth.URI.parse(URL);
      resolve(totp.generate());
    });
  }

I am not sure if having the URL in plain text in the script is secure enough tho. Anyway any solution which is free is fine by me.

Thanks for that tip I have updated it to use otpauth and included basic instructions on setting that up.

Tested it on my Italian amazon account and it works.

image

image

will look at whether I can make it run as an addon

1 Like

Hi @Jon_White,

I was able to run on my end and get the list populated in my HA.
However, every 5 minutes (when the script runs) I receive a text message with the OTP code.
Is there a config that?

Using the method suggested by @emilypeek would cause the same?

Thank you.

There is this note at the MFA registration page:

Setting an app as the preferred method

If you want to create one-time passwords from an app instead of having them delivered to your phone, clear your two-step verification settings. To do this, tap or click “Disable,” then check the box next to “Also clear two-step verification settings” in the window that appears. Finally, re-enable two-step verification using your authenticator app as your preferred method.

I then have two registered apps one for use though the browser and one for the script
image

Maybe this is the reason?

Hi @Jon_White,

I used your project as based and created one similar that does a one-way sync from Amazon Shopping List to HA.

Thanks a lot for your help. :slight_smile:

Hi @Jon_White,

In case you want to use as Home Assistant AddOn, I created one for the same purpose:

Hi Thiago,

This is amazing, thanks!

One proposal: could you also make the link to the login page and list page configurable?
I’m from Austria and use the amazon.de pages…

Thanks
Ralph

Hi @ralph1337 ,

I will try to implement that.
To be honest, this is my first project so some of the stuff that I did, I had to learn from scratch.

I want to also implement a “Debug” option in order to check what items were “collected”.

I will try to get these two items soon.

@ralph1337,

I added the URLs to the configuration in the Addon and committed to the main branch.

I still use the US URLs and cannot test with other countries.
Test when you have a chance and let me know if it worked.

Thank you.

Thanks! Works perfectly for me.

I just have adapted a few things in the automation. It also helps to simplify and get rid of the command line sensor.
You can check if the item is already in the list, directly within the automation like this:

  - action: todo.get_items
    data:
      status: needs_action
    target:
      entity_id: todo.yourlist
    response_variable: todo
  - if:
      - condition: template
        value_template: >
          {{trigger.json.name not in todo['todo.yourlist']['items'] |
          map(attribute='summary') | list}}