Question about instant event notifications
Question about instant event notifications
Greetings,
This is my first post, and I've just begun experimenting with ZoneMinder to replace a homegrown system (based on Motion, i.e. "motion-project", and some custom tooling) because it can't deal with all of the moving shadows at my new house.
I've been reading through the forums and Google (as well as the docs) and am sort of confused... am I correct that there's no built-in way to trigger external actions immediately when an event occurs?
At first I thought/read that filters could do it, but that doesn't seem to be the case. I was really confused by the documentation around the "Run in background" option; apparently this seems to be from the web UI's perspective (run the filter on a regular basis instead of when you click the button) as opposed to what I originally thought, the event's perspective (run on a regular basis, instead of every time a new event occurs).
I've found pliablepixels/zmeventserver but I don't really understand why I'd use that; it's still just polling the shared memory on a regular - albeit short - interval.
Am I correct that there's no way to just automatically hook in some external action/command every time an event happens, immediately when the event happens, either built-in or some widely-used "addon" or "plugin"?
Thanks,
Jason
This is my first post, and I've just begun experimenting with ZoneMinder to replace a homegrown system (based on Motion, i.e. "motion-project", and some custom tooling) because it can't deal with all of the moving shadows at my new house.
I've been reading through the forums and Google (as well as the docs) and am sort of confused... am I correct that there's no built-in way to trigger external actions immediately when an event occurs?
At first I thought/read that filters could do it, but that doesn't seem to be the case. I was really confused by the documentation around the "Run in background" option; apparently this seems to be from the web UI's perspective (run the filter on a regular basis instead of when you click the button) as opposed to what I originally thought, the event's perspective (run on a regular basis, instead of every time a new event occurs).
I've found pliablepixels/zmeventserver but I don't really understand why I'd use that; it's still just polling the shared memory on a regular - albeit short - interval.
Am I correct that there's no way to just automatically hook in some external action/command every time an event happens, immediately when the event happens, either built-in or some widely-used "addon" or "plugin"?
Thanks,
Jason
Principal Software Engineer - Some Company
Re: Question about instant event notifications
To the best of my knowledge, there is no plugin today that directly hooks into the C++ code which detects the alarm - that would be as instant as possible.
I no longer work on zmNinja, zmeventnotification, pyzm or mlapi. I may respond on occasion based on my available time/interest.
Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
Re: Question about instant event notifications
look into zmTrigger.pl
this may be fast enough.
this may be fast enough.
Re: Question about instant event notifications
Isn't that the other way around, for triggering alarms?
Principal Software Engineer - Some Company
Re: Question about instant event notifications
Ok, thanks.asker wrote: ↑Wed Jun 20, 2018 2:18 pm To the best of my knowledge, there is no plugin today that directly hooks into the C++ code which detects the alarm - that would be as instant as possible.
For the time being at least, I think I'm going to look into starting with the code from https://github.com/pliablepixels/zmeventserver (my Perl is **really** rusty, and was never very good to begin with) and replacing the websocket server logic with something that just triggers a command I specify. At least that will get it down to a 5-second-interval polling of the shared memory.
Principal Software Engineer - Some Company
Re: Question about instant event notifications
If that’s all you want to do the event server is overkill. I wrote that for a full alarm system for zmNinja which includes FCM. Take a look at the included zm_alarm file instead. https://github.com/ZoneMinder/zoneminde ... m-alarm.pl
I no longer work on zmNinja, zmeventnotification, pyzm or mlapi. I may respond on occasion based on my available time/interest.
Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
Re: Question about instant event notifications
Is the performance of that OK? I'd sort of assumed that querying SQL every second was horribly taxing compared to reading shared memory, and doing it the way you did in the event server...asker wrote: ↑Wed Jun 20, 2018 11:09 pm If that’s all you want to do the event server is overkill. I wrote that for a full alarm system for zmNinja which includes FCM. Take a look at the included zm_alarm file instead. https://github.com/ZoneMinder/zoneminde ... m-alarm.pl
(I currently have a hacked-up version of zmeventnotification.pl with the WS stuff removed, just making a system call to run another script in the background on every event.)
Principal Software Engineer - Some Company
Re: Question about instant event notifications
Don’t know to be honest. I would assume not. If you’ve already modified the event server then I suppose that’s fine. FWIW I’ll be adding a hook soon to call an external script
I no longer work on zmNinja, zmeventnotification, pyzm or mlapi. I may respond on occasion based on my available time/interest.
Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
Re: Question about instant event notifications
Oh cool! I'll keep an eye open for it.
Principal Software Engineer - Some Company
Re: Question about instant event notifications
it does ....but zmTrigger.pl also reports the monitor status back....there is a 2 way pipe. I noticed this while experimenting using remote wireless motion detectors that activated recording... and connected via telnet on a 3rd machine that as a camera alarmed I would receive a string indicating an ON state then the OFF state with timestampsIsn't that the other way around, for triggering alarms?