Binding.xml config-description


I am working on an openhab2 binding. In my case the binding will autodetect the local IP, but it may not always be appropriate, so I need an optional config parameter.

Using a config file would work:

I found out that binding.xml allows me to specify binding config-description, like this:

		<parameter name="localIP" type="text">
			<label>Local IP</label>
			<description>Local IP to bind to. This is optional and only has to be set if the binding is unable to detect it.</description>

Now, is this feasible/recommended? And how would I be able to query the configuration settings in Code?


1 Like