alexa_media_player: problem to reconfigure integration/authentication

IMPORTANT: Please search the issues, including closed issues, and the FAQ before opening a new issue. The template is mandatory; failure to use it will result in issue closure.

Describe the bug

I found alexa media player not configured; then I tried to configure again but I found a new form: tried to supply data many times, but integration is always not working. howto I can supply information in second and third value? Schermata 2024-10-05 alle 20 35 34

To Reproduce

  1. Go to ‘integration’
  2. Click on ‘alexa media player’
  3. Scroll down to ‘reconfigure’
  4. See error

Expected behavior

integration working fine; no re-authentication request; what I have to insert in second and thir value? device to add and device not to add?

what means error:

AlexaAPI: An exception of type TypeError occurred. Arguments: (‘can only concatenate str (not “NoneType”) to str’,)

I use HASSOS, I’m not able to install/update alexapy module…I don’t have pip3 available…

System details

  • Home Assistant version: 2024.10.1 on HASSOS
  • alexa_media version (from const.py or HA startup log): 4.13.2
  • alexapy version (from pip show alexapy in homeasssistant container or HA startup log): I don’t have pip tool available
  • Is Amazon 2FA/2SV enabled <!—We will not debug login issues if unanswered—> (y/n): YES
  • Amazon Domain: amazon.it

Debug Logs (alexa_media & alexapy)

2024-10-05 14:37:32.289 DEBUG (MainThread) [custom_components.alexa_media.helpers] di@gm: Returning uuid {‘uuid’: ‘268d2309eb7b7db11ecdb201b0c911e3’, ‘index’: 0} 2024-10-05 14:37:32.326 DEBUG (MainThread) [alexapy.alexalogin] Creating TOTP for H******************************************D2A 2024-10-05 14:37:32.327 DEBUG (MainThread) [alexapy.alexalogin] Generating OTP 966056 2024-10-05 14:37:32.327 DEBUG (MainThread) [alexapy.alexalogin] Login created for xxxxxxxxxx@gmail.com - amazon.it 2024-10-05 14:37:32.330 DEBUG (MainThread) [alexapy.alexalogin] Searching for cookies from /config/.storage/alexa_media.xxxxxxxx@gmail.com.pickle 2024-10-05 14:37:32.330 DEBUG (MainThread) [alexapy.alexalogin] Trying to load cookie from file /config/.storage/alexa_media.xxxxxxxxx@gmail.com.pickle 2024-10-05 14:37:32.339 DEBUG (MainThread) [alexapy.alexalogin] Trying to load aiohttpCookieJar to session 2024-10-05 14:37:32.351 DEBUG (MainThread) [alexapy.alexalogin] Searching for cookies from /config/alexa_media.dxxxxxxx@gmail.com.pickle 2024-10-05 14:37:32.352 DEBUG (MainThread) [alexapy.alexalogin] Searching for cookies from /config/.storage/alexa_media.xxxxxxxxxxxx@gmail.com.txt 2024-10-05 14:37:32.352 DEBUG (MainThread) [alexapy.alexalogin] Using credentials to log in 2024-10-05 14:37:32.352 DEBUG (MainThread) [alexapy.alexalogin] Attempting oauth login to https://www.amazon.com/ap/signin?openid.return_to=https://www.amazon.com/ap/maplanding&openid.assoc_handle=amzn_dp_project_dee_ios&openid.identity=http://specs.openid.net/auth/2.0/identifier_select&pageId=amzn_dp_project_dee_ios&accountStatusPolicy=P1&openid.claimed_id=http://specs.openid.net/auth/2.0/identifier_select&openid.mode=checkid_setup&openid.ns.oa2=http://www.amazon.com/ap/ext/oauth/2&openid.oa2.client_id=device:323638643233303965623762376462313165636462323031623063393131653332333431333234393536346335363335353634643332353733383331&openid.ns.pape=http://specs.openid.net/extensions/pape/1.0&openid.oa2.response_type=code&openid.ns=http://specs.openid.net/auth/2.0&openid.pape.max_auth_age=0&openid.oa2.scope=device_auth_access&openid.oa2.code_challenge_method=S256&openid.oa2.code_challenge=jTRCQHzjPbr_n_zvxBFTX_oTbCDASrGaTpLi78c2eDs&language=it_IT 2024-10-05 14:37:32.352 DEBUG (MainThread) [alexapy.alexalogin] Loaded last request to https://www.amazon.com/ap/register 2024-10-05 14:37:32.353 DEBUG (MainThread) [alexapy.alexalogin] Processing https://www.amazon.com/ap/register 2024-10-05 14:37:32.419 WARNING (MainThread) [alexapy.helpers] alexalogin.login((<alexapy.alexalogin.AlexaLogin object at 0x7fc40edda8d0>,), {‘cookies’: {}}): An error occurred accessing AlexaAPI: An exception of type TypeError occurred. Arguments: (‘can only concatenate str (not “NoneType”) to str’,)

Additional context

Hassos 2024.10.1 on VM

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 19

Commits related to this issue

Most upvoted comments

What I’ve found so far (fellow italian user speaking): as long as you just read sensors (for instance temperature, next alarm, etc) it works fine. As soon as you send a command to the device (be it media player or a vocal input), something breaks and it asks to be reconfigured just as you showed. I’ve tried everything: delete and re-add, re-authenticate in every way possible, but no luck so far. As I understand, it’s an issue limited to amazon.it domain (and maybe some others). We’ll wait and hope in further updates…

I done again alexa integration, and now seems to be ok, but I’m not able to control my echo dot; in logs I found this:

2024-10-06 21:59:29.222 DEBUG (MainThread) [alexapy.alexaapi] d******i@gm:Login error detected; ignoring post request to /api/np/command with {‘type’: ‘PlayCommand’} {‘deviceSerialNumber’: ‘G0922H0725120SFN’, ‘deviceType’: ‘A4ZXE0RM7LQ7A’} 2024-10-06 21:59:29.222 WARNING (MainThread) [alexapy.helpers] alexaapi.play((<alexapy.alexaapi.AlexaAPI object at 0x7f3a4f3eb950>,), {}): An error occurred accessing AlexaAPI: An exception of type AlexapyLoginError occurred. Arguments: (‘Login error detected; not contacting API’,)