Software
Other
Loxone
- Software
Homeautomation Miniserver
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.
In diesem Video beschreiben wir wie Sie am Beispiel einer INSTAR 2K+ Kamera diese in Loxone als benutzerdefierte Intercom hinzufügen können.
Hier die Pfade zum abgreifen eines Bildes der Kamera (2K+ Serie):
- 2K+ Auflösung:
http://192.168.178.21/snap.cgi?chn=11
- FullHD Auflösung:
http://192.168.178.21/snap.cgi?chn=12
- HD Auflösung:
http://192.168.178.21/snap.cgi?chn=13
Bei HD bzw. FullHD Kameras wäre der Pfad:
- FullHD/HD Auflösung:
http://192.168.178.21/tmpfs/snap.jpg
- 320p Auflösung:
http://192.168.178.21/tmpfs/auto.jpg
- 160p Auflösung:
http://192.168.178.21/tmpfs/auto2.jpg
Das Video als MJPEG würden Sie wie folgt abgreifen bei der (2K+ Serie):
- 2K+ Auflösung:
http://192.168.178.21/livestream/11?action=play&media=mjpeg
- FullHD Auflösung:
http://192.168.178.21/livestream/12?action=play&media=mjpeg/
- HD Auflösung:
http://192.168.178.21/livestream/13?action=play&media=mjpeg
Bei den HD/FullHD Kameras wäre es:
- FullHD/HD Auflösung:
http://192.168.178.21/mjpegstream.cgi?-chn=11
- 320p Auflösung:
http://192.168.178.21/mjpegstream.cgi?-chn=12
- 160p Auflösung:
http://192.168.178.21/mjpegstream.cgi?-chn=13
Installation of the Miniserver
- 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
and password: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:
Smart Home App and WebUI
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:
Control INSTAR IP camera via the Loxone Miniserver
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:
Example 1: Triggering an alarm
- 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.
Example 2: Go to a saved position
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.
Display your camera video on alarm
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).
Integrating the alarm output relay of the camera
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:
In the Loxone Config Software, we can now drag the first digital input onto the work surface and - for testing - connect it to the orientation light of the Touch control we had previously used:
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.
Integrating the alarm input of the camera
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:
The alarm input then triggers all alarm actions that you have activated in the Alarm actions in the camera's WebUI - in the example above, the Alarm server was contacted.
Use the Loxone Miniserver as alarm serverTrigger
There is a new alarm server API for WQHD 2K+ cameras. The individual steps below are still valid. Only the URL query is now called &trigger
instead of &active
, the numerical values have changed and now allow the evaluation of multiple, simultaneous alarm triggers! You will find an example implementation of the MQTT and HTTP alarm server v2 API with Node-RED here.
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/ON
(permanently on)http://192.168.2.58/dev/sps/io/alarmserver/OFF
(permanently off)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.
Discuss this article on the INSTAR Forum !