Here’s something to try for those dealing with Captcha not showing issues, I had a small issue with the Captcha after upgrading to HA 0.74.0…
Delete the "custom_components/media_player/__pycache__" folder.
Restart HA
Hard refresh the HA page in your browser.
On Windows/Linux, Hold down Ctrl and press F5 for Chrome/Firefox/Edge…
On Mac, Hold ⇧ Shift and click the Reload button for Chrome/Firefox.
I find a Hard refresh usually fixes 99% of my frontend issues with updates or new components. If anything it’s something to check off the list since I haven’t seen it mentioned yet.
Issue is from those who have long ping times to US (i.e. AU/ NZ, etc.)
I get the same ‘update’ error timing (and always have since you first made this module).
Internet on this side of the planet uses a carrier pigeon sometimes :-/
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host=‘www.alexa.amazon.com’, port=443): Max retries exceeded with url: /gp/sign-in.html (Caused by NewConnectionError(‘<urllib3.connection.VerifiedHTTPSConnection object at 0x7f833682b0>: Failed to establish a new connection: [Errno -2] Name does not resolve’,))
using url: amazon.com.au results in no captcha being requested.
Doesn’t matter which country you are from, or which country you are travelling to now, let’s say.
All it matters is the domain of the account that has the Alexa / Echo devices binded to it.
I have amazon accounts on .com, .uk, .au, but my devices are all on amazon.com … so .com it is for me.
If the .com website has high latency there isn’t much that I can do. The major issue with increasing the update interval is that it will increase the time it takes for the comment to see state changes in the media players. So say if I increased it to 30 seconds, it would mean it could take up to 30 seconds for a media player to show the next song title or album art when the echo moves to a new song.
The only real option would be to allow the user to set the update interval for themselves, so that they could decide just what is acceptable.
I applied a fix today that instead of checking the login page for a specific keyword/phrase tries to gather a list of echo devices as a means of checking if login was successful. This should work better for those in other regions that the language is something other than English.
Just ran into another issue with the login. Looks like the captcha is not always the only thing that amazon requires to login this way. Sometimes you get an email verification link that is required to proceed. I’ll have to work this into the auth flow. So for those having issues where it keeps asking for the captcha this could be the issue.
I now get the capture screen but can’t see the capture characters, I input something random in the hopes it will pop up again with the characters but the capture screen never pops back up.
Try logging out of HA in your browser, doing a hard refresh as suggested by @VladTepz.
Then log back in and try again. I never get the Captcha first time either, just random text. I type in some letter, hit enter, then try again. 2nd time always works for some reason.
Alas it did not make a difference still can’t see the capture characters if I input anything it never pops back up unless I reboot. Using hassio 0.73.1 RPi 3b
I tested the newest version again. To see if it works now for germany. But it failed with the following errors in the logs:
2018-07-22 12:33:22 ERROR (MainThread) [homeassistant.core] Error doing job: Future exception was never retrieved
Traceback (most recent call last):
File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/media_player/alexa.py", line 173, in setup_alexa
update_devices()
File "/usr/local/lib/python3.6/site-packages/homeassistant/util/__init__.py", line 318, in wrapper
result = method(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/homeassistant/util/__init__.py", line 318, in wrapper
result = method(*args, **kwargs)
File "/config/custom_components/media_player/alexa.py", line 129, in update_devices
devices = devices.json()['devices']
File "/usr/local/lib/python3.6/site-packages/requests/models.py", line 896, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/local/lib/python3.6/site-packages/simplejson/__init__.py", line 518, in loads
return _default_decoder.decode(s)
File "/usr/local/lib/python3.6/site-packages/simplejson/decoder.py", line 370, in decode
obj, end = self.raw_decode(s)
File "/usr/local/lib/python3.6/site-packages/simplejson/decoder.py", line 400, in raw_decode
return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 8 column 1 (char 7)
But for UK, I get the captcha then all I see is that error every minute or so, I tried some changes in the python like en-US to en-GB and different URLS - just ends up not working with no error messages,
@keatontaylor brilliant works superbly. Is it possible you could add BBC as a media content as echo/dot still showing idle when BCC radio is playing (BBC is the default player in UK )