-
-
Notifications
You must be signed in to change notification settings - Fork 36.2k
Trap for missing UUID in config_flow for Squeezebox #158721
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
Conversation
|
Hey there @rajlaud, @pssc, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
| "error": { | ||
| "cannot_connect": "[%key:common::config_flow::error::cannot_connect%]", | ||
| "invalid_auth": "[%key:common::config_flow::error::invalid_auth%]", | ||
| "missing_uuid": "LMS did not provide a unique identifier.", |
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.
So when does this happen? What can the user do to fix 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.
Well, nothing really.... All LMS versions for ever should always return a UUID. It likely means it's something pretending to be an LMS that isn't (e.g. like slimproto). The protocol has been around for so long there's a few lite versions out there, but basically if you don't have a uuid, you need a proper lms
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 guess I could add a "please check you LMS version" to the message ...
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.
Think this is most likely i suspect when its not really lms on the other end of the connection
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.
Like, if we expect every client to return a UUID, we can turn it into an assertion (and if we then get an issue from a user we'd be proven wrong). If we do expect it to be not there, we should explain what it means that it didn't provide a unique identifier
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 the server (LMS) rather than the client, and yes, we expect every one to return a UUID if they're actually an LMS.
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.
So if there's a reasonable chance that there are ones out there wihtout UUID, we should just tell that it's not compatible
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.
OK - I'll update the text message
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.
updated
|
Thanks @joostlek . Is that the last one for the quality scale now? |
|
I need to check up on that one again |
Thanks |
Proposed change
The Squeezebox integration uses a uuid returned from the LMS as the unique identifier. In init we errored if the uuid was missing, but didn't trap this condition in config_flow. This PR traps for this error in config.flow.
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: