Where does configuration go? mixed v1 v2 bindings

Do I understand this correctly that not all bindings available in v1 have migrated to v2?

Under v2, do cfg files need to exist for each v2 binding, but sit in openhab.cfg for v1 config? In other words: a v1 binding needs its config in openhab.cfg, while v2 bindings have their individual cfg files?!

V1 bindings need their own cfg files. They will be located in the services folder and created automatically when you install the binding. They will be prefilled with example value.

V2 bindings are configured through the paperUI and the configuration is stored in a json database located in:

1 Like

Are you sure about PaperUI being required.
I thought you can use textual config in v2 for everything?!

I don’t know about the binding configurations themselves
You can write things, items, rules… But bindings configs, I don’t know

Have a look in the binding docs

There are not many config parameters that are associated with the v2 Bindings [contrary to the v1 bindings which have their own *.cfg (and resulting *.config) files]. openhab.cfg is not used anymore in OH2.
Actually… I don’t know of any v2 Binding that has binding specific config info.

Most (if not all) of the parameters are directly configured on the Bridge -> Thing -> Channel (B/T/C) for the respective v2 Bindings. Each element (B/T/C) has its own parameters and they are described in the corresponding v2 Binding documentation.

Some v2 Bindings do not support textual configuration for B/T/C (I may be wrong here).

You can use PaperUI or *.things files to set up these B/T/C configurations.
If PaperUI is used, these settings end up in the jsonDB. These are called “Managed” Things.
If flat text config files (*.things) are used, there is no secondary storage of their settings. OH2 reads the *.things file from $OPENHAB_CONF/things/ directly and loads it up in memory.

See more info here: HowTo: Manage OpenHab 2 configurations (this stuff apply mostly to v1 addons)


They are all supposed to but not all of them have documented how to do so in their README. And even for some of the ones that do, it is some complex in some cases that people use automatic discovery to figure out all the parameters needed anyway and then build the .things file from that. I don’t understand it personally but people have their reasons I suppose.

1 Like

Really?! That’s funny. :smiley: