Mosquito MQTT update v3 broke my hassio

I changed the MQTT broker addon to the MQTT server and web client.
(https://github.com/hassio-addons/addon-mqtt/blob/v0.1.1/README.md).
It is (still) working.

1 Like

OK, next step. I was able to kill the discovery.json file in hassio (root) in dir hassio:/mnt/data/resin-data/
After that the supervisor stopped crashing, and I am now able to get into mqtt itself.

1 Like

Same problems over here, mqtt not working anymore, now trying to set a old snapshot back where is works

Back in business!

  1. Login to raspi hassio Docker root

  2. start homeassistant and ssh, smb addons by hand (docker start homeassistant / docker start addon_core_ssh / docker start addon_core_samba

  3. Delete all mqtt: stuff from configuration.yaml (via samba)

  4. Delete /mnt/data/resin-data/discovery.json (via root ssh docker)

  5. docker start resin_supervisor

  6. login at UI - configure MQTT 3 Addon with user Account
    config Addon:
    {
    “logins”: [
    {
    “username”: “myuser”,
    “password”: “mypass”
    }
    ],
    “anonymous”: false,
    “customize”: {
    “active”: false,
    “folder”: “mosquitto”
    },
    “certfile”: “fullchain.pem”,
    “keyfile”: “privkey.pem”
    }

  7. Added exact same user in settings/user: myuser, mypass

  8. full hassio restart

  9. configure integrations - Take a look to the top, message appears: “Mosquitto” - Do you want to use the integratet broker - yes! (here is the magic!) - Success (only with matching users)

  10. Restart hassio (if not all mqtt devices will stay “yellow”

  11. BACK IN BUSINESS!

2 Likes

I did the same thing yesterday, but I was told I would eventually have to change back. I had 96 MQTT clients needing direction, clicking relays and blinking lights all over the house…and then my wife tripped while trying to leave for work in the dark…not very happy…I took the quick fix LOL.

2 Likes

Same problems for me… lost 4h and eventually reverted back to V2…

This rundown matches my own experience getting it to work. One important thing that is missing is that after removing discovery.json and getting back in, don’t attempt a reboot until you have updated to Supervisor 139.

A misunderstanding I think. You don’t have to change back. The community repo MQTT addon will also start using the HA user credentials at some point (all the addons are adding this that can, so that user management can be implemented).

The difference is that the official repo mqtt addon ties in with the one-click integration. I don’t know if the community repo mqtt addon will.

Either way, the choice will remain.

1 Like

PRAISE THE FLYING SPAGHETTI MONSTER!
another system is up! man, that was more than 24h living like savages [I mean: turning most of the lights by hand] but right now seems like all my mqtt switches [tasmotized] and sensors are back online.

Home Assistant 0.81.6; Supervisor 139, HassOS 1.12, Mosquitto v3; Samba v8. my steps eventually were those:

  1. finally there were no issues with bootloop, so I skipped hunting the discovery.json file

  2. after many fails I hanged up my RPi3, so I flashed it fresh&clean with latest and greatest hassio image

  3. recovered my snapshot with 0.81.5 with wipe

  4. after reading all this thread and brainstorming with my brother [his system also died yesterday] I TURNED OFF mqtt in all my ESP-based devices [lots of sonoffs basic and sonoffs touch; all with tasmota, so was relatively easy]

  5. uninstalled mqtt broker, removed mqtt from configuration

  6. took out the zigbee dongle & remove the zigbee2mqtt configuration

  7. restarted & updated everything, after another reboot made sure everything is working

  8. installed mqtt broker, entered the configuration at the addon page:

     {
       "logins": [
         {
           "username": "NEW-MQTT-USER",
           "password": "NEW-MQTT-PASSWORD"
         }
       ],
       "anonymous": false,
       "customize": {
         "active": false,
         "folder": "mosquitto"
       },
       "certfile": "fullchain.pem",
       "keyfile": "privkey.pem"
     }
    
  9. entered mqtt configuration in the yaml (I’m 99,99% sure that addon config OVERWRITES that, but when my brother was testing his fixes - broker started to work ONLY after adding this to yaml):

     mqtt:
       broker: core-mosquitto
       username: !secret mqtt_username
       password: !secret mqtt_password
       discovery: true
    
  10. restart, checked the mqtt logs in the addons page - to be sure everything is ok)

  11. device by device - turned on the mqtt, entered new credentials

  12. installed zigbee dongle, added zigbee2mqtt config, restart

  13. all sensors & switches are back!

I assume that step 9 makes no sense, but I won’t risk deleting that :smiley:
I DIDN’T add any user with the new authorisation module - only local user in the mqtt addon configuration.

my guess is, that everything worked earlier, but after changing the user all my mqtt devices were trying to connect to broker and then failed because of… DDoS! so, the more mqtts are in the system, the bigger “DDoS attack” is performed and hassio just can’t get it right. before I turned off mqtt in all tasmotas - the switches when touched were terribly slow. they were endlessly connecting with broker…

so, THANK YOU everyone involved in this rough fight. it was good to brainstorm with you all, I am sure that it helped a lot with my restoration!

and good luck to everyone who still is fighting with the dead hassio installation. THERE IS A HOPE!

3 Likes

Yes my hassio is up and running again.
Many thank for the options above, does the trick also for me :slight_smile:

What a time for me to try using MQTT for the first time 2 days ago.

My mqtt light keeps disconnecting and reconnecting repeatedly every min and I’m not sure if its related to this update or me just misconfiguring something.

I had everything setup the way @pejotigrek has it except i also have “discovery_prefix: homeassistant” in my config under mqtt:

Get rid of it!
Get rid of everything including:

mqtt:

It isn’t needed

I updated and had the problem as well.

But…

Thanks to all the back and forth on this issue. I’ve got my system sorted out and working.

Thanks all.

Then how do I enable discovery?

So I tried a couple of different configurations, both of which have worked for me.

  1. First minimal changes
  • I deleted the entire mqtt: section including mqtt: from config.yaml
  • I left my MQTT switches in config yaml
  • I set the MQTT add-on to defaults and re-entered my local username and password in the addon.
  • I think I removed the MQTT integration and then re-added it and it worked from the ‘top of page’ prompt and didn’t prompt me for any information.

This worked fine.

  1. I decided to use discovery and HA user
  • I deleted the entire mqtt: section including mqtt: from config.yaml
  • I created a user in Home Assistant using the same username and password I had used as the internal username and password (which was still configured in my sonoff switches.
  • I reset to defaults the MQTT addon settings saved and restarted it
  • I removed my MQTT switches in config yaml
  • I removed the MQTT integration and restarted.
  • I then got an error after restarting when I tried to add the MQTT integration so I clicked on the option down the meny and entered the ip address 127.0.0.1, the username and password (the HA one I created)
  • In tasmota, I enabled MQTT discovery from the console in both my switches - SetOption19 On
  • My switches then were automatically detected so I had to maks a few other changes to the following:
    ui-lovelace.yaml
    groups.yaml
    customize.yaml
    google-assistant.yaml
    automations.yaml

I also had to edit the friendly name and icon and I used the configuration>Customize function to do that… however I did make a few errors in customize that might have made it invalid… so I’m not sure if it was actually ignoring customize file or not (probably not)

END! Everything is working as before.

it shouldn’t be like this…having look to retro compatibility the dev team should allow a more smooth transition to the new platform…

2 Likes

And to reinforce my point of view i’m seing a lot of users changing to Hass.io Add-on: MQTT Server & Web client…so bad news for this v3…

It will be just putting off the inevitable because the community addon will be switching to the new auth real soon. As a stopgap it’s a good solution when your system is broken but I wouldn’t be delaying fixing it properly.

Hello,
I’m in the boot loop too after updating to 0.81 from 0.8 and mqtt update to v3. All I get is 404 not found in the browser. Before the hassio update my mqtt was broken too thought I could fix it with the update to 0.81.All docker add ons are running and I can access them but I can’t reach my hassio frontend. Ssh isn’t working either it just says 403 forbidden if I try to to get anything else than for example hassio ha info. The ssh info says that I’m running 0.81 so some of the update worked.
How can I restore a snapshot without working ssh? Hassio is installed on an Ubuntu laptop so I have graphical access to all files.
I guess the mqtt add on is causing these problems.
Can I delete the mqtt add on with a docker command or do I make things worse with this?

Thanks

403 means you are banned… look for ip_bans yaml in /config… delete it and restart.