Mosquito MQTT update v3 broke my hassio

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.

This is really useful, thank you. A couple of questions…

Can I just clarify: Going forward, everything that connects to HA will need a username and password defined in HA? Sonoff switches, for example, appear as a user hence they need to be defined in ‘Configurations, Users’ (albeit that they can all use the same username and password).

And also:
What kind of changes did you need to make to your yaml files? I am guessing from the files you list that discovery created some random names for the Sonoffs?

Interesting list, as I have all my Sonoff’s and other mqtt things working again with the exception of Zigbee2mqtt. The Hassio Zigbee2mqtt addon is working as I see the devices in the log, but don’t see the entities back in HA. I need to rebuild the Zigbee2mqtt I suppose.

One difference in your setup versus mine is the (I thought required) switch from mqtt: in configuration.yaml to “Integrations” in Hassio (= the mqtt setup in HA UI menu -> Configuration -> Integrations -> MQTT) .

You didn’t do that part yet? Isn’t that the reason why step 9. is still necessary and makes sense? Otherwise there would be no HA recognition of mqtt messages. I mean that all involved in the mqtt exchange need their mqtt configurations; the mqtt devices (e.g. Sonoff’s), the mqtt broker (mosquitto add on) and the host (HA). Isn’t it?

my thinking is that home assistant goes this path:

  1. check yaml mqtt config
  2. check yaml addon config
  3. check integratons

step 2, if exists, overwrites and overrides step 1, and if step 1 OR (1 AND 2) is true, then step 3 is “all is done, just inform that it’s configured”

so - if I remove mqtt config from yaml, then I will need to set things up in the integrations [I guess]. but - even that I’m just a copy&paste programmer :wink: - I like hardcore “full control” impression, and that’s why I really “hate” the integrations menu :wink: and I’ll do everything just not to touch anything config-related via the frontend. I just like&prefer to set things up in yaml files [which I hate from time to time also :smiley: well, nobody’s perfect ;)]. your thinking is correct - with no yaml “main mqtt” settings [broker choosing] the system will need integrations setting just to know “there is a mqtt with those credentials configured, we can use it”. if you just add an addon [step 2 of checklist] then system will know that “there is a broker, but we don’t know how to use it”.

and regarding zigbee2mqtt - I didn’t changed it at all. my config is cut to packages [wherever I could split it to packages of course] so I just temporarily removed “zigbee2mqtt” package & phisical dongle from the RPi3, BUT ALL MY SENSOR SETTINGS etc. mqtt related stuff - remained distributed in all other files [so it gave me some errors in the dashboard that some of the lights, sensors, input_booleans etc. failed to configure.
then, when system was up and running, I just brought back my zigbee2mqtt package, plugged in the dongle and that’s all.

QUICK EDIT: zigbee2mqtt wasn’t changed in general - just entered my new mqtt user and password of course!

1 Like

Thanks for your quick reply!.

Could be, but I’m not sure as I can’t find details about it.

What bothers me is that I had a detailed mqtt configuration in configuration.yaml (with “birth” and “last will” etc) and these are gone now mqtt is in HA UI in Integrations. Dunno how to influence that as I don’t see any information in Integrations, except that it is there with the correct IP. So I’m thinking about experimenting getting back to mqtt in configuration.yaml.

I agree, but if HA developers decide that UI is the way to go then I’m more a follower :wink:
But at the moment the Integrations menu is in a state that there is much to be desired.

Agreed :wink:

Thanks for this info. Hmm, need to investigate what’s happening in my Zigbee2mqtt setup. Something for this evening :wink:

that is my nightmare - I even wrote another post btw this matter. I know that UI makes sense for some reasons [more approachable system for everyone] but as you noticed - not everything can be done “by mouseclick” - and I’m afraid, that it ain’t gonna change much, so if devs decide that UI is the new yaml, then we will loose part of the fun and large part of the control [IMHO]. I just don’t feel to secure if I rely only on a web interface. but that’s me :wink:

But the devs are damned if the do and damned if they dont. You only have to look over the forums to see a lot of errors are caused by incorrect yaml format and other posts complaining how they hate yaml so a UI should remove a majority of those

I hope & expect both (the yaml files and UI) will be long time around. The elegance, for example in UI of “Automations”, is that one can do easy things with enough information in the UI, and it is then integrated in the corresponding yaml. But that one can do more elaborate things in the yaml files. The visaversa between UI and yaml is the difficult part.
Back to “Integrations”: I suspect that this is also the direction for the integrations. But IMHO the Integrations structure is a construction in progress and the MQTT is sent too early in that construction.

they should let both ways to coexist. there are lots of people that chose Home Assistant because the ability of editing the yaml [I know it’s not perfect, but it is, and that’s important for me].

making something clickable-only makes it less home/amateur-dev-friendly in my opinion. you know - if I wanted the easy way of click-n-go, I would go to something “nice and pretty” that someone did the hard work for me already :wink:

yeah, somebody driven by a successful #hacktoberfest just pressed “send to production” button too early :smiley:

1 Like

Fixing the issue will always be the preferred way.

With the statement regarding the community mqtt addon, I have some comments.
The next version (will probably be released later this week) the NGINX proxy you open when using the web client will be authenticated by using Home Assistant.
The mosquitto broker (MQTT) that runs in that addon will not have that anytime soon, I have not (yet) looked into how much work that will require.

1 Like

Is anyone struggling with a binary sensors no longer functioning in HA? While i can see it on the network, see it establishes a connection to the broker it isn’t displaying a senor change state or toggling the relay when clicked.

(HA Garage door controller)

1 Like

Yes - I do see the same problem with my garage door magnetic sensor.

I was. But that problem has now been overtaken by this. Until I sort that I can’t look at the binary sensors.

I’m really stuck with it.

My garage door sensor is now working after a restart of HA. No explanation yet.

I tried the old on/off routine without success. Glad yours is working though. I’ll have another play with it this evening once i’ve got some spare time.

Actually i have another problem and that’s with state changes not being updated in HA after reboot. My automations do still seem to work though. I think that’s more of an espurna and tasmota issue that i need to address rather than HA or MQTT broker issue.