Skip to content

Module configuration

Julian Waller edited this page Oct 25, 2022 · 1 revision

The module configuration is like preferences for the connection. E.g. the IP-address of the device controlled by the instance.

As part of creating a module, you should implement the getConfigFields() method.

Companion will call this when the configuration panel is opened for your module, so that it can present the correct fields to the user.
The fields you can use here are similar to the ones for actions and feedbacks, but with more limitation.

You can see the list of field types here, the linked documentation states any limitations that apply when used for the configuration, or if they are not allowed.
Additionally, each field is required to have a width property. This should be a value 1-12.

When your module is initialised, you will be provided a copy of the config, and any time the user changes the configuration, configUpdated() will be called.

Clone this wiki locally