Skip to content

[mqtt] Trigger channels created in .things file are not shown as such in Mailn UI #19583

Description

@dilyanpalauzov

The way to create a triggering MQTT/Generic channel in a .things file, as described at https://www.openhab.org/addons/bindings/mqtt.generic/, is to put [… trigger="true"] in the configuration. The way to create a triggering channel over Main UI for MQTT/Generic is to select as Type “trigger” (instead of Number, Text(String), On/Off Switch). Exporting to DSL of a triggering channel, created over Main UI, shows Type trigger:. The way to describe a triggering channel in a .things file, foreseen in Thing.xtext, is to start a channel line with

Trigger Switch :

instead of

Type switch : [… trigger="true"]

or instead of

Type trigger :

Trigger channels setup over a .things file with trigger="true" are not shown as such in Main UI: in Main UI it is not clear whether this is a State or Trigger channel. Using the form Trigger Switch: in a .things file emits a message “Channel … has no type” from org.openhab.binding.mqtt.generic.internal.handler/GenericMQTTThingHandler.java:initialize().

  • Accept the syntax Trigger Switch: for mqtt generic thing channel when reading .things file.
  • Show in MainUI in a distict way triggering and state channels, irrespective of whether the triggering channel was configured using Type trigger:, Type switch : [trigger="true"] or Trigger Switch: form.

I am using openHAB 5.1 build 4865.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions