MQTT not working 0.98.4 > 0.98.5 UPGRADE

I got the message that MQTT could not startup. And my MQTT messages from Homey didn’t come in anymore. I tried to restart HA serveral times but still no succes. I only performed the upgrade and nothing more. This is what the log shows:

Setup failed for mqtt: Integration failed to initialize.

19:47 setup.py (ERROR)

Unable to start embedded MQTT broker

19:47 components/mqtt/init.py (ERROR)

Error initializing MQTT server

19:47 components/mqtt/server.py (ERROR)

Broker startup failed: [Errno 98] error while attempting to bind on address (‘0.0.0.0’, 1883): address in use

19:47 components/mqtt/server.py (ERROR)

That’s your problem.

You’ve got an external broker running, and are trying to use the built in broker too. You have to pick one (the recommendation is usually the external one).

That is strange I’ve only one broker running for quite al long time. and the previous update’s of HA didn’t breake the MQTT internal broker.

Well, you’ve got two now :wink:

If you’re using the Hass.io install method, check your add-ons. If you’re using another install method… what one?

I’m using Hass.io and this are my add-ons:

If I reconnect the mqtt-clients the mqtt-broker responds as aspected, see the log of my MQTT add-on :

1568178910: Saving in-memory database to /data/mosquitto.db.
1568179185: New connection from 192.168.xxx.xxx on port 1883.
[INFO] found Ebel on local database
1568179186: New client connected from 192.168.xxx.xxx as ArielaMQTTClientTest (p2, c1, k60, u’Ebel’).
1568179186: Client ArielaMQTTClientTest disconnected.
1568179344: Socket error on client Homey Beeklust, disconnecting.
1568179354: New connection from 192.168.xxx.xxx on port 1883.
[INFO] found Homey on local database
1568179355: New client connected from 192.168.xxx.xxx as Homey Beeklust (p2, c1, k60, u’Homey’).

Now the stange thing is that the enteties from Ariela does show up and show there messages. The enteties from Homey are still “not available”

Mosquitto is an external broker.

Home Assistant has one built in - the embedded broker. That’s what your original error message is about.

Check what your mqtt: section looks like in configuration.yaml

Thanks for your help.

I had these statements in my ‘configuration.yaml’ file:

MQTT nodig voor Homey

#mqtt:
birth_message:
topic: ‘hass/status’
payload: ‘online’
will_message:
topic: ‘hass/status’
payload: ‘offline’

I # them out and restarted HA but no succes. Then I rebooted the NUC and now the messages are comming back.

I had those topics added to the ‘configuration.yaml’ file to signal Homey when a restart of HA take place. But I assume this not the right place to do this.

Please see the sticky post for how to correctly format code, configuration, etc.

That config doesn’t list a broker, so Home Assistant is automatically trying to set up the built in one.

Remove the MQTT integration (Integrations -> MQTT -> bin icon), then add the required line to point to your MQTT broker.