eMail alert setup

Forum for questions and support relating to the 1.32.x releases only.
Post Reply
bodom
Posts: 10
Joined: Thu Feb 15, 2018 4:52 am

eMail alert setup

Post by bodom » Tue Dec 25, 2018 5:48 pm

Hi there!

I have installed a brand new ZoneMinder 1.32 and, after a while, managed to configure two cameras.

I have followed the guide to setup email notifications:
- i have configured the email sending options
- i have created a filter for any event id >= 1 "email details of all matches" and "run filter in background"

When i run the filter by hitting the execute button, i correctly get all the emails about past events. When i trigger a new event, even by forcing it on the console view or by walking in front of the camera, nothing happens.

I suppose i am doing something wrong, even if i believe i have followed the docs. May somebody please point me to the right direction?

User avatar
snake
Posts: 247
Joined: Sat May 21, 2016 2:20 am

Re: eMail alert setup

Post by snake » Tue Dec 25, 2018 7:10 pm

Sounds like you need to have the filter search for events:

Code: Select all

date/time greater than or equal to -1 minute
For more details on troubleshooting email see:
https://wiki.zoneminder.com/How_to_get_ ... Zoneminder
and
https://wiki.zoneminder.com/SMS_Notifications

bodom
Posts: 10
Joined: Thu Feb 15, 2018 4:52 am

Re: eMail alert setup

Post by bodom » Wed Dec 26, 2018 12:53 am

So it, looks like that for background filters to work, ZoneMinder needs to be restarted.

Is this a bug? Should i report it?

Also, I get the email sometime after the event has passed. From my understanding, the background filter runs every 60 seconds.
I need an instant notification as soon as the event starts, before it is even finished. Is it possible?

Edit: so it looks like the FAQ suggests to spam the DBMS to achieve this. Isn't there a smarter way?

subdee
Posts: 1
Joined: Thu Dec 27, 2018 3:33 pm

Re: eMail alert setup

Post by subdee » Thu Dec 27, 2018 3:37 pm

I'm heaving very same issue as you described. For some reason filter that is marked for running in background is not picked up. It only works if executed manually. I've restarted zoneminder service after creating background filter but it's still not executing.
What have you changed to have it running?

Thanks!

Edit:
Here is output of zm filter table. If I understood documentation zmfilter.pl script is pulling the list of filters from this table and it would execute them periodically if they have background flag set to 1.

mysql> select * from zm.Filters\G;
*************************** 1. row ***************************
Id: 1
Name: PurgeWhenFull
Query: {"sort_field":"Id","terms":[{"val":0,"attr":"Archived","op":"="},{"cnj":"and","val":95,"attr":"DiskPercent","op":">="}],"limit":100,"sort_asc":1}
AutoArchive: 0
AutoVideo: 0
AutoUpload: 0
AutoEmail: 0
AutoMessage: 0
AutoExecute: 0
AutoExecuteCmd:
AutoDelete: 1
AutoMove: 0
AutoMoveTo: 0
UpdateDiskSpace: 0
Background: 1
Concurrent: 0
*************************** 2. row ***************************
Id: 2
Name: Update DiskSpace
Query: {"terms":[{"attr":"DiskSpace","op":"IS","val":"NULL"}]}
AutoArchive: 0
AutoVideo: 0
AutoUpload: 0
AutoEmail: 0
AutoMessage: 0
AutoExecute: 0
AutoExecuteCmd:
AutoDelete: 0
AutoMove: 0
AutoMoveTo: 0
UpdateDiskSpace: 1
Background: 1
Concurrent: 0
*************************** 3. row ***************************
Id: 52
Name: RunOnEvent
Query: {"terms":[{"attr":"MonitorName","op":"=","val":"IPD-C34Y02-BS"},{"cnj":"and","attr":"AlarmFrames","op":">=","val":"1"}],"sort_field":"StartDateTime","sort_asc":"0","limit":"5"}
AutoArchive: 0
AutoVideo: 0
AutoUpload: 0
AutoEmail: 1
AutoMessage: 0
AutoExecute: 0
AutoExecuteCmd: 1
AutoDelete: 0
AutoMove: 0
AutoMoveTo: 0
UpdateDiskSpace: 0
Background: 1
Concurrent: 0
*************************** 4. row ***************************
Id: 55
Name: test
Query: {"terms":[{"attr":"StartDateTime","op":">=","val":"-1 minute"}],"sort_field":"Id","sort_asc":"1","limit":"100"}
AutoArchive: 0
AutoVideo: 0
AutoUpload: 0
AutoEmail: 1
AutoMessage: 0
AutoExecute: 0
AutoExecuteCmd: 0
AutoDelete: 0
AutoMove: 0
AutoMoveTo: 0
UpdateDiskSpace: 0
Background: 1
Concurrent: 0
4 rows in set (0.00 sec)
Last edited by subdee on Thu Dec 27, 2018 5:04 pm, edited 1 time in total.

rockedge
Posts: 1108
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA
Contact:

Re: eMail alert setup

Post by rockedge » Thu Dec 27, 2018 4:06 pm

I need an instant notification as soon as the event starts
I believe this may steer you in the right direction...
https://github.com/pliablepixels/zmeventserver/issues/9

also I have done this with a PERL program running as a daemon that monitors the events and I think it may be possible to poll zmtrigger.pl via telnet or socket but that is all custom stuff.

Post Reply

Who is online

Users browsing this forum: No registered users and 14 guests