|Re: How to add things dynamically in the binding [message #1770423 is a reply to message #1770375]
||Fri, 11 August 2017 07:24
| Kai Kreuzer
Registered: December 2011
To answer you correctly, I will have to understand your use case a bit better.
Note that a binding is not allowed to decide on its own that certain devices should be used by the installation - this is intentionally left to the user/admin of the system by means of the Inbox.
If you are not implementing a binding, but rather want to build a custom ESH-based runtime that out-of-the-box supports your devices, you can implement your own ThingProvider. This implementation can read your custom config files and dynamically create Things from it. Note that a binding must not implement this interface, so for such a solution you would build a proprietary extension.
A middle path could be to implement a binding with a DiscoveryService, which puts the stuff in the inbox and then use an auto-approve feature (currently only available in openHAB, see https://github.com/openhab/openhab-distro/blob/master/distributions/openhab/src/main/resources/conf/services/runtime.cfg#L51-L54, but I plan to move that to ESH).
Hope this helps,
Powered by FUDForum
. Page generated in 0.01715 seconds