Mosquito MQTT update v3 broke my hassio

Me too,

Socket error on client , disconnecting.

from all my ESP01 switches after V3 update. I have anonymous: true in config, and a python MQTT client is working fine, although it has no username/password defined.

Quickest solution…restore only the updated plugin…rollback to 2.0 and everything works…

1 Like

try to run
docker inspect -f "{{ .Mounts }}" homeassistant
it will dump volumes info, something like this:
[{bind /usr/share/hassio/ssl /ssl ro false rprivate} {bind /usr/share/hassio/share /share rw true rprivate} {bind /usr/share/hassio/homeassistant /config rw true rprivate}]
the /usr/share/hassio is your target. discovery.json should be there. if not - i have no idea why :slight_smile:

That did not work for me.

nope… same problem

I think I’m going to throw something out of the window now…

trying everything AGAIN, so mqtt thrown out of the configuration files, only set up via addon screen. user & password set, and the same credentials entered into every tasmota device.
logs are showining that broker works I think?

[INFO] found USERNAME on local database
1541454038: Client DEVICE_NAME already connected, closing old connection.
1541454038: Client DEVICE_NAME disconnected.
1541454038: New client connected from 192.168.1.161 as DEVICE_NAME (c1, k15, u'USERNAME').

and that repeats for I guess every tasmotized device. but still - they are not available. console at tasmota panel shows that connection failed.

when checking integrations menu, I’ve got this, after clicking on “submit”:

does it make any sense to try harder, or I just need to give up and try downgrading…?

1 Like

I had that issue as well… downgraded… next time dev team should keep retro compatibility or at least sugest the correct config before release this type of updates… on the past 2 weeks it’s the second time I have issues…

I fixed this problem by removing mqtt settings from my main configuration.yaml, and then using the integration configurator (configuation => integrations => mqtt) to reconfigure mqtt. Updated supervisord to 139 and the hostsystem to 1.12.

After that mqtt started working again, I re-added the sonoff accounts and restarted the addon once again. And then all the sonoffs worked again. In between fixing I also saw the discovery settings but now that mqtt is working it seems to have disappeared. :slight_smile:

Downgrading is most likely possible, but you’ll most probably have to upgrade at some point. :slight_smile:

final config:

{
  "logins": [
    {
      "username": "ha",
      "password": "ha-passwd"
    },
    {
      "username": "sonoff1",
      "password": "pass1"
    },
    {
      "username": "sonoff2",
      "password": "pass2"
    }
  ],
  "anonymous": false,
  "customize": {
    "active": false,
    "folder": "mosquitto"
  },
  "certfile": "fullchain.pem",
  "keyfile": "privkey.pem"
}

Good luck!

Thanks congneato, looks like i’m back up and running. I was mindful of not moving to 139 as i was still managing to boot hassio but i’ve worked through all the changes and i’m up and running again.

Have you restarted both HA and the mosquitto addon before trying the integration?

thanks for your hints - tried that approach couple of times… ;(
right now I’m in process of downgrading and testing all the configs. hope it will work, as it’s getting late & it would be cool to go to sleep in a “correctly working home” :wink:

Ditto now.

I never used the homeassistant user - always had a different user/password - I guess that’s why I didn’t have any problem.

Thinking about using MQTT discovery now…

Guys,
This is what I did to get mqtt v3 working.

  1. Dis-abled the mqtt componant in configuration yaml.
  2. Deleted the existing mqtt (from configuration.yaml) in the Intergrations
  3. then selected CONFIGURE mqtt, from list of new intergrations.
  4. entered core-mosquitto as my broker
  5. enterd username and password (I created a new user in configurations Users)
  6. Ticked the discovery box.
  7. Restarted homeassistant.

All working as before on my end. supervisor 139, hassio v0.81.6

Hope this helps others, really annoying as I depend heavily on mqtt.

2 Likes

Have you tried deleting the Mqtt integration and then adding it again. My integration initially said configuration.yaml next to it but when I added it again it now shows the IP address of my hassio install.

I did this too but I entered the IP address of hassio instead of core-mosquitto for number 4 and didn’t tick discovery.

entering ip address, I think would be the same as using built-in mqtt broker, and not the addon, but I could be wrong.

Any way core-mosquitto worked for me.

yeah, I deleted, restarted hassio, then tried to add and the error from screenshot appeared.

now I’m on downgraded MQTT and my tasmotized sonoffs and switches still are unavailable.

so basically I’m screwed :face_with_symbols_over_mouth:

1 Like

I can confirm it uses the add-on and not the built in broker as I can see the clients connecting in the log of the add-on.

1 Like

You said the tasmota console shows the connection failing. What is the error number shown on the message in the console?

if I understand it correctly: 2 & 4

23:41:10 MQT: Attempting connection...
23:41:17 MQT: Connect failed to 192.168.1.3:1883, rc -2. Retry in 10 sec
23:41:28 MQT: Attempting connection...
23:41:47 MQT: Connect failed to 192.168.1.3:1883, rc -4. Retry in 10 sec

but also noticed that zigbee2mqtt controlled zigbee sniffer fails, so it’s something with mqtt for sure

1 Like