Mosquito MQTT update v3 broke my hassio

Ugggh… No clue what has happened now… I mentioned that I rebooted the host about 20 mins ago and it came back up just fine. I didn’t change anything except for the auto update of the supervisor to 139. MQTT was still v2.

I went away a few mins and now my HA is dead dead again. I can still ping it but I can no longer ssh into it to see what’s going on. WTF?

1 Like

I’ll give this a try:

  • Supervisor boot loop is fixed in 139. It was the discovery issue.

  • Mosquitto addon v3 now uses integrations. This means discovery: needs to be enabled.
    I was mistaken. Discovery component does NOT need to be enabled.

  • It also can use the new user auth credentials, so you could for example create an “mqtt” user and password (configuration > users in the UI) and use that on all your clients. OR you can specify a local user/pass in the “logins”: part of the addon config page and fill in existing user/passwords you are already using. You can NOT use the usernames “homeassistant” or “addons” in either place because they are already taken.

  • You remove mqtt: from configuration.yaml completely. (I am running it this way now.)

  • You go to configuration > integrations in the UI and select mqtt from the bottom list, then choose configure. You choose to use auto-discovery or not, and then it should show up in the top list as “Configured”. It is normal to not see any devices within, currently.

At this point you may want to restart HA in order to be rid of the old mqtt: in configuration.yaml. Or maybe a full reboot is better (now that the reboot bug is gone because you have supervisor 139).

Other details are here https://www.home-assistant.io/addons/mosquitto/

8 Likes

This screwed my system too. Seems OK now. My fix was -

I took out my SD card, connected it up to my Mac and opened the partition containing the homeassistant directory (using the trial of extFS for Mac by Paragon). Deleted the discovery.json file, took a backup at the same time, edited out the mqtt: section from configuration.yaml reinserted and it booted back up. Cleaning up a few errors, configured the MQTT integration and rebooted, things Seem to be working OK now. Also had to change the MQTT devices username from homeassistant but that’s not too much hard work, only 10 devices at the moment.

Ask away if you need any more help!

I’ve lost an entire day to this bug. So glad I found this thread to explain the various woes that befell me. First previously reliable sensors refusing to connect, then Hass itself totally giving up on me requiring a lengthy erase, etch, restore.

1 Like

to fix the loop you have to remove discovery.json file inside your config folder. use ssh or any other way to get into the host file system.

That worked for me also.

Can the file system be viewed and the files edited and removed by putting the SD card into any Linux pc?

yes. I do it with Ubuntu on my laptop.

1 Like

I’ve got a dumb question now, so forgive me: by “config” folder, you mean the folder that all yaml files are etc.?

I can’t see discovery.json even via ssh in that location :sweat_smile: [but also I’m on 0.81.6 + samba v8 + mosquitto 2.0, as I’ve reflashed my SD card and booted the older version]

This worked for me thanks!

well. you are almost there. it should be by 1 or 2 levels upper i think.
in my case it was /usr/share/hassio. But it depends what hassio install method did you use. if you can’t find it just use linux find command

Did all that but keep getting socket errors for all devices …

1 Like

HassOS on RPi3, so kinda locked system, if I understand correctly.

yeah, tried find earlier - without any success…

meanwhile, updated mosquitto, so now I have the deadly combination: 0.81.6 + samba v8 + mqtt v3 ;D but right now no mqtt active… once more I’ll dig the whole topic to find how to activate that d*mn mqtt [because lots of lights & sensors are down still], but if you’d be so kind - still please point me to this discovery.json file [is it possible, that I just don’t have it?]

1 Like

I don’t think you need to worry about the discovery file if your system is booting ok. Just make sure you have supervisor 139 installed. Sounds like you just need to sort your Mqtt connections now.

How do I check that?

ok, thanks for this. so one is checked out from the list :smiley:
yep, supervisor 139, system bootable. digging in the mqtt config now…

@ashscott check in the menu: hass.io, tab: system.

2 Likes

On the hassio tab - look under system. Then look in add-ons mosquito to see what messages are in the log.

I have 138. Update to 139 is not working here.

Press update, then refresh the browser. If the latest update is not showing as 139 press reload first.

Me too,

1541450688: Socket error on client DVES_4B7AFB, disconnecting.

Any ideas?