Skip to content
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

[plugwise] Add bridgeUID to thingUID during discovery #8445

Merged
merged 1 commit into from
Sep 11, 2020

Conversation

wborn
Copy link
Member

@wborn wborn commented Sep 10, 2020

Additional validation got added in OH3 to make sure that the bridgeUID is added to Things with bridges (openhab/openhab-core#1481).

The PlugwiseThingDiscoveryService did not add the bridgeUID so it would cause the following exceptions during discovery:

java.lang.IllegalArgumentException: Thing UID 'plugwise:circleplus:abc' does not match bridge UID 'plugwise:stick:xyz'
	at org.openhab.core.config.discovery.DiscoveryResultBuilder.validateThingUID(DiscoveryResultBuilder.java:166) ~[bundleFile:?]
	at org.openhab.core.config.discovery.DiscoveryResultBuilder.withBridge(DiscoveryResultBuilder.java:120) ~[bundleFile:?]
	at org.openhab.binding.plugwise.internal.PlugwiseThingDiscoveryService.createDiscoveryResult(PlugwiseThingDiscoveryService.java:130) ~[bundleFile:?]
	at org.openhab.binding.plugwise.internal.PlugwiseThingDiscoveryService.handleInformationResponse(PlugwiseThingDiscoveryService.java:195) ~[bundleFile:?]
	at org.openhab.binding.plugwise.internal.PlugwiseThingDiscoveryService.handleReponseMessage(PlugwiseThingDiscoveryService.java:211) ~[bundleFile:?]
	at org.openhab.binding.plugwise.internal.PlugwiseFilteredMessageListenerList.notifyListeners(PlugwiseFilteredMessageListenerList.java:64) [bundleFile:?]
	at org.openhab.binding.plugwise.internal.PlugwiseMessageProcessor.processMessage(PlugwiseMessageProcessor.java:153) [bundleFile:?]
	at org.openhab.binding.plugwise.internal.PlugwiseMessageProcessor$MessageProcessorThread.run(PlugwiseMessageProcessor.java:60) [bundleFile:?]

Signed-off-by: Wouter Born <github@maindrain.net>
Copy link
Member

@Hilbrand Hilbrand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Hilbrand Hilbrand merged commit 02484bc into openhab:2.5.x Sep 11, 2020
@Hilbrand Hilbrand added this to the 2.5.9 milestone Sep 11, 2020
@wborn wborn deleted the plugwise-discovery-bridgeuid branch September 11, 2020 07:52
CSchlipp pushed a commit to CSchlipp/openhab-addons that referenced this pull request Sep 12, 2020
Signed-off-by: Wouter Born <github@maindrain.net>
markus7017 pushed a commit to markus7017/openhab-addons that referenced this pull request Sep 19, 2020
Signed-off-by: Wouter Born <github@maindrain.net>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this pull request Oct 8, 2020
Signed-off-by: Wouter Born <github@maindrain.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants