-
Notifications
You must be signed in to change notification settings - Fork 289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error while setting up platform alexa_media - KeyError: 'csrf' #258
Comments
Thanks for reporting. I suspect Amazon changed something with the login. Will have to look into it. Unfortunately I'm traveling for a couple weeks so can't do much till I'm back. |
Unfortunately yes, total loss. |
Have the same issue on hassio as well with latest HA. |
same problem. |
same problem here |
It looks like Amazon have tweaked the API, and the AlexaPy library no longer gets the CSRF token from the login URL (and there's no error checking in the init function there). Given the upstream maintainers lack of time, I've forked the AlexaPy repo and updated the site - I'd raise a PR but it's a one line change and I've not done anything to actually test it - but it works for me. You can find the updated repo at https://gitlab.com/jfautley/alexapy - I've tested this against an Amazon UK account using Hass.IO. To install (on Hass.IO), SSH into your instance and run: For other Home-Assistant installs, you should be able to use |
Thanks @jfautley . I'm currently traveling abroad until August 2 but should be able to make the fix when I'm back. @keatontaylor any chance you can test/implement before then? |
@jfautley , Thank you! |
Not fully understanding how to install this... Should I completely uninstall the original plugin and install this instead? or just install it over it? |
Ensure you delete the .pickle file out of your config folder. Just tested - fix works fine for me too. Thanks @jfautley |
Ah yes, working now, thank you |
Its working again, thanks @jfautley |
I'm sorry for being a noob but could someone just give me quick pointers about how to install this? I installed the original media player via HACS on Hassio, but I'm not sure how to upgrade/replace alexapy. |
First a huge thx @jfautley now works again! @erichter2018 the simplest way would be to go to the "Configurator" then clic on settings and on "Execute shell Command" Then don't forget to delete your .pickle file in your /config directory and reboot ;-) |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@jfautley This fixed it for me as well! Thank you! |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
OK, so ran the shell script, all fine (I had removed the configurator plugin as I use git to manage my config files). There is no pickle file in my config dir though. Only one for my Ring doorbell. AlexaPY was working fine until the other day when this change became apparent, so I've already set up the connection to Amazon, so confused as to why I dont have a .pickle file? |
This comment has been minimized.
This comment has been minimized.
@petestanley112 @mattnewham |
@3ative yep - not sure how though. I just restarted my instance and its working again now. I guess I was still properly authenticated because I didnt have to do any authentication steps, just started working when I put the new alexapy in the config dir. Should it not really go into deps though? I dont really like it in the root of the config dir |
@mattnewham |
Hi I followed your instructions, but continue to give me the same problem. in config the alexapy folder appeared, should I put it under custom_component? thanks i'm a noob. |
@3ative But yeah took a few trays to get it working del picke reinstalled the plugin but this pip3 install --target /config --no-dependencies git+https://gitlab.com/jfautley/alexapy Got it working for me.. so thanks fogarty.... Tts is all that works for me. But that's all I want so yeah... oh and I had to re authent every time I del .pickle |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@leonka93
|
Did you restart homeassistant ? And delete the Alexa media pickle file from
/config?
…On 3 August 2019 at 00:10:21, petestanley112 ***@***.***) wrote:
God knows how to send messsges@ some one.
But yeah took a few trays to get it working del picke reinstalled the
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<https://github.com/keatontaylor/alexa_media_player/issues/258?email_source=notifications&email_token=AABS336WNWXB5MOVP6ES7HLQCS5F3A5CNFSM4IG6KDE2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3PAZLY#issuecomment-517868719>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABS337BFLXWSCVCSAEYKKLQCS5F3ANCNFSM4IG6KDEQ>
.
|
@ 3ative@mattnewham yes I deleted the pickle file and restart HA. but after the reboot the pickle file continues to appear, and it does not find me nor the Alexa speakers associated with my account asks me to verify it |
I installed hassio on Raspberry Pi 3+.The URL is amazon.it thanks to all |
@leonka93 |
This comment has been minimized.
This comment has been minimized.
after a few reboots, finally work, the pickle file continues to appear but does not create problems for music playback. I do some tests for notifications etc. I'll update you. thanks |
@jfautley Please make a PR on the gitlab page. |
@keatontaylor I'm actually reviewing if we can make a more robust fix so we can feed multiple urls to iterate through. |
As an update, there's a new OTP page where you can then select voice or SMS which we need to handle particularly if you have multiple devices. Looking at a solution now. |
Hi I am new to all this and have very limited knowledge. Trying to get the Alexa devices shown on media players, when I open the configurator - execute shell command and copy the above mentioned pip3 line it fails to update... I get this: Command executed: pip3 install --target /config --no-dependencies git+https://gitlab.com/jfautley/alexapy: 1 any ideas... spent all day trying to get Alexa to work! thanks in advanced. |
Thanks to @fogarty for the solution! Not clear to me how to fix it on Home Assistant on wheels@Buster. pip3 install --target /config --no-dependencies git+https://gitlab.com/jfautley/alexapy This is the command for HASSIO, but how to solve on buster? |
Also thanks to @fogarty for the fix. I'm running hassbian and installed the fix by changing to homeassistant's virtualenv:
the path might be different, if you installed homeassistant manually on a buster system. And then installed the fix to my local homeassistant/ via
You might need to run this command as root if your user hasn't write access to the homeassistant's config dir. After applying this patch, I have media_player instances for my echos available. Unfortunately, they don't work and my journal shows approximately every 10secs the following error messages.
I would appreciate it, if you could point me in the right direction. Edit: I just realized the update in the dev branch by @alandtse and I will try it out later today. Edit 2: Nevermind. I changed the server from amazon.com to the local amazon.de and now it seems to work fine! |
Describe the bug
TTS was not working anymore. I suspected an old cookie etc, deleted the .pickle file and restarted homeassistant which always worked. Configuration with 2FA seemed to work. Afterwards I started to see the following errors in the log:
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Media Players should appear along the functionality
Screenshots
If applicable, add screenshots to help explain your problem.
System details
const.py
or HA startup): v1.3.1pip show alexapy
or HA startup): 0.7.0Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: