How to show mqtt state on sitemap

** Issue of the topic:**

Hi. after some help please.
I have mqtt working successfully between openhab, the mosquitto broker & a network enabled display. I want the sitemap to provide information as to what is happening with the display. I thought this would be configured in the thing entry in the sitemap rather than as a rule, but just haven’t been able to find the info…

the aim is that when an MQTT command is sent to the display, i would like it to show in the sitemap too, if the display responds with a state, then i would like that also presented in the sitemap. (like a centralised copy of what the display is doing).

before asking, i read the openhab mqtt documents, googled here and other forums and while it’s been really helpful, aside from confusing legacy v1 documents I still can’t find the answer…

Any suggestions would be welcome - thanks.

Linux openhab 4.19.0-8-686-pae #1 SMP Debian 4.19.98-1+deb10u1

mosquitto broker & openhab 2.5.1 running on ubuntu 20.04 in a virtual machine, an ESP8266 Nodemcu with OLED1306 display running tasmota (display variant). Paperui used for all the config except sitemaps.

*** Please post configurations**

Tasmota display config
MQTT Host - openhab
MQTT Port - 1883
MQTT User- *****
MQTT Topic - tasmota_display1

Mosquitto broker
command to display hello on the remote screen from the broker using the configured thing / channel in openhab

username & password enabled
hosted on same server as openhab2
mosquitto_pub -h -u **** -P **** -t cmnd/tasmotas/displaytext -m hello

** Things configuration related to the issue**

** Sitemap configuration related to the issue**
this is only a placeholder as i haven’t been able to find a working configuration…

sitemap default label=“default sitemap”
Frame label=“Tasmota Devices”{
Text item=tasmota_display1 label=“tasmota_display1”


Looks like you have Simple Mode turned on. If so than the name of your Item is actually mqtt_topic_tasmota_display1_tasmota_display1.

I recommend turning off Simple Mode so you have some control over the Items.

I do (did) have it turned on, thanks. i’ll give that a try.

If that is two different things (small t) that you want to display on your sitemap, you will need two different Items, one for “out” and one for “in”.

just to help anyone who finds this via search engine later… .

my solution to getting openhab to show the MQTT changes in the sitemap and report successful mqtt changes in frontail was to replace the MQTT v2 binding with V1 and ensure i used captial letters for commands (i.e. on should be ON). i know the v2 binding is supposed to work (openhab ver 2.5.1), but this was the only change (aside from moving everything from paperui to text files) but it now works flawlessly.

there is so much old and outdated info i spent weeks going through, but this was a really useful link (note the v1 version) MQTT Binding (v1.11) Getting Started 101