Using MQTT without text configuration?

Hi,

I am recreating my OH2.2 system from scratch in OH2.5. Thanks to all the documentation and forums I’m making very good progress. I am also thinking carefully about how I can use new OH capabilities to make my system clean and efficient.

I’m trying to get some Shelly relays working in OH2.5 using the MQTT binding. It’s working at the broker level and also everything seems OK in PaperUI - I have a Thing for each Shelly device (screenshots below).


In PaperUI I can control the relay and see its correct status (including when status is changed by its physical switch):

2020-01-05 (2)

My challenge now is to get it controllable from HABpanel and then in rules.

When I add a switch widget in HABpanel I can see an MQTT topic, but that does not work to control the relay or show its status:

Am I missing a step? In OH 2.2 I defined items in a config file:

Switch Kitchen_cupboards_on "Kitchen cupboard lights ON" {mqtt=">[homemqtt:shellies/shelly1-BA2D6E/relay/0/command:command:*:on]"}
Switch Kitchen_cupboards_off "Kitchen cupboard lights OFF" {mqtt=">[homemqtt:shellies/shelly1-BA2D6E/relay/0/command:command:*:off]"}

Do I need to use an item definition like this, or is there something I can do in PaperUI to bridge the gap between the working thing and HABpanel?

Thanks,

Phil

You can use PaperUI to create Items (instead of xxx.items files) and to link them to channels of v2 bindings.

You cannot use PaperUI to link Items to v1 bindings, like your mqtt= examples.

You have to have Items for use in HABpanel or other UIs. Do not confuse Items with auto generated names with actual MQTT topics.