Page 1 of 1

Arming and dis-arming by editing filters from command line

Posted: Mon Sep 08, 2014 2:05 am
by mugwhy
I have seen a few posts around where people mention they are arming and dis-arming zoneminder but it's not clear what they are doing to do that but I suspect they are just changing camera function from say "monitor" to "modect" for example.

I on the other hand would prefer cameras to record motion in all circumstances when armed or dis-armed.

For me having the system email me or NOT email me on motion detection would be satisfactory for an arm/disarm scenario however just enabling OPT_EMAIL or disabling still does not suit.

I would like when I am home for system NOT to email me if motion is detected from cameras inside the house but to continue emailing if motion is detected from cameras outside the house. But in both circumstances to continue recorded motion.

Then when I leave home to have email notifications on motion detected from all cameras.

At the moment I achieve this from fiddling with filters and this works but its time consuming.

My question is, can these filters be edited from a command line and if so can someone give me a pointer on a few commands to investigate to edit a filter from the command line. If I can do that then I figure I can then just make a script to arm and disarm by editing filters. ie.. stop and start emailing from certain cameras at the launch of a couple of scripts on my desktop.

Please advise
thank you

Re: Arming and dis-arming by editing filters from command li

Posted: Sat Mar 07, 2015 8:39 am
by llandre

I need to do a similar thing.
I've just started to implement a solution by myself.
It is not very clean, however it should work.
I implemented a dirty hack to change alarm email messages are sent if and only if the file /var/cache/zoneminder/misc/email_alarm_disabled does not exist.
Now I have to write a simple Android app that remotely can create/delete this file on the server where ZM runs. This way I can enable/disable email sending from everywhere.
In your case you should implement further check to filter emails on a camera basis as well.

If anybody is interested I can share the code.


Re: Arming and dis-arming by editing filters from command line

Posted: Sun Jan 06, 2019 11:32 am
by llandre
If anybody is interested, the code is available here: ... ce-system/.