Skip to main content

How can I set, clear and check Bosch encoder virtual alarms via CGI?

Question

How can I set, clear and check Bosch encoder virtual alarms via CGI?

Answer

Related Products

All Bosch encoders or IP cameras running firmware 4.0 and above


You can use virtual alarms within encoders as a trigger to have other events take place. Each device has four virtual alarm inputs. This is an example on how to integrate 3rd party devices/software to trigger an event to take place on the encoder.  This event could be used to change any variable via ATSL (Alarm Task Script Language) - example below

Virtual Alarms via CGI

num=1 refers to virtual input #1
num=2 refers to virtual input #2
num=3 refers to virtual input #3
num=4 refers to virtual input #4


Set Virtual input #1 Alarm:

http://<IPAddress>/rcp.xml?command=0x0a8b&type=F_FLAG&direction=WRITE&payload=01&num=1


Clear Virtual input #1 Alarm:

http://<IPAddress>/rcp.xml?command=0x0a8b&type=F_FLAG&direction=WRITE&payload=00&num=1


Check Virtual input #1 Alarm status:

http://<IPAddress>/rcp.xml?command=0x0a8b&type=F_FLAG&direction=READ&num=1

Return result :
0 refer to virtual alarm is set
1 refers to virtual alarm is clear


Virtual Alarms in ATSL

if (VirtualAlarm(1)) then Relay(1) := true;
if (!VirtualAlarm(1)) then Relay(1) := false;


⚠️ ATSL Documentation





JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.