Openhab2 serial port dropdown

Hi everyone,

I am new to openhab and stumbled into a frustrating issue.
Some bindings (e.g. “Serial Button Binding” and “LG TV Serial Binding”) are able to automatically show the available serial ports. I looked everywhere (how the thing-types differed to mine, maybe additional information they put in their Factory) but I was unable to figure out how they were able to show this information.

Any direction on how to implement this will be appreciated.

Jense

I think you mean context section in configuration descriptions.

<?xml version="1.0" encoding="UTF-8"?>
<config-description:config-descriptions
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:config-description="http://eclipse.org/smarthome/schemas/config-description/v1.0.0"
    xsi:schemaLocation="http://eclipse.org/smarthome/schemas/config-description/v1.0.0
        http://eclipse.org/smarthome/schemas/config-description-1.0.0.xsd">

  <config-description uri="{binding|thing-type|channel-type|any_other}:bindingID:...">
    <parameter-group name="String">
      <label>String</label>
      <description>String</description>
      <context>String</context>
      <advanced>{true|false}</advanced>
    </parameter-group>

    <parameter name="String" type="{text|integer|decimal|boolean}" min="Decimal" max="Decimal" step="Decimal" pattern="String" required="{true|false}" readOnly="{true|false}" multiple="{true|false}" groupName="String" unit="A|cd|K|kg|m|mol|s|g|rad|sr|Hz|N|Pa|J|W|C|V|F|Ω|S|Wb|T|H|Cel|lm|lx|Bq|Gy|Sv|kat|m/s2|m2v|m3|kph|%|l|ms|min|h|d|week|y">
      <context>{network-address|serial-port|password|password-create|color|date|datetime|email|month|week|dayOfWeek|time|tel|url|item|thing|group|tag|service|channel|rule|location}</context>
      <required>{true|false}</required>
      <default>String</default>
      <label>String</label>
      <description>String</description>
      <unitLabel>String</unitLabel>
      <options>
        <option value="String">String</option>
      </options>
      <filter>
        <criteria name="String">String</criteria>
      </filter>
    </parameter>
  </config-description>

  <config-description uri="{binding|thing-type|channel-type|any_other}:bindingID:...">
    ...
  </config-description>
...
</config-description:config-descriptions>

See here:
https://www.eclipse.org/smarthome/documentation/development/bindings/xml-reference.html#xml-structure-for-configuration-descriptions

Hi gitMiguel,

Thank you for your help. I had already added the context node to the bridge-type, but this did not solve the issue.
I think it has something to do with the openhab version. Currently I am running 2 versions on my computer. On port 9001 it shows the available serial ports, on port 8080 it does not, even for the LG TV binding.

Kind regards,
Jense