Using Dynamic State Options for Parameter in Thing configuration

Hi all,

I’m working on a Binding for a ClearOne audio matrix (ClearOne XAP) and have it successfully showing me the names of my sources in the “Source” Channel in the Control section of PaperUI:


Processing A is correctly renamed to “Kodi”, Processing B to “LMS”, Processing C to “Spotify”

I would like to also use these customised names in the Thing Configuration, in a multi-select drop-down list:

image
Processing A, Processing B and Processing C do not show their proper names

Currently the list of “Selectable Inputs” is hard-coded in thing-types.xml but it would be nice to also have this populated from the actual inputs available for the Unit type (different unit types have different numbers of sources I could choose from)

Any assistance you can provide on this will be greatly appreciated :slight_smile:

Thanks!

Hi Garry,

For dynamic configurations you can implement a ConfigOptionProvider (see ConfigOptionProvider interface). The getParameterOptions method should check for your config description uri and the return the possible values for each (or the desired) parameter given. If you need an example have a look at my current work on the configuration for the new Ephemeris service.

I have an XAP800 but unfortunately every now and then it would scream down the speakers as if there was feedback in the box somewhere. This usually happened late at night and woke everyone up so it had to go. Sad really, as it worked perfectly for my multi-zone audio… I’m now looking at getting a couple more chrome cast audios.