connection errors after Mosquitto upgrade

Posted on
Sun Feb 28, 2021 11:42 pm
agame offline
Posts: 514
Joined: Jul 13, 2017
Location: Melbourne, Australia

connection errors after Mosquitto upgrade

I had to reinstall my Mosquitto broker, and in so doing have ended up being forced to upgrade to Mosquitto 2.0.8.

This broke a number of things as authorisation is now required by default - having worked through that I now have several Shelly devices communicating with the broker and every thing looks fine from MQTT Explorer.

However the indigo log indicates the connection is continually cycling on and off:

Code: Select all
2021-03-01 16:39:22.044   MQTT Connector Debug   mqtt connector - shellies: processReceivedMessage: shellies/shelly1-500291EFFE49-gate/ext_temperature_f/0, payload: 61.4
2021-03-01 16:39:22.054   MQTT Connector Debug   mqtt connector - shellies: processReceivedMessage: shellies/shelly1-500291EFFE49-gate/ext_temperature/2, payload: 15.0
2021-03-01 16:39:22.065   MQTT Connector Debug   mqtt connector - shellies: processReceivedMessage: shellies/shelly1-500291EFFE49-gate/ext_temperature_f/2, payload: 59.0
2021-03-01 16:39:22.075   MQTT Connector Debug   mqtt connector - shellies: processReceivedMessage: shellies/shelly1-500291EFFE49-gate/ext_temperature/1, payload: 17.4
2021-03-01 16:39:22.083   MQTT Connector Debug   mqtt connector - shellies: processReceivedMessage: shellies/shelly1-500291EFFE49-gate/ext_temperature_f/1, payload: 63.3
2021-03-01 16:39:22.094   MQTT Connector Debug   mqtt connector - shellies: processReceivedMessage: shellies/shelly1-500291EFFE49-gate/ext_temperatures, payload: {"0":{"hwID":"2830fcee351901c3","tC":16.3},"2":{"hwID":"286895e53519013a","tC":15.0},"1":{"hwID":"28e75ce535190125","tC":17.4}}
2021-03-01 16:39:22.103   MQTT Connector Debug   mqtt connector - shellies: processReceivedMessage: shellies/shelly1-500291EFFE49-gate/ext_temperatures_f, payload: {"0":{"hwID":"2830fcee351901c3","tF":61.4},"2":{"hwID":"286895e53519013a","tF":59.0},"1":{"hwID":"28e75ce535190125","tF":63.3}}
2021-03-01 16:39:22.305   MQTT Connector Debug   mqtt connector - shellies: Connected with result code 0
2021-03-01 16:39:22.307   MQTT Connector Error   mqtt connector - shellies: Disconnected with result code 1
2021-03-01 16:39:22.307   MQTT Connector   mqtt connector - shellies: Subscribing to: shellies/# (0)
2021-03-01 16:39:22.327   MQTT Connector Error   mqtt connector - shellies: Disconnected with result code 1
2021-03-01 16:39:22.334   MQTT Connector Debug   mqtt connector - shellies: Connected with result code 0
2021-03-01 16:39:22.334   MQTT Connector   mqtt connector - shellies: Subscribing to: shellies/# (0)
2021-03-01 16:39:22.350   MQTT Connector Error   mqtt connector - shellies: Disconnected with result code 1
2021-03-01 16:39:22.351   MQTT Connector Debug   mqtt connector - shellies: Connected with result code 0
2021-03-01 16:39:22.352   MQTT Connector   mqtt connector - shellies: Subscribing to: shellies/# (0)
2021-03-01 16:39:22.733   MQTT Connector Error   mqtt connector - shellies: Disconnected with result code 1
2021-03-01 16:39:22.734   MQTT Connector Debug   mqtt connector - shellies: Connected with result code 0


My first thought was that I have screwed up the new authorisation settings - however slabs of good data occasionally are coming through, and I gather the error codes suggest it is connecting successfully before being disconnected due to a protocol verision issue(?).

Any thoughts on what I need to look at? I've tried both the protocol options in the plugin with no apparent change. [Edit: checked. the config file, and should be defaulting to 311)

Posted on
Mon Mar 01, 2021 8:19 am
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: connection errors after Mosquitto upgrade

Are you running the Mosquitto broker on the same machine as Indigo? What machine is MQTT Explorer running on? What OS version is the Indigo server running?

Did you notice this on the Mosquitto web page?

The Mosquitto project is happy to announce the release of version 2.0! This is a big change with breaking behaviour changes in the broker. Users, packages and plugin authors should read migrating from 1.x to 2.0 to help with the changes.


I need to see your configuration file. Anonymize the username/password before posting.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Mon Mar 01, 2021 8:45 am
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: connection errors after Mosquitto upgrade

Also, make sure you're on the latest version of the MQTT Connector plugin. It was updated a couple weeks ago.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Mon Mar 01, 2021 4:26 pm
agame offline
Posts: 514
Joined: Jul 13, 2017
Location: Melbourne, Australia

Re: connection errors after Mosquitto upgrade

FlyingDiver wrote:
Are you running the Mosquitto broker on the same machine as Indigo?


yes - same machine.

What machine is MQTT Explorer running on?


MQTT Explorer is running on both the local machine, and the mac I use to remotely manage Indigo (and showing the same data)

What OS version is the Indigo server running?


Catalina 10.15.7

The only non-standard part of this setup is the Indigo User's home directory is located on an external disk (to manage disk space).

Did you notice this on the Mosquitto web page?

The Mosquitto project is happy to announce the release of version 2.0! This is a big change with breaking behaviour changes in the broker. Users, packages and plugin authors should read migrating from 1.x to 2.0 to help with the changes.


yes I have, thanks. I've tried running both with 'allow_anonymous true' and with a password file specified (thats what is currently running) .

I need to see your configuration file. Anonymize the username/password before posting.


I'm off site so will post this this afternoon (the passwords aren't in the config file, only the password file path, so no issues there).


I believe I'm running the latest plugin store version (0.4.9).

Posted on
Mon Mar 01, 2021 4:29 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: connection errors after Mosquitto upgrade

FYI, until I can figure out how to get the new version of Mosquitto running in a Docker container, I'm not going to be able to investigate this at all. And it's fighting me. :(

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Mon Mar 01, 2021 7:49 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: connection errors after Mosquitto upgrade

Finally got Docker to behave. And then I created a Mosquitto container with the latest version (2.07). Created a config file with:

Code: Select all
listener 1883
allow_anonymous true


I was able to connect from both MQTT Explorer and the MQTT Connector plugin. Ran for a while, then I started seeing the same errors you did (or very similar). Which persisted even after disabling the connector device.

I'm tracking this in https://github.com/FlyingDiver/Indigo-MQTT/issues/17.

I think I might have an idea what's going on.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Mon Mar 01, 2021 8:38 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: connection errors after Mosquitto upgrade


joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Mon Mar 01, 2021 10:15 pm
agame offline
Posts: 514
Joined: Jul 13, 2017
Location: Melbourne, Australia

Re: connection errors after Mosquitto upgrade

FlyingDiver wrote:



just back and tried the new release before sending you my config....its looking good! Fantastic, thank you!!

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest