-
Notifications
You must be signed in to change notification settings - Fork 131
Items Zmtrigger_Item
ggodart edited this page Jan 6, 2021
·
1 revision
See original
use Zmtrigger_Item;
$name_for_camera = new Zmtrigger_Item("Numeric_ID_of_monitor_in_ZoneMinder");
$camera2 = new Zmtrigger_Item(2,10,200,"Second monitor triggered for 10s with a score of 200");
set $name_for_camera ON; # Starts alarm condition in ZoneMinder
set $name_for_camera OFF; # Cancells alarm condition in ZoneMinder
$motionSensor->tie_items($camera2) if state_now $alarm ON;
Object used to trigger ZoneMinder events
Creates an item based on the Generic_Item. The item connects to your ZoneMinder server utilizing a Socket_Item
and the zmtrigger
package included in ZoneMinder.
SETUP In ZoneMinder click "Options"
Select the "System" tab
Check the box to enable OPT_TRIGGERS
edit /opt/zm/bin/zmtrigger.pl
in the "Channel/Connection Modules" section comment all lines starting with push except the one referencing
ZoneMinder::Trigger::Channel::Inet
Restart ZoneMinder
Method | Description |
---|---|
new($monitor_id,$max_duration,$score,$description) |
Creates a new Zmtrigger_Item .$monitor_id should be a valid numeric ZoneMinder monitor ID$max_duration OPTIONAL Specifies the maximum duration of the trigger. If not specified the value specified in mh.private.ini under zm_trigger_max_duration will be used.$score OPTIONAL Specifies the default score of the trigger. If not specified the value specified in mh.private.ini under zm_trigger_score will be used.$description OPTIONAL Specifies the default description of the trigger to be displayed in Zoneminder. If not specified the value specified in mh.private.ini under zm_trigger_description will be used |
set($state) |
The set method changes the state of an existing Zmtrigger_Item by creating a Socket_Item which connects via telnet to the zmtrigger.pl provided with ZoneMinder.$state : Should only be ON or OFF - ON creates an event trigger with a maximum duration. In case of a communication failure or MH crash the trigger will time out on the ZoneMinder end. - OFF cancels the active trigger for the monitor. |
# Category = Zmtrigger
#
#
# Socket_Item properties
#
# IP or Host name of server running ZoneMinder
zm_server_address = localhost
# Port assigned to ZoneMinder's zmtrigger
zm_server_port = 6802
#
# Zmtrigger_Item Default Values
#
# Maximum duration of triggered state in seconds if not cancelled by an OFF
zm_trigger_max_duration = 300
# Score assigned to the trigger in ZoneMinder
zm_trigger_score = 200
# Description of trigger passed to ZoneMinder
zm_trigger_description = MisterHouse
Dustin Robinson