Mosquito MQTT update v3 broke my hassio

I only have one MQTT user - the same as for v2 and it is working with V3. I didn’t make any changes to my Sonoffs. All I did was remove the mqtt: section from config yaml and then config the integration after restarting. I didn’t enable mqtt discovery. My switches are still configured as before v3

Oh man, just before going (too late) to bed… it started working again and my sonoff’s came back. Hurray!!!

So like others before said:

  1. update: Hass.io supervisor 139, Host system Hassio 1.12, Home Assistant to 0.81.6, Mosquitto broker 3.0
  2. delete mqtt: from configuration.yaml
  3. In Integrations tick the discovered ‘mqtt’ and ‘submit’. (I didn’t do the mqtt ‘configure’)

Restarted several times in between, I forgot how many times. And it finally worked.

Also, I use just one username & password for my sonoff’s, so no need for different ones.

Good luck everyone, I go to bed!

I only had to reconfigure as you aren’t allowed to have the username as homeassistant anymore. Otherwise I wouldn’t have had to make any changes to the Sonoff’s. I didn’t enable MQTT discovery explicitly, just noted it to make sure discovery is enabled in general (which was already enabled for me).

yeah… I never used homeassistant as the username…
I have always used discovery: in config yaml
When you add the MQTT integration, you get to choose MQTT discovery or not (check box) I didn’t tick that box as all my switches are already configured.

1 Like

Ah good point. I did tick that and now seem to have duplicate switches in Alexa. Not all but some. I’ll have to go through it again and untick that box, see if they come back again.

Calling it a night now!

I didn’t enable discovery for MQTT because I didn’t want to have to screw with topics (command and state) as I find the mqtt discovery information in the manual as clear as mud. If I understood it I might switch to it.

Even after all that it is still not working. I get:

Unable to connect to the MQTT broker: Connection Refused: not authorised.

Whenever I try to change an mqtt switch from the front end.

What a complete balls-up.

1 Like

tried the “clean” approach.
removed all with mqtt from addons, configuration files etc.
rebooted twice.
turned on discovery in yaml [I don’t like it, but thought I’d bite the bullet].
rebooted.
created special MQTT user [just to be sure that system won’t bounce my mqtt login]
installed MQTT v3 [clean install].
broker was found in the integrations, so I chose “configure”, ticked “enable discovery”, clicked on “submit” and…

image

so I’m out for now. I have no more ideas and no strenght to cope with that problem, time for sleep.
thank you all for trying to help - I hope that tomorrow will bring some magic explaination & fix to my problem…

1 Like

No no this is fine,

I just had this error. Ignore it from the list at the top and manually configure it from the big list lower down.
I’ve just re-done it AGAIN and left the discovery checkbox unticked as all my switches are manually configured already.

1 Like

No, 139 was a fix for a horrible 138 error which sent supervisor container into a restart loop. If you rebooted while running 138 and mqtt v3 you had to delete discovery.json to get back up and running.

same here, frustrated…
now after some reboots I don’t even get the UI…

1 Like

Hey @pvizeli any chance of a bit of guidance?

worked for me, do not forget to delete the addon first, then restore from backup and reboot.

I currently have all my MQTT switches configured in config yaml.

If I decide to comment them out and restart and then enable MQTT discovery in the integration, will I need to reconfigure my switches to work or will discovery pick up the topic (command and state)?

I’m just tossing up if I should use the ‘new’ way as these things have a tendency to be broken without warning in the future and I’d like to keep ahead of the curve…

I suppose I could just bite the bullet and see…

Ok This time I have it figured out (I know I’ve said it before…)

  1. Update to latest HA version and supervisor.
    1a) Delete mqtt: from your configuration.yaml
  2. Create a HA user for use with mqtt
  3. Delete and reinstall mosquito mqtt addon V3. Probably not necessary unless you made a mess like I did.
  4. Start the mqtt addon.
  5. Restart HA
  6. Configure the mqtt integration. No need to add any username or password. If it asks for this retry after refreshing your browser cache (CTRL + F5) and you should get a dialogue box without login or password requirements.
  7. Update all your mqtt devices with the user and password created in step 2.
  8. Restart HA.
3 Likes

and don’t forget that in your known_devices.yaml your cell-phone names changed to the mqtt login name you replaced homeassistant with. :slight_smile:

  1. DON’T create a new user - use the same local user you had before (as long as it wasn’t the homeassistant user)
  2. Unless yu were using homeassistant user, you don’t need a new user and you don’t need to change a thing
2 Likes

I did not have a user specified for mqtt before. I was using anonymous login. Also this user is for the devices not the mqtt addon.

thanks for that “delete” hint, managed to revert to mosquitto 2 for now and HA is back working

In the MQTT addon I had a user and password configured (still do) and that is the same as the user I had set in the devices.

1 Like