Embedded mqtt starts instead of mosquitto connection

Hello Everybody!
And I’m definitely new to homeassistant.

Here’s the problem. I’m trying to make a standalone version of Homeassistant to work with Mosquitto MQTT located on the same Raspbian server. The configuration is right from the manual:

mqtt:
broker: localhost

As soon as my homeassistant sees that configuration it’s trying to load its embedded MQTT addon which is not configured and hanging with the following log messages:
Jan 19 16:13:04 helios hass[2334]: #033[32m2019-01-19 16:13:04 INFO (MainThread) [homeassistant.loader] Loaded mqtt from homeassistant.components.mqtt#033[0m
Jan 19 16:13:04 helios hass[2334]: #033[32m2019-01-19 16:13:04 INFO (MainThread) [homeassistant.setup] Setting up mqtt#033[0m
Jan 19 16:13:04 helios hass[2334]: #033[32m2019-01-19 16:13:04 INFO (MainThread) [homeassistant.setup]
Setup of domain mqtt took 0.0 seconds.#033[0m

Somehow, I cannot find any utility to either disable or uninstall that mqtt add-on, which seems to be a part of the original homeassistant installation.

There is a “hassio” command line tool, but it’s not included to my standalone version, unfortunately.

Any idea would by appreciated!

So how are you running home assistant? Through Python venv?

An add-on refers to hassio add-ons. Are you referring to the embedded Python MQTT broker?

Anything related to hassio does not apply to anything but hassio.

There shouldn’t be anything to do to stop the embedded Python MQTT broker except make sure it isn’t running when your other broker is running, then start your home assistant

Exactly, through Python venv.

Your right, it is embedded Python MQTT broker

I don’t get it - “make sure it isn’t running” - should I give up on Mosquitto and start using embedded MQTT? Or to make sure the embedded MQTT isn’t running, but that’s the question, how?

Stop home assistant.

Is mosquitto still running? Is it your installed version or did a process get stuck shutting down HA?

Check mosquitto with a client app. Is it your preferred MQTT broker?

Start home assistant. Any more errors?

Yes Mosquitto is always running as it should. Never had a problem with Mosquitto. Homeassistant is starting its own embedded MQTT as soon as I add mqtt: to the configuration.yaml event though I never use embedded: word.

OK. There is nothing to run, or do, aside from specifying the ‘external’ broker, to manage the embedded broker.

I guess I don’t understand the problem fully because your log does NOT indicate that it is loading the embedded broker. Your log indicates that it is loading the COMPONENT for MQTT.

From the docs:

If you are running a Mosquitto instance on the same server as Home Assistant then you must ensure that the Mosquitto service starts before Home Assistant. For a Linux instance running Systemd (Raspberry Pi, Debian, Ubuntu and others) then you should edit the file /etc/systemd/system/[email protected] as root (e.g., sudo nano /etc/systemd/system/[email protected] ) and add the Mosquitto service: [Unit] Description=Home Assistant After=network.target mosquitto.service

Right. It’s all been set. It doesn’t matter though, because I start and stop services manually - homeassistant after mosquitto.

So is your thought that because it hangs AFTER completing the MQTT component startup that you think it’s running the embedded broker? It’s not hanging because of some other misconfiguration ?

No, without mqtt: in configuration.yaml homeassistant starts properly

gotcha.

have you tried 127.0.0.1 or the IP of your server, instead of localhost? perhaps there is a bug with using localhost?

I did. Same result.

Is this actually formatted correctly in your config?

spaces have been removed from the front by the editor

You know you can use the code tags, right? It would save us the question. That’s why we have the blue box at the top of the page. We have so many people who have posted issues, only to find out it is a spacing error. Using the proper formatting keeps us from assuming or questioning that.

Now I do, let me try

Is this how you have it? mqtt.localnet?

mqtt:
  broker: mqtt.localnet
  port: 1883
  username: homeassistant
  password: !secret homeassistant

Copy all the code from your config.

paste into editor

highlight all the code you want to format

hit the code button