Page 1 of 1

Blue Iris MQTT Disconnect error 138

Posted: Fri May 22, 2020 9:03 pm
by pwm
Hello,
I am trying to setup MQTT with Blue Iris but I am running into some issues. I have set the MQTT broker IP and port and ran the Test in the MQTT configuration. It reports that it ran successfully but a few seconds later there is a disconnect error:

Code: Select all

Initialized
Connecting
Connected OK
Subscribed OK
Publishing test message
Published OK
Disconnect error 138
Shutdown
I don't see any published topics in Mosquitto broker log from Blue Iris so I don't know what the test is actually doing. I have lots of other MQTT traffic going through that broker so I think I must not have Blue Iris set up correctly.

Re: Blue Iris MQTT Disconnect error 138

Posted: Fri Aug 28, 2020 8:56 pm
by rhatguy
Were you able to sort this out. I'm using an MQTT broker provided through HomeAssistant (Hass.io). I to have other things running through the broker, so I think its working fine. Curious.

Re: Blue Iris MQTT Disconnect error 138

Posted: Fri Aug 28, 2020 9:01 pm
by rhatguy
As soon as I posted this I remembered that I needed to add the new user to my accesscontrollist file. In hassio that is located at /share/mosquitto/accesscontrollist. I added the following

user blueiris
topic readwrite #

Re: Blue Iris MQTT Disconnect error 138

Posted: Fri Jun 25, 2021 2:49 pm
by ivamar
pwm wrote: Fri May 22, 2020 9:03 pm Hello,
I am trying to setup MQTT with Blue Iris but I am running into some issues. I have set the MQTT broker IP and port and ran the Test in the MQTT configuration. It reports that it ran successfully but a few seconds later there is a disconnect error:

Code: Select all

Initialized
Connecting
Connected OK
Subscribed OK
Publishing test message
Published OK
Disconnect error 138
Shutdown
I don't see any published topics in Mosquitto broker log from Blue Iris so I don't know what the test is actually doing. I have lots of other MQTT traffic going through that broker so I think I must not have Blue Iris set up correctly.
hi, i have excat same error/ output . can you share your solution. thank you.

Re: Blue Iris MQTT Disconnect error 138

Posted: Sun Jul 04, 2021 12:07 pm
by atreyu
For use with Home Assistant, ensure you have a User setup in HA, then configure BI at Settings->Digital IO and IoT->MQTT->Configure. It's good practice to make a new user for each connection. In my case I made a user in HA of mqtt_bi.

Then configure your various MQTT alerts as desired on each camera. You can include additional information in the payload. I put &MEMO in the payload field of the ai alert to do things in HA with that information. But I would guess any listed in the help document under "Timecode and other Macros" would work.

You can also monitor mqtt messages coming in to HA at Configuration->Integrations->Mosquitto Broker->Configure->Listen to a topic. For reasons, I have standard triggers come in on topic bimotion/{camera name} and AI confirmed triggers come in on topic aimotion/triggers/{camera name}. To listen for aimotion messages I listen for "aimotion/#". # is a wildcard in this case.

You can listen for all messages with simply '#', but with all of the BI motion, shellies, and wireless stuff on rtl_433, it's a noisy stream.