Alexa Devices: Failed setup, will retry: 'Default_Location'
The problem
When attempting to setup the Amazon Alexa Devices integration, I get an "Failed setup, will retry: 'Default_Location'" error.
more details from the log:
Logger: homeassistant.components.alexa_devices Source: helpers/update_coordinator.py:382 integration: Alexa Devices (documentation, issues) First occurred: 16:40:43 (12 occurrences) Last logged: 16:47:44
Unexpected error fetching [email protected] data Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 382, in _async_refresh self.data = await self._async_update_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/alexa_devices/coordinator.py", line 54, in _async_update_data return await self.api.get_devices_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.13/site-packages/aioamazondevices/api.py", line 700, in get_devices_data entity_ids_list = await self._get_devices_ids() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.13/site-packages/aioamazondevices/api.py", line 516, in _get_devices_ids default_location = location_details["Default_Location"] ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^ KeyError: 'Default_Location'
What version of Home Assistant Core has the issue?
core-2025.6.1
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Alexa Devices
Link to integration documentation on our website
https://www.home-assistant.io/integrations/alexa_devices
Diagnostics information
No response
Example YAML snippet
Anything in the logs that might be useful for us?
Additional information
No response
Hey there @chemelli74, mind taking a look at this issue as it has been labeled with an integration (alexa_devices) you are listed as a code owner for? Thanks!
Code owner commands
Code owners of alexa_devices can trigger bot actions by commenting:
@home-assistant closeCloses the issue.@home-assistant rename Awesome new titleRenames the issue.@home-assistant reopenReopen the issue.@home-assistant unassign alexa_devicesRemoves the current integration label and assignees on the issue, add the integration domain after the command.@home-assistant add-label needs-more-informationAdd a label (needs-more-information, problem in dependency, problem in custom component) to the issue.@home-assistant remove-label needs-more-informationRemove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.
(message by CodeOwnersMention)
alexa_devices documentation alexa_devices source (message by IssueLinks)
🔍 Potential duplicate detection
I've analyzed similar issues and found the following potential duplicates:
What to do next:
- Please review these issues to see if they match your issue
- If you find an existing issue that covers your problem:
- Consider closing this issue
- Add your findings or 👍 on the existing issue instead
- If your issue is different or adds new aspects, please clarify how it differs
This helps keep our issues organized and ensures similar issues are consolidated for better visibility.
This message was generated automatically by our duplicate detection system.
Hi, thx for reporting.
Please test the library via command line: https://github.com/chemelli74/aioamazondevices?tab=readme-ov-file#test
It will create a out folder with some debugging files; for this issue I need you to share all "api-phoenix.json".
There should not be sensitive data inside, but if you prefer you can join HomeAssistant on Discord and then contact me: chemelli74#2180
So you can share the file privately.
Same here, on the first attempt it was "Failed setup, will retry: 'Default_Location'", deleted it to setup again and now always "Unknown error" or "Invalid authentication"
I'm in Portugal but the amazon account is from Spain
Please follow the steps mentioned above
Same here, on the first attempt it was "Failed setup, will retry: 'Default_Location'", deleted it to setup again and now always "Unknown error" or "Invalid authentication"
I'm in Portugal but the amazon account is from Spain
Solved, I remembered that my account was created a long time ago in amazom.com, but it was not logging in selecting US has the default country, with the error message "Invalid authentication". After restarting HA and using US as default country it worked.
Hi, thx for reporting.
Please test the library via command line: https://github.com/chemelli74/aioamazondevices?tab=readme-ov-file#test
It will create a
outfolder with some debugging files; for this issue I need you to share all "api-phoenix.json". There should not be sensitive data inside, but if you prefer you can join HomeAssistant on Discord and then contact me:chemelli74#2180So you can share the file privately.
Hi, thanks for your support/reply
i runned “ pip install aioamazondevices” in the command line (in “Advanced SSH and web terminal”. after this i tried to run: python library_test.py but got this error:
i do something wrong… can you give me some more info about how to proceed?
Nothing wrong, the script needs to be downloaded manually as it's not part of the library.
Thank you for taking the time to test
Nothing wrong, the script needs to be downloaded manually as it's not part of the library.
this resulted in another error:
You are not running it in the same system when aioamazondevices is installed. Please double check your env.
From the log files I could see my home region was NA (North American). Set the account up a long time ago. Using https://www.amazon.com/hz/mycd/myx?ref_=myx_address_ux&language=en#/home/settings/payment?activity=changeCOR or https://www.amazon.com/gp/help/customer/display.html?nodeId=GKLNQTSN7HKK5SBT I was able to change my address and with it my own country. I also used the Kindle payment option to move my account to Amazon.nl. Don't know exactly which one did the job but it now works.
Thx for the feedback, and happy it now works !
@DennisAppelman base don the feedback from the others having this issue, please check your Amazon account settings.
From the log files I could see my home region was NA (North American). Set the account up a long time ago. Using https://www.amazon.com/hz/mycd/myx?ref_=myx_address_ux&language=en#/home/settings/payment?activity=changeCOR or https://www.amazon.com/gp/help/customer/display.html?nodeId=GKLNQTSN7HKK5SBT I was able to change my address and with it my own country. I also used the Kindle payment option to move my account to Amazon.nl. Don't know exactly which one did the job but it now works.
Can't seem to get it working on my account. I always kept getting default location error. But ever since I moved my kindle to amazon.nl, I now get a new unknown error when I attempt to add my account.
Logger: aiohttp.server Source: /usr/local/lib/python3.13/site-packages/aiohttp/web_protocol.py:481 First occurred: 12:51:07 PM (3 occurrences) Last logged: 12:51:28 PM Error handling request from 172.30.33.4
Traceback (most recent call last): File "/usr/local/lib/python3.13/site-packages/aiohttp/web_protocol.py", line 510, in _handle_request resp = await request_handler(request) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.13/site-packages/aiohttp/web_app.py", line 569, in _handle return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.13/site-packages/aiohttp/web_middlewares.py", line 117, in impl return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 92, in security_filter_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 210, in forwarded_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 26, in request_context_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 86, in ban_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 242, in auth_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/headers.py", line 41, in headers_middleware response = await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/http.py", line 73, in handle result = await handler(request, **request.match_info) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/decorators.py", line 83, in with_admin return await func(self, request, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 227, in post return await super().post(request, flow_id) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 74, in wrapper return await method(view, request, data, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 121, in post result = await self._flow_mgr.async_configure(flow_id, data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 336, in async_configure result = await self._async_configure(flow_id, user_input) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 383, in _async_configure result = await self._async_handle_step( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ flow, cur_step["step_id"], user_input ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) ^ File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 487, in _async_handle_step result: _FlowResultT = await getattr(flow, method)(user_input) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/alexa_devices/config_flow.py", line 34, in async_step_user data = await client.login_mode_interactive(user_input[CONF_CODE]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.13/site-packages/aioamazondevices/api.py", line 622, in login_mode_interactive login_soup, _ = await self._session_request( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<3 lines>... ) ^ File "/usr/local/lib/python3.13/site-packages/aioamazondevices/api.py", line 367, in _session_request raise CannotRetrieveData( f"Request failed: {HTTPStatus(resp.status).phrase}" ) aioamazondevices.exceptions.CannotRetrieveData: Request failed: Not Found
Need full debug log.
If you don't want to share it here, join HomeAssistant on Discord and then contact me: chemelli74#2180
BTW, which devices you see if you logon on the Alexa Mobile App ?
@DennisAppelman , @Skyridr , if you still have issues worth a try opening https://alexa.amazon.com/api/users/me from your browser after autenticating to amazon home page, at the very beginnign you'll see:
countryOfResidence
and at the very end:
marketPlaceDomainNamemarketPlaceLocale
Those should indicate the setting of your account and may help with this issue.
thanks for the advice.
ş get this data from amazon: "countryOfResidence":"NL" "marketPlaceDomainName":"https://www.amazon.com" "marketPlaceLocale":"en-US
when i try to setup Alexa devices it gives this error: Failed setup, will retry: Error occurred while updating @.***
unfortunately the problem does still exist.
regards Dennis
Op ma 30 jun 2025 om 12:47 schreef Simone Chemelli @.***
:
chemelli74 left a comment (home-assistant/core#146824) https://github.com/home-assistant/core/issues/146824#issuecomment-3018502716
@DennisAppelman https://github.com/DennisAppelman , @Skyridr https://github.com/Skyridr , if you still have issues worth a try opening https://alexa.amazon.com/api/users/me from your browser after autenticating to amazon home page, at the very beginnign you'll see:
- countryOfResidence
and at the very end:
- marketPlaceDomainName
- marketPlaceLocale
Those should indicate the setting of your account and may help with this issue.
— Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/146824#issuecomment-3018502716, or unsubscribe https://github.com/notifications/unsubscribe-auth/BE5IQCKCZSNG7P6O2SW5OTL3GEBUZAVCNFSM6AAAAAB7KBTMGSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTAMJYGUYDENZRGY . You are receiving this because you were mentioned.Message ID: @.***>
ş get this data from amazon: "countryOfResidence":"NL" "marketPlaceDomainName":"https://www.amazon.com" "marketPlaceLocale":"en-US
As https://www.amazon.nl do exist, you have to move your account from US to NL and then this specific "Default_Location" error will be fixed.
thanks for the advice.
ş get this data from amazon: "countryOfResidence":"NL" "marketPlaceDomainName":"https://www.amazon.com" "marketPlaceLocale":"en-US
when i try to setup Alexa devices it gives this error: Failed setup, will retry: Error occurred while updating @.***
unfortunately the problem does still exist.
regards Dennis
Op ma 30 jun 2025 om 12:47 schreef Simone Chemelli @.*** …
Just want to add that I'm having the same issue, though I'm in the UK and have that set. The only options I have when connecting the Alexa integration are location, username, password, OTP. I get passed this, but it fails on the next page with the above message.
@Wo0dsw0rth , https://github.com/home-assistant/core/issues/146824#issuecomment-3018502716
@Wo0dsw0rth , https://github.com/home-assistant/core/issues/146824#issuecomment-3018502716 Thanks Chemelli74, I did try accessing the URL, but got error 401 and couldn't load the website.
Thanks Chemelli74, I did try accessing the URL, but got error 401 and couldn't load the website.
You need to try https://alexa.amazon.com/api/users/me from a machine where you are logged onto the (standard) amazon website.
For UK the URL is: https://alexa.amazon.co.uk/api/users/me
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.