That comes with the MQTT V2 binding, so you already have it. I’m currently on the phone so can’t help much, but did write a sort of generic tutorial.
@rlkoshak also wrote this which might help.
And @Max_G very recently asked the same questions.
Use the above links to help, but in general:
- Create a Bridge Thing to connect openHAB to Mosquitto
- Create Things for each device.
- Within each Thing create Channels for each property of the device (temperature reading, relay etc)
- Link your items to your Thing Channels using the
channel=
syntax, instead of themqtt=
syntax.