Hubitat with Indigo native MQTT broker

siclark
Posts: 1964
Joined: Tue Jun 13, 2017 5:08 am
Location: UK

Hubitat with Indigo native MQTT broker

Post by siclark »

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
autolog
Posts: 3996
Joined: Tue Sep 10, 2013 3:07 am
Location: West Sussex, UK [GMT aka UTC]
Contact:

Re: Hubitat with Indigo native MQTT broker

Post by autolog »

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.
siclark
Posts: 1964
Joined: Tue Jun 13, 2017 5:08 am
Location: UK

Re: Hubitat with Indigo native MQTT broker

Post by siclark »

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.
autolog
Posts: 3996
Joined: Tue Sep 10, 2013 3:07 am
Location: West Sussex, UK [GMT aka UTC]
Contact:

Re: Hubitat with Indigo native MQTT broker

Post by autolog »

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.
User avatar
FlyingDiver
Posts: 7283
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: Hubitat with Indigo native MQTT broker

Post by FlyingDiver »

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
User avatar
FlyingDiver
Posts: 7283
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: Hubitat with Indigo native MQTT broker

Post by FlyingDiver »

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
siclark
Posts: 1964
Joined: Tue Jun 13, 2017 5:08 am
Location: UK

Re: Hubitat with Indigo native MQTT broker

Post by siclark »

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.
autolog
Posts: 3996
Joined: Tue Sep 10, 2013 3:07 am
Location: West Sussex, UK [GMT aka UTC]
Contact:

Re: Hubitat with Indigo native MQTT broker

Post by autolog »

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. :)
autolog
Posts: 3996
Joined: Tue Sep 10, 2013 3:07 am
Location: West Sussex, UK [GMT aka UTC]
Contact:

Re: Hubitat with Indigo native MQTT broker

Post by autolog »

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. ;)
User avatar
FlyingDiver
Posts: 7283
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: Hubitat with Indigo native MQTT broker

Post by FlyingDiver »

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
autolog
Posts: 3996
Joined: Tue Sep 10, 2013 3:07 am
Location: West Sussex, UK [GMT aka UTC]
Contact:

Re: Hubitat with Indigo native MQTT broker

Post by autolog »

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
siclark
Posts: 1964
Joined: Tue Jun 13, 2017 5:08 am
Location: UK

Re: Hubitat with Indigo native MQTT broker

Post by siclark »

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 [emoji1787]
siclark
Posts: 1964
Joined: Tue Jun 13, 2017 5:08 am
Location: UK

Re: Hubitat with Indigo native MQTT broker

Post by siclark »

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!
autolog
Posts: 3996
Joined: Tue Sep 10, 2013 3:07 am
Location: West Sussex, UK [GMT aka UTC]
Contact:

Re: Hubitat with Indigo native MQTT broker

Post by autolog »

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
Post Reply

Return to “Hubitat”