-
-
Notifications
You must be signed in to change notification settings - Fork 37.4k
Added unique_id property back to Yamaha media_player #12373
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
Closed
+5
−0
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back 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.
blank line contains whitespace
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.
Is
self._zonea user-configurable string (i.e., something that could change through, say, the Yamaha app)? The objective is to not have anything user-configurable in the unique ID that could change down the road while still representing the same thing.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 does not appear to, it appears as if it comes from rxv.RXV() call which returns a receiver object. After tracing through the rxv code, it appears to grab the self._zone from the xml that is requested from the device. When I get home, I can verify this.
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'll have to check the yamaha app as well.
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 guessing the reason it was removed was that it's based on the URL. A unique ID needs to be based on something that won't change for the device, such as a serial number or mac address. I'd see if something like that is available from the API that could be used instead.
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 makes sense. For time constraints, I only 'rolled back' the changes. When i get home I can find a better way to handle the unique_id. I may have been too hasty with this PR.
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.
self._zone is not user configurable, it comes from the device.
As far as I can see in both the rxv code, and poking at the XML API for the Yamaha unit, there is nothing available at the rxv layer for uniqueness. That's all operating at the url level (which there was already code to ignore by url devices previously discovered).
The only existing path I'm seeing to get an actual unique id is data that's available in the upnp discovery packet. We don't require everyone to go through that path, so that wouldn't work if discovery was disabled. I don't see any imperative path to get that.
Newer receivers have a more REST like API, but for those of us with older ones losing multizone because there is not a guarunteed way to generate stable uuid would be really sad.
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'd try and investigate the underlying bug. Not having a unique ID shouldn't affect the behavior of the actual platform code at all.