-
-
Notifications
You must be signed in to change notification settings - Fork 30.7k
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
Rework Sonos media player platform #12126
Conversation
REQUIREMENTS = ['SoCo==0.13'] | ||
REQUIREMENTS = [ | ||
'https://github.com/SoCo/SoCo/archive/' | ||
'9f848e7a2c73aebb0f6d0b09008b17990f4ffabc.zip#SoCo==0.14a5'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A needed third party fix is on track to be released in SoCo 0.14 on February 17th. So feel free to review now, even though the REQUIREMENTS
are not completely ready yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is okay, we had this before also some times :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm told it is no longer allowed to introduce Github requirements so I will hold off merging this PR until SoCo 0.14 ships.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's okay. That is only for packages they want produce a packages. But in this case we need this version and it will go into mainstream later
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, that is a policy that makes sense to me but I think some consensus is needed here. This PR has been lingering for two months because I did ask about just this policy in Discord and IIRC both @balloob and @armills said that my only options were to a) fork SoCo with my single patch added, or b) wait it out for a new SoCo release.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We had the same situation on last update of this platform and we had do it like now. First we point to commit and after the release was out, we update to new release. I see no problem, sorry.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One technical question I have is how to format the string so the package is not downloaded on each restart. The SoCo Github currently has version "0.12+" and we are using "0.13" in current HA code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need look how pip does install it: pip list --format=freeze
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, that helped me figure it out. But that apparently points to a disadvantage of a Github requirement: two different commits can have the same version and pip
will not know to update.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing 👍 Thanks a lot for this hard work
c3b5fdc
to
a527bbe
Compare
a527bbe
to
03ffc3d
Compare
https://github.com/SoCo/SoCo/blob/master/soco/__init__.py#L22 You are sure with "12-"? But the goal is that he don't try to reinstall it self every startup and not the correct version :) |
Yes, "0.12-" is what works to stop the reinstall on startup. But I think we should await SoCo 0.14 or a resolution of home-assistant/architecture#3. |
We should not add new requirements that point at GitHub. What is the release cycle of SoCo ? |
@balloob That is just a placeholder, see here: #12126 (comment) |
47d0888
to
3ebf899
Compare
0774a48
to
cdd6a54
Compare
cdd6a54
to
e4ce7ad
Compare
Upstream was finally updated. This has waited for so long, I will merge it in a few hours if nobody objects. Some fallout is expected so I have set myself as codeowner for the time being. |
Sounds good 👍 go for it. |
@amelchio: Sorry I'm late to the party. Just confirmed that the |
With version 0.64 there are problems. No picture of the album and there is no possibility to start or stop music playback |
Open an issue if something is broken. Don't spam old PRs. |
Description:
This is an updated version of the huge Sonos rework originally proposed in #10419. It decreases code complexity and moves to a push model based on Sonos event subscriptions.
I have integrated all changes made to the Sonos platform since my original PR but I do not have the hardware to test the Night Sound support; maybe @rbdixon can help out?
Related issue (if applicable): fixes #11822, fixes #9570
Checklist:
If the code communicates with devices, web services, or third-party tools:
tox
run successfully.REQUIREMENTS
variable (example).requirements_all.txt
by runningscript/gen_requirements_all.py
.New files were added to.coveragerc
.