You need to actually install an MQTT broker. This is completely separate to openHAB. I would recommend to install Mosquitto - it’s as simple as following this guide: https://randomnerdtutorials.com/how-to-install-mosquitto-broker-on-raspberry-pi/
And welcome!
EDIT:
By way of explanation: to get MQTT working for your home automation, using openHAB, you will need:
- An MQTT broker. This is the central piece of an MQTT system - everything else communicates through the broker. The broker is completely separate to openHAB (ignoring Moquette, which is deprecated).
- Within openHAB:
- The MQTT binding installed
- A Bridge thing defined (which I think you’ve done with your MQTT Broker Thing - presumably you’re using PaperUI for setup?), which tells openHAB where your MQTT broker is (IP address and port), and if it needs a username or password and some other feature.
OpenHAB can now communicate with and through the MQTT broker. Once that is setup, it’s time to add your devices.
- Outside of openHAB setup your device so that it connects to the MQTT broker
- Configure openHAB to subscribe to the device’s topics through a Thing:
- Create a Thing for the device
- Within the Thing, create Channels for each topic (or more) that you want to subscribe to
- Once you have Channels setup, you can attach these to openHAB Items.
- Once you have openHAB Items you can expose them in Sitemaps, which makes them easily controllable!
If you don’t mind fiddling with text files for configuration (instead of PaperUI), have a look at this which I recently wrote - it’s based around a Sonoff Basic flashed with Tasmota, but the general principals are very similar between devices:
- Install broker
- Setup Bridge between openHAB and broker
- Connect device to broker
- Setup openHAB Thing for device
- Subscribe to device topics through Thing Channels
- Attach Thing Channels to Items
- Expose Items in Sitemap
(Note that you only need to do steps 1 & 2 once, whilst 3 onwards needs to be done for each new device).