Hubitat with Indigo native MQTT broker

Posted on
Thu Jul 14, 2022 2:03 am
siclark offline
Posts: 1669
Joined: Jun 13, 2017
Location: UK

Hubitat with Indigo native MQTT broker

Hi Jon, I have finally updated Indigo and starting to migrate to the native MQTT broker to simplify my setup. I keep getting below error when trying to connect to the native broker, but works fine with a docker one. It certainly recognises it, as changing to a different IP tells me there is no broker running. Any ideas as to why this isn't working? I can see the HE plugin writing to the native broker.
I have it on port 1884 rather than 1883 which is where the docker one runs, if that matters

Code: Select all
 Hubitat Bridge Warning          Plugin encountered an unexpected disconnection from MQTT Broker at 192.168.0.41:1884. MQTT Broker [Code 1884]. Retrying connection ...


Cheers

Posted on
Thu Jul 14, 2022 6:08 am
autolog offline
Posts: 3714
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Hubitat with Indigo native MQTT broker

Hi Simon,
No reason it shouldn't work but obviously it isn't :?

Is the 1884 broker password protected?
Presumambly MQTT Explorer is connecting OK as you can see the Hubitat messages?

I will setup a test on my dev system and see what happens with 1884.

I will report back in due course.

Posted on
Thu Jul 14, 2022 9:07 am
siclark offline
Posts: 1669
Joined: Jun 13, 2017
Location: UK

Re: Hubitat with Indigo native MQTT broker

Yes MQTT explorer and HE both work fine. I am only using 1884 as my prod broker is running in docker on the same mac mini. Happy to use the standard and turn off the docker one, but its not working on 1883 anyway, so I had to turn docker back on and how testing with a different port.

Posted on
Thu Jul 14, 2022 11:28 am
autolog offline
Posts: 3714
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Hubitat with Indigo native MQTT broker

I have just fired up Mosquitto on my dev box using port 1884 and the plugin connects to it OK.

You didn't advise whether you are using a password.
If you are, re-editing and saving the MQTT device making sure the password is correct might help?

Given that MQTT Explorer can connect to the broker, it probably isn't a firewall issue.

What version of the plugin are you running?

The latest on Github is 2022.0.4, maybe give that a try if you aren't using that one.

Posted on
Thu Jul 14, 2022 2:55 pm
FlyingDiver offline
User avatar
Posts: 6208
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Hubitat with Indigo native MQTT broker

If the OP is talking about the MQTT Broker plugin, there is no password or any other possible authentication. I've used that broker plugin with the Shims plugin, but no other plugins. It's a really minimal broker, but it should just work.

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

Posted on
Thu Jul 14, 2022 2:57 pm
FlyingDiver offline
User avatar
Posts: 6208
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Hubitat with Indigo native MQTT broker

Does Hubitat try and do anything with QoS or EOL messages? It's possible the plugin can't handle those.

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

Posted on
Fri Jul 15, 2022 12:51 am
siclark offline
Posts: 1669
Joined: Jun 13, 2017
Location: UK

Re: Hubitat with Indigo native MQTT broker

No authentication used. It’s not a port issue it’s the hubitat plug-in that sprang seem able to connect to the Mqtt plug-in broker. As FlyingDiver says, maybe it expects something from the broker it can’t do, but the hubitat plug-in logs don’t give much away.

Posted on
Fri Jul 15, 2022 2:07 am
autolog offline
Posts: 3714
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Hubitat with Indigo native MQTT broker

Having read the feedback from overnight, I have just twigged that you are using the Indigo MQTT Broker plugin, I mistakenly assumed you were using Mosquitto.

I have installed that plugin and can reproduce the error.

So my Hubitat plugin is working with Mosquitto but not with the Indigo MQTT Broker plugin :?

Now that I can reproduce it, I will do some debugging and try and figure out where it is going wrong. :)

Posted on
Fri Jul 15, 2022 4:14 am
autolog offline
Posts: 3714
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Hubitat with Indigo native MQTT broker

Initial debugging (and code correction) has revealed the code being returned is 7.

Not sure what this means at the moment and it would have been helpful if the original message output the code rather than the port number!
Now corrected in my testing version. ;)

Posted on
Fri Jul 15, 2022 6:06 am
FlyingDiver offline
User avatar
Posts: 6208
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Hubitat with Indigo native MQTT broker

OK, Jon and I have this sorted. He's working on a fix now.

Short answer is that the MQTT Broker plugin is MQTT 3.1.1 only, while Hubitat was specifying 3.1.

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

Posted on
Fri Jul 15, 2022 8:24 am
autolog offline
Posts: 3714
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Hubitat with Indigo native MQTT broker

Hi Simon,

New pre-release version 2022.0.5 available here: Add support for MQTT v3.1.1 protocol

This version updates include:
  • Added user selectable support for MQTT v3.1.1 protocol (now the default) in order to bring this plugin up-to-date and to make it compatible with the Indigo MQTT Broker plugin.
  • Minor code tidying and bug fixes.

Once you have confirmed that it works OK, I will make it an official release and post it to the Indigo Plugin Store.

A big thanks to Joe (@FlyingDiver) for pointing me in the right direction to get this plugin to work with his MQTT Broker plugin. :D

Posted on
Fri Jul 15, 2022 10:39 am
siclark offline
Posts: 1669
Joined: Jun 13, 2017
Location: UK

Re: Hubitat with Indigo native MQTT broker

Don’t think I’ve said recently how amazing you guys are. Thank you. Even more important now that docker has broken on my Mac and I’ve got no zigbee lights anymore

Posted on
Fri Jul 15, 2022 2:00 pm
siclark offline
Posts: 1669
Joined: Jun 13, 2017
Location: UK

Re: Hubitat with Indigo native MQTT broker

All good. I had to follow instructions to install a package but all is working. Simplifies things not having another broker to run.
Thanks for the speedy turnaround!

Posted on
Sat Jul 16, 2022 3:57 am
autolog offline
Posts: 3714
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Hubitat with Indigo native MQTT broker

Hi Simon,
Thanks for the update and pleased to know you have got your zigbee lights back under control! :)

I have now uploaded the latest version 2022.0.5 to the Indigo plugin store and posted an announcement on this sub-forum here: Hubitat Bridge Version 2022.0.5 Update

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest