-
-
Notifications
You must be signed in to change notification settings - Fork 603
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
Indicate why adding an association is not allowed or failed #6772
Comments
@AlCalzone What are the possible reasons why an association could not be allowed apart of security? |
I've been thinking of adding an enum with possible reasons, since there are a few actually. Should I move this to my repo as a feature request? |
Yeah I think it makes sense 👍🏼 |
The driver will include the reason for the failure in the thrown error starting with version 13. |
Nice! No changes required on my side so as I already show the error thrown :) |
do you use |
Yes: for (const a of associations) {
if (
this._driver.controller.isAssociationAllowed(
source,
groupId,
a,
)
) {
this.logNode(
zwaveNode,
'info',
`Adding Node ${a.nodeId} to Group ${groupId} of ${sourceMsg}`,
)
await this._driver.controller.addAssociations(
source,
groupId,
[a],
)
return true
} else {
this.logNode(
zwaveNode,
'warn',
`Unable to add Node ${a.nodeId} to Group ${groupId} of ${sourceMsg}, association not allowed`,
)
}
} |
Then you'll need to change something, see linked PR. I'll also write migration docs for v13 like usual. |
Hi,
I recently tried to add an association between 2 devices that did not have the same level of security. I got the errors below:
Once you know the problem it's easy, but if you don't, the message doesn't help.
Is it possible to improve the error message?
The text was updated successfully, but these errors were encountered: