- Are you using openhabian?
- What is your MQTT Broker? Mosquitto? Have you confirmed that your broker has actually started? What is your broker configuration? Does it have a username and password?
- What is your openHAB MQTT configuration?
When sharing code or configuration make sure to use code fences.