Giter VIP home page Giter VIP logo

Comments (4)

akmolina28 avatar akmolina28 commented on May 23, 2024

One of my goals with this project is to extend the webhook to allow you to post the actual image file. I hadn't thought about posting an image URL but that could work too.

The nice thing about integrating with Blue Iris is that it can manage the file storage for you by deleting old files automatically. If I open up the webhook to posting image files, then I'll need build out the file management too so that the server doesn't fill up with gigs of image files. None of this is novel or hard but it would take some time to stand up.

What does a web request from Shinobi look like?

from last-watch-ai.

ministryofsillywalks avatar ministryofsillywalks commented on May 23, 2024

Shinobis API is quite extensive. So far that I haven't even begun to scratch the surface ;)
https://shinobi.video/docs/api
However Shinobi can produce a snaphot jpeg url where a camera stream can be seen as a jpeg updating each X seconds.
http://xxx.xxx.xxx.xxx/[API KEY]/jpeg/[GROUP KEY]/[MONITOR ID]/s.jpg
Shinobi can also call a webhook once motion is detected.
So my proposed workflow was

  1. Shinobi detects movement
  2. Shinobi calls webhook in lastwatch
  3. Lastwatch checks snapshot.jpg URL
  4. If object is detected continue with whatever I want done

This flow would not create gigs of image files as they are not stored on the drive but are dynamic in the url. So lastwatch should (maybe) only use the image for detecting and can discard it afterwards.
This is me a completely non dev/coding person talking so this might not be possible :)

from last-watch-ai.

akmolina28 avatar akmolina28 commented on May 23, 2024

The file would have to be accessible by the webserver in order to run it through the AI. The entire app is built around the assumption that the image file is accessible by the web server. Note that this could include shared folders.. the images don't have to physically reside on the web server, they just have to be accessible through the file system.

Either the image data would need to be posted to the webhook, or the image URL would be posted. I see shinobi provides an API to get images but where is the API that triggers on motion events? I could expose a new webhook endpoint for Shinobi but I have no idea what format it sends. I don't see anything in the API docs about pushing motion events.

from last-watch-ai.

ministryofsillywalks avatar ministryofsillywalks commented on May 23, 2024

The documentation is not the best. ;)
I currently use node-red to receive webhooks from shinobi. On a motion detection shinobi can call a webhook (GET or PUT I think) and you can add varaibles. So for example when a monitor detects motion I call:
http://10.10.10.3:1880/shinobi/{{MONITOR_ID}}
This automatically inserts the monitor ID and from there I have node-red grab the jpeg image from the snapshot stream and then pass this on to doods or tensorflow or deepstack
Here you can find some of the variables.
https://gitlab.com/Shinobi-Systems/Shinobi/-/blob/master/libs/events/utils.js
Afaik Shinobi does not allow to send a jpeg to a webhook.
But maybe there is a simpler solution and im just overengineering the whole thing ;)

from last-watch-ai.

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.