- Integrating the alarm output relay of the camera
- Integrating the alarm input of the camera
- Use the Loxone Miniserver as alarm server
The home automation miniserver from Loxone connects all smart components in your apartment or house. All strings run together to the Miniserver to enable communication between the individual components: Light, shading, heating, buttons as well as your INSTAR IP camera.
- First, the Miniserver must be installed and connected in your distributor. The LAN cable must be connected to the network router (e.g. Internet W-LAN router) and the miniserver must be connected to power. After approx. 1 minute the Miniserver should be operational:
Miniserver: The left LED flashes green regularly. The right LED is off.
- To configure the Miniserver you need a PC on which the program Loxone Config is installed. This PC must be connected to the same network router (W-LAN or LAN) to which the Miniserver was connected.
- To create a new project in the software by clicking on New Project, select the miniserver and enter the appropriate project data in the following input masks.
- By clicking on the arrow below the Connect button in the software, the search dialog can be opened. After the Miniserver appears, it must be selected and enter the user data - Default: user name:
admin. By clicking on Setup you get an overview of the configuration. After confirming this, you will come to the Network Settings - specify here a static IP address that is available on your local network.
- As a last point of the initial configuration the just created project must be saved in the Miniserver:
From this point it is possible to use the Smart Home App to connect to the Miniserver with your mobile phone, tablet, PC as long as you are in your home network. Download the apps directly from the here, or in the respective APP Store and log in to the Miniserver with the user data that you specified in the steps before during the initial configuration.
The web interface of the miniserver is via the local IP of the server in your network and the login you entered in the setup for the item Visualizations:
In order to control our IP camera via the Loxone server, we need to create a virtual output and assign it a button in the UI and a CGI command for the camera:
- Access your Project on the Loxone Miniserver and click on Virtual Outputs.
- Now a button will appear at the top of the menu bar where you can create a Virtual Output.
- Clicking on this button opens the configuration page where you can assign a camera to the output via its IP address.
- Then click Virtual Exit Command to assign the output a command that you want to send to the camera when you press the button.
- Enter a name for the function you want to use with the CGI command. In the example we take the command that triggers an alarm on the camera. Please note that this command only works with INSTAR Full HD cameras. However, if you have a camera from another series, you can easily exchange the command for another CGI command. The command requires the username and password of the administrator user to be appended to the back of the camera - in the example, this is username = admin and password = instar (if you select a CGI command here that can turn something on or off on the camera) these are to be entered accordingly with command at ON and at command at OFF, with the respective parameter.)
- Then click on the exit, hold down the left mouse button and drag the object onto the work surface on the right.
- Afterwards we can create a Virtual input with which we want to trigger the virtual output.
- Click Virtual input to create an input.
- In the opening configuration window you can give a name to the input, select it in the Visualization (WebUI) and as Input Type choose key (if you have chosen another CGI command next to the one on the camera) and turns off, you should instead choose a switch here).
- Then pull the Input onto the work area.
- And connect the two elements.
- Save the change by clicking on the floppy disk icon in the top left corner and transfer the program with the Save in Miniserver button.
Now when we access the web interface of the miniserver again, we can see that a button has appeared there. If we select this and press it, an Audio Alarm is triggered on our camera and thus all programmed alarm actions are started - in the example the Alarm server was contacted.
For the second example, we can now recycle a lot of the previous one.
- First click on the Virtual output that we created for our camera.
- And then on the Virtual Output command to add another command.
- Here you can store the stored position 1 for the command for ON and the stored position 2 for command for OFF:
- And drag the configured output to the work area.
- Now click on Virtual Inputs.
- And on Virtual Inputs.
- As display in the visualization (WebUI) we select a Switch here.
- Then pull the entrance onto the work surface.
- And connect both outputs (from the virtual input) to the previously created virtual output.
- Save the settings.
- And transfer the program to the miniserver.
- Click the button in the WebUI to pan the camera between the two positions.
To display the camera image in the Loxone Miniservers WebUI, we can add a Custom Intercom from the list of Networks:
In the configuration of the Intercoms enter the JPG path of your camera - this is the IP address of the camera followed by
/tmpfs/snap.jpg and the administrator login to the camera (example s. below) and then drag it to the desktop:
For testing, we create again a Virtual input in the form of a Button and connect it to our Intercom. Save the setting and transfer the program to the Miniserver:
We now have a virtual bell button that when pressed shows the live video of the camera:
Now all you have to do is replace this virtual bell with Loxone physical accessories. In the following example we have connected the motion detector and the Touch Control Element with the Intercom. If you operate the control or be detected by the motion detector, the ringer will be immediately resolved and all displays running the Loxone software will show you the live video of the embedded camera:
The output on the right side of the Intercoms can in turn connect other devices that are to be triggered when ringing.
To the output on the right side of the Intercom you can connect further devices, which are to be triggered during the ringing. In the example we have connected the orientation light of the Touch control. The end result is:
- You press the virtual bell button in the WebUI OR you click on the Loxone Touch control OR you trigger the Loxone motion detector and the Intercom module is activated.
- When activated, the miniserver WebUI and the Loxone Smartphone Apps will automatically display the video image of the camera and play a ringtone.
- As an example for another action we have connected the orientation light of the touch control with the Intercom and see that it is activated when the Intercom is activated (e.g. you could install a gong here).
The most INSTAR IP cameras have an alarm output:
- For indoor cameras (such as IN-8015 FullHD), this is usually port 1 and 2 of the four green connectors on the rear panel of the camera.
- For outdoor cameras, you will usually find the connection on the cable harness of the camera.
We would now like to use this alarm output to report an alarm on the camera in the Loxone Miniserver and trigger a reaction there. In the following example we take the IN-8015 Full HD indoor camera and connect it to the digital input (potential free) of the Loxone Miniserver:
If we now trigger an alarm on the camera via the Loxone WebUI or App we want the camera to send a pulse via the alarm output to the digital input of the Loxone Miniserver. We can set this in the alarm actions in the WebUI of the camera:
The duration in seconds indicates how long the alarm output relay remains open after an alarm. The 5s set here mean that the orientation lamp lights up for
5s after an alarm and then goes out again.
We can now look at the opposite way and address the alarm input of the INSTAR IP camera via the Loxone Miniserver. Therefore we connect the first digital output of the miniserver with the alarm input of the IN-8015 Full HD:
In the Loxone Config software we now have to add a button module. Make sure that you are on the My Project tab (1) and then select the button under Insert button in the Operation category and place it on the desktop:
Then pull the first Digital output onto the work surface and connect it to the output of the button:
You can now use any actuator or sensor as an input - as well as virtual inputs that can be operated via the Loxone App or WebUI. In the example we have - as before - connected the Motion detector and the Touch control as well as our virtual bell button to the input of the button.
If one of these three elements is now triggered, a pulse is sent to the alarm input of the camera. We can now activate the alarm input again in the Alarm actions in the camera's WebUI:
Note that the relay works in the Loxone Miniserver N.O. (normally open). If you switch the input mode to N.C., you would receive a continuous alarm accordingly! Accept these settings and trigger one of the 3 inputs (motion detector, touch control or the virtual bell) and you will see an alarm input in the Logbook of your camera:
All INSTAR HD and Full HD cameras have an Alarm Server Function which can be used to contact an external alarm server via a web request (HTTP GET to the REST API of the server) in case of an alarm on the camera.
As receiver for the alarm server request of the camera we can use in the Loxone Config software a Virtual input:
- select the Virtual inputs for this.
- click on Virtual input to create a new one.
- give the new input a name - this will be needed afterwards for the alarm server request (you should use a simple name, without spaces - or special characters).
- drag the new input onto the desktop.
You can now connect the new input to anything you want to trigger by the alarm event on the camera. We will use the bell/Intercom we created in a previous step:
Connect the input to the input of the Intercom Module, save the configuration and transfer it to the Loxone Miniserver.
To use this input, we must now configure the Alarm Server on the camera. Therefore we have to know that the Virtual Input in the Loxone Miniserver can be reached via the REST API under the path
/dev/sps/io/<Name of the Virtual Input>/. This path must be preceded by the IP address of the Loxone Miniserver - e.g.
192.168.2.58 - and the state we want to switch the input to must be appended at the end:
http://192.168.2.58/dev/sps/io/alarmserver/Pulse(briefly on and then off again)
We want the camera to send a pulse to the alarm server only for a short time and it will immediately jump back into the OFF state and armed again for the next alarm. We therefore select the last of the three commands above and enter it into the Web interface of our camera:
Please note that you have to enter the login below to connect to the miniserver via Loxone Config!
Accept these settings and trigger an alarm on the camera - e.g. with the virtual button we created before:
The alarm is triggered on the camera and the alarm server is contacted. The Loxone Miniserver receives the message and activates the intercom - on all screens where the Loxone WebUI or App is opened, the live video of the triggering camera is shown to you immediately.