-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[lcn] Make auto discovery use segment id and module id for ThingID #8120
[lcn] Make auto discovery use segment id and module id for ThingID #8120
Conversation
number. Serial number is used as representation property. Signed-off-by: Thomas Weiler <[email protected]>
Travis tests have failedHey @toweosp, |
Signed-off-by: Thomas Weiler <[email protected]>
Travis tests have failedHey @toweosp, |
Signed-off-by: Thomas Weiler <[email protected]>
Travis tests have failedHey @toweosp, |
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, looks good! Actually the module's serial number is not needed at all anymore. The property could be dropped and replaced by an address (representation-)property, which could be set during discovery identical to the Thing ID. That would simplify code.
I intentionally used the serial/firmware number as the representation property and didn't remove the property. If I am not mistaken: Serial number is the only unique and immutable property of an lcn module. So auto discovery can identify identity of modules/things even if segment id or module id get changed. Furthermore after the change provided by this PR auto discovery in existing installations using the 2.x lcn binding will not discover existing modules/things as new but ignore them if paper ui is configured accordingly. Moreover ThingID of manually added modules/things can differ from the scheme used by auto discovery, so I think ThingID will /can not be equal to the representation property in every case, might it be the serial number or an address identifier. Last but not least I generally wouldn't remove the serial number property, because it could ease support in the not so rare cases where module handling depends on serial number/firmware age. |
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
...ab.binding.lcn/src/main/java/org/openhab/binding/lcn/internal/LcnModuleDiscoveryService.java
Outdated
Show resolved
Hide resolved
Can you change the Thing UIDs in the documentation examples from serial numbers to the new scheme? |
…ing/lcn/internal/LcnModuleDiscoveryService.java Changed ThingUIDs in documentation examples Co-authored-by: Fabian Wolter <[email protected]> Signed-off-by: Thomas Weiler <[email protected]>
Signed-off-by: Thomas Weiler <[email protected]>
Travis tests were successfulHey @toweosp, |
1 similar comment
Travis tests were successfulHey @toweosp, |
Done. |
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.
LGTM
…penhab#8120) Signed-off-by: Thomas Weiler <[email protected]> Signed-off-by: MPH80 <[email protected]>
…penhab#8120) Signed-off-by: Thomas Weiler <[email protected]>
…penhab#8120) Signed-off-by: Thomas Weiler <[email protected]>
…penhab#8120) Signed-off-by: Thomas Weiler <[email protected]>
…penhab#8120) Signed-off-by: Thomas Weiler <[email protected]>
…penhab#8120) Signed-off-by: Thomas Weiler <[email protected]> Signed-off-by: Daan Meijer <[email protected]>
…penhab#8120) Signed-off-by: Thomas Weiler <[email protected]>
…penhab#8120) Signed-off-by: Thomas Weiler <[email protected]>
When using auto discovery modules are now identified by a combination of segment id and module id in the format
S<segmentID>M<moduleID>
instead by serial number. Serial number is used as representation property (e.g. to identify identical modules when using auto-ignore option in PaperUI). Closes #8097.