Difference between revisions of "ZMTrigger"
Line 1: | Line 1: | ||
==About== | ==About== | ||
/usr/bin/zmtrigger.pl is an optional perl script for zoneminder. See the script for a brief description. One way it can be used is to overlay text information from an outside source (say a temperature sensor) onto the video feed. | /usr/bin/zmtrigger.pl is an optional perl script for zoneminder. See the script for a brief description. One way it can be used is to overlay text information from an outside source (say a temperature sensor) onto the video feed. | ||
==Configuration== | ==Configuration== | ||
Enable it first, by going into options, config, and | |||
Enable it first, by going into options, config, and checking Enable Triggers. | |||
Then <code># service restart zoneminder</code> | Then <code># service restart zoneminder</code> | ||
Verify it is running with ps auxw | grep zmtrigger | Verify it is running with ps auxw | grep zmtrigger | ||
===Overlaying Text Data onto a Video Feed=== | ===Overlaying Text Data onto a Video Feed=== | ||
After you have verified the script is running, test it is working. | After you have verified the script is running, test it is working. | ||
Line 21: | Line 28: | ||
Then type in another terminal | Then type in another terminal | ||
< | <pre>telnet ipaddress 6082</pre> | ||
in the telnet session type the following | in the telnet session type the following | ||
< | <pre>3|show||||testingOSD</pre> | ||
then press return. | then press return. | ||
Line 34: | Line 41: | ||
===Example | ===Example Script=== | ||
Here is a script of connecting to an ipaddress that serves a value from a sensor. | Here is a script of connecting to an ipaddress that serves a value from a sensor. | ||
Wget is not as fast as possible, but this is simple and works quickly as a test. | |||
<pre> | |||
#!/bin/bash | #!/bin/bash | ||
counter=1 | counter=1 | ||
Line 51: | Line 58: | ||
#((counter++)) | #((counter++)) | ||
done | done | ||
</pre> | |||
===Troubleshooting=== | |||
* <code>tail -f /var/log/zm/zmtrigger.log</code> | |||
When it fails, you will see it fail. |
Revision as of 16:21, 12 February 2017
About
/usr/bin/zmtrigger.pl is an optional perl script for zoneminder. See the script for a brief description. One way it can be used is to overlay text information from an outside source (say a temperature sensor) onto the video feed.
Configuration
Enable it first, by going into options, config, and checking Enable Triggers.
Then # service restart zoneminder
Verify it is running with ps auxw | grep zmtrigger
Overlaying Text Data onto a Video Feed
After you have verified the script is running, test it is working.
Choose a monitor, say monitor 1, then add %Q to the monitors timestamp section.
The monitor must be in either modect, mocord, or nodect mode.
Open the video feed for monitor 1.
Then type in another terminal
telnet ipaddress 6082
in the telnet session type the following
3|show||||testingOSD
then press return.
Refer to Documentation for what this command means.
If done correctly, you should immediately see testingOSD in place of the %Q you put in the timestamps section.
For more examples of how to use ZMTrigger see the forums.
Example Script
Here is a script of connecting to an ipaddress that serves a value from a sensor. Wget is not as fast as possible, but this is simple and works quickly as a test.
#!/bin/bash counter=1 while [$counter -le 10] do PRESSURE=`wget ipaddress -q -O -` echo "1|show||||$PRESSURE" | telnet ipaddress 6802 sleep 4 #((counter++)) done
Troubleshooting
tail -f /var/log/zm/zmtrigger.log
When it fails, you will see it fail.