Comments (4)
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.
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
- Shinobi detects movement
- Shinobi calls webhook in lastwatch
- Lastwatch checks snapshot.jpg URL
- 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.
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.
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)
- Adding web request automation returns error HOT 4
- Interface to edit automations HOT 3
- Add continuous build integration
- Mqtt Posting? HOT 5
- Unable to subscribe to automations
- Dev branch add vendor/autoload and compose to dockerfile HOT 4
- Builds on docker hub? HOT 1
- Intensive CPU HOT 9
- No image display on web interface. HOT 5
- ARM64 Jetson Nano HOT 1
- Idea: Gallery view or thumbnails in Detection Events webpage HOT 2
- Build failing? HOT 3
- No processing? HOT 6
- Feature suggestion: Dark mode HOT 1
- Profile matching no longer using full path but filename only HOT 1
- Ignore SSL exceptions in automation
- Substitution Variables section in WebRequest is out of date HOT 6
- Passing additional variables via HA API body HOT 1
- Question: Negative doesn't seem to work as expected HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from last-watch-ai.