Difference between revisions of "SMS Notifications"
(→About) |
|||
Line 1: | Line 1: | ||
You setup email to point to a [https://en.wikipedia.org/wiki/List_of_SMS_gateways text gateway]. Setup a filter that monitors the cameras for alarms, and when an alarm | |||
is set off you have it send an email to the text gateway. Simple. | |||
You can get images from the alarm embedded in the text (covered in install steps). | |||
== Installation == | |||
Follow [https://wiki.zoneminder.com/How_to_get_ssmtp_working_with_Zoneminder How to get ssmtp working with Zoneminder]. | |||
When testing be aware of the following: | |||
* Free email services limit how many emails you are allowed to send through SMTP. It helps to disable cron emails. | |||
* Always test by emailing 1 (or similar low number) results. | |||
* When you make the filter you will want to have it send the 'current' alarms. You don't want it to text you old events. | |||
This is accomplished with a Date/Time greater than or equal to -1 minute. However, there is no need to set this when testing. | |||
=== Tips === | |||
* If when testing the filter execute, the 'execute' button becomes unclickable, uncheck then recheck the email option. | |||
<pre> | |||
#watch "tail -n 30000 /var/log/syslog | grep sSMTP | tail" | |||
</pre> | |||
* When testing use submit at first, not execute. Submit will show you results but not email. | |||
* See | |||
=== Example Filter === | |||
For monitoring on the weekend you might have | |||
<pre> | |||
Weekday equal to Saturday AND | |||
Weekday equal to Sunday AND | |||
alarm frames greater than or equal to 1 AND | |||
date/time greater than or equal to -1 minute | |||
</pre> | |||
== | == Notes == | ||
Notifications can be set easily if you want alarms emailed whenever an event occurs between a static time, for example between 12AM and 6AM. If you have a situation where you may not want the alarms to send you text messages on occasion, this requires | Notifications can be set easily if you want alarms emailed whenever an event occurs between a static time, for example between 12AM and 6AM. If you have a situation where you may not want the alarms to send you text messages on occasion, this requires work. | ||
A feature in the works would allow you to set filters based on run states, which would mean, you could change the run state at any desired time, and only then would SMS be sent. Until then, you must have duplicate monitors and have the filters activated on only one of them. | A [http://www.github.com/zoneminder/zoneminder/issues/1750 feature in the works] would allow you to set filters based on [https://wiki.zoneminder.com/filter_on_run_states run states], which would mean, you could change the run state at any desired time, and only then would SMS be sent. Until then, you must have duplicate monitors and have the filters activated on only one of them. If you like, you can compile zoneminder from a [https://wiki.debian.org/BuildingTutorial package source] such as the debian package and add the commits manually which is not difficult, at your own risk | ||
==Resources== | ==Resources== |
Revision as of 20:03, 16 March 2017
You setup email to point to a text gateway. Setup a filter that monitors the cameras for alarms, and when an alarm is set off you have it send an email to the text gateway. Simple.
You can get images from the alarm embedded in the text (covered in install steps).
Installation
Follow How to get ssmtp working with Zoneminder.
When testing be aware of the following:
- Free email services limit how many emails you are allowed to send through SMTP. It helps to disable cron emails.
- Always test by emailing 1 (or similar low number) results.
- When you make the filter you will want to have it send the 'current' alarms. You don't want it to text you old events.
This is accomplished with a Date/Time greater than or equal to -1 minute. However, there is no need to set this when testing.
Tips
- If when testing the filter execute, the 'execute' button becomes unclickable, uncheck then recheck the email option.
#watch "tail -n 30000 /var/log/syslog | grep sSMTP | tail"
- When testing use submit at first, not execute. Submit will show you results but not email.
- See
Example Filter
For monitoring on the weekend you might have
Weekday equal to Saturday AND Weekday equal to Sunday AND alarm frames greater than or equal to 1 AND date/time greater than or equal to -1 minute
Notes
Notifications can be set easily if you want alarms emailed whenever an event occurs between a static time, for example between 12AM and 6AM. If you have a situation where you may not want the alarms to send you text messages on occasion, this requires work.
A feature in the works would allow you to set filters based on run states, which would mean, you could change the run state at any desired time, and only then would SMS be sent. Until then, you must have duplicate monitors and have the filters activated on only one of them. If you like, you can compile zoneminder from a package source such as the debian package and add the commits manually which is not difficult, at your own risk