How to set modify a parameter on an Event via the API for remote configuration


This post describes how to modify an event parameter via the remote configuration API. There are several situations which might require such changes:

  • Setting an event from active to inactive
  • Modifying the threshold of detection of the microphone

Remote configuration API

This API allows the remote configuration of the camera via IP notifications in the form of GET requests which come be executed by the camera ( Admin Menu > IP Notify Profiles ) or by external software. With this API it possible to modify parameters in the Admin Menu or in the Setup Menu.

Admin Menu

To list the sections which can me modified in the Admin Menu.

INF: These sections are available for remote configuration:
INF:   logo
INF:   ipprofiles
INF:   msgsysprofiles
INF:   mailprofiles
INF:   smsprofiles
INF:   ftpprofiles
INF:   phoneprofiles
INF:   soundprofiles
INF:   signaloutprofiles
INF:   visalarm
INF:   iowiring
INF:   fileserver
INF:   quickinstaller
INF: Use the following command to view parameters of a certain section.
INF: command: "list&section=<section name>"

To view parameters of a certain section

Setup menu

To list the sections which can me modified in the Setup Menu.

INF: These sections are available for remote configuration:
INF:   imagecontrol
INF:   eventcontrol
INF:   exposurecontrol
INF:   general
INF:   exposure
INF:   color
INF:   jpeg
INF:   text
INF:   vptzcontrol
INF:   thermal
INF:   videomotionanalysis
INF:   settings
INF:   recording
INF:   event_env
INF:   event_ima
INF:   event_int
INF:   event_msg
INF:   event_met
INF:   event_sig
INF:   event_tim
INF:   actions
INF:   actionhandler
INF:   mxpegparam
INF:   quickcontrol
INF:   quickcontrolreset
INF:   imageprogram
INF:   audio
INF: Use the following command to view parameters of a certain section.
INF: command: "list&section=<section name>"

Modifying profiles

To edit parameters which do not belong to profiles the following commands are used:

  • Read a parameter
  • Set a parameter

To edit profiles the following calls must be used:

  • Set a profile
    http://<cameras_ip>/control?section=&set_profile=<profile type>:<profile name>
  • Read a profile
    http://<cameras_ip>/control?section=&read_profile=<profile type>:<profile name>
  • Add a profile
    http://<cameras_ip>/control?section=&add_profile=<profile type>:<profile name>
  • Delete a profile
    http://<cameras_ip>/control?section=&delete_profile=<profile type>:<profile name>

So if we want to modify the profile characteristics we will use the set_profile call. Amongst them the most requested are setting a profile as inactive or changing a profile name. These two require knowing that their parameters are:

_profilename: this is the name given to the profile
_profilestate: blank means active and i represents inactive.

Example 1. Modify the Image Analysis Event profile AS for MxActivitySensor from Active to Inactive.

This is the output of the Setup Menu > Event Overview.

Use the following request to visualise the Image Analysis Events section:

the following is the output for this command:

to list only the profiles


which shows the following output:

ima=VM:_profilename=VM:_profilestate=i:ima_sens=vm:vm_list=1 # (profile string constant)
ima=VM2:_profilename=VM2:_profilestate=i:ima_sens=vm:vm_list=2,3 # (profile string constant)
ima=AS:_profilename=AS:ima_sens=as:activity_level=33:activity_area=0,0,0,1280,960:activity_directions=Left;Right;Up;Down # (profile string constant)

to read the different parameters of the Image Analysis Profile AS:

which will display the output

_profilename=AS # (profile name)
ima_dead=5 # 0 … 3600
ima_sens=as # as, vm
activity_level=33 # 0 … 99
activity_area=0,0,0,1280,960 # (encoded string constant)
activity_directions=Left;Right;Up;Down # Left, Right, Up, Down
vm_list= # (string constant)

to set the Image Analysis Profile AS from active to inactive:

this will change the profile from active to inactive:



Example 2. Modify the Trigger Level for Microphone in the Environment Events

In this example we show how to modify the trigger level for the microphone in the environment events but this would apply to any threshold or level in any of the events.

To show the contents of the section:

List of parameters referring to the Microphone

#-P env:mi_lvl “Trigger Level”:
#-E env:mi_lvl “Trigger level on a percent scale (0…100).”
#-W env:mi_wid 50, 100, 150, 200, 250, 300, 400, 500, 750, 1000, 2000
#-P env:mi_wid “Microphone Signal Width”: “50 ms”, “100 ms”, “150 ms”, “200 ms”, “250 ms”, “300 ms”, “400 ms”, “500 ms”, “750 ms”, “1000 ms”, “2000 ms”
#-E env:mi_wid “Minimum duration of noises louder than the trigger level.”

The two events in the list:

env=PI:_profilename=PI:_profilestate=i:env_sens=ir # (profile string constant)
env=MI:_profilename=MI:env_dead=5:env_sens=mi:il_src=auto:il_lvl=100.0:ir_lvl=50:mi_lvl=50:mi_wid=50:tp_src=intern:tp_lvl=50.0:tp_unit=celcius:pos_anchor=:pos_dist=1:pos_unit=m:vel_max=1:vel_unit=m/s:uhu_act=first:uhu_unit=celcius:uhu_lvl=30:uhu_lvl_cmp=higher:ara_area=0,0,0,1280,960:ara_measurement_mode=absolute:ara_mode=pixel:ara_millipercent=1.000:ara_act=first:ara_unit=celcius:ara_lvl=30:ara_reference_area=0,0,0,1280,960:ara_lvl_cmp=higher:ara_show_area=off:ara_show_meter=1:ara_show_temperature=off:ara_show_name=off:env_cmp=higher:env_act=first # (profile string constant)

Note 1. Notice how the profile includes the parameters for all the events of the type Environment , this includes : Shock Detection, Illumination, PIR, Microphone, Temperature and Thermal Events.

The parameter “Trigger Level” is env:mi_lvl and the list of values is from 0 to 100.

To show the current parameters of the profile:


with the output

_profilename=MI # (profile name)
env_dead=5 # 0 … 3600
env_sens=mi # gy, il, mi, tp
mi_lvl=50 # 0 … 100
mi_wid=50 # 50, 100, 150, 200, 250, 300, 400, 500, 750, 1000, 2000

reflecting the value in the camera web interface:

To change the Microphone Level value from 50 to 100:


1 Like