Skip to content
This repository has been archived by the owner on May 7, 2020. It is now read-only.

Bridge nested syntax does not support different thingHandlerFactory for thing #5404

Closed
mrbig opened this issue Apr 11, 2018 · 0 comments
Closed
Labels

Comments

@mrbig
Copy link

mrbig commented Apr 11, 2018

This issue is a follow up from #5301 and refers to a somewhat experimental technology at the moment.

Given are two bundles that share the same binding id. Reasons for this are described in #5301 A prototype for this is the blukii support or the modbus based sunspec support

The issue arises when the bridge and the connected thing are from different bundles, and the nested syntax is used:

Bridge modbus:tcp:se4000 [ ... ] {
    inverter-single-phase myinverter [ ... ]
}

Currently these items are silently ignored, because the GenericThingProvider checks the proposed thing with the bridge's ThingHandlerFactory only. See here

I propose, that we should rescan every thingHandlerFactory each time the code is recursing into nested bridges/things. To avoid incorrect connection between different bindings may the binding id could been checked and if they don't match then ignore the thingHandlerFactory.

Note: a workaround for this is to ignore the nested syntax in such cases and use flat list with references, so the above could be rewritten as:

Bridge modbus:tcp:se4000 [ ... ]
Thing modbus:inverter-single-phase:se4000:myinverter (modbus:tcp:se4000) [...]
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants