Mosquito MQTT update v3 broke my hassio

Agreed, although it works for my use case.

configuration.yaml:

mqtt:
  broker: core-mosquitto

Hassio MQTT Mosquitto V3 addon config:

{
  "logins": [
    {
      "username": "mqtt",
      "password": "mypsswd"
    }
  ],
  "anonymous": true,
  "customize": {
    "active": false,
    "folder": "mosquitto"
  },
  "certfile": "fullchain.pem",
  "keyfile": "privkey.pem"
}

Changed “username”: from “homeassistant” to > “mqtt” yesterday and did the same for my client.

Settings/Integrations > Configured:

2018-11-06_9-15-09

The integration showed up there automatically, i did not “configure” it there myself in the front end.

Running

  • Home Assistant 0.81.6
  • HassOS 1.11
  • Hassio supervisor 139 (Was 138 yesterday and still worked, auto updated last night)
1 Like

You will see in your logs somewhere something very similar to -

2018-11-05 23:16:03 WARNING (MainThread) [homeassistant.components.mqtt] Data in your config entry is going to override your configuration.yaml: {‘broker’: ‘localhost’, ‘discovery’: True, ‘password’: ‘omitted!’, ‘port’: 1883, ‘username’: ‘omitted’}

Meaning it’s not using the entry in your configuration.yaml anymore (you can edit it out and it will still function the same minus the error in the log) as you are now using the integration.

The reason it configured itself is because you still have the broker in config yaml. As @cogneato said you don’t need it anymore.

The annoying thing for me is that I have a load of ESP based sensors and light controllers that I can’t now update with Arduino presumably because they are now stuck in a loop of trying to connect to MQTT. So I’m going to have to use a 2nd SD card and install a standalone MQTT with my old “homeassistant” username to be able to update the code for them all to reconnect with a new username.

Even reverting to V2 hasn’t helped.

I’ve just unistalled MQTT and gone to Integration to add MQTT but it’s hardly ‘one click’ where I’m looking.

It asks for broker, port, username and password.

Is this the same thing?

I entered my local i.p. for broker and it is now working, but I wonder if I should have entered “core-mosquitto” (am I now using the built in broker rather than Mosquitto?)

thankyou this worked for me, glad to see I’m not the only one whose setup completely broke yesterday. delivering breaking changes to Samba and MQ at the same time was very annoying.

Yes, you are correct. Thus meaning you can still use the mqtt: in your configuration.yaml without a problem as i meant.

Agreed with exception of step 2 & 7.
It is not necessary to have a new user in Hass for the mgtt part. You can just use the user defined in mgtt config. Got it all working again yesterday evening late, and it didn’t break during my sleep :wink:

Is it plausible that in the course of restoring full then partial snapshots then restoring the individual MQTT v2 add-on that one could corrupt one’s database?

Absolutely agree dojf. However the advantage of having a user defined in HA rather than locally in the addon will become apparent when user permissions are introduced :slight_smile:

Yesterday I wanted to do an update but as I normally do I check the forum if there are problems with the new versions and I stumbled onto this thread, so I haven’t perform the update yet.

Is there already a known “save” procedure to update from supervisor 138, Mtqq V2, Samba V7, Hassio 81.2 to
supervisor 139, Mtqq V3, Samba V8, Hassio 81.6 I’m not that experienced therefore this question.

Are you sure there is a need for a HA user (with future HA permissions) to have a role in the mqtt setup? In my view the mqtt broker and mqtt message exchange process is very separate from HA.
Anyway, at the moment it is IMO confusing to have a HA user and a mqtt user with the same name as they don’t have a relation in the current situation.

Revert only won’t work. You have to remove/delete mqtt and then install a backup of you last running mqtt. This worked for me.

I removed the v3 and restored the v2 from snapshoot and worked…

I tried as everyone else and the only fix I could get working was to restore to v2 from a snapshot. Have disabled the auto update on the mqtt add on until I am confident that it will work.

This is the longest downtime I have had in the 2+ years I have been running HA. Luckily I had some spare time today to get it back into working order but it still took a bit of time and plenty of reboots/restarts to get it all back :sweat:

I’m stuck in the bootloop and can only access it via ssh. However I cannot locate the configuration folder.

Did you find the location of the config folder for the install on a raspberry pi?
I tried the find command, but thats not working

EDIT:
found it: thanks to @cogneato (Mosquito MQTT update v3 broke my hassio)
/mnt/data/supervisor in hassos

I don’t want to say I managed to fix the mqtt issue before making sure, but I’ve managed to get 3 of my 33 sonoffs back online… and adding the rest now… :smiley:
So what was weird is that the Mosquitto broker and HA integration worked fine on my other instance of HA, which got me thinking, why? The only difference between them is their respective static IP’s… So I formatted my main RP3 and still the broker installed but the integration didn’t work…
Long story short (12 hours short), start by removing (or formatting) HA, then install the Mosquitto addon with default settings (make sure no mqtt entried on configuration.yaml), then go into each mqtt device and turn off their mqtt (I figure that the integration doesn’t work because of all the failed attempts of the old mqtt settings, where all the switches keep trying to connect with a different username and password), then do the HA mqtt integration… SHOULD work now. Then create any random username and password under the Mosquitto addon “logins” config. Lastly, turn your mqtt devices mqtt back on and give them the newly created username and password…
Hope this works for others as well

Not knowing how these things work in HA land…has there been any ‘official’ statement from the developers who released this update? Is there likely to be one? Seems like it was a murderous update.

There’s a built in broker now?

How is that configured? I’m now seeing this: