-
-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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 secondary russound controller discovery failure #123590
Fix secondary russound controller discovery failure #123590
Conversation
07a2527
to
6b5a690
Compare
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 for bumping the dependency! However, could you please update the PR description to contain at least one (or multiple) of the following:
- A link to the release notes of this package version, and all versions in between.
- A link to the changelog of this package.
- A link to a Git(Hub) diff/compare view from the current version to the bumped version.
This allows us to review upstream changes, which is needed to decide this change is working as intended and/or if we can include it in, for example, a patch release of Home Assistant.
Thanks already! 👍
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
Completely thought I linked that. Here's the diff: noahhusby/aiorussound@2.2.2...2.2.3 |
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, @noahhusby 👍
../Frenck
Proposed change
One of the supported configurations for Russound is to have a primary controller linked to Home Assistant over LAN with secondary controllers linked to the primary via serial. The current code uses the mac address of each controller to create the device info for each unit. Unfortunately, the mac address can only be retrieved for the primary controller in a stack, so the current system won't work.
This change makes it so that the unique ID of the linked controllers is comprised of {primary-controller-mac-addr}-{linked-controller-id} so that the linked controllers can still be listed as devices.
Explanation of changes:
primary_mac_address
variable represents the mac_address of the primary controller. When mac_address of the controller object is None, then the parent_controller.mac_address variable will be non-null. (The library ensures that this is the case, so primary_mac_address will always be non-null).attr_unique_id
variable is immune to the changes since thezone.device_str()
includes both the controller id and zone id.{primary_mac_addr}-{C[1].Z[1]}
and Controller 2, Zone 1 will be{primary_mac_addr}-{C[2].Z[1]}
device_identifier
variable is set to the mac_address if it's the primary controller, otherwise it's set to{primary_mac_addr}-{linked_controller_id}
How this functions if the stack-up changes:
This theoretically introduces issues if the order of the controllers were to be updated. In the case of the Russound stack-up, most of the configuration options are on the primary controller and are propagated to the linked controllers. No matter whether the linked devices were able to be identified by mac address, there is going to be some amount of clean up to do if the Russound configuration changes.
Diff: noahhusby/aiorussound@2.2.2...2.2.3
Type of change
Additional information
Checklist
ruff format homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
.To help with the load of incoming pull requests: