Setting up Connection to KNX

From iRidium Mobile Wiki
Jump to: navigation, search
_

How It Works: Ways of Connection to KNX

This section presents instructions for connecting iRidium to the KNX bus via the KNXnet/IP protocol.


Ways of connection to the KNX bus:


1. Any KNX IP router (Interface) with support of KNXnet/IP Tunneling (unicast)

KNX scheme.png

Number of connections to the bus:
One panel at a time can connect to KNX through any KNX IP Router (Interface) via the KNXnet/IP, locally or via the Internet.
Licensing:
Device License (KNX), Device License Pro (KNX), Site License (Logic Machine 2, 3, Reactor), Site License Pro (Logic Machine 2, 3, Reactor). More >>


2. Any KNX IP router (Interface) with support of KNXnet/IP Tunneling and the iRidium Gate application on PC

KNX scheme gate.png

Number of connections to the bus:
up to 4-5 panels at a time can connect to KNX through any KNX IP Router (Interface) + iRidium Gate for KNX via the KNXnet/IP (unicast). Locally or via the Internet. It is possible to connect more panels if the amount of data transferred to each panel is decreased. The maximum number of connections can be determined experimentally for each particular installation.
Licensing:
Device License (KNX), Device License Pro (KNX), Site License (Logic Machine 2, 3, Reactor), Site License Pro (Logic Machine 2, 3, Reactor). More >>. iRidium Gate does not require licensing. It is installed on any Windows PC.


3. KNX IP router KNX IP BAOS 771/772 via the KNXNet/IP Tunneling protocol (unicast)

KNX scheme BAOSga.png

Number of connections to the bus:
up to 5 panels at a time can connect to KNX through KNX IP BAOS 771/772 via the KNXNet/IP Tunneling protocol (locally or via the Internet).
It is required to set up some additional properties >> on the router.
Licensing:
Device License (KNX), Device License Pro (KNX), Site License (Logic Machine 2, 3, Reactor), Site License Pro (Logic Machine 2, 3, Reactor). More >>.


4. KNX IP router KNX IP BAOS 771/772 via the BAOS protocol (Bus Access and Object Server).
This mode is described in the article KNX IP BAOS.

KNX BAOS-BAOS.png

Number of connections to the bus:
up to 10 (in practice up to 5 when working with the nominal load) panels at a time can connect to KNX through KNX IP BAOS 771/772 via the BAOS protocol (locally or via the Internet). The maximum number of connection does not exceed 10 and depends on the amount of transferred data. For work via the BAOS protocol it is required to set up datapoints in ETS.
Licensing:
Device License (KNX), Device License Pro (KNX), Site License (BAOS), Site License Pro (BAOS). More >>.


5. KNX IP router Logic machine 2, Logic machine 3 or Logic machine 3 Re:actor via the KNXnet/IP protocol

KNX LM.png

Number of connections to the bus:
up to 10 panels at a time can be connected to Logic machine via the KNXnet/IP unicast (locally or via the Internet). For work with iRidium Logic machine нdoes not require additional programming. It is used as a standard KNXnet/IP interface.
Licensing:
Device License (KNX), Device License Pro (KNX), Site License (Logic Machine 2, 3, Reactor), Site License Pro (Logic Machine 2, 3, Reactor). More >>.

↑ Back

Characteristic Features of Connection to KNX via the KNXNet/IP Tunneling Protocol

When setting up projects in ETS and setting up Wi-Fi network on the automation site you should consider the characteristic features of different KNX IP routers and the KNXNet/IP Tunneling protocol:


Attention.png iRidium control panels and the KNX IP router should be in one IP subnetwork.


Attention.png When selection the KNX IP router (Interface) make sure it supports KNXNet/IP Tunneling.


Attention.png IP multicast – connection to KNX using group data transfer. It is not supported by iRidium.


Attention.png The majority of KNX IP routers support only 1 connection at a time. It means that two control panels cannot work with 1 KNX IP router concurrently without using additional means:

1. Installation of several KNX IP routers enables concurrent connection of several control panels to the bus
2. iRidium Gate (the application for PC) enables connection of 4-5 control panels to 1 KNX IP router
3. KNX IP BAOS 771/772 routers support up to 5 connections via KNXnet/IP Tunneling (after the setting >>)
4. KNX IP BAOS 771/772 routers support up to 10 connections via the BAOS protocol


Attention.png The KNXNet/IP Tunneling protocol is a UDP protocol. For working with KNX IP routers via the Internet it is required to make additional settings:
Activate NAT in the settings of the KNXnet/IP driver in the iRidium project and set up port forwarding on your Internet router. More >>


Attention.png For activation of iRidium projects the forced request of group addresses in the KNX bus is used. It is performed at each start of iRidium projects.
To see the status of group addresses at the project start mark "Read" in the properties of each address in ETS. More >>


Attention.png When setting up the Wi-Fi network it is NOT recommended using several access points as when switching them the connection with the KNX IP router gets lost for some time. Unexpected short disconnection periods when switching access points can lead to loosing connection with KNX for 1-2 minutes. It is due to the feature of KNX routers which secures them from emergency disconnection.
Use Wi-Fi repeaters to organize the network or use KNX routers which support several connections. iRidium Gate or routers which support several connections via KNXnet/IP (Logic Machine or BAOS) can also help you to reconnect quickly.


Attention.png If your project has many (>100) group addresses, then at the start of the iRidium clients via KNXnet/IP some data can be lost on the way to the control panel. It does not affect regular work (event changes) but there is possibility of loosing data when connecting of control panels. It can be solve by one of the following ways:

  • use of KNX IP BAOS (the BAOS protocol)
  • using interval for command sending in the driver properties (Send Time) to enable stable receipt of data from KNX and reduce load on the bus.


Contact iRidium Support Team to receive more detailed instructions.

Preparation of Data in ETS for Their Import in iRidium

Before creating a visualization project, make sure the KNX equipment is set up and the ETS project is ready for import. After that you can proceed.


Preparation of Projects in ETS

Make sure the KNX IP router (Interface) you selected supports work with KNXNet/IP.

KNX new connection.png


Assign the “[√] Read” flag to the group addresses which status should be received at the start of iRidium projects. It affects only the receipt of the status at the project start (it does not affect event updates):

KNX properties program read fag.png


Save the project file in the ETS3 or ETS4 format (*.pr3, *.pr4, *,pr5, *.knxproj, *.csv) for its import in iRidium GUI Editor.


After the project saving, close the ETS program, if the used KNX IP router does not support >1 connection at a time. Otherwise iRidium cannot connect to the bus.

↑ Back

Import of Group Addresses from ETS to iRidium

You can import the list of group addresses with all settings formed in ETS to iRidium GUI Editor. It will allow you to set up control of the addresses fast. Create a new project in iRidium GUI Editor, then select “File” >“Import”:

KNX import project ETS.png


The tool of import forms the list of KNX IP routers and group addresses. The list has the tree view:

KNX import tree commands.png

The list will be added into your project when you click OK.

↑ Back

Creation of KNX IP Routers and Lists of Group Addresses in the Manual Mode

If you don’t have the ETS project from which you can import the addresses, create a KNX IP router and the list of addresses manually.

Select the KNX Router device (KNXnet/IP) in the “DEVICE BASE” window of GUI Editor and drag it into “PROJECT DEVICE PANEL” window.

KNX creation of gateways and channels.png


Properties of Connection to KNX IP Routers

You can set up local or external connection for the created KNX IP router – to work in the home/office Wi-Fi network or via the Internet.

To set up properties of connection to KNX, open the upper level of the device tree:


Connection to KNX IP Routers in the Local Network

KNX connection settings.png

Host – the router IP-address (IPv4)

Port - the port of connection to the router (by default it is 3671)

Reconnect time (ms) - the period before reconnection to the router at the abnormal disconnection

Send time (ms) - the pause between outgoing commands. It is set up to decrease the workload of the router and the bus.

Ping Time (ms) – the frequency of sending the Ping command for confirming the connection with the router

Nat – it should be activated if you use connection via the NAT server (via the Internet)or routing on the level of the network card in the local network (several IP-addresses on one network card with data trasfer between subnetworks.

↑ Back

Connection to KNX IP Routers via the Internet

For working via KNXnet/IP via the Internet:

KNX connection settings ext.png
1. Indicate the public address of your Internet router in the Host property
2. Activate the Nat property
3. Set up Port Forwarding on your router to enable remote control.


↑ Back

Switching Between the Local and Internet Connection

If the control panel should hold the connection with the system when the panel is out of the limits of the Wi-Fi network of the system, you need to set up the switch between the Internet and the local network.

The remote mode suggests connection to the system via the Internet. At that the external IP-address or the domain name of the system to which you need to connect have to be used.


Attention.png In iRidium Wi-Fi/3G CANNOT be switched automatically. For switching between the Internet and the local network you need buttons with special settings. See the settings below.
Attention.png To control the system remotely you have to open the system for external access -
to set up the Port Forwarding Service.
Attention.png To secure equipment from unauthorized access we recommend using secure connection with the remote system (VPN).


Setting up of the switch Wi-Fi/3G in iRidium projects:

Scripts PpenTemplate.png

1. Open the script editor in iRidium GUI Editor.

2. Download and add into your project the template of the Wi-Fi/3G switch (Add Script from file):
download the template of the Wi-Fi/3G switch

The Wi-Fi/3G switch is performed with the help of the script function SetParameters

Setting up of parameters of the Wi-Fi/3G switch:

function Internal_1() // Function name
{
IR.GetDevice('KNX Router (KNXnet/IP)').SetParameters({Host: '192.168.0.100', Port: '3671', ConnectTime: '120000', SendTime: '0', PingTime: '60000'}); // Driver Name + Parameters
}
function External_1()
{
IR.GetDevice('KNX Router (KNXnet/IP)').SetParameters({Host: '215.110.10.10', Port: '3671', ConnectTime: '120000', SendTime: '0', PingTime: '60000'});
}

Indicate in the command settings:

  • Function name – the name of the switch function (command). Two functions cannot have the same name in a project.
  • Driver Name – the name of the driver which parameters are changed
  • Parameters – the set of the switch parameters which you need to apply to the driver


Assign commands to buttons:

  1. Select the button which will be responsible for the Wi-Fi/3G switch.
    Open the properties of the button: Object Properties > Programming
  2. Open Macros Editor of the button for the Press or Release events
  3. Select the Script Call command and add it by double-clicking on it
  4. Select the name of the function you want to activate in the drop-down list. Create the command.

Script call internal-external.png


Set up access to the equipment from the Internet:

In order to do that open the equipment ports for remote access.


Download the example of the Wi-Fi/3G switch (project) >>

↑ Back

Setting up Multiclient Connection to KNXnet/IP with the Help of iRidium Gate

iRidium Gate for KNX is a free application for installation on Windows PC. It enables:

  • Multiclient connection to KNX IP routers (4-5 panels)

A standard KNX IP router does not usually support more than 1 connection at a time. iRidium Gate enables control of the one KNX IP router from 4-5 devices at a time (the maximum number of connected devices is limited by the amount of data the router can process)

  • Reducition of load on KNX

iRidium Gate "remembers" the status of group addresses information about which went through it while the iRidium Gate work. Gate sends the information, which was saved, to control panels when they send forced requests to KNX at the project start. It allows you to make the forced request of the bus only once. Then, when connecting to the bus, the panels receive data directly from the bus. And the bus receives requests only from those addresses the status of which hasn’t been saved in Gate.

  • Fast reconnection to KNX when switching Wi-Fi access points

Switching of access points when working via the KNXnet/IP protocol can take much time (60000-120000 ms) as it involves emergency disconnection from KNX. iRidium Gate enables support of stable connection to KNX and assumes reconnection of control devices.


Attention.png For installation of iRidium Gate the constantly running Windows PC is required. It should be in one IP subnetwork with the KNX IP router and iRidium control panels.


Setting up iRidium Gate for KNX >>

↑ Back


Setting up Multiclient Connection via KNXnet/IP through KNX IP BAOS

KNX IP BAOS 771/772 are KNX IP routers with the possibility of setting up multiclient connection when working via the KNXnet/IP protocol.


When working via KNXnet/IP Tunneling BAOS routers provide:

  • Multiclient connection to KNX (up to 5 panels)

A regular KNX IP router usually supports only one connection at a time. KNX IP BAOS can support connection with up to 5 devices at a time after some set up.

  • Fast reconnection to KNX when switching Wi-Fi access points

Switching of access points when working via the KNXnet/IP protocol can take much time (60000-120000 ms) as it involves emergency disconnection from KNX. KNX IP BAOS enables reconnection of control devices due to the set up of the multiclient connection:


Set up multiclient connection to KNX IP BAOS via the KNXnet/IP protocol:

KNX IP BAOS routers support up to 5 KNXnet/IP Tunneling connections. But only one is active by default. Its physical address is 15.15.250.


To activate the rest tunnels, hold the Learn button on the router for >1 second. секунды. The rest 4 tunnels will be activated with the help of the 4-fold long pressing on the "Learn" button. They will take the physical addresses according to the address of the first tunnel. For example:

1. Tunneling connection 1 (15.15.250)
Press and hold the Learn button >1 сек.
(flashing of the LED indicator shows that the additional tunnel is set up and activated)
2. Tunneling connection 2 (15.15.251)
Press and hold the Learn button >1 сек.
3. Tunneling connection 3 (15.15.252)
Press and hold the Learn button >1 сек.
4. Tunneling connection 4 (15.15.253)
Press and hold the Learn button >1 сек.
5. Tunneling connection 5 (15.15.254)


To change the range of physical addresses for the set up tunnel connections, use ETS (change the address of the first connection and repeat the set up of the rest 4). For example:

1. Tunneling connection 1 (1.1.1)
2. Tunneling connection 2 (1.1.2)
3. Tunneling connection 3 (1.1.3)
4. Tunneling connection 4 (1.1.4)
5. Tunneling connection 5 (1.1.5)


Capabilities and advantages of KNX IP BAOS routers when working via the Object Server protocol:

BAOS routers can be set up for multiclient connection via the BAOS protocol (Bus Access and Object Server) which enables up to 10 (in practice up to 5) concurrent connections to the router via ТСР/IP.

BAOS is a protocol of KNX IP BAOS routers. When setting up BAOS the table of intermediate (Datapoints) is formed. They enable:

  • connection of several control devices (from 1 to 10 when there is a small number of variables)
  • reduction of the load on the bus as it is not required to send requests to the bus at the start initialization of iRidium project variables (all states are received directly from the router, from the table of datapoints). When BAOS works via KNXnet/IP, the request to the bus is sent every time at the iRidium launch.
  • stable work via the Internet (ТСР protocol)
  • fast reconnection at the disconnections which occur when switching Wi-Fi access point

They do not require installation of the iRidium Gate application on your PC.


Setting up work with KNX IP BAOS via the Bus Access and Object Server protocol>>

↑ Back

Controlling KNX Group Addresses in iRidium Projects

In iRidium projects a KNX IP router consists of 3 parts:

  • Driver Tokens – the list of variables which store information about connection to the router.
  • Commands – the list of group addresses available for writing.
  • Feedbacks – the list of group addresses available for reading.

They have the following properties and application:


Driver Tokens

Driver Tokens are the variables where the status of connection to the controlled KNX IP router is stored. The properties can be read only. To use the driver variable drag it on a graphic item. (the value can be output in the item text field or it can be used to affect the item state)

GUI KNX Tokens.png

Online the state of connection to the controlled system (Online/Offline = 1/0)
Status the status of connection to the system (Offline/Connect/Online/Disconnect = 0...3)
Host the domain name of the remote system
HostPort the port of the remote system to which iRidium App connects
IP the IP-address of the control panel
HostIP the IP-address of the remote system to which iRidium App is connected
Port the client local port through which connection to the remote device is performed

Commands

Commands – it is the list of group addresses available for writing.

These are commands for sending numbers and strings to the bus. A command is assigned to the graphic item which can write data to the corresponding address with the help of this command.


KNX add command Relay 1.png
Commands
Name the command name, at random
Type the data type
SubType the data subtype (measurement units, regulation limits)
Address the group address


To assign a command for the KNX group address to a graphic item drag it on the graphic item and select the properties of command assigning. At that be guided by the group address type, the graphic item type and the desirable way of control:


Go to examples of controlling equipment in the KNX bus>>


Feedbacks

Feedbacks – it is the list of group addresses available for reading.

A feedback channel receives the value from a particular address in the KNX bus. The received value can be output on graphic items. Remove channel from which you do not need to receive feedback in the Feedbacks tab – it will reduce the load on the bus at the project launch.


KNX add feedback Relay 1.png
Feedbacks
Name the command name, at random
Type the data type
SubType the data subtype (measurement units, regulation limits)
Address the group address


To assign a KNX status channel to a graphic item drag it on the graphic item and select the properties of channel assigning. At that be guided by the group address type, the graphic item type and the desirable way of control:


Go to examples of controlling equipment in the KNX bus>>

↑ Back

Emulation of Project Work

Emulator

- is an iRidium application for Windows which can be launched from GUI Editor for testing your projects. Emulator can work both with a license (with connection to the equipment) and without it (when only the project graphic part is functional).

Operation modes for Emulator (see GUI Editor > Tools > Options > Emulator):

Without the license (Demo Mode: on) – no connection with the controlled equipment.
With the license (License Path: [...]) – when the license file is selected, all Emulator functions work and there is connection with the controlled equipment.

Indicate the path to the license file for Emulator (GUI Editor > Tools > Options > Emulator):

Path to the license.png

* When Demo Mode is activated Gui Editor won’t show the message about starting without the connection to the controlled equipment (without a license). Check if there is a license when setting up your project.

Emulator hot keys

Click F5 to start Emulator.
Click F8 to open the Emulator settings (password: 2007)
Click F4 to open the Emulator log.


Attention.png For fully functional work of iRidium on your PC it is required to get an iRidium license and activate it for for your PC.

Activation of licenses for iPad/iPhone/Mac/Android based or other devices does NOT lead to the automatic licensing of the PC with the installed iRidium Environment. A license for your PC is required for iRidium client on your PC (including Emulator) to work in the fully functional mode. The license should be purchased separately or you can use free For testing purposes you can use free licenses).


Logging in Windows

Log window.png

iRidium Log is a window where information about iRidium work, error messages and iRidium Script logs (IR.Log) are output in the text format.


To open the iRidium log in Windows, click F4.

↑ Back

Launching Projects on Control Panels

Uploading and launching of iRidium projects on control panels are performed with the help of the iRidium Transfer application installed on your PC. You can also upload your project on the panel from GUI Editor with the help of Transfer.

↑ Back


Go to examples of controlling equipment in the KNX bus >>

↑ Back