TECHNICAL NOTE
AXIS P8221 Network I/O Audio Module
Notification messages
How to integrate AXIS P8221
Updated: August 19, 2011
Rev: 1.1
Download from Www.Somanuals.com. All Manuals Search And Download.
ꢀꢀꢀ TECHNICAL NOTE – Axis Communications
Notification messages
1 Introduction
AXIS P8221 Network I/O Audio Module provides additional I/O ports and audio functionality to a
network video installation and is intended to be used in combination with Axis network cameras, video
encoders and video decoders.
Integrating AXIS P8221 with Axis network video products involves sending notification messages
between AXIS P8221 and the other products. Notification messages can be sent via HTTP or TCP and
contain instructions, for example, to steer a PTZ camera to a preset position when one of the AXIS
P8221 input ports is activated. The messages are constructed using commands and parameters
available from Axis HTTP-based application programming interface (API), VAPIX®.
This white paper gives some examples of how to set up and construct these notification messages. The
paper should be considered as introduction and is in no way a complete description of all notification
messages and other possibilities provided by VAPIX®.
1.1 HTTP and TCP
Most of Axis network video products support both HTTP and TCP notification messages. HTTP
messages are more secure as HTTP servers require a login name and password.
1.2 VAPIX®
VAPIX® is an HTTP-based application programming interface (API) available in Axis network video
products. VAPIX® provides functionality for requesting images, controlling network camera functions
(PTZ, I/O ports, etc) and setting and retrieving internal parameter values. The purpose of the API is to
make it easier for developers to build applications that support Axis network video products.
The VAPIX® specification is available on www.axis.com/developer
A VAPIX® command (request) follows the syntax
where <ip>is to be replaced by the product’s IP address.
Note:
Axis Customer Support does not provide assistance with VAPIX-related issues.
1.3 Liability Disclaimer
Axis Communications AB makes no warranty of any kind with regard to the material
contained within this document, including, but not limited to, the implied warranties of
merchantability and fitness for a particular purpose. Axis Communications AB shall not be
liable nor responsible for incidental or consequential damages in connection with the
furnishing, performance or use of this material.
Later versions of this document will be posted on the Axis website.
Rev: 1.1, Last updated: 19/08/2011
3
Download from Www.Somanuals.com. All Manuals Search And Download.
ꢀꢀꢀ TECHNICAL NOTE – Axis Communications
Notification messages
2 Examples
2.1 Play an audio clip
This example describes how to set up AXIS P8221 to play an audio clip when triggered by a signal
from another Axis network video product, in this case AXIS Q7401 Video Encoder.
The idea is to use AXIS P8221 as an HTTP event server and to send an HTTP notification
from AXIS Q7401 to AXIS P8221. The HTTP notification is a VAPIX command instructing
AXIS P8221 to play the audio clip.
2.1.1 Preparations
Before following this example, you should:
• Upload the audio clip to AXIS P8221
Refer to the online help or the AXIS P8221 User’s Manual.
2.1.2
Set up an event server in AXIS Q7401
1. Open the AXIS Q7401 Setup pages in a web browser.
2. Go to Setup > Events > Event Servers
3. Click Add HTTP
4. Enter a Name, for example AXIS P8221
5. In the URL field, enter
6. Enter the user name and password for AXIS P8221
7. Click OK
Figure 1. Setting up an event server in AXIS Q7401. Replace “IP” with the IP address of AXIS P8221.
2.1.3 Set up a triggered event in AXIS Q7401
1. Open the AXIS Q7401 Setup pages in a web browser
2. Go to Setup > Events > Event Types
3. Click Add triggered
4. Enter a Name, for example Play audio clip
5. Select a trigger from the Triggered by drop-down list. For testing purposes, use the
manual trigger.
6. Under When Triggered, select Send HTTP notification.
Rev: 1.1, Last updated: 19/08/2011
4
Download from Www.Somanuals.com. All Manuals Search And Download.
ꢀꢀꢀ TECHNICAL NOTE – Axis Communications
Notification messages
7. Select the event server AXIS P8221
8. In the Custom parameters field, enter the id number of the clip to be played:
clip=0
9. Click OK
The total command sent from AXIS Q7401 to AXIS P8221 is:
where 0 is the audio clip number (numbering starts from 0).
Figure 2. Setting up a triggered event in AXIS Q7401.
Rev: 1.1, Last updated: 19/08/2011
5
Download from Www.Somanuals.com. All Manuals Search And Download.
ꢀꢀꢀ TECHNICAL NOTE – Axis Communications
Notification messages
2.2 Go to PTZ preset position when a door is opened
In this example, a door sensor is connected to one of the AXIS P8221 I/O ports. When the
door is opened, AXIS P8221 sends a command to AXIS P5534 PTZ Dome Network Camera
to go to a preset position.
To accomplish this, a triggered event is set up in AXIS P8221. The event is triggered by a
signal from the I/O port. When the event is triggered, AXIS P8221 sends an HTTP
notification to AXIS P5534. The HTTP notification is a VAPIX command instructing AXIS
P5534 to go to the preset position.
2.2.1 Preparations
Before following this example, you should:
• Set up the PTZ preset position in AXIS P5534
Refer to the online help or the AXIS P5534 User’s Manual.
• Configure the AXIS P8221 I/O port as an Input port
Refer to the online help or the AXIS P8821 User’s Manual.
2.2.2 Set up an event server in AXIS P8221
1. Open the AXIS P8221 Setup pages in a web browser
2. Go to Setup > Events > Event Server
3. Click Add HTTP
4. Enter a Name, for example AXIS P5534
5. In the URL field, enter
6. Enter the user name and password for AXIS P5534
7. Click OK
Figure 3. Setting up an event server in AXIS P8221. Replace “IP” with the IP address of AXIS P5534.
2.2.3 Set up a triggered event in AXIS P8221
1. Open the AXIS P8221 Setup pages in a web browser
2. Go to Setup > Events > Event Types
3. Click Add triggered
4. Enter a Name, for example Go to preset
5. Select the Input ports trigger from the Triggered by drop-down list.
6. Under When Triggered, select Send HTTP notification.
Rev: 1.1, Last updated: 19/08/2011
6
Download from Www.Somanuals.com. All Manuals Search And Download.
ꢀꢀꢀ TECHNICAL NOTE – Axis Communications
Notification messages
7. Select the event server AXIS P5534
8. In the Custom parameters field, enter:
gotoserverpresetname=Door
where Door is the name of the preset position
9. Click OK
The total command sent from AXIS P8221 to AXIS P5534 is:
Figure 4. Setting up a triggered event in AXIS P8221.
Rev: 1.1, Last updated: 19/08/2011
7
Download from Www.Somanuals.com. All Manuals Search And Download.
ꢀꢀꢀ TECHNICAL NOTE – Axis Communications
Notification messages
2.3 Activate an output port
This example describes how to set up AXIS P8221 to activate an output port on another Axis network
video product, in this case AXIS Q7401 Video Encoder.
To accomplish this, a triggered event is set up in AXIS P8221. The event is triggered by a
signal from the AXIS P8221 Input port 1. When the event is triggered, AXIS P8221 sends an
HTTP notification to AXIS Q7401. The HTTP notification is a VAPIX command instructing
AXIS Q7401 to activate the Output port.
2.3.1 Preparations
Before following this example, you should
• Configure the AXIS Q7401 I/O port 1 as an Output port
Refer to the online help or the AXIS Q7401 User’s Manual.
• Configure the AXIS P8221 I/O port 1 as an Input port
Refer to the online help or the AXIS P8221 User’s Manual.
2.3.2 Set up an event server in AXIS P8221
1. Open the AXIS P8221 Setup pages in a web browser
2. Go to Setup > Events > Event Server
3. Click Add HTTP
4. Enter a Name, for example AXIS Q7401
5. In the URL field, enter
6. Enter the user name and password for AXIS Q7401
7. Click OK
Figure 5. Setting up an event server in AXIS P8221. Replace “IP” with the IP address of AXIS Q7401.
2.3.3 Set up a triggered event in AXIS P8221
1. Open the AXIS P8221 Setup pages in a web browser
2. Go to Setup > Events > Event Types
3. Click Add triggered
4. Enter a Name, for example Open door
Rev: 1.1, Last updated: 19/08/2011
8
Download from Www.Somanuals.com. All Manuals Search And Download.
ꢀꢀꢀ TECHNICAL NOTE – Axis Communications
Notification messages
5. Select the Input ports trigger from the Triggered by drop-down list.
6. Under When Triggered, select Send HTTP notification
7. Select the event server AXIS Q7401
8. In the Custom parameters field, enter:
action=1:/
9. Click OK
The total command sent from AXIS P8221 to AXIS Q7401 is:
where action=1:/means set port 1 as active. Use \ to set a port as inactive.
It is also possible to use a command such as action=1:/10000\to activate port 1, wait
10 seconds (10 000 milliseconds) and then inactivate port 1
Figure 5. Setting up a triggered event in AXIS P8221.
Rev: 1.1, Last updated: 19/08/2011
9
Download from Www.Somanuals.com. All Manuals Search And Download.
ꢀꢀꢀ TECHNICAL NOTE – Axis Communications
Notification messages
2.4 Switch video source
This example describes how to switch the AXIS P7701 Video Decoder video source when the sound
captured by a microphone connected to AXIS P8221 rises above a predefined audio alarm level.
To accomplish this, an event triggered by audio detection is set up in AXIS P8221. When the
event is triggered, AXIS P8221 sends a TCP notification to AXIS P7701 instructing AXIS
P7701 to change video source.
2.4.1 Preparations
Before following this example, you should
• Set up video sources in AXIS P7701
Refer to the online help or the AXIS P7701 User’s Manual.
• Connect a microphone to AXIS P8221 and configure the audio alarm level
Refer to the online help or the AXIS P8221 User’s Manual.
2.4.2 Set up an event server in AXIS P8221
1. Open the AXIS P8221 Setup pages in a web browser
2. Go to Setup > Events > Event Server
3. Click Add TCP
4. Enter a Name, for example AXIS P7701
5. In the Network address field, enter the host name or IP address of AXIS P7701.
6. In the Port field, enter the TCP port number. Default port number is 2048.
7. Click OK
Figure 6. Setting up an event server in AXIS P8221. Replace “IP” with the IP address of AXIS P7701.
2.4.3 Set up a triggered event in AXIS P8221
1. Open the AXIS P8221 Setup pages in a web browser
2. Go to Setup > Events > Event Types
3. Click Add triggered
4. Enter a Name, for example Audio detection
5. Select the Audio detection trigger from the Triggered by drop-down list.
6. Under When Triggered, select Send TCP notification.
7. Select the event server AXIS P7701
Rev: 1.1, Last updated: 19/08/2011
10
Download from Www.Somanuals.com. All Manuals Search And Download.
ꢀꢀꢀ TECHNICAL NOTE – Axis Communications
Notification messages
8. In the Message field, enter:
sourcename=DoorCam1
where DoorCam1is the name of the video source in AXIS P7701.
9. Click OK
Figure 7. Setting up a triggered event in AXIS P8221.
Rev: 1.1, Last updated: 19/08/2011
11
Download from Www.Somanuals.com. All Manuals Search And Download.
ꢀꢀꢀ TECHNICAL NOTE – Axis Communications
Notification messages
3 More information
The VAPIX® specification is available on www.axis.com/developer
Information about event servers and triggered events is available in the products’ User’s
Manual and in the products’ online help.
shipped with each product.
Axis Customer Support does not provide assistance with VAPIX-related issues.
Rev: 1.1, Last updated: 19/08/2011
12
Download from Www.Somanuals.com. All Manuals Search And Download.
|