Difference between revisions of "HTTP string: Send from AlphaCom"
From Zenitel Wiki
(→Example: Control PTZ on an Axis camera) |
(→Example: Control PTZ on an Axis camera) |
||
Line 37: | Line 37: | ||
*EDIO port configuration: | *EDIO port configuration: | ||
− | [[File:EDO Axis.PNG]] | + | [[File:EDO Axis.PNG|thumb|left|500px|Configuration of EDIO port #1]] |
+ | <br style="clear:both;" /> | ||
*Event configuration: | *Event configuration: | ||
Station 179 presses DAK 1 (= Sub Event 1): | Station 179 presses DAK 1 (= Sub Event 1): | ||
− | [[File:EDO Axis Pan10left.PNG]] | + | [[File:EDO Axis Pan10left.PNG|thumb|left|500px|DAK 1 press will send http command to camera 10.5.102.44 to pan 10 degrees to the left]] |
+ | <br style="clear:both;" /> | ||
Action strings: | Action strings: | ||
Line 48: | Line 50: | ||
Station 179 presses DAK 2 (= Sub Event 2): | Station 179 presses DAK 2 (= Sub Event 2): | ||
− | [[File:EDO Axis Pan10right.PNG]] | + | [[File:EDO Axis Pan10right.PNG|thumb|left|500px|DAK 2 press will send http command to camera 10.5.102.44 to pan 10 degrees to the right]] |
+ | <br style="clear:both;" /> | ||
Action strings: | Action strings: | ||
EDO 1 "GET /axis-cgi/com/ptz.cgi?rpan=10 HTTP/1.1\r\nHost: 10.5.102.40\r\nConnection: Keep-Alive\r\n" | EDO 1 "GET /axis-cgi/com/ptz.cgi?rpan=10 HTTP/1.1\r\nHost: 10.5.102.40\r\nConnection: Keep-Alive\r\n" | ||
EDO 1 "Accept: */*\r\n\r\n" | EDO 1 "Accept: */*\r\n\r\n" |
Revision as of 11:22, 13 September 2017
Contents
HTTP GET via EDO Port
You can send HTTP GET to third-party systems using EDO ports and Event Handler.
Set up EDO port
In AlphaPro select Exchange & System > Serial Ports > Configure EDIO port
Port-Type: TCP/IP Client
IP-Address: destination IP
Port: destination port, usually 80 when HTTP.
Keep-Alive: off
Create Event
Use EDO command to send HTTP GET on the configured port.
Example using DAK 1 to send HTTP GET:
EDO 1 "GET /triggerevent?variable1=test1&variable2=test2 HTTP/1.1\r\nHost: 10.5.101.110\r\nConnection: Keep-Alive\r\n" EDO 1 "Accept: */*\r\n\r\n"
A string generated by the EDO command can contain maximum 128 characters. If the http string exceeds this length, one can simply use multiple EDO commands.
Example: Control PTZ on an Axis camera
Every time DAK 1 is pushed on intercom station 179 you want to pan an Axis camera 10 degrees to the left. Pushing DAK 2 should pan the camera 10 degrees to the right.
The http commands used by Axis are:
- Relative pan : 10 degrees right
http://myserver/axis-cgi/com/ptz.cgi?rpan=10
- Relative pan : 10 degrees left
http://myserver/axis-cgi/com/ptz.cgi?rpan=-10
The camera IP address is 10.5.102.44.
- EDIO port configuration:
- Event configuration:
Station 179 presses DAK 1 (= Sub Event 1):
Action strings:
EDO 1 "GET /axis-cgi/com/ptz.cgi?rpan=-10 HTTP/1.1\r\nHost: 10.5.102.40\r\nConnection: Keep-Alive\r\n" EDO 1 "Accept: */*\r\n\r\n"
Station 179 presses DAK 2 (= Sub Event 2):
Action strings:
EDO 1 "GET /axis-cgi/com/ptz.cgi?rpan=10 HTTP/1.1\r\nHost: 10.5.102.40\r\nConnection: Keep-Alive\r\n" EDO 1 "Accept: */*\r\n\r\n"