[SOLVED] V2 vs V3 - Option Parameter not showing

,

I have a v2 and v3 version of my binding, it seems that the UI on v3 doesn’t allow an option parameter to show? They are exactly the same other than pom/namespace changes. Could someone confirm this is a bug or whether something has changed.

v2:

v3:

xml:

	<bridge-type id="account">
		<label>Sonoff Account Thing</label>
		<description>Sonoff Account</description>
		<config-description>
			<parameter name="email" type="text" required="true">
				<label>Email</label>
				<description>Email</description>
			</parameter>
			<parameter name="password" type="text" required="true">
				<label>Password</label>
				<description>Password</description>
			</parameter>
			<parameter name="region" type="text" required="true">
				<label>Region</label>
				<description>Region</description>
			</parameter>
			<parameter name="ipaddress" type="text" required="true">
				<label>IP Address</label>
				<description>IP address of openhab for multicast packets from devices (may have more than one NIC)</description>
			</parameter>
			<parameter name="accessmode" type="text" required="true" groupName="configuration">
				<label>Access Mode</label>
				<default>1</default>
				<options>
					<option value="mixed">Cloud and Local</option>
					<option value="cloud">Cloud Only</option>
					<option value="local">Local Only</option>
				</options>
			</parameter>
		</config-description>
	</bridge-type>

It should work.

What I do see is that you have groupName attribute. I don’t know if that is causing the issue. But I would not expect to have only a groupName on 1 parameter. So you might want to remove it.

Second. The default value is invalid. It shows 1, while 1 is not an option.

I’m assuming you created the thing when this parameter was present in the binding? Otherwise this might be the problem. Because new parameters are not added on existing things.

1 Like

Hi @hilbrand

Thanks for the quick response.
so removed the group, changed the default (I grabbed the option setting from google :roll_eyes: and forgot to change the default.

All now working. just threw me as was ok for 2.5.11.

Thanks

Hi,

I think I just ran into the same issue in the BSB-LAN binding.
As far as I could see the UI does not show the settings because the group definition for (in your case) “configuration” is missing.

I guess adding a “parameter-group” node would have also solved the issue.

<config-description>
   <parameter-group name="configuration">
      <label>Configuration</label>
   </parameter-group>
   ...
</config-description>