we are developing a new binding and use many static things which shall be defined by a .things-file.
Writing the file is already done and paperui also recognizes the things.
But that only works with a static path for testing…
Is there any way to find out the path of the things-folder? As far as I know there are 2 different ones…
PaperUi has to know the path. So maybe there is a variable or any function to get it?
My understanding is your binding should not be editing .things files directly ever.
It should be using the API defined by the architecture to create Things and add them to the Inbox. The OH API will call your binding with any Things that exist in .things files for your binding to operate on. Your binding can make calls on the OH API to add new Things to the Inbox.
There is no 2.x version binding that edits .things files. I’m pretty certain that would be a considered a violation of the architecture.
PaperUI doesn’t know the path to the .things files. The core of OH knows it and processes those files and makes all the Things available through an API. PaperUI gets a list of all the Things through this API.
could you point me to the documents to use for adding things?
Is there any possibility to directly add things? That means to avoid the inbox and the confirmation of things.
We have another config-file where all of our devices and their properties are saved. Therefore we used to parse this file into a .things file. We can only use this file to discover all devices at once. As all the devices shall be used as things, the confirmation in the inbox is another useless step for the users of our binding.
We are really new to openhab and ESH, so if anyone could give us some advice, you´re really welcome.
I’m not a developer for OH so can’t answer your questions. You also might have better luck posting on the ESH forums since that is where all of these interfaces are implemented.