Cannot Setup MQTT Addon

I installed Homeassitant from Scratch with
Home Assistant 2022.9.7 Supervisor 2022.09.1 Operating System 9.0 Frontend 20220907.2 - latest

Than I went to Integrations to search for MQTT.
When I found MQTT a setup page came up

I filled it out:
with the correct ip-address of homeassistant and a username which I created in front called mqtt with the correct password of this user.
After a short time the following answer appeared:

When I tried to look into the mqtt-log the following answer came up:

Mosquitto-Broker ist not installed

I tried a couple of hours to solve the problem and I hope now that anybody can help me.

Thanks

You need the mqtt-broker addon. Just go to addons instead of integrations, there you find the official addon, just search for mqtt.

1 Like

Thanks, the MQTT-Broker ist running.
But when I look under Add-ons, a message comes out:" You don#t have any add-ons installed yet. …
When I add MQTT it shows me under LOGS that the Broker is running. I set the buttons for "Start on boot " and “Watchdog” to on and If I start the Broker then the buttons go to “off” and a red sign in the upper end glows.
I want to controll a WLAN Power Socket Switch with energy monitoring from DeLock 11827 with homeassistant but the System does not recognize the switch.

With an MQTT-Explorer I looked and it looks good, but it doesn’t work.

What’s going on?

Many folk are confused at the difference between the MQTT broker Add-In, and the MQTT Integration.

More MQTT help can be found here (with lots of links to the docs):

If this helps, :heart: this post!

Hello FloatingBoater,
I did what in the description was written.
The stand ist:
The Mosquitto-broker runs.
The Tasmota-Switch shows me the following:

00:00:00 CFG: aus Flash geladen am FA, zählen 18
00:00:00 Projekt delock Kueche-Schalter1 Version 7.2.0(basic)-2_7_4
00:00:00 WIF: verbinden mit AP1 MM7490_nomap in Modus 11N als Kueche-Schalter1-5531...
00:00:05 WIF: verbunden
00:00:05 DNS: initialisiert
00:00:05 HTP: Web-Server aktiv bei Kueche-Schalter1-5531.local mit IP-Adresse 192.168.178.52
18:58:03 MQT: Verbindungsversuch...
18:58:03 MQT: verbunden
18:58:03 MQT: tele/Kueche-Schalter1/LWT = Online (beibehalten)
18:58:03 MQT: cmnd/Kueche-Schalter1/POWER = 
18:58:03 MQT: tele/Kueche-Schalter1/INFO1 = {"Module":"Delock 11827","Version":"7.2.0(basic)","FallbackTopic":"cmnd/Kueche-Schalter1_fb/","GroupTopic":"cmnd/tasmotas/"}
18:58:03 MQT: tele/Kueche-Schalter1/INFO2 = {"WebServerMode":"Admin","Hostname":"Kueche-Schalter1-5531","IPAddress":"192.168.178.52"}
18:58:03 MQT: tele/Kueche-Schalter1/INFO3 = {"RestartReason":"Software/System restart"}
18:58:03 MQT: stat/Kueche-Schalter1/RESULT = {"POWER":"ON"}
18:58:03 MQT: stat/Kueche-Schalter1/POWER = ON
18:58:07 MQT: tele/Kueche-Schalter1/STATE = {"Time":"2022-10-05T18:58:07","Uptime":"0T00:00:12","UptimeSec":12,"Vcc":3.459,"Heap":28,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":1,"POWER":"ON","Wifi":{"AP":1,"SSId":"MM7490_nomap","BSSId":"DC:15:C8:81:79:40","Channel":11,"RSSI":100,"Signal":-45,"LinkCount":1,"Downtime":"0T00:00:06"}}
18:58:07 MQT: tele/Kueche-Schalter1/SENSOR = {"Time":"2022-10-05T18:58:07","ENERGY":{"TotalStartTime":"2022-10-05T17:13:59","Total":0.000,"Yesterday":0.000,"Today":0.000,"Period":0,"Power":0,"ApparentPower":0,"ReactivePower":0,"Factor":0.00,"Voltage":212,"Current":0.000}}
19:03:07 MQT: tele/Kueche-Schalter1/STATE = {"Time":"2022-10-05T19:03:07","Uptime":"0T00:05:12","UptimeSec":312,"Vcc":3.459,"Heap":27,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":1,"POWER":"ON","Wifi":{"AP":1,"SSId":"MM7490_nomap","BSSId":"DC:15:C8:81:79:40","Channel":11,"RSSI":100,"Signal":-47,"LinkCount":1,"Downtime":"0T00:00:06"}}
19:03:07 MQT: tele/Kueche-Schalter1/SENSOR = {"Time":"2022-10-05T19:03:07","ENERGY":{"TotalStartTime":"2022-10-05T17:13:59","Total":0.000,"Yesterday":0.000,"Today":0.000,"Period":0,"Power":0,"ApparentPower":0,"ReactivePower":0,"Factor":0.00,"Voltage":214,"Current":0.000}}

In Homeassistant no device was detected.
The Log of the MQTT-broker shows only the starting phase

The config entry of the MQTT Integration shows the follwing:

{
  "home_assistant": {
    "installation_type": "Home Assistant OS",
    "version": "2022.9.7",
    "dev": false,
    "hassio": true,
    "virtualenv": false,
    "python_version": "3.10.5",
    "docker": true,
    "arch": "aarch64",
    "timezone": "Europe/Berlin",
    "os_name": "Linux",
    "os_version": "5.15.61-v8",
    "supervisor": "2022.09.1",
    "host_os": "Home Assistant OS 9.0",
    "docker_version": "20.10.17",
    "chassis": "embedded",
    "run_as_root": true
  },
  "custom_components": {},
  "integration_manifest": {
    "domain": "mqtt",
    "name": "MQTT",
    "config_flow": true,
    "documentation": "https://www.home-assistant.io/integrations/mqtt",
    "requirements": [
      "paho-mqtt==1.6.1"
    ],
    "dependencies": [
      "http"
    ],
    "codeowners": [
      "@emontnemery"
    ],
    "iot_class": "local_push",
    "is_built_in": true
  },
  "data": {
    "connected": true,
    "mqtt_config": {
      "birth_message": {
        "topic": "homeassistant/status",
        "payload": "online",
        "qos": 0,
        "retain": true
      },
      "discovery": true,
      "port": 1883,
      "tls_version": "auto",
      "will_message": {
        "topic": "homeassistant/status",
        "payload": "online",
        "qos": 0,
        "retain": false
      },
      "broker": "core-mosquitto",
      "username": "**REDACTED**",
      "password": "**REDACTED**",
      "discovery_prefix": "homeassistant",
      "keepalive": 60,
      "protocol": "3.1.1"
    },
    "devices": [],
    "mqtt_debug_info": {
      "entities": [],
      "triggers": []
    }
  }
}

I hope You can help me and i come forward.
Greeting and thanks

Hi,

Let’s go through the logs you have shown:

  • Log #2 - OK shows the Mosquitto Add-In broker log at start-up. Everyhting looks normal, and you have not set up any Mosquitto logins, so assunme you are using full HASS users (log would show INFO: Setting up user xxxxxx).
  • Log #1 - OK shows a Tasmota device console log. The key phrase here is 18:58:03 MQT: verbunden which I believe means Connected. The firmware is version 7.2.0, which is really OLD.
  • Log #3 - OK shows Download Diagnostics for the MQTT Integration - all looks fine, but there are no HASS Discovery devices listed (N.B. Tasmota Discovery is different and seperate!).

So an old Tasmota device is connected and authenticated to the Mosqutto broker. The MQTT Integration is installed.

Unfortunately, neither the MQTT Integration (to connect HASS to Mosquitto), nor the Tasmota Integration (to allow HASS to discover Tasmota devices via MQTT) make getting log files easy.

You’ve clearly tried, and posted the Download Diagnostics for the MQTT integration as that is all the integration offers. The Tasmota integration doesn’t even give diagnostics as an option.

As long as both MQTT and Tasmota integrations are installed, and your Tasmota device is set to use Tasmota discovery (SetOption19 0), the device should be discovered and appear.

The issue is your version of Tasmota v7.2.0 is really old. Tasmota is up to v12, and Tasmota Discovery was added in about v9.3.

This gives top options:

  • Stay with an old Tasmota version, using HASS Discovery (which has been removed from Tasmota), and accept poor support in HASS for sensor units and long term statistics.

    • Connect to your Tasmota device via the web interface, select Console
    • Enter setoption19 1
    • You should see MQT: stat/<device-name>/RESULT = {"SetOption19":"ON"}
    • HASS should discover via the MQTT Integration (not as good as the Tasmota Integration).
  • Upgrade to a more recent Tasmota > v9.3, and check setoption19 0 is set

    • As v7.2.0 is so old, you can’t just upgrade to v12 and keep your existing settings.
      • Option 2.1 Upgrade in steps to (say) v9.3, then v12 and try to keep settings
      • Option 2.2 Write your settings down, and upgrade to v12, and re-configure the Tasmota device
    • After upgrade, check setoption19 0 is set.
    • Keep Tasmota up to date - one MQTT command upgrades ALL of my devices in one every few months.

This answer took a lot more work than expected due to the need to check old versions.

If this helps, :heart: this post!

Thank’s a lot.
I’ll try to update the tasmota version.
I’ll come back, when i did it.
Greetings
Hardy

Hi FloatingBoater,
I flashed the tasmota devices to 12.1.1.6 and it works now via the Tasmota integration.

Thanks a lot, the old version of the Tasmota Software was the mistake.
Many greetings to You from DĂĽsseldorf, Germany
Hardy

Glad I could help Hardy, from Northumberland, England!

TschĂĽĂź! *

(*Relatives on the Danish Border)