25
submitted 1 year ago* (last edited 1 year ago) by corroded@lemmy.world to c/homeassistant@lemmy.world

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.

you are viewing a single comment's thread
view the rest of the comments
[-] dmtalon@infosec.pub 1 points 1 year ago* (last edited 1 year 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.world 1 points 1 year 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 1 points 1 year 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.

[-] dmtalon@infosec.pub 2 points 1 year ago

in BI, for each camera I have the following set under settings/alerts/on alerts

this post was submitted on 07 Jul 2024
25 points (100.0% liked)

homeassistant

15409 readers
3 users here now

Home Assistant is open source home automation that puts local control and privacy first.
Powered by a worldwide community of tinkerers and DIY enthusiasts.

Home Assistant can be self-installed on ProxMox, Raspberry Pi, or even purchased pre-installed: Home Assistant: Installation

Discussion of Home-Assistant adjacent topics is absolutely fine, within reason.
If you're not sure, DM @GreatAlbatross@feddit.uk

founded 2 years ago
MODERATORS