Giter VIP home page Giter VIP logo

Comments (19)

VorlonCD avatar VorlonCD commented on September 26, 2024 2

@edalquist - Does this do the trick?

Prior to this update, the only time a trigger cancel would be called is if another image is analyzed and found to have nothing found.

NOW, after each triggered event, if you have any cancel URL's or MQTT configured, a cancel event is 'queued' and a cancel will be sent in 30 seconds (Controlled via 'ActionCancelSeconds' in the settings JSON file)

If there are any new triggered events in the mean time, the cancel event time for the camera will be updated/extended.

AITOOL-VORLONCD.zip

from bi-aidetection.

VorlonCD avatar VorlonCD commented on September 26, 2024

You should be able to do this now by erasing the trigger URL and enabling mqtt action with connection to blueiris server.

from bi-aidetection.

edalquist avatar edalquist commented on September 26, 2024

ack, I'll give that a try. It looks like I'd only be able to publish to a single topic though so doing trigger + flag (needs to publish to two different topics) wouldn't be possible yet right?

from bi-aidetection.

VorlonCD avatar VorlonCD commented on September 26, 2024

Havent implemented multiple mqtt servers yet (if needed??) but if you put multiple topics and payloads on each text box, it will trigger all of them. Like "topic1 | topic2", "payload1 | payload2"
AITOOL-VORLONCD.zip

from bi-aidetection.

edalquist avatar edalquist commented on September 26, 2024

Awesome, I'll give that a try today. I doubt (famous last words) multiple mqtt server support is needed as the whole point of a local server is a single pubsub router for all your things.

from bi-aidetection.

VorlonCD avatar VorlonCD commented on September 26, 2024

Ok, so when you control BI you dont have to set BI as a server in settings? Or you DO set to BI and it forwards any messages it doesnt handle? I dont think I'm as MQTT literate as I should be.

from bi-aidetection.

edalquist avatar edalquist commented on September 26, 2024

BI is a MQTT client, just like AITool is now. You point both at a MQTT broker (server) which handles the pubsub aspects of the message queue system. In my case I'm using Mosquito MQTT with Home Assistant. Both BI and AITool connect to it and can use it as a way to communicate between each other. Additionally Home Assistant can watch the MQTT topics, react to them and publish to them to control things.

from bi-aidetection.

VorlonCD avatar VorlonCD commented on September 26, 2024

Is this working ok now? Or does a separate option really need to be configured to trigger BI via mqtt or url?

from bi-aidetection.

edalquist avatar edalquist commented on September 26, 2024

Just verified it works! I'll see if I can do a writeup on how to setup AITool and use MQTT to tigger BI so none of the HTTP/Auth stuff is needed.

My topic is ai/[camera]/motion | BlueIris/admin and payload is [detections] | camera=[camera]&trigger&memo=[SummaryNonEscaped]

This has let me turn off all HTTP access to BI from AITool which is awesome.

from bi-aidetection.

youzer-name avatar youzer-name commented on September 26, 2024

I'm trying to do the same thing and when I test the MQTT with the pipe separated topics it ignores the pipe and runs the whole topic together. Using a direct copy & paste of what edalquist posted above I see an MQTT message with a topic of "ai/cameraname/moiton | BlueIris/admin" coming through under my subscription to "ai/#" in MQTT.fx No message comes through under the BlueIris subscription. Am I missing something about how to enter the multiple topics and payloads? I'm using a space, a pipe, and a space between each one (" | ").

EDIT: So it looks like it works when there is a real trigger, but the Test button isn't handling the multiple MQTT topics properly.

from bi-aidetection.

edalquist avatar edalquist commented on September 26, 2024

What version (from overview tab) are you running?

from bi-aidetection.

youzer-name avatar youzer-name commented on September 26, 2024

I was running the latest release, but I just tested it in a pre-release 1.67.8.24326 9/25/2020 1:30:53 PM and the test button works with multiple MQTT topics.

Looking at the "releases" page I realize I should have said that I was running the latest pre-release posted under Releases. The test I just did that worked was a newer version VorlonCD sent me that hadn't been posted to GitHub yet.

from bi-aidetection.

MYeager1967 avatar MYeager1967 commented on September 26, 2024

Does the BlueIris/admin topic need to be cancelled?

from bi-aidetection.

jdom avatar jdom commented on September 26, 2024

This is great. @edalquist, is there a write up for setup instructions to integrate via MQT ? I believe at this time gentlepumpkin's post in ipcamtalk is really outdated. We should probably have docs directly in markdown in this repo, so we keep them up to date (as possible) with the current state of things.

from bi-aidetection.

jdom avatar jdom commented on September 26, 2024

A minute after going back to the readme, I noticed https://github.com/VorlonCD/bi-aidetection/blob/master/mqtt.md just beside it, so sorry about the question, I'll look into those instructions now. Thanks, and great work, everyone

from bi-aidetection.

ipeterski avatar ipeterski commented on September 26, 2024

Hey. Is there a setting to tell AI Tools /*when to submit a cancel request, or how is it told to send the cancel... query is the resset from blue iris go to ai tools? no point in going bi > ai tools > mqtt > blue iris.. i can just have the close mqtt directly to the master.

(i have cloned cameras,.. despite weeks of efforts.. i cannot seem to get AI tools and bi to work off 1 camera and NOT see all the false alerts in my screen.. )

anyways.. ywah. my comment was merly, what triggers the "cancel" in ai tools.. the ai or bi?

Thanks

from bi-aidetection.

ipeterski avatar ipeterski commented on September 26, 2024

kind of a follow up,

hi, so i was watching the mqtt for the trigger and cancels.. my cameras are not getting a cancel request.. so i watched as a car drove , ai tools send a trigger command, yet it never sent the cancel,,, the cancel fields are red text, and not black, not sure if that means anything.. i will have a look in the config to see anything, but not sure how the cancel fields are activated... and again im refering to the mqtt cancel fields.. the url trigger and cancel work fine. but i would like to utilize the mqtt..

thanks in advanced.
--Stickers

from bi-aidetection.

edalquist avatar edalquist commented on September 26, 2024

I have cancel setup but AITool only cancels if it gets an image with no match.

My setup looks like:

  • CameraFoo (onvif) - subscribed to on-camera motion detection (I do this to save server CPU) when triggered it triggers the (ai) camera
  • CameraFoo (ai) - Disabled unless triggered, uses BI motion detection, saves a snapshot every 3s when triggered.
  • CameraFoo (live) - 24/7 recording, trigger resets after 30s of no new triggers.

AI Tool watches the (ai) camera snapshot folder and on a hit it triggers the (live) camera via MQTT. Each new hit in AI Tool triggers the camera again keeping the alert going until either a miss in AI Tool or the 30s timeout passes.

from bi-aidetection.

edalquist avatar edalquist commented on September 26, 2024

I was fine with the previous behavior where BlueIris just reset the trigger after 30s. This is a handy option to have though.

from bi-aidetection.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.