This is the third tutorial from the series of tutorials describing integration of the DOMIQ system with Mobotix devices. In the previous tutorials we described the integration of the Mobotix T24 video door station and usage of the SIP protocol and Mobotix devices in or- der to perform the function of the video door station. This time we focus on integration of the Mobotix Q24 video camera inside the house.

From this tutorial you will learn how to:
- control the camera functions using DOMIQ user interfaces,
- define the areas of movement detection and react on the movement in these areas,
- integrate the camera with the Satel Integra alarm system,
- use the SIP protocol to inform about alarm events.
Before you start reading, please read also the previous tutorials from this series, as this tutorial contains references to procedures described before.
1. Camera control #
Using the programming (API) interface of the camera, you can control all functions of the camera directly from the DOMIQ user interface. So you can create a visualization screen or page in Remote, in which you put the buttons invoking the most frequently used functions of the camera.
.The commands are sent to the camera using the Get method of the HTTP protocol. In order to get access to the full description of the programming interface of the camera, en- ter the following text in the browser address box: http://<ip kamery>/help, and then in section Remote-Controlling the Camera (at the bottom of the site) choose The HTTP API.
The futher part of this chapter shows three examples of usage the programming interface in order to control the camera from the visualization. In the described examples we present usage of commands in the Command field of the Button. Please bear in mind that in the Command field there is no need to use ”C.” prefix. In any other case the described commands must be preeceded by the prefix.
The presented commands can also be used in other functionalities of the Base module, e.g. events, timers, logic etc.
1.1. Change the image format #
Mobotix Q24 camera emables displaying the image in different formats. You can change the format using display_mode parameter. The available values of the parameter are: simple, lenscorr_l11, surround, panorama, pano_focus, pano_dbl.
The general syntax of the command changing the image format is as follows: C.HTTP.get=http://<login>:<hasło>@<ip_kamery>/control/control?set§sec-tion=general&display_mode=<format_obrazu>.
HTTP.get=http://admin:test@192.168.10.100/control/control?set&sec-tion=general&display_mode=pano_dbl
Setting the double panorama mode
In order to create the full interface to switch the image format, add 6 Buttons to the visualization and then in Command field enter the above command and change the value of the display_mode parameter.
1.2. Change the image size #
The camera software allows you to change the image resolution in the following range: 160×120, 320×240, 352×288, 384×288, 640×480, 704×576, 768×576, 800×600, 1024×768, 1280×960, 2048×1536. Therefore the image can be easily adjusted to the current needs and the speed of your Internet connection (especially remote connections). You can also define a rule in events or timers that will automatically change the resolution of the image in your absence in order to provide a smoother image in case of the remote connections and increase the resolution, when you are in the local network.
The general syntax of the command is as follows: C.HTTP.get=http://<login>:<hasło>@<ip_kamery>/control/control?set§sec-tion=imagecontrol&size_mode=<rozmiar>.
HTTP.get=http://admin:test@192.168.10.100/control/control?set&sec-tion=imagecontrol&size=640x480
Setting the resolution of 640×480 pikseli.
1.3. Zoom in and out the image #
Using this function you can see the details of the displayed image. The camera provides 8x zoom. The zoom can be absolute (a given value of the zoom, e.g. 5x) or relative (to- wards the previous settings, e.g. by 1). The change of zoom is expressed in per milles, so the value of 1000 corresponds to the zoom by 1.
The general syntax of the command (absolute change) is as follows: C.HTTP.get=http://<login>:<hasło>@<ip_kamery>/control/click.cgi?zoom=<powiększenie>.
HTTP.get=http://admin:test@192.168.10.100/control/click.cgi?zoom=4000
The image zoomed 4 times.
The image can be zoomed in using the following command: HTTP.get=http://<login>:<hasło>@<ip_kamery>/control/click.cgi?zoomrel=<zmiana_powiększenia>.
HTTP.get=http://admin:test@192.168.10.100/control/click.cgi?zoomrel=1000
The image zoomed in by 1.
Each time the command is performed, the size is zoomed 1x. In order to zoom out the image, enter the negative number as a relative zoom value.
HTTP.get=http://admin:test@192.168.10.100/control/click.cgi?zoomrel=-1000
The image zoomed out by 1x.
Please remember to change login, password and the IP of the camera in the presented examples.
2. Integration of the camera with the Base module #
The integration of the camera with the Base module is the starting point to integration with other systems of the intelligent building. The camera software works with the external software, so it is possible to fully integrate the camera with the DOMIQ system, and thus the entire installation of the intelligent building. The integration is bi-directional and proceeds according to the following procedure:
2.1. Sending the information to the Base module #
If you create a simple rule, the Base module will receive information about any event which is invoked in the camera. Therefore the Base can react on e.g. pressing buttons on the video door station, the detection of motion, sound detection, etc.
- Log in the configuration interface of the camera.
- Choose Admin setup (a new window is opened).
- In section Transfer Profiles choose IP Notify Profiles
- Click Add new profile at the bottom of the screen. In the IP Notify Profile field, enter a profile name, e.g., Base. From the IP Notify Type list, select Custom Configuration. In the Destination Address field, enter:
IP:4224e.g.,192.168.10.20:4224≥ Select Raw TCP/IP in the Data Protocol field and Plain text in the Data Type field. The last window defines the messages that will be forwarded to the Base module when an event defined in the camera is triggered. We will limit ourselves to transmitting the name of the action that triggered the event. To do this, enter:MOBOTIX.event.q24=$(EVT.EST.ACTIVATED). This notation means that the name of the action that triggered the event will be received by the Base module as theC.MOBOTIX.event.q24=<zdarzenie>command. In the case of pressing the bell button, it will be:C.MOBOTIX.event.q24=CameraBellButton.
An example configuration is shown below:
- Click Add new profile at the bottom of the screen. In the IP Notify Profile field, enter a profile name, e.g., Base. From the IP Notify Type list, select Custom Configuration. In the Destination Address field, enter:
- Click on the Set button to confirm changes. Next click on the Close button to save them.
2.2. Receiving the information from the Base module #
Camera events can be triggered by any message received via TCP/IP. In this example, a TCP/IP message will be used to trigger video recording. The action is defined as follows:
- Choose option Setup Menu, and then Event Settings.
- Mark the check box in the section IP Receive (RC) Events and fill in the following parameters:
- Leave the IP Receive Port field at its default value of 8000. From the IP Receive Compare list, select String Compare. In the IP Receive Message field, enter any message that will trigger the event. Do not use Polish characters or spaces. In our case, we used the word recording.
- Click on the Set button to confirm changes.
- Return to the main Setup Menu and select Recording. In the new window, complete the following parameters:
- Select Enable from the Arming section.
- From the Recording section, select Event Recording. Select Include audio if you want to record audio.
- In the Start Recording section, choose the action that should trigger the recording. You can select several options by holding down the Ctrl key (PC) or cmd key (Mac). In our case, we selected RC: IP Receive.
- The remaining three options define parameters and duration of recording.
The example configuration is presented in the picture below:
- The configuration is ready. From now on if the camera gets the TCP/IP message with the contents recording the recording of the image will be started.
- Click on the Set button to confirm changes. Next click on the Close button to save them.
In the next part of the tutorial we describe how to send TCP/IP commands from the Base module.
Having configured the camera, enter the Satel alarm system.
3. Integration with the Satel alarm system #
The integration of the alarm system and monitoring provides an even better and more complete supervision of the building/apartment in your absence. By defining the motion detection zone you can get an immediate information about the zone violation in the form of a notification or a SIP connection to your mobile phone or tablet. The live preview will allow you to assess the risks and take a quick decision. Thanks to the automatically invoked recording, nothing will escape your attention.
3.1. Automatic recording #
Thanks to the automatic invoking of the recording you can be sure, that you will not miss any alarm event. The recording can be invoked after the motion detection area is violated or the alarm sensor is activated (PIR sensor, reed relay, sensor of breaking the window, smoke sensor, flooding sensor etc.).
3.1.1. Recording invoked by the motion detection #
Definition of the areas of the motion detection
Motion detection areas should be defined after setting the camera in the target place. The area definition is as follows:
- Press the Shift button and double-click on the image preview. As a result, a little yellow square will appear.
- Release the Shift key and click on the screen to mark the opposite corner of the area. The area will be visible as a rectangle with a yellow edge.
- SelectSetup Menu > Event Settings.
- In section Video Motion Windows choose Hide but highlight on event from the drop-down menu (the area will be marked red if the frame is crossed).
- The camera has two profiles defined by default: VM and VM2. In the VM profile click on Add Rectangle in order to add the defined area. In the field Video Motion Definitions (VM) appear the parameters of the defined rectangle. You can define several areas within one profile. In order to do this, repeat points 1 and 2, and then click on Add Rectangle. As a result, another area will be added in the field Video Motion De- finitions (VM).
An example configuration is presented in the picture below:
- The next step is to define a reaction of the camera on motion detection. It can, for example start recording, play sound, send TCP/IP message, etc. In our case, the camera will send TCP/IP notification to the Base.
- Move to the top level of the Setup Menu, next select the Action Group Overview and add a new group (the Add new group button).
- In new window set its parameters:
- Enter the name of a group, e.g. Motion.
- From the drop-down list select the Enable option.
- In the Event Selection section, select VM – Video Motion.
- In the Actions section, add a new action (Add new action button), and then select IP Notify<profile name> from the list, in our case IP Notify: Base.
- Click on the Set button to confirm changes. Next click on the Close button to save them.
Reaction of the Base module
The recording can be started as a direct response to the detection of motion. However, in this case the recording should be invoked only when there is no one in the building/apartment. In order to do this, create an event that will check the status of the alarm system and decide to start recording.
- Go to the Events tab in the Base configurator.
- Add a new event and fill in its parameters
- Enter the description (optional)
- In the Channel field enter:
C.MOBOTIX.event.q24(as described in chapter 2.1 Sending the information to the Base.) - In the Data field enter the name of the motion detection profile. In this case
VM. - In the Condition field enter:
E.IDS.armed.<strefa>==1, where<strefa>stands for the zone number, which determies if there is anyone in the building.
- Click Add Command.... In the window that appears, enter
C.TCP.send.<IP kamery>:8000in the Name:field, and in the Value field, enter the message to be sent to the camera. In our case, this is the word recording (it will trigger the previously defined rule to start recording). The command will only be executed if the expression in the Condition field is met.
The Base module can optionally send the notification to all the registered Remote applications or make a SIP call to a person/persons. These functions were described in chapter 4.
3.1.2. Recording invoked by the alarm sensors #
This way of invoking the recording is fuller, because it allows to take into account the work of any kind of sensor connected to the alarm system. It is also more reliable, because the mistakes in the motion detection can be avoided. The procedure is limited to a single event, which is defined as follows:
- Add a new event and fill in its parameters
- Enter the description (optional)
- In the Channel field enter:
E.IDS.input.(%d+)– any input of the alarm system. - In the Data field enter 1.
- In the Condition field enter:
E.IDS.armed.<strefa>==1, where<strefa>stands for the zone number, which determies if there is anyone in the building.
- Click Add Command.... In the window that appears, enter
C.TCP.send.<IP kamery>:8000in the Name:field, and in the Value field, enter the message to be sent to the camera. In our case, this is the word recording (it will trigger the previously defined rule to start recording). The command will only be executed if the expression in the Condition field is met.
The Base module can optionally send the notification to all the registered Remote applications or make a SIP call to a person/persons. These functions were described in chapter 4.
4. Optional reactions #
Automation system reaction to the violation of the standby or the motion detection zones does not have to be limited to record the image. In this chapter we will show you how to send alarm notifications and make a SIP alarm connection with mobile devices.
4.1. Alarm notifications #
The Base module enables sending notification with any message to all currently paired DOMIQ/Remote applications. In order to define such action, add an additional command to the event which invokes the recording.
In the Name field enter C.REMOTE.notify and in Value enter any contents of the message.
Having defined this action the users will be notified about invoking of the alarm recording.
4.2. Alarm SIP connection #
In reaction to the motion detection zone violation or alarm sensors the Base module can initiate a SIP connection to notify users about the incident.
The configuration of the server, client accounts and SIP client applications is described in detail in tutorial TU-0012 entitled “DOMIQ, SIP and Mobotix cameras” therefore we will not present it here in its entirety, but only limit ourselves to presenting those fragments of the configuration where changes need to be made.
In the case of alarm SIP connections, we recommend to define a separate profile of SIP connections in order to separate the alarm connections from the normal ones. When defining an alarm profile, you should also (this is not necessary) choose sound message (Message name), which will be played at the beginning of each alarm call and thanks to which the user will be able to recognize if this is an alarm connection. You can use ready sounds available in the camera (e.g. sound called Alarm) or upload your own audio file. In the tutorial “MOBOTIX T24 Video Door Station” we described how to upload audio files.
In relation to the procedure described in the previous tutorial, the way of starting the connection with mobile devices will be changed. Instead of IP notifications we will use the programming interface of the camera.
In addition to the command which initiates the connection with devices that are assigned to connections profile, we will also present a command establishing the connection with the selected SIP client.
Both commands have the C. prefix, as in this case they will be used in the definition of a event, if it is required.
In order to establish connection with all devices within a profile, use the command with the following syntax: C.HTTP.get=http://<login>:<hasło>@<ip_kamery>/control/rcontrol?action=voip-phone&profile=<nazwa_profilu>.
C.HTTP.get=http://admin:test@192.168.10.31/control/rcontrol?action=voip-phone&profile=alarm
Connection with SIP clients with the assigned profile: alarm.
The general syntx of the commamd connecting with any SIP client is as follows.C.HTTP.get=http://<login>:<hasło>@<ip_kamery>/control/rcontrol?action=voip-call&sipaddr=<adres_SIP_klienta>.
C.HTTP.get=http://admin:test@192.168.10.31/control/rcontrol?action=voip-call&sipaddr=user1@192.168.10.31:5061Connection with the SIP ckient with the following SIP address: user1@192.168.10.31:5061.
Please remember to change login, password and the IP of the camera in the presented examples.
Automation of the SIP connection initialization consists in adding one of the described commands to the list of actions that will be done after violation of the motion detection area or alarm sensors.