Where is the code?

Hi,

I am trying to set up a mqtt device on OH2.4. ALL web help explains how to edit .cfg files, but I don’t have any . I created a panel with habpanel. All I need to do ist finding a place for these magic lines:
Switch LivingRoom_Light “Living Room Light” (LR,gLight)
{ mqtt=">[broker:cmnd/sonoff-A00EEA/POWER:command:*:default],
<[broker:stat/sonoff-A00EEA/POWER:state:default]" }
I have the broker, the binding and an item, but no idea where to put the mqtt commands. Although I created an item, items/ is empty. services/ contains addons.cfg, dashboard.cfg, runtime.cfg. Looks like the UI is not using the locations that normal users use.

So where can I place the mqtt statements for my item so that it works in habpanel?

Thanks,
Archi

That doesn’t mean anything.

You are using the MQTTv2 binding
Your item config is for the MQTTv1 binding

Please see the docs for the MQTT binding

You first need to create a Broker Thing
PaperUI → Configuration → Things → + → MQTT Binding → Broker Thing → Enter your broker details
Then you need to create a Generic MQTT thing
PaperUI → Configuration → Things → + → MQTT Binding → Add manually → Generic MQTT Thing
Open the thing and add the required channels

You are referring to an Item definition which should go to

conf/items/somefile.items

I am almost there following yout hints. I added in the channel of the generic mqtt item

MQTT state topic
tasmota/sonoff_570D27/stat/POWER:state:default

and for
MQTT command topic
tasmota/sonoff_570D2/cmnd/POWER:command:*:default

Which hopefully is correct, because in mosquitto I can see the output of my wall tasmota (if I cntrol it from somewhere):
tasmota/sonoff_570D27/stat/RESULT {“POWER”:“ON”}
tasmota/sonoff_570D27/stat/POWER ON
tasmota/sonoff_570D27/tele/LWT online
tasmota/sonoff_570D27/cmnd/POWER (null)

I think I need an item now, but I cannot figure out how I create an item thats linked to that channel. I believe I need an item, because thats what I see in the habpanel.

Another hint for me?

Hans-Jörg:
No, unfortunately not. I create some things during my experiments in PaperUI, but
/etc/openhab2/items
is empty, as well as the Windows share.
I only contains the readme.txt. This is what irritates me. BTW also things is empty an I defenitely have some.

Items created through PaperUI are stored in JSONDB…

It works! I found the Item linking on the blue circle left of the channel name. The mqtt commands are:
MQTT state topic
tasmota/sonoff_570D27/stat/POWER
MQTT command topic
tasmota/sonoff_570D27/cmnd/POWER

BTW: Is there a way to directly look into the JSONdb to see what openhab has written there?

Of course, the files are readable with any editor.