-
Notifications
You must be signed in to change notification settings - Fork 291
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
fix: fix url and persistent notification #2398
Conversation
Multiple fixes & refactoring, primarily internal URL for proxy and external URL for cloud connections.
for more information, see https://pre-commit.ci
According to ChatGPT: The automatic adjustments made by Error Analysis:
Specific Changes:black:
isort:
Why Do These "Errors" Occur?These "errors" occur because the original code does not meet the stylistic guidelines enforced by Fixing the Issues:
In essence, |
As mentioned.. nothing wrong, I saw that the script did some stylistic changes and nothing that affects the logic when I did the review. |
If you want to add the fixes I reverted to this so I can squash them in with this, please do. |
I'm sorry but I do not understand your statement... |
I just spotted an error in |
I don't understand it, too, but I think it has something to do with these reverts: |
added 1399: hass,
I've merged the reverted fixes into my dev and added the missing |
BTW, I'm up and running fine on 2024.8.0b2 with these changes + alexapy 1.28.1. |
The missing |
Following your recipe, It´s working now. Thanks |
Correct. |
can you specify exactly what recipe? I'm running 2024.8.b02, 4.12.4, add hass, to init.py update manifest.json to alexapiy 12.8.1 I did those things but still not working for me. |
Sure, just apply these additional changes to the files: |
Hi. |
Removed code commented during testing
I just discovered that the previously removed
Fixing... |
Removed SERVICE_CLEAR_HISTORY
Can you also identify what you're fixing? The PR title isn't useful for a changelog. Please list the issues it'll close and I can figure out a good way to describe it. |
@alandtse - As can be seen from our comments above, this PR still lacks the changes you had reverted due to the lack of a proper commit message. Without these changes, not all errors will be fixed: |
This template summary for @danielbrunt57 was created with the help of ChatGPT to save some time: ChangelogChanges in Version [Version-Number]:
These changes aim to improve the stability, user experience, and maintainability of the Alexa Media Player integration for Home Assistant. |
CONF_HASS_URL missing CONF_URL duplicated in save_user_input_to_config
I believe it addresses all of these issues: It may also fix: BTW, the coordinator wasn't added per se, it was a refactoring to define it once: |
I still have troble to set up AMP. Here are the steps I took:
Despite these steps, after reconfiguring, I get a failure indicating that I need to reauthenticate. After restarting Home Assistant, I see my Echo devices and entities, but they are all unavailable. I already tried an older version and some other things but still it's not working. Which logs do you need, how do I get that information, and how else can I help to get this running again? Alexa Media Reauthentication Required |
You need to edit |
thank you @jleinenbach but I forgot to mention I also did that. |
Did you apply the other changes, too, as you just mentioned two files? I am unsure if simply reconfiguring will suffice, or if it is necessary to start from scratch: delete the configuration, delete the cookie in .storage, and then reboot before creating a new configuration. |
I have now recreated exactly the way you described. When I try to set up the integration again, I get to the forwarding of Amazon Alexa. After I have entered my access data here I am asked how I want to receive my OTP, by phone, sms or otp tool. No matter what I choose I am redirected from different computers back to the Amazon Alexa login page, as soon as I log in again the game starts all over again |
I have never observed a login loop like that before. All I can say is that the OTP tool is my default method for Amazon login (not by SMS), and with AMP, I never had another option. Maybe it helps to clear the browser cookies for Amazon. |
oh I apparently had too many otp from amazon, after I deleted everything there and set it up again I was able to complete this step. However, Alexa threw the error immediately after logging in that I had to log in again. After a restart of HA it initializes forever I hope for the best |
No whatever I do I always get Alexa Media Reauthentication Required |
All, the random off topic comments on a PR we're trying to commit are not helpful. Please take any discussions asking for help to an issue. |
Yah I'm not going to look to deep; that will need to be handled by the community. I will commit whatever is in the PR, but I'm not maintaining this more than handling PR review. |
I think this is fixed with Daniel's last 2 commits and the other comments suggest that it works although there are other issues which are not caused by this PR. |
I am new to this, I understand that if I copy only this from init_py :
in user_input: is it possible for alexa media player to work in 2024.8?, thanks for the project and the help |
I think we should also change the manifest.json requirements for this PR to: Thanks to @chrisvblemos, we know that the issue with the regional Amazon domains is a problem with alexapy, not AMP, it persists even with version 1.28.1: IMO, the current situation is that an alexapy issue remains unresolved with this PR because the manifest.json has not been updated to >=1.28.1. Even then, it will only work for Amazon.com until alexapy fixes the CSRF cookie problem in the next version, which is due to improved Amazon API security. |
It has to be done in the HA container which you can not get to with SSH/Terminal. alexapy does not exist at the level you see via terminal. If you run
We can't yet. I tried submitting that a while ago but Alan rejected it stating that more things have to happen regarding a new alexapy release than just the mods that have gone into 1.28.1. And to reiterate, @alandtse has requested no more comments in this PR unless related directly to this PR. Thanks! |
Multiple fixes & refactoring, primarily internal URL for proxy and external URL for cloud connections.