Go to documentation repository
Format of events procedure for the Mail Message Service:
OnEvent("MMS","_id_","_event_")
Operator format to describe actions with the Mail Message Service:
DoReact("MMS","_id_","_command_" [,"_parameters_"]);
Format of events procedure for the Mail message:
OnEvent("MAIL_MESSAGE","_id_","_event_")
Operator format to describe actions with the Mail message:
DoReact("MAIL_MESSAGE","_id_","_command_" [,"_parameters_"]);
Operator format to describe actions with the Voice Message Service:
DoReact("VMS","_id_","_command_" [,"_parameters_"]);
Operator format to describe actions with the Voice Notification Service:
DoReact("VNS","_id_","_command_" [,"_parameters_"]);
Format of events procedure for the Short Message Service object:
OnEvent("SMS","_id_","_event_")
Operator format to describe actions with the Short Message Service:
DoReact("SMS","_id_","_command_" [,"_parameters_"]);
Format of events procedure for the Telegram bot:
OnEvent("TELEGRAM","_id_","_event_")
Operator format to describe actions with the Telegram bot:
DoReact("TELEGRAM","_id_","_command_" [,"_parameters_"]);
Example of using reactions of the Mail Message Service object.
Set port number of the mail message service to 25 on Macro 1.
OnEvent("MACRO","1","RUN") { DoReact("MMS", "1", "SETUP", "port<25>"); }
Example of using reactions of the Mail message object.
Send message with image from camera when it switches to an alarm state when motion detection triggers.
OnInit(){ i=0; //counter is used to avoid overwriting of images from one camera } OnEvent("CAM",N,"REC") //camera is in alarm state { filename = "c:\" + N + "_msg_"+str(i)+".jpg"; i=i+1; DoReact("MONITOR","1","EXPORT_FRAME","cam<"+ N + ">,file<" + filename+ ">"); DoReact("MAIL_MESSAGE", "1", "SETUP", "body<camera is triggered"+ N + ">, subject<alarm on camera>, from<john.smith@axxonsoft.com>, to<mary.foreman@axxonsoft.com>,attachments<" + filename + ">"); DoReact("MAIL_MESSAGE","1","SEND"); }
Example of using reactions of the Voice Message Service object:
It is required to send message on macro 1 if modem is connected to COM2 port, type of dialing is pulse, don't wait for tonal signal.
OnEvent("MACRO","1","RUN") { DoReact("VMS","1","SEND","modem<2>,pulse<1>,waitfordialtone<0>"); }
Examples of using events and reactions of the Voice Notification Service object:
Play the audio file when camera stops recording:
OnEvent("CAM",N,"REC_STOP") { DoReact("VNS","1","PLAY","file<C:\Program Files (x86)\Axxon PSIM\Wav\cam_alarm_"+N+".wav>"); }
Stop playing the audio file when camera starts recording:
OnEvent("CAM",N,"REC") { DoReact("VNS","1","STOP"); }
When a predetermined time zone starts, change the volume control value to a lower one, and then after the time zone ends, set the average volume control value:
OnEvent("TIME_ZONE","1","ACTIVATE") { DoReact("VNS","1","SETUP","level<2>"); } OnEvent("TIME_ZONE","1","DEACTIVATE") { DoReact("VNS","1","SETUP","level<8>"); }
Examples of using events and reactions of the Short Message service object:
It is required to send a short message to the “89179190909” number when the first camera is alarmed.
OnEvent("CAM","1","MD_START") { DoReact("SMS","1","SETUP","phone<+79179190909>,message<camera 1, alarm>"); }
Install a short message device and send a message to the “89179190909” number when the first sensor is alarmed.
OnEvent("GRAY","1","CONFIRM") //confirm alarm from sensor 1 { DoReact("SMS","1","SETUP","device<>",); //install a device for short message delivery DoReact("SMS","1","SETUP","phone<+79179190909>,message<sensor 1, alarm>"); //send message about an alarm on sensor 1 to telephone number }
Play the c:\Windows\Media\Tada.wav audio file when receiving an sms using the Mail Message Service 2.
OnEvent("SMS","2","RECEIVE") { DoReact("PLAYER","3","PLAY_WAV","file<c:\Windows\Media\Tada.wav>"); }
Examples of calling the command for sending a message to Telegram using a macro:
OnEvent("MACRO","3","RUN") //run macro 3 { //Sending using chat_id & bot_id from object settings: DoReact("TELEGRAM",1,"SEND","text<Hello world>"); //Explicit specifying of chat_id & bot_id in the command: DoReact("TELEGRAM",1,"SEND","text<Hello world>,chat_id<828752651>,bot_id<809045046:AAGtKxtDWu5teRGKW_Li8wFBQuJ-l4A9h38>"); //Sending a file with a chat ID and bot ID: DoReact("TELEGRAM",1,"SENDPHOTO","caption<Hello world>,chat_id<828752651>,bot_id<809045046:AAGtKxtDWu5teRGKW_Li8wFBQuJ-l4A9h38>,photo<G:\\1.jpg>"); //Sending geolocation with a chat ID and bot ID: DoReact("TELEGRAM",1,"SEND","text<Hello world>,chat_id<828752651>,bot_id<809045046:AAGtKxtDWu5teRGKW_Li8wFBQuJ-l4A9h38>",longtitude<37.3428359>,latitude<55.6841654>,address<Office>); }