Is there a way to get tiggered video clip name in alert?

Post Reply
MorningZ
Posts: 1
Joined: Wed Aug 19, 2020 1:09 am

Is there a way to get tiggered video clip name in alert?

Post by MorningZ »

Hi everyone. New to Blue Iris and loving the ability to talk to my other stuff over MQTT, but I've run into a dead end that I am not sure how to get out of.

When motion triggers a camera to record, i am using the default file name format "&CAM.%Y%m%d_%H%M%S"

I'm not sure how to get that generated file name into an outgoing MQTT alert.

Things I've tried:
- I can't use { "topic": "bi/alert", "file" : "&CAM.%Y%m%d_%H%M%S" } as the payload because there is a few second lag between the clip getting saved and the MQTT going out, resulting in different file names.
- For a bit I was using "&CAM.latest" as the file format name, which I could match in MQTT payload, but that obviously is no good since alerts just over write each other
- Lastly I tried by dropping the seconds off the file name "&CAM.%Y%m%d_%H%M" and while this *mostly* works, it does cause issues as the MQTT alerts make their way through my setup (which is Home Assistant and Node-RED). While it mostly works as noted, it's not the solution since it's not rock solid if the alert happens near a changing of the minute.

I saw in the docs "&ALERT" which kind of seems what I was after, but that doesn't seem to evaluate to anything in the MQTT payload. { "topic": "bi/alert", "file" : "&ALERT" } shows up as just that in Node-RED listening for that message.

Ultimately what I am after is to save the alert clip on the SSD that Blue Iris runs on in the full datetime format *and* make a copy of this on Home Assistant's SMB share so I can leverage the video in it, but first and foremost I need a way to consistently get the name of the file that BI created.

I did see a (pretty clever!) post on another forum about creating a hidden copy of the camera and saving alerts to a different folder. in this case the HA smb share could be the clip target, and I could use "&CAM.latest" since I don't care about older versions. But wow that seems like a resource intensive answer to my problem. If it's not a concern, that'll make me feel better and possibly go this route

Thanks in advance!
- Stephen
Post Reply