This tutorial begins the series of tutorials, in which we present integration of DOMIQ sys- tem with Mobotix cameras. This one focuses on Mobotix T24: Hemispheric IP Video Door Station.
By reading this tutorial, you will learn how to:
- integrate Mobotix T24 Video Door Station with DOMIQ system;
- detect and react to motion detected by the camera;
- integrate Mobotix T24 with the other subsystems of an intelligent building, such as Satel alarm system or LCN;
- implement the answering machine functionality.
1. Mobotix T24
Mobotix T24 Video Door Station, source: www.mobotix.com
- Camera parameters:
- Extra wide view – hemispheric (180° vertically and horizontally),
- High quality picture (max. resolution 2048x1536px),
- Video door station functionality,
- Integration with 3rd-party software,
- Motion and noise detection,
- Movies and pictures recording on the memory card (max. 32GB) or network hard drive (max. 1TB),
- Two programmable buttons,
- SIP protocol implementation,
- Time schedules,
- Events.
- No mechanical parts in the construction of the camera.
- High resistance to atmospheric conditions.
- Expandable with additional I/O modules, such as the numeric keypad, fingerprint read- er, magnetic card reader, etc.
2. Camera Setup
Camera has a built-in configuration interface. Configurator can be opened in any web browser. In order to run the configurator, enter camera’s IP in the web browser. Configu- ration presented in this chapter applies also to Mobotix Q24 cameras, which will be de- scribed in another tutorial.
2.1. Sending event from camera to DOMIQ/Base
Camera software cooperates with external software, thus providing full integration with the DOMIQ system and thereby with the entire intelligent installation. By creating a simple rule presented below, Base will receive a notification each time an event in the camera is triggered. Based on this, it can respond, for example to pressing bell button, motion or noise detection, etc. The rule presented in this section will be used later in the tutorial. In- tegration is very simple and created according to the following procedure:
- Log in into the camera’s configurator.
- Select the Admin Setup (a new window will open).
- From the Transfer Profiles section, select the IP Notify Profiles:
- Click on the Add new profile.
- In the IP Notify Profile field, enter a name of a profile, e.g. Base.
- From the IP Notify Type drop-down list, select Custom Configuration.
- In the Destination Address field type:
<Base’s IP>:4224
, e.g.192.168.10.20:4224
- From the drop-down lists select: the Raw TCP/IP in the Data Protocol and the Plain text in the Data Type.
- The last field is used to define messages that will be passed to Base, when an event is triggered. We will show, how to pass the name of an action that triggered an event. The syntax is as follows:
<identifier_name>=$(EVT.EST.ACTIVATED)
. In our case:MOBO- TIX.event.t24=$(EVT.EST.ACTIVATED)
. This notation means, that the name of an action, that triggered an event will be received by the Base as the command:C.MOBOTIX.event.t24=<event name>
. For example, in case of pressing the bell button, the command will be:C.MOBO- TIX.event.t24=CameraBellButton.
An example of a configuration is presented in the picture below:
4. Click on the Set button to confirm changes, next click on the Close button to save them.
2.2. Triggering camera events
As a next step we will define actions that will trigger events in camera. Events can be trig- gered in many ways. Later in this section we will present definitions of three actions: pres- sing a button on the video door panel, motion detection and receiving TCP/IP message.
2.2.1. Receiving TCP/IP message
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:
- Select the Setup Menu and then the Event Overview.
- In the Message Events section, click on the Edit.
- In a new window, click on the Add new profile and fill profile properties:
- Enter a name (left-top corner of the screen). In our case Base message.
- Make sure that the String compare option is selected.
- In the Message field enter the contents of a message that will trigger an event, for example recording.
- Click on the Set button to confirm changes.
- MovetothetopleveloftheSetupMenuandselectRecording.Inthenewwindowfillthe following parameters:
- Select Enable from the Arming section.
- From the Recording section, select Event Recording. Select Include audio if you want to record audio.
- From the Start Recording section select the action that will trigger recording. You can choose multiple items holding down Ctrl (PC) or cmd (Mac) button. In this case chose: Message: Base message.
- The remaining three options define parameters and duration of recording.
The example configuration is presented in the picture below:
- Configurationcompleted.Fromnowon,ifcamerareceivesaTCP/IPpacketcontaining recording message, it will start recording.
- Click on the Set button to confirm changes, next click on the Close button to save them.
Later in the tutorial, we will present how to send such TCP/IP packets using Base module.
2.2.2. Video door station buttons
Pressing buttons on a video door panel can trigger any event in a camera. In the presen- ted example, it will send a TCP/IP message to the Base module. To achieve this, we will use the IP profile created in Chapter 2.1. The following procedure applies to pressing the bell button.
- In the camera configurator click on the Setup Menu and next on the Action Group Overview.
- In the window that appears, add a new group (the Add new group button) and set its properties:
- Enter the name of a group, for example Bell.
- From the drop-down list select the Enable option.
- From the Event Selection, select the CameraBellButton.
- In the Actions section, add a new action (the Add new action button), next choose IP Notify:<the name of previously created profile>. In our case: IP Notify: Base.
- Configurationcompleted.Fromnowon,eachtimethebellbuttonispressed,theBase module will receive a command
C.<name>=CameraBellButton
, in our case:C.MOBOTIX.event.t24=CameraBellButton
. When receiving this command, Base mo- - dule can execute any action, that will be presented later in this tutorial.
- Similarly,repeatstepsfrom1to3inordertodefineaneventforpressingthelightbut- ton on the video door panel.
- Click on the Set button to confirm changes, next click on the Close button to save them.
2.2.3. Motion detection
Events can also be triggered by motion detected by a camera in selected areas. Areas should be defined after a camera is mounted in the final position. To define an area follow these steps:
- Log in into the camera’s configurator.
- Press the Shift button and double-click on the image preview. As a result, a little yel- low 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.
- Click on the Setup Menu. In the Image Analysis Events, click on Edit.
- Select the Hide Unused Windows in the Video Motion Windows (it will hide unused areas). Select the Hide but highlight on event from the drop-down list (the area will be highlighted in red when camera detects motion inside it).
- By default camera has two profiles: VM and VM2. In the VM profile, click on the Add Rectangle to the area created in steps 2 and 3. The Window List shows the identifier of the defined area. If the event is to be triggered by motion detection in several inde- pendent areas, enter their identifiers in the Window List field separated by commas, or as numerical ranges. Make sure the Inactive checkbox is not selected.
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 ca- mera will send TCP/IP notification to the Base.
- MovetothetopleveloftheSetupMenu,nextselecttheActionGroupOverviewand add a new group (the Add new group button) and set its parameters:
- Enter the name of a group, e.g. Motion.
- From the drop-down list select the Enable option.
- From the Event Selection, select the Image Analysis: VM.
- In the Actions section, add a new action (the Add new action button), next choose IP Notify:<the name of previously created profile>. In our case: IP Notify: Base.
8. Click on the Set button to confirm changes, next click on the Close button to save them.
Settings presented in this chapter do not cover whole functionality of the camera. We de- scribed only those features that are useful for integration with DOMIQ/Base module.
3. DOMIQ/Base Configuration
Configuration of a Base module for the purpose of integration with Mobotix T24 is limited
to definition of responses to events generated by the camera.
3.1. „No one at home” scenario
We will present three reactions to the „No one at home” scenario. Two of them are very simple: the first starts recording when the bell button is pressed. The second starts recor- ding when the camera detects movement in the selected area. The third and the most complex fulfills the functionality of an answering machine.
In all cases we will use events triggered by a TCP/IP message (see 2.2.1.Receiving TCP/ IP message) and previously created event profiles.
We will use the Satel alarm system to determine the presence of people. If there is no Sa- tel alarm panel in your installation, then you can use a MEM variable instead. The variable should be set by calling the scene for leaving/entering a building. In this example, we as- sumed that a Satel alarm panel is installed.
Reaction to pressing the bell button/motion detection
- Select the Events tab in the Base configurator.
- Add an event and set its properties:
- Enter a description (optionally)
- In the Channel field type:
C.MOBOTIX.event.t24 .
- In the Data field enter:
CameraBellButton
, if recording is to be triggered by pressing the bell button. However, if recording should to be triggered based on the motion detection, then type the name of a motion detection profile (VM by default). - In the Condition cell type:
E.IDS.armed.<zone_number>==1
, where <zone_number> is the number of a zone that determines presence of people. If there is no Satel alarm system, then enterMEM.<name>==1
instead. Remember to set this variable in the scene for leaving/entering the building.
- ClicktheAddCommand…button.Inthenewwindowthatappears,intheNamefield enter:
C.TCP.send.<camera_IP>:8000.
In the Value field enter the content of a message to be sent to the camera. In our case: recording (see 2.2.1.Receiving TCP/IP message). Optionally, Base module can send a notification to all paired Remotes. If you want to add this functionality to the above procedure, proceed as follows: - 4. Add another command (click the Add Command… button). In the Name field enter:
C.REMOTE.notify.
In the Value field enter the content of a notification message.
The answering machine
As befits an intelligent building, we present the implementation of a more advanced solu- tion using Mobotix T24 and DOMIQ/Base module. We will show how to implement the functionality of an answering machine that can record video messages, while you are away from home. The algorithm of this solution is as follows:
The welcome message can be any. However it is important to include the information that pressing the Light button is required to leave a message (we explain it in details later in this chapter). The welcome message can be recorded using a microphone built in the ca- mera or you can upload an audio file to the camera in one of the following formats: .wav, .tar or .al.
In order to configure a welcome message:
- Log in into the camera configurator.
- Select the Admin Setup > Manage Audio Messages. If you want to record message using built-in microphone, click on Record. Otherwise click on Upload to add a mes- sage as a audio file.
Definition of the answering machine is as follows:
- Log in into the Base configurator.
- Select the Events tab, add a group and give it a name, e.g: Answering machine.
First, we will create an event triggered by pressing the bell button. The event will start play- ing the welcome message.
1. Addaneventandsetitsproperties:
- Type a short description, e.g. Bell.
- In the Channel field enter:
C.MOBOTIX.event.t24.
- In the Data cell type:
CameraBellButton
- In the Condition field type:
E.IDS.armed.<zone_number>==1
, where <zone_number> is the number of a zone that determines presence of people. If there is no Satel alarm system, then enterMEM.<name>==1
instead. Remember to set this variable in the scene for leaving/entering the building. - Click on the Add Command…. In the new window that appears, in the Name cell type:
C.HTTP.get.
In the Value field enter the command that will trigger welcome message. The general syntax is as follow:http://<login>:<password>@<ca- mera_IP>/control/rcontrol?action=sound&soundfile=<audio_file>.
In our case: http://admin:meinsm@192.168.10.32/control/rcontrol?ac- tion=sound&soundfile=welcome.
• Add another command. In the Name field type: C.LOGIC
. In the Value cell enter: timestamp=time().
This command assigns current time to the timestamp variable. As the second step we will create an event, which will be triggered by pressing the Light button. As a result, the event will trigger recording.
- Add an event and set its parameters:
- Optionally enter a description
- In the Channel field type:
C.MOBOTIX.event.t24
. - In the Data cell enter: C
ameraLightButton.
- In the Condition field type:
E.IDS.armed.<zone_number>==1,
where <zone_number> is the number of a zone that determines presence of people. If there is no Satel alarm system, then enterMEM.<name>==1
instead. Remember to set this variable in the scene for leaving/entering the building. - Click on the Add Command… button. In the Name field enter:
C.LOGIC
, in the Va- lue cell type:ts()
.
- Go to the Logic tab and paste the following code:
function ts()
local et = use 'VAR.et'
et=date(" %d-%m-%Y %H:%M")
local t=time()
if (t-timestamp)<20 then
command("C.TCP.send.<T24_IP>:8000=<message_content>")
end
end
Replace <T24_IP>
with IP address of the video door station , as the <message_con- tents>
enter a word to be processed by the camera (see 2.2.1.Receiving TCP/IP messa- ge), in this case: recording.
An examplary command could be as follows: command("C.TCP.send.192.168.10.32:8000=recording")
The if (t-timestamp)<20
condition determines the time window in which the caller needs to press the Light button in order to leave a video message. The (t-time- stamp)<20
expression is evaluated when the Light button is pressed. So if you want to create a 10s time window, then you have to add 10 seconds to the lenght of the welcome message. When the event occurs current date and time are saved to the VAR.et
variable:
local et = use 'VAR.et'
et=date(" %d-%m-%Y %H:%M")
Using this variable you can define an element on a visualization that informs about left messages. To do that, add a Text element to a visualization. In the Label field enter short description, for example: You have new video message. In the Channel field enter: VAR.et.
Optionally, Base module can send a notification to all paired Remotes, each time new vi- deo message is recorded. To achieve this, add the following command inside the if (t- timestamp)<20
expression.
command(”C.REMOTE.nofity=You have new video message”)
. Contents of the notification can be freely modified.
You can watch recorded messages using the camera configurator or via Mobotix MX- Easy application.
Additionally, camera software allows to send e-mails as a reaction to an event. To do this, configure your email account in the camera settings and then set sending an e-mail as the response to an event. As an attachement, camera can send an image or a video clip.
3.1.1. Reaction when someone is at home
System can react to pressing the bell button, when someone is at home. One of the most obvious reactions is to call a Videophone in the building/apartment. Mobotix T24 video door station works with Grandstream videophones. Configuration should be made in ac- cordance to the manufacturer’s manuals.
Base module can also react to this event by:
- Displyaing a visualization with the camera preview and with buttons to open gate orwicket.
- Turning on light nearby gate/wicket when it is dark outside.
- Turning on lights on the way to a building (after opening the door/gate), when it is dark outside.
Opening a gate/wicket can be done in one of the following ways:
- using a dedicated Mobotix MX-OPT-IO1 expander;
- using a Satel or LCN relay.Mobotix MX-OPT-IO1 moduleIf you don’t intend to buy this device, then you can skip this section. Otherwise, keep reading.
Mobotix MX-OPT-IO1 module besides door/gate opening function, allows to connect extensions such as: PIR sensors, additional bell buttons, numeric keyboard, reed relays, etc.
Mobotix MX-OPT-IO1. Source: www.mobotix.com
Using Mobotix MX-OPT-IO1 requires additional camera configuration:
- Select Admin Menu. In the Hardware Configuration click on the Assign Wires.
- In the new window that appears, in the Door Release Actuator select IO Module: Door.
- Click on the Set button to confirm changes. Next click on the Close button to save them.
In order to send a notification to the Base when opening a gate/door, proceed as follows:
- Select Setup Menu and then Event Overview.
- In Signal Event, click on Edit.
- In the new window that appears, click on Add new profile. Give it a name, for exam- ple door and set its parameters:
- Check the Signal Output.
- From the first drop-down list select: Device Out: ~Door.
- Click on Set to confirm changes.
- Move to the top level of the Setup menu and select the Action Group Overview.
- Create and configure a new group:
- Enter a name, for example: door.
- In the Event Selection section choose: Signal:<name>.
- Define an action to be executed after opening gate/wicket. In this case: sending an IP notification to the Base module (IP Notify: Base).
- Click on the Set button to confirm changes. Next click on the Close button to save them.
Satel/LCN System
Opening a gate/wicket can be done using a single relay in the Satel or LCN system. Satel
relays have battery backup, so this is a huge advantage in case of power loss.
The functionality presented in the beginning of this section (turning on light nearby gate/ wicket) can be achieved using two events. The procedure is as follows:
- Addagroupofeventsandgiveitaname.
- Addfirsteventandsetitsparameters:
- In the Channel field type:
C.MOBOTIX.event.t24.
Leave the Data field empty. - Click on the Add command…. Next in the Name field enter:
C.LOGIC.
In the Value cell type:ring("$D0").
- In the Channel field type:
- Move to the Logic tab and paste the following code:
function ring(val)
local sensor = use 'LCN.sensor.segment.module’
if (val=="CameraBellButton" or "CameraLightButton") and sen-
sor.value<500 then
-- switching visualization screen and turning light on
command("C.DISPLAY.screen=”screen_name”)
command("C.LCN.relay.segment.module.relay=1")
else
-- only switch visualization screen
command("C.DISPLAY.screen=”screen_name")
end
end
The above code sends commands after pressing buttons on video door panel. If action should be triggered by motion detection, then replace line no.3 with the following one:if (val=="CameraBellButton" or "CameraLightButton" or "VM") and sensor.value<500 then
Some elements in the above code need to be customized – they are marked with red co- lor. In the second line, enter address of a light sensor. Optionally you can use other device to measure light, such as Elsner Elektronik P03/3 Weather Station. In line no.4 enter the minimum light level at which light should turn on. In lines 4 and 7 enter the name of a screen with preview from video door camera. In line 5 enter the address of an LCN modu- le and relay number used for turning light on.
4. As the next step we will create an event that will be triggered by opening a gate/wic- ket. The reaction to this event can be, for example, turning on light on the way to a building. Depending on used relay, the event will be triggerd in a different way:
- If you use a LCN relay then in the Channel field enter:
E.LCN.relay.<seg- ment>.<module>.<relay>.
For a Satel relay enter:E.IDS.output.<out- put_number>
. In case of using a Mobotix MX-OPT-IO1 expander type:C.MOBOTIX.event.t24.
- In the Data field enter: 1 in case of using LCN or Satel. If you are using Mobotix expander, then enter the name of the previously defined group, in our case: door.
- In the Condition field enter an expression which will check light level, for example
LCN.sensor.0.10<200.
- In the Action section define a sequence of actions to be executed when opening gate/wicket.Buttons for opening wicket/gate
In case of LCN or Satel it is a standard command for setting a relay:C.LCN.relay.<segment>.<module>.<relay>=1.
for LCNC.IDS.output.<output_number>=1;pin:xxxx
for Satel.If gate/wicket is controlled via Mobotix expander, then use the following command:C.HTTP.get=http://<login>:<password>@<camera_ip>/control/rcon- trol?action=customfunction&action=sigout&profile=~Door.