Hi and welcome,
Go to your paperui and add MQTT broker via Addons, if you already have one go to Configuration -> Things “+” and click MQTT Binding and if they are not autodiscovered (which default tasmota is not) click “ADD MANUALLY” -> Generic MQTT Thing select your broker and save it.
Then go to
Configuration -> Things and locate your newly created Thing, click on it and add channels you have, like type switch, configure topic which tasmota is using and command topic as well.
Save it
then click on newly created channel and click on blue dot, which will offer you an option to link it to an Item or create new one.
Name of that Item you then use in your sitemap file which you have to edit in some kind of editor on your OH server located in /conf/sitemaps/default.sitemap (you have to create new file there)
or you can do it completely in files if you like
/things/mqttbroker.things
Bridge mqtt:broker:home "Mosquitto MQTT Broker" [
host="IP",
secure=false,
port=1883,
qos=0,
retain=false,
clientid="random",
keep_alive_time=30000,
reconnect_time=60000,
username="",
password=""
]
/things/tasmota.things
Thing mqtt:topic:WallSwitchWorkroom "WallSwitch Light Workroom" (mqtt:broker:home) @ "Workroom" {
Channels:
Type switch : switch "Workroom Lights" [ stateTopic="home/workroom/light/stat/POWER", commandTopic="home/workroom/light/cmnd/POWER", on="ON", off="OFF" ]
Type string : wifi-ssid "Wifi SSID" [ stateTopic="home/workroom/light/tele/STATE", transformationPattern="JSONPATH:$.Wifi.SSId" ]
Type string : wifi-rssi "Wifi RSSI" [ stateTopic="home/workroom/light/tele/STATE", transformationPattern="JSONPATH:$.Wifi.RSSI" ]
Type string : uptime "Uptime" [ stateTopic="home/workroom/light/tele/STATE", transformationPattern="JSONPATH:$.Uptime" ]
Type string : time "Time" [ stateTopic="home/workroom/light/tele/STATE", transformationPattern="JSONPATH:$.Time" ]
Type string : devicestate "Device State" [ stateTopic="home/workroom/light/tele/LWT" ]
}
/items/workroom.items
Switch WSwitch_Workroom "Workroom Lights" <light> (gWSwitch, gLightsHome, gLights, FF_Workroom, gStoreChange) ["Switchable"] { channel="mqtt:topic:WallSwitchWorkroom:switch" }