I am using Beebotte mqtt broker and it used to work fine until I upgraded to the latest version of hassio. I The broker doesnt provide any username/password but only a token which in my configuration I had:
Having exactly the same issue since V0.117.
Config:
mqtt:
broker: 192.168.178.45
client_id: ha
# mqtt discovery
# discovery: true
# discovery_prefix: ha
(Does not matter whether discovery is on or off.)
Now lots of errors in homeassistant.log like:
2020-11-04 20:47:31 WARNING (Thread-5) [homeassistant.components.mqtt] Disconnected from MQTT server 192.168.178.45:1883 (1)
This is my local broker on the same Pi3. (I am using the HA core install).
Mosquitto.log shows:
1604519147: New client connected from 192.168.178.45 as ha (c1, k60).
1604519148: New connection from 192.168.178.45 on port 1883.
1604519148: Client ha already connected, closing old connection.
1604519148: Socket error on client ha, disconnecting.
1604519148: New client connected from 192.168.178.45 as ha (c1, k60).
1604519149: New connection from 192.168.178.45 on port 1883.
1604519149: Client ha already connected, closing old connection.
Ok found a solution for me:
disable the client id, so the config is now the most simple possible:
mqtt:
broker: 192.168.178.45
This is with HA V0.117.2 core installation and my own mosquitto v3.1 installation (has not been touched for some time)
I guess this is bug for V0.117 as the cliend_id was used before with no problem?
I have the same problem with Home Assistant OS, Mosquitto broker on RPi3 starting from v. 0.117. There is auto-configured MQTT integration
HA log:
2020-11-24 11:43:09 WARNING (Thread-5) [homeassistant.components.mqtt] Disconnected from MQTT server core-mosquitto.local.hass.io:1883 (1)
2020-11-24 12:24:04 WARNING (Thread-5) [homeassistant.components.mqtt] Disconnected from MQTT server core-mosquitto.local.hass.io:1883 (1)
Mosquitto add-on log:
1606207385: Client 5JoqTIwffOAuTj5IJ45ClB has exceeded timeout, disconnecting.
1606207390: New connection from 172.30.32.1 on port 1883.
[INFO] found homeassistant on local database
1606207392: New client connected from 172.30.32.1 as 5JoqTIwffOAuTj5IJ45ClB (p2, c1, k60, uāhomeassistantā).
1606208257: Saving in-memory database to /data/mosquitto.db.
1606209842: Client 5JoqTIwffOAuTj5IJ45ClB has exceeded timeout, disconnecting.
1606209845: New connection from 172.30.32.1 on port 1883.
[INFO] found homeassistant on local database
1606209847: New client connected from 172.30.32.1 as 5JoqTIwffOAuTj5IJ45ClB (p2, c1, k60, uāhomeassistantā).