How do rules for events work?
A device analyzes various types of data, such as a video stream or the operating temperature of the device. The purpose is to detect significant events that you want the system to react on automatically. Such events can be anything from motion detected in a video stream, the push of a button, or a lost network connection. You can configure your system to trigger actions when events are detected. For instance, the system can automatically play an audio clip when a camera detects motion, or send an email when vandalism is detected.
To make an event trigger an action automatically, you create a rule that consist of one or several conditions and an action. The action will be triggered when all the conditions are met.
For more information about specific conditions and actions, see Conditions and actions.
Example
You have installed a speaker and a camera to prevent trespassing. You have configured the motion detection application in the camera to only detect motion within a restricted area.
When there is movement in the restricted area, you want a speaker to automatically play a pre-recorded message that tells the intruder to leave the area. For this you need to set up a rule on your device:
Rule — Play a message when motion is detected.
Condition — Motion is detected.
Action — Play message.
Event — The camera detects motion when someone walks in the restricted area.
Condition — The event is analyzed by the rule. Since the conditions are met, the action is triggered.
Action — The speaker plays the audio clip.
You have plenty of options for configuring the rules. For instance, you can add a schedule to the condition so that the rule only triggers the action during certain hours. If the rule is active only outside office hours, then your staff can walk in the area during office hours without triggering the audio message.
Set up rules for events
To help you understand how to configure events, we have created a set of video tutorials for common use cases. The tutorials use the device webpage for configuration. You access the device webpage by entering the IP address of your device in a browser.
For information about the configuration options of your device, go to the device webpage and click .
For information about assigning an IP address, see How to assign an IP address and access your device.
Record video when the camera detects motion
This example explains how to set up the camera to start recording to the SD card five seconds before it detects motion and to stop one minute after.
- Make sure that AXIS Video Motion Detection is running:
Go to Settings > Apps > AXIS Video Motion Detection.
Start the application if it is not already running.
Make sure you have set up the application according to your needs. If you need help, see the user manual for AXIS Video Motion Detection 4.
- Create a rule:
Go to Settings > System > Events and add a rule.
Type a name for the rule.
In the list of conditions, under Application, select AXIS Video Motion Detection (VMD).
In the list of actions, under Recordings, select Record video while the rule is active.
Select an existing stream profile or create a new one.
Set the prebuffer time to 5 seconds.
Set the postbuffer time to 60 seconds.
In the list of storage options, select SD card.
Click Save.
Direct the camera to a preset position when the camera detects motion
This example explains how to set up the camera to go to a preset position when it detects motion in the image.
- Make sure that AXIS Video Motion Detection is running:
Go to Settings > Apps > AXIS Video Motion Detection.
Start the application if it is not already running.
Make sure you have set up the application according to your needs. If you need help, see the user manual for AXIS Video Motion Detection 4.
Add a preset position:
Go to Settings > PTZ and set where you want the camera to be directed by creating a preset position.
- Create a rule:
Go to Settings > System > Events > Rules and add a rule.
Type a name for the rule.
In the list of conditions, select a video motion detection condition under Application.
From the list of actions, select Go to preset position.
Select the preset position you want the camera to go to.
Click Save.
Use audio to deter intruders
This example explains how to connect a speaker to the camera and set it up to play a warning message when the camera detects motion in a restricted area.
- Required hardware:
Active speaker with built-in amplifier and connecting wires
Make sure the camera is disconnected from power before making the connections. Reconnect to power after connecting the wires.
- Add audio clip to the camera:
Go to Settings > Audio > Output and click .
Click Upload new clip.
Browse to locate your audio clip and click Done.
Create a rule:
Open the device webpage for the camera.
Go to Settings > System > Events.
Go to Recipients and add a recipient.
Go to the device webpage of the speaker that has the audio clip stored on its SD card.
Copy a link to the audio clip.
Return to the device webpage of the camera.
Go to Rules and add a new rule:
Under Condition, select Video motion detection.
Under Action, select Send notification through HTTP.
Show a text overlay in the video stream when the device detects motion
This example explains how to display the text “Motion detected” when the device detects motion.
Make sure that AXIS Video Motion Detection is running:
Go to Settings > Apps > AXIS Video Motion Detection.
Start the application if it is not already running.
Make sure you have set up the application according to your needs.
- Add the overlay text:
Go to Settings > Overlay.
Enter
#D
in the text field.Choose text size and appearance.
- Create a rule:
Go to System > Events > Rules and add a rule.
Type a name for the rule.
In the list of conditions, select AXIS Video Motion Detection.
In the list of actions, select Use overlay text.
Select Camera 1.
Type “Motion detected”.
Set the duration.
Click Save.
Send an email automatically if someone spray paints the lens
Go to Settings > System > Detectors.
Turn on Trigger on dark images. This will trigger an alarm if the lens is sprayed, covered, or rendered severely out of focus.
Set a duration for Trigger after. The value indicates the time that must pass before an email is sent.
- Create a rule:
Go to Settings > System > Events > Rules and add a rule.
Type a name for the rule.
In the list of conditions, select Tampering.
In the list of actions, select Send notification to email.
Select a recipient from the list or go to Recipients to create a new recipient.
To create a new recipient, click . To copy an existing recipient, click .
Type a subject and a message for the email.
Click Save.
Detect tampering with input signal
This example explains how to trigger an alarm when the input signal has been cut or short-circuited. For more information about the I/O connector, see .
- Create a rule:
Go to Settings > System > Events and add a rule.
Type a name for the rule.
In the list of conditions, select Digital input and then select a port.
In the list of actions, select Send notification to email and then select a recipient from the list. Go to Recipients to create a new recipient.
To create a new recipient, click . To copy an existing recipient, click .
Type a subject and a message for the email.
Click Save.
Set up rules with a VMS
You can also set up rules in your video management system (VMS) software. The principle is the same, but each VMS has a different interface.
For information about how to set up rules in your VMS, see the user manual for the VMS.
Integrate third-party devices
I/O connection
You can connect a third-party device to the I/O port of an Axis device.
Example
Start recording when a door is opened.
In this case the camera is located near the door, and the door sensor is connected by cable to the I/O port on the camera.
The door sensor sends a signal when the door is opened.
The I/O connection on the camera receives the signal and triggers an action in the camera to start recording.
Virtual input
You can use a virtual input for incoming HTTP requests.
Example
Start recording when a door is opened.
In this case the camera is not located close to the door. The door sensor is connected by cable to an I/O relay, which is connected to the camera over the network.
The door sensor sends a signal when the door is opened.
The I/O relay box receives the signal and triggers an HTTP request via the network to a virtual input on the camera.
The camera receives the virtual input and triggers an action in the camera to start recording.
Conditions and actions
There are different conditions and actions available for different products. Here you find explanations for all of them.
Conditions
- Use this condition as a trigger
- Use this option as an activating condition to initiate an action. It can be used for rules with one or more conditions. However, only the first condition have this option and only some actions can be used with an activating condition.
In order for the action to be triggered, all other conditions must be met before the activating condition. Whether the action keeps going or not depends on the type of action and if the rule consists of more than one condition. The action will continue as long as the conditions are met with disregard of the status of the activating condition. When one or more of the other conditions aren’t met, the action stops. If you choose not to have an activating condition, the action is triggered when all the conditions are met.
Video encoder
|
Actions
Defog
Guard tours
Guard tours (recorded)
HDMI
Use HDMI while the rule is active: Select to let the HDMI connection stay open until the conditions are no longer met.
I/O
Illumination The built-in Infrared (IR) light and white light illuminator allows the camera to perform video surveillance in low light areas without the need for external lighting.
Images
LEDs
Call button LED while rule is active: Select to change the color and pattern for the call button LED for a specific device state until the conditions of the rule are no longer met. For States and Default, see Call button LED infinity Flash LED: Select to make the LED flash for a set duration. You can choose a color for the LED. The LED can be used during installation and configuration to visually validate if settings work correctly, for example to confirm that motion detection triggers an action. Flash LED while the rule is active: Select to make the LED flash for the duration of the rule. You can choose a color for the LED. Light and siren
Mediaplayer
Monitor
MQTT
Notifications
Overlay text
Power saving mode
Power saving mode while the rule is active: Select to let the power saving mode remain on or off until the conditions are no longer met.
Preset positions
Radar
Recordings Records audio or video to a selected storage.
Record video: Select to start recording video.
Record video while the rule is active: Select to record video for the duration of the rule. Security
SNMP trap messages
Tracking
Video clips When you send a video clip, it’s generated in a non-searchable way. It means that you can’t fast forward or rewind, or jump to a specific point on the timeline. To do these things, you can use Axis Matroska File Splitter or third-party software like MKVToolNix.
WDR mode
Wiper
Wireless
|