Binding configuration only set correctly when (re-)starting openHAB?

(Jürgen Baginski) #1

Shouldn’t each binding configuration parameter be set according the used .things file when the bundle is restarted via the Karaf-console?
In my used case I tried to change the mode “modeOpeningTime” of the Tankerkoenig binding using a .things file. Changing from the used “false” to “true” was not possible after changing the file and restarting the bundle. Only after restarting openHAB completly the change was done.
IMHO at least the restart should have read the applied setting or am I missing something?

0 Likes

(Rich Koshak) #2

I think it is important to be clear here that configs and Things are not the same thing, usually. If a binding has a separate configuration and you use text config files, those go in a file in %OH_CONF/services/bindingname.cfg.

Things are defined and .things files and represent a single device.

So if I understand correctly, you are modifying Things, not configs. It might be a Bridge Thing (i.e. a Thing that represents the connection to some other hub or controller or antenna or the like through which other devices communicate with OH), but it’s still a Thing.

OK, with that out of the way, I think it is also important to realize that the handling and processing of the text based configs is, to my understanding, centralized. The reading and parsing of the files is done by the OH core, not by the individual bindings. The core should see the change and pass the updates to the binding. So I would not expect restarting the binding bundle to force a reread of the .things files because the bindings don’t read that file themselves.

But the OH core is supposed to see changes made to the text files and pass them to the binding. Did you have to restart because it failed to do so? If so, that is definitely a bug which should be filed.

0 Likes

(Jürgen Baginski) #3

Thanks for the clarification, I used the wrong terms!
Yes, the “modeOpeningTime” is a setting for the bridge.
And yes, I tried to just change the .things file and after that restarting the bundle, both with no effect. Only the complete restart of openHAB did the trick. I’ll take my time an investigate more (like doing the same when the configuration is done just via PaperUI) and report that as an issue.

0 Likes