Difference between revisions of "HTTP string: Send from AlphaCom"
From Zenitel Wiki
(→Create Event) |
(→Event configuration) |
||
Line 49: | Line 49: | ||
<br style="clear:both;" /> | <br style="clear:both;" /> | ||
− | + | {{Code2| | |
− | EDO 1 "GET /axis-cgi/com/ptz.cgi?rpan=-10 HTTP/1.1\r\n" | + | EDO 1 "GET /axis-cgi/com/ptz.cgi?rpan<nowiki>=</nowiki>-10 HTTP/1.1\r\n" |
EDO 1 "Accept: */*\r\n\r\n" | EDO 1 "Accept: */*\r\n\r\n" | ||
+ | }} | ||
Station 179 presses DAK 2 (= Sub Event 2): | Station 179 presses DAK 2 (= Sub Event 2): | ||
Line 57: | Line 58: | ||
<br style="clear:both;" /> | <br style="clear:both;" /> | ||
− | + | {{Code2| | |
− | EDO 1 "GET /axis-cgi/com/ptz.cgi?rpan=10 HTTP/1.1\r\n" | + | EDO 1 "GET /axis-cgi/com/ptz.cgi?rpan<nowiki>=</nowiki>10 HTTP/1.1\r\n" |
EDO 1 "Accept: */*\r\n\r\n" | EDO 1 "Accept: */*\r\n\r\n" | ||
− | + | }} | |
[[Category:AlphaCom Applications]] | [[Category:AlphaCom Applications]] | ||
[[Category: ICX-AlphaCom Applications]] | [[Category: ICX-AlphaCom Applications]] | ||
[[Category:Video]] | [[Category:Video]] |
Revision as of 14:29, 31 May 2022
HTTP GET can be sent to third-party systems using EDO ports and Event Handler.
Contents
Configuration
Set up EDO port
In AlphaPro select Exchange & System > Serial Ports, and select the EDIO port to configure.
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:
Action commands:
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
Example scenario: Every time DAK 1 is pushed on intercom station 179 you want to pan an Axis camera with IP address 10.5.102.44 10 degrees to the left. Pushing DAK 2 should pan the camera 10 degrees to the right.
Each EDO port can control one camera. There are 10 EDO ports, so in total one can control up to 10 cameras using the method described in this article.
HTTP commands used by Axis
- 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
EDIO port configuration
Event configuration
Station 179 presses DAK 1 (= Sub Event 1):
Action commands:
EDO 1 "GET /axis-cgi/com/ptz.cgi?rpan=-10 HTTP/1.1\r\n" EDO 1 "Accept: */*\r\n\r\n"
Station 179 presses DAK 2 (= Sub Event 2):
Action commands:
EDO 1 "GET /axis-cgi/com/ptz.cgi?rpan=10 HTTP/1.1\r\n" EDO 1 "Accept: */*\r\n\r\n"