I have been using the BlueIris NVR integration (from HACS) for quite some time, and it works great for triggering BI from HA. I’ve trying to do the opposite now: Fire off automations in HA whenever BI detects motion on one of my cameras.

I’ve never used MQTT before, so I’m learning as I go, but I think I have most of my setup configured properly. I’ve installed Mosquitto and the MQTT integration in HA. I’ve configured BI to connect to HA, and running “Test” in the “Edit MQTT Server” menu in BI shows a good connection and no errors. I’ve set my cameras to post an MQTT event when the alert is triggered (and I’ve verified that the alerts are in fact being triggered).

Nothing happens in HA, though. The “Motion” sensor for my camera in HA stays at “Clear.” In fact, the history shows no change at all, ever.

I have the events in BI set up as follows: On Alert: MQTT Topic - BlueIris/&CAM/Status and Payload - { “type”: “&TYPE”, “trigger”: “ON” } On Reset: Exactly the same, but change ON to OFF.

I’ve tried change the MQTT autodiscovery header in HA from “homeassistant” to “BlueIris,” and it made no difference. The Mosquitto logs show a login from HA, so I feel like I’m close, but I’m not sure where else to look.

Edit: I installed MQTT explorer, and I’ve verified that the messages are making it to Mosquitto, and they appear to be correctly formatted.

UPDATE: I set the MQTT integration to listen to the MQTT messages coming from BI, and sure enough, they were coming through just fine. For some reason, the BI integration just wasn’t seeing them. Digging through the system logs, I saw some errors “creating a binary sensor” coming from the BI integration. The only thing I can think is that because I didn’t have MQTT set up when I first installed the BI integration, something went wrong with the config (although I had already rebooted the system several times). I re-downloaded the BI integration and re-installed it, and now everything works perfectly.

  • dmtalon@infosec.pub
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    5 months ago

    I get alerts from BI Motion in HA (via mqtt)… I’ll look at it a bit to jog my memory and see if I can give any tips. It’ll likely be tomorrow or so as I’m traveling today

    • corroded@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      5 months ago

      I’d be interested to hear how you have it set up. My issue is definitely with HA. I can see the messages making it to the broker; HA just isn’t recognizing them it seems.

      • dmtalon@infosec.pub
        link
        fedilink
        English
        arrow-up
        1
        ·
        4 months ago

        Didn’t get home til late last night… Looking at my automation. If you’ve successfully connected (via mqtt) and validated in explorer. my automation to trigger a notification on motion is quite simple.