alexa_media_player: HA >= 2024.12.0 breaks AMP *** Do not post "same here"; it is still being worked on!
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
Integration does not load
To Reproduce
update to latest beta
- Go to ‘…’
- Click on ‘…’
- Scroll down to ‘…’
- See error
Expected behavior
it works
Screenshots
System details
- Home Assistant version: 2024.12.0bo
- alexa_media version (from
const.pyor HA startup log): 14.8 - alexapy version (from
pip show alexapyin homeasssistant container or HA startup log): 1.29.4 - Is Amazon 2FA/2SV enabled <!—We will not debug login issues if unanswered—> (y/n): y
- Amazon Domain: amazon.com
Debug Logs (alexa_media & alexapy)
Unable to install package alexapy==1.29.4: × No solution found when resolving dependencies: ╰─▶ Because alexapy==1.29.4 depends on aiofiles>=23.1.0,<24.0.0 and aiofiles>=24.1.0, we can conclude that alexapy==1.29.4 cannot be used. And because you require alexapy==1.29.4, we can conclude that your requirements are unsatisfiable.
Additional context
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 46
- Comments: 117 (1 by maintainers)
Commits related to this issue
- fix: bump alexapy to version 1.29.5 (#2724) Closes #2723 Closes #2720 Closes #2698 — committed to alandtse/alexa_media_player by bieniu 2 years ago
I’m not sure where it came up that I’m refusing to cede control or some weird power trip. I am no longer actively developing but am reviewing PRs and helping with releases. You can see we still have fairly frequent releases.
One of the only serious contributors is @danielbrunt57 recently and he has been granted contributor rights here already. Unfortunately, he is not a developer so is keeping it running to the best of his abilities so I still review his PRs before merging as requested.
For all those who want to fork, please go ahead. For others who want to contribute now, submit a PR and once you’ve actually shown you want to maintain this, I’ll also make you a contributor. Please do read the issues though to understand the grief you’re agreeing to. Again, props to @danielbrunt57 for being willing to deal with it.
But regardless, it’s open source and you’re welcome to fork. That said, this issue is getting off topic. There are people subscribed who just want to know about work arounds and status of fixes. Please take any further discussion on forking to the discussion board.
Lastly, alexapy isn’t under my repo or name. I just have rights to maintain it for Keaton. The same expectations likely apply there. But you can probably convince him to make you an admin there too. But that gets even less contributors than amp.
For those who run HA OS and aren’t able to update
alexapydirectly using PIP (and don’t want to wait for the next update):You can go to
/config/custom_components/alexa_media/manifest.jsonand change the version foralexapyunderrequirementsto1.29.5and then restart HA.Well, it’s officially broken now, as the production HA Release is now 2024.12, this needs to be fixed please.
Just have to say, you guys are mental. This is the most noisy issue thread I’ve subscribed to in ages. Due credit to devs and moderators for dealing with things quickly, confidently and calmly - I appreciate the work, but shame on the users poisoning this issue thread with irrelevant and unhelpful comments that spam people like me who are just genuinely happy to wait a couple of days for devs of a custom integrations to react to emerging issues.
@danielbrunt57 do you have a ko-fi link or similar? The attitude of some users of a free, custom component is astounding and I’d like to make a positive gesture.
The issue was only seen in betas last week, Daniel’s and others have been working on it since last week.
If you can code, pitch in - if your can’t, be patient and if you can’t be patient, roll back - this is a custom component, for an unofficial api to a closed ecosystem.
@danielbrunt57 Am I right we are only waiting for the change in alexapy you submitted to be approved now? Any tasks I can help with?
Watching
following
Would be great if the title would be noticed!
If you have the same issue just subscribe to this topic and wait for a fix. Don’t post the same error that that already been posted several times.
It seems like there are people willing to continue the valued work of the original creator of this project. Since that author is apparently no longer involved and can’t/won’t pass the project to someone else, is there some reason why those willing to carry on can’t just fork this and start a new project to move forward?
For the noobs like me:
SSH into HA OS (using Terminal or one of the SSH addons from HA)
docker exec -it homeassistant bash
pip install alexapy
vi /usr/local/lib/python3.13/site-packages/alexapy-1.29.4.dist-info/METADATA
Press the “i” key (INSERT MODE in VI)
Line 16: Change 24.0.0 to 25.0.0
ESC (ESCAPE key)
Type :wq + ENTER (this saves and closes VI)
pip install aiofiles -U
vi /usr/local/lib/python3.13/site-packages/alexapy/alexawebsocket.py
Press the “i” key (INSERT MODE in VI)
Line 26: change from aiohttp.http_websocket import ALLOWED_CLOSE_CODES, WSCloseCode To: from aiohttp import http_websocket
ESC (ESCAPE key)
Type :wq + ENTER (this saves and closes VI)
Restart Home Assistant and AMP/alexapy should be working in HA Core 2024.12.x.
NOTE: This process will need to be repeated after every HA Core update since updating core redownloads everything and the changes you’ve made will be lost!
I checked what’s changed in aiofiles 24.1.0 from 23.2.1 and the update looks to be safe for
alexapyto use. That said, it still needs to be tested first. Thenalexapylibrary dependencies updated followed byalexapybump to v1.29.5, then new AMP bump with a revisedmanifest.json…@alandtse:
alexapyissue posted: Error loading Alexa Media Player integration on the latest HA beta release 2024.12.0b0 which requires aiofiles>=24.1.0Great, fixes are on the way… I believe we’ll see Alexa Media Player working again soon!
https://github.com/alandtse/alexa_media_player/pull/2724
A heartfelt thanks for the 5.0.1 update – fixed issues with HA 2024.12.0 here. Much appreciated!
@alandtse (and others?) - many thanks for fixing this quickly.
HA does have a beta channel. The trouble is that components like AMP are maintained by other people who may not have the same time resources to deal with issues that HA Core breaks in the cadence required to allow for immediate updates to not cause issues.
The bottom line is that everything in HACS is generally to be considered “experimental” – a lot of it works almost all the time. But occasionally, a situation arises like this. In general, the community rallies and there’s a solution and release within a couple of days.
Rolled back to November release 😔
The easiest solution for people who updated and broke is to roll back. Either by restoring a backup or by going into ssh and typing
ha core update —version 2024.11.3Error after Home Assistant Update:
Setup failed for custom integration ‘alexa_media’: Requirements for alexa_media not found: [‘alexapy==1.29.4’].
It’s alantse project so until he approves the merge to fix the issue we wait.
Tell then it’s roll back or wait tell he pushes the fix.
It is after all free so any complaining on our part is bad form.
It is interfering with my plans for world domination though bwaaahaaaa 😉
Another one who stays at 11.3…
If you want to try using AMP & Core 12.x before
alexapyis updated, you’ll have to edit line 16 in filehomeassistant:/usr/local/lib/python3.12/site-packages/alexapy-1.29.4.dist-info/METADATAto readRequires-Dist: aiofiles (>=23.1.0,<25.0.0). Before you can do that, you first have to get HA to installalexapy!Here are my steps… I upgraded from Core 2024.11.3 to 2024.12.0b2. Then…
This will downgrade aiofiles to 23.2.1 and that has to be rectified as other modules depend on
aiofiles24.1.0. Before rectifying though, edit/usr/local/lib/python3.13/site-packages/alexapy-1.29.4.dist-info/METADATALine 16: Change24.0.0to25.0.0Than…
(this will restore aiofiles 24.1.0)
Since
alexawebsocket.pywill now fail onfrom aiohttp.http_websocket import ALLOWED_CLOSE_CODESin Python 3.13, Edit/usr/local/lib/python3.13/site-packages/alexapy/alexwebsocket.pyand change Line 26:from aiohttp.http_websocket import ALLOWED_CLOSE_CODES, WSCloseCodeTo:from aiohttp import http_websocketRestart Home Assistant and AMP/alexapy should be working in HA Core 2024.12.x.
NOTE: This process will need to be repeated after every HA Core update since updating core redownloads everything and the changes you’ve made will be lost!
Can’t we just move alexapy into this repo to ease further development? Aland is not anymore maintaining it anyway and even barely looking into issues and prs unfortunately so everything takes really long and then it still needs to be published to pypi and bumped here etc
Huge thanks indeed. Eh, what a pity HA doesn’t want to make it an official integration… So many people have Alexas… we cannot just go and throw them away…
Fixed in version 5.0.1
Whether the original creator wants to “hand it over” or not is irrelevant. It’s an open source project. Nobody requires his permission to create a fork. I agree it’s nice to show respect and have an agreed handover on a project like this, but the time for this has long passed. This project is now essentially unusable. It breaks as often as it works. Fixes are difficult or impossible without the owner’s cooperation, and that is not forthcoming.
I just wonder, given the obvious eagerness of others to continue, why this didn’t happen months ago.
12.0 has fixed the Spotify integration but now Alexa is broken. Hope it can be fixed soon.
I too have a Harmony Hub sitting in my pile of “this stuff is for collecting dust”. In a few more years maybe it can join my showcase of electronics from the past…
My favorite features of AMP though are actionable notifications and
notify.alexa_media_last_called.To be honest, what “bothers” me most about the issues around some of the HACS integrations isn’t that they sometimes break or take a long time getting fixed, but how often it is just a “dependency” issue that can be fixed by changing a number in the manifest file.or something like that. I am not sure if it’s a “Linux thing” or a “Python Thing” but it feels like something that can cause a lot of grief over time, since nobody can realistically expect Devs that are doing this in their free time and for free will keep updating stuff indefinitely…
Did you install HA without Docker? https://community.home-assistant.io/t/ha-without-docker-on-linux/733437
It is being worked on…
It is indeed important to many. As with all of us things movie on and life has a way of getting in the way so Alan may no longer have time or desire to continue this which is totally understandable. It is his creation though and he may not want to hand it over as is which is total fair but that’s up to him to decide.
Forking it at this point would likely make the most sense if handing over can’t happen as there others willing to step in.
It not fair to be bugging Alan for fixes and this was always done for free.
If you don’t like it, don’t run custom component (HACS) add-ons. The fact is, there are just a lot of moving parts, and this is why some folks wait until the middle or end of the month to update.
For me was this the easiest way to solve it fot now 😃. Forgotten that this was also a solution haha
This solution is likely to cause other problems by downgrading aiofiles:
I want this integration too much, so I rolled back the version. Hope this can be resolved 😃
You’re welcome, more than happy that you appreciate it. I know that too well as I was already here when the split happened. It’s a module and was outsourced for a reason. The reason is to provide it’s features for more than one use case AND to ease maintenance. Yes, the split was to make things easier and your asked for merge would cause the opposite.
Btw, talking about value… I read your new comment addressing me more thorough than I normally would do, but even when I did that I must admit there was not much more value coming out of it…
I don’t even get what your problem is. I mentioned where you provided a good workaround including all problems that will be caused and still you think you are the corpus delicti I talk about?! I said one should just wait and not start madness on false facts. Not more and not less!
But as you already decided to mistakenly project everything onto yourself and confirming my P.S. too well… Claiming that the module is unmaintained and unused otherwise has zero value, too, as it’s just some baseless claim.
So it would be too kind of you refrain from posting such “facts” as poisoning the discussion with false claims has not that much value and steals even more of our time…
Last thing here, as this is too much of a Kindergarten already. My text’s value was at least honoured by one guy, but to explain it to you:
I said that telling ppl this problem will stay forever as the module is outsourced and unmaintained by the lazy devs and the other false claims is not helping anyone, but causing trouble. That I tried to rectify and as the issue is known to both devs, I recommended to wait for the fix. This fix will come and it will not even cause trouble to release branch users. (If both devs have time to fix it on time and until today they always had)
:mikedrop:
You guys are heroes 😍
On Fri, Dec 6, 2024, 4:34 PM Neil Sleightholm @.***> wrote:
Thanks for fixing ❤️
I installed AMP 5.0.1 before upgrade to 2024.12.0 and it works fine (notify, actionable notification) Updated later to 2024.12.0 and no problem
It is unless you need a fix that is in 2024.12.0 such as that for BMW Connected Drive.
I am seriusly considering to move to Google assistant, until HA voice will be a reliable option to replace Alexa or Google and will have proven and commercially available HW option (maybe UniFi AI Theta Audio) - looks like it is going to happen soon. I am dreaming to get rid of cloud
@sphinxlady , how does that make any sense? Alan has stated multiple times that he isn’t going to contribute to the project any longer. We shouldn’t just be waiting, particularly when @danielbrunt57 has already stepped up. @alandtse, we appreciate what you’ve done. It’s a fantastic integration, but it needs a captain. If you’re not going to do it, then it’s time to step aside and let others take over.
I can’t. My hands are tied by @alandtse…
Unlikely. AlexaPy is a multi purpose module for Python and not bound to this single use case we have here. So if you would say “copied” as in forked, then yes, might be a nice idea if you want to add even more work to your maintenance workflow, but only then. Otherwise you have to wait until it’s fixed over there. We are not talking about hours of work to fix it, so I see no reason to fork anything here. (+ Luckily it’s nothing anyone here can decide anyways ^^)
And while we are at it… I use this Addin for years now and NEVER had big downtimes in the release cycle. So where in the name of :putgodlikentitynamehere: comes this never asked for “it’s broken for months now!!!1eleven” mentality from?! It’s your fault that you install the Home Assistant Beta and now complaining that things don’t work for a few days is nothing but naive and if I were the developer, I would even call it a direct insult of my work. Betas are not meant for everyday use, but to report bugs. This was done already, so wait until it’s fixed!
P.S. Because we live in a world where everyone feels immediately insulted, discriminated etc etc… This one was not against the ppl who came here to rightfully report the issue or help with temporary solutions.
I’ve updated my comment above.
Forking it doesn’t require permission as it open source as mentioned but if the owner doesn’t want to original to continue then it doesn’t as it under their control. At this point it makes sense to just fork it to clean things up and leave Alan alone. things have gotten quite messy with neglect and rushed fixes which makes updating it harder.
alexapy-1.29.4-patched.tar.gz
heres the whl with patched code if need something asap and can’t wait like me until its fixed, extract, copy whl to home assistant then pip install
Hey, there is. It’s called Beta! They however have zero control or influence on 3rd party components. It’s well known in software circles to stay clear of beta unless you are a nerd and stay clear of first major releases if you are a nervous Nelly!
Turned off my automations that use this integration for now and will wait patiently for the update. 😃
This works, although there’s a typo in this line, it should be:
Edit
/usr/local/lib/python3.13/site-packages/alexapy/alexawebsocket.pyThe “a” is missing in alexawebsocket.py
In my case, I just updated the AMP version via HACS to the new release 5.01, which the HACS integration itself showed as new. So I ran the HA re-start (complete) and everything is OK again!.
Note that I already had the updated version 2024.12.0 installed therefore, the AMP 5.0.1 version does not need to be installed before migrating to HA 2024.12.0. Note: I`m using HA installed on Raspberry pi 4.
You need to execute the installs and edits in the HA container.
docker exec -it homeassistant bash
Or just install this wheel (might need to rename from zip to whl first as GitHub doesn’t allow uploading whl files) using pip install alexapy-1.29.4-py3-none-any.whl and restart HA afterwards.
But that’s exactly the reason why I think those few alexapy python files should be just moved into this repo.
alexapy-1.29.4-py3-none-any.zip
You need to do some updates, I think. The version of alexapy required by Alexa Media Player 5.0.1 is 1.29.5 from what I see above.
Updated and everything is fixed. Thanks all!
Hi, Thanks for this fast support. Appreciated! With HA on 2024.12, after upgrading AMP 5.0.1, the fix is working fine to me.
Service OK with update and 2024.12.0
Great, it worked here too, thanks @cbhiii
On my side correct command was typing ha core update --version 2024.11.3
Did they fix it?
https://pypi.org/project/AlexaPy/#history
chore: release 2024-12-05
https://gitlab.com/keatontaylor/alexapy/-/merge_requests/405
Bump aiofiles to version 24.1.0
https://gitlab.com/keatontaylor/alexapy/-/merge_requests/403
I was trying to apply the command lines and I found it strange that it was not installing the alexapy 1.29.4 version
If I am not mistaken, this command needs to be executed using the Advanced SSH & Web Terminal add-on with Protection Mode disabled.
Hi This is what I get:
please help
Thanks
Very simple its his project and tell it lets others have full control to update it. I would agree if he wants to move on or life demands his attention it would be a good idea to hand control to another or others but that’s his choice.
So sorry to hear that! BTW, are you hiring any good candidates for you plan???
In any event, do NOT make the change above as it doesn’t work other than eliminate the import error. The suggested import does import but when websocket.py is actually invoked, a log statement will fail.
alexapy has a MR pending to correctly fix the issue. Waiting for @alandtse to approve it as a non-breaking change and release it…
What can I say? Fat fingers??
Home Assistant has a Beta channel.
There should be an early adopter and a stable channel if there are so many big issues on release.
I have upgraded as well and now Alexa is broken. Wonderful. Never ending list of stuff that breaks with HA 😦
Hi Could you please explain how we can change that file using HA in docker ? Thanks Phil
Well, I hope the maintainer/contributors of this repo can find the heart (and time) to fix it. It is a rather useful and nice integration, and I’d be sad to see it go.
It’s not as simple as that since alexapy is a python library that HA imports like httpx, aiohttp, aiofiles, typing, etc, etc, etc. Besides, @alandtse still owns the GitHub repo for alexa_media and the GutLab repo for alexapy in PyPi and manages and reviews the PR’s for them. He’s just contributing and code or consultation. Good luck finding someone to take on the responsibility of the entire project!
I posted an issue for this in alexapy and Alan has responded there but there’s no PR there yet. I just wish the current AMP release of 5.0.0 was 4.13.9 or 4.14.0 until alexapy is updated, merged, then AMP updated, merged and then released as 5.0.0.