zmfilter.pl for SMS Server Tools
Posted: Sat Mar 29, 2008 10:57 pm
Hi All
I’ve made a code change in zmfilter.pl to output an event to a temp file.
The temp file is place in the spooling directory for smstools to process.
I suggest backing up zmfilter.pl first before you replace it with the link below.
# tail –f /var/log/messages
zma_m1[6638]: INF [kitchen: 128 - Gone into alert state]
zma_m1[6638]: INF [kitchen: 138 - Left alarm state (3107) - 102(82) images]
zmfilter[19124]: INF [Creating notification message]
zmfilter[19124]: INF [Sending notification message '491721234567 ']
zmfilter[19124]: INF [Notification message file created '/var/spool/sms/outgoing/zmsmstools.out.lyZo7']
zmfilter[19124]: INF [Notification message sent]
How?
1. Install smstools a confirm its working from shell with command: sendsms 491721234567 'Hello, how are you'
2. Setup event message filter as per normal.
3. Set check box ZM_OPT_MESSAGE to true value.
4. Add your mobile number to message subject field ZM_MESSAGE_SUBJECT.
5. Edit/add suggested string to ZM_MESSAGE_BODY ZM: ZoneMinder alarm detected. Monitor %MN%, Event Id %EI%.
6. Replace zmfilter.pl with the link below, restart ZM and trip cameras.
Tested on ZM 1.22.3 only.
http://socomms.com/contrib/scripts/
I guess this also could be altered to suit gnokii, or any other application that requires an output event to a temp file.
Comments, suggestions and flaming accepted
Enjoy!
Steve
Reference
http://www.hayne.net/MacDev/Perl/writeToTempFile
I’ve made a code change in zmfilter.pl to output an event to a temp file.
The temp file is place in the spooling directory for smstools to process.
I suggest backing up zmfilter.pl first before you replace it with the link below.
# tail –f /var/log/messages
zma_m1[6638]: INF [kitchen: 128 - Gone into alert state]
zma_m1[6638]: INF [kitchen: 138 - Left alarm state (3107) - 102(82) images]
zmfilter[19124]: INF [Creating notification message]
zmfilter[19124]: INF [Sending notification message '491721234567 ']
zmfilter[19124]: INF [Notification message file created '/var/spool/sms/outgoing/zmsmstools.out.lyZo7']
zmfilter[19124]: INF [Notification message sent]
How?
1. Install smstools a confirm its working from shell with command: sendsms 491721234567 'Hello, how are you'
2. Setup event message filter as per normal.
3. Set check box ZM_OPT_MESSAGE to true value.
4. Add your mobile number to message subject field ZM_MESSAGE_SUBJECT.
5. Edit/add suggested string to ZM_MESSAGE_BODY ZM: ZoneMinder alarm detected. Monitor %MN%, Event Id %EI%.
6. Replace zmfilter.pl with the link below, restart ZM and trip cameras.
Tested on ZM 1.22.3 only.
http://socomms.com/contrib/scripts/
I guess this also could be altered to suit gnokii, or any other application that requires an output event to a temp file.
Comments, suggestions and flaming accepted
Enjoy!
Steve
Reference
http://www.hayne.net/MacDev/Perl/writeToTempFile