Tasker Android App - Schedule Alarm

Add a task to timed adjust motion detection

In the PREVIOUS STEP we have defined 2 tasks that will cause the camera to pan between a daytime and a nighttime position. Now we want to adjust the motion detection in the camera for these two positions, as at night often a much lower sensitivity is already sufficient. This is followed by the creation of a TIME-CONTROLLED PROFILE that allows us to perform these tasks automatically at sunrise or sunset. By the same principle, you can address almost all camera functions - both for our HD cameras, as well as the VGA models. The required CGI commands can be found in our CGI documentation:

Add a task to activate the motion detection area 1

Now we need a task that allows us to activate the motion detection area 1 with a sensitivity of 75% (for the day position) and at the same time deactivate all other areas.

Tasker - Add a Task

  1. Make sure Tasker is enabled and click + to add a new task.

Tasker - Add a Task

  1. Name the task and confirm the entry.

Tasker - Add a Task

  1. Press the Plus button to open the Action Category dialogue.

Tasker - Add a Task

  1. Select Net.

Tasker - Add a Task

  1. And then the HTTP GET action.

Tasker - Add a Task

  1. Now configure the HTTP GET command to send the CGI command to the IP address of your camera (see below).

Tasker - Add a Task

  1. Then press the play button to test the action.

Now (see 6 above) we need to create the HTTP command, which will be sent to the camera when the task is activated. Enter the IP address of your camera as Server Address - do not forget to attach the camera to Webport if it is not 80. If your camera has e.g. 192.168.178.200 and the camera is locally accessible via the port 8081 (the HTTP port can be viewed in the web interface under Network / IP configuration), you must enter 192.168.178.200:8081 as the server address. This is followed by the corresponding CGI command in the Path input field.

The CGI command that activates Area 1 of your camera with 75% sensitivity is:

/param.cgi?cmd=setmdattr&-name=1&-enable=1&-s=75&-x=0&-y=0&-w=1280&-h=720&cmd=setmdattr&-name=2&-enable=0&-s=30&-x=0&-y=0&-w=1280&-h=720&cmd=setmdattr&-name=3&-enable=0&-s=0&-x=0&-y=0&-w=1280&-h=720&cmd=setmdattr&-name=4&-enable=0&-s=0&-x=0&-y=0&-w=1280&-h=720

Please change in the command the username (usr) admin and password (pwd) instar according to your camera login. Please note that the command above will span area 1 over the entire image. But you can simply edit the size of the area directly in the command. The variables x and y correspond to the start point of the range (in the example above, both variables are equal to 0 - that means that the range starts in the lower right corner). The size of the area is determined by its width and height. In the example above, the width w = 1280 pixels and the height h = 720 pixels. This means that the area is covered over the entire image.

Add a task to activate the motion detection area 2

Now we need a task that allows us to activate the motion detection area 2 with a sensitivity of 30% (for the night position) and at the same time deactivate all other areas.

Tasker - Add a Task

  1. Press + to add a new task.

Tasker - Add a Task

  1. Name the task and confirm the entry.

Tasker - Add a Task

  1. Press the Plus button to open the Action Category dialogue.

Tasker - Add a Task

  1. Select Net.

Tasker - Add a Task

  1. And then the HTTP GET action.

Tasker - Add a Task

  1. Now configure the HTTP GET command to send the CGI command to the IP address of your camera (see below).

Tasker - Add a Task

  1. Then press the play button to test the action.

Tasker - Add a Task

  1. Add an icon for the task and go back to the overview.

Now (see 13 above) we need to create the HTTP command, which will be sent to the camera when the task is activated. Enter the IP address of your camera as Server Address - do not forget to attach the camera to Webport if it is not 80. If your camera has e.g. 192.168.178.200 and the camera is locally accessible via the port 8081 (the HTTP port can be viewed in the web interface under Network / IP Configuration), you must enter 192.168.178.200:8081 as the server address. This is followed by the corresponding CGI command in the Path input field.

The CGI command that activates Area 2 of your camera with 30% sensitivity is:

/param.cgi?cmd=setmdattr&-name=1&-enable=0&-s=75&-x=0&-y=0&-w=1280&-h=720&cmd=setmdattr&-name=2&-enable=1&-s=30&-x=0&-y=0&-w=1280&-h=720&cmd=setmdattr&-name=3&-enable=0&-s=0&-x=0&-y=0&-w=1280&-h=720&cmd=setmdattr&-name=4&-enable=0&-s=0&-x=0&-y=0&-w=1280&-h=720

Please change in the command the username (usr) admin and password (pwd) instar according to your camera login. Please note that the command above will span area 2 over the entire image. But you can simply edit the size of the area directly in the command. The variables x and y correspond to the start point of the range (in the example above, both variables are equal to 0 - that means that the range starts in the lower right corner). The size of the area is determined by its width and height. In the example above, the width w = 1280 pixels and the height h 0 is 720 pixels. This means that the area is covered over the entire image.

In the following we will bring together the Day & Night Position tasks and the corresponding motion detection defined above via a Time Controlled Profile.