Mosquito MQTT update v3 broke my hassio

I think -2 means it can’t connect to the IP and -4 is a timeout so could be a connection issue rather than password issue. Are the IP addresses of your Mqtt clients allowed in your add-on Mqtt config?

sure, v2 broker:

{
  "plain": true,
  "plain_websockets": false,
  "ssl": false,
  "ssl_websockets": false,
  "anonymous": true,
  "logins": [
    {
      "username": "user-name-one-for-all-mqtt-devices",
      "password": "my-mqtt-password"
    }
  ],
  "customize": {
    "active": false,
    "folder": "mosquitto"
  },
  "certfile": "fullchain.pem",
  "keyfile": "privkey.pem"
}

EDIT: and from configuration.yaml:

broker: 127.0.0.1
username: "user-name-one-for-all-mqtt-devices"
password: "my-mqtt-password"
port: 1883

[that worked earlier]

Your add-on config is same as mine except I have anonymous set to false. I don’t have any settings in configuration.yaml, not even mqtt:

I just configured the username, password in integrations.

one thing I don’t understand is why the hell I can see in home-assistant.log that:

2018-11-06 00:03:13 INFO (Thread-2) [homeassistant.components.mqtt] Successfully reconnected to the MQTT server

looks like broker is working, right? it just refuses all clients…

I think I’ve found the issue. Hassio Supervisor v139 was released 8 hours ago, which coincides with when my Mosquitto broke. Restoring a working snapshot from a few days ago has not fixed my issue, which leads me to think the Supervisor upgrade had a hand in breaking it. I’m raising an issue on Github now.

[deleted]

See my later post below. Mosquito MQTT update v3 broke my hassio

I am using the same login for all clients. I have not configured the login as a home assistant user, just in the add-on and it is all working.

1 Like

omg, different users for every sensor/device that uses mqtt?

I really hope that it is not the path that developers chose with this update… please no…

I’m trying the built-in broker now.
no luck with that too…

oh boy I’m p*ssed now… and need to wake up in the next 6 hours so I guess I give up :frowning:
I feel totally powerless & helpless with that issue

1 Like

My setup got broken so much I had to restart everything. Luckily I mounted the SD card on my Mac and copied off the config files, but I am starting from scratch with clean build.

MQTT working fine now, no surprise there though

Issue with Supervisor raised on Github. That has to be the cause of it. I tried a full wipe and restore from my last snapshot from three days ago and they still won’t talk to each other.

I’ve got my configs backup, and tried it without mqtt, then added mqtt “fresh and new” and still nothing :frowning:

I had duplicate switches showing so decided to look further. I restored from a recent backup, updated again and all is well now. I just typed in localhost for the MQTT integration (along with username/password) instead of specifying an IP or service name.
I also have the following in my configuration.yaml

mqtt:
broker: core-mosquitto
username: !secret mosquittouser
password: !secret mosquittopassword

It didn’t seem to work properly without it but I do get a message in the logs

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’}

Everything is back and seems to work. Alexa is also behaving herself with the switches.

so you didn’t installed mosquitto addon at all, right?

V2 Mosquitto was reinstalled automatically when I did a wipe & restore from a snapshot (didn’t work as I had renamed the user on tasmota devices as previous was homeassistant so devices trying to connect with wrong username). I just updated to v3 amended to new username in config, updated samba and then updated the Hassio OS to 0.81.6

ok, I see. but when having broker: core-mosquitto in configuration - you’re not using add-on anyway so it might be unistalled :slight_smile:

I’m giving last shot to that crap and calling that a day. I really hope that tomorrow “one for all” fix will be ready somehow, because right now my hassio installation is kinda pointless… :frowning:

To clear the error in the log I have just removed -

mqtt:
broker: core-mosquitto
username: !secret mosquittouser
password: !secret mosquittopassword

Reloaded and it’s all still working fine, so far…

1 Like

hah, so addon it is… I’m totally confused right now. everybody has different configuration and it just randomly works or not…

1 Like

My advice - remove integration, remove mosquitto addon, remove all mqtt config from configuration.yaml & reboot.

Install and configure mosquitto addon, check and see if devices are connecting in the logs, if this is working then add integration and reboot. Do not add mqtt into configuration.yaml but do make sure you have discovery: in there.

1 Like

When looking at my Alexa discovered devices from the Alexa portal, they are displaying as -

Wardrobe Light (Offline)
switch.wardrobe_light

Offline being the concern, however they do seem to function??