knx ip in smart home equipment
Ethernet is an open (manufacturer-independent), high-performance, local and wide area network compliant with the international standard IEEE 802.3 (Ethernet). Ethernet is used for local networks, particularly in conjunction with the internet As well as in smart home equipment. Throughout the world there are a wide variety of different network structures. The Ethernet standard defines the physical areas (network engineers call them layers) – i.e. for example the following:
- What form the signals take in the cable
- What cables are used
- Cable pin configurations
- How the various devices can access a common system
- How the characters being sent are represented
- What data backup methods are used For sending data between two devices, these definitions are generally not sufficient, however. Numerous other details concerning the protocols used also need to be defined; this is particularly important in large networks (internet). Protocols are needed in order for computers to communicate with one another in the network.
TCP/IP:
a group of protocols or rules (protocol family) introduced in 1984 – is currently very widely used. Although usually discussed in the for “TCP/IP”, TCP (Transmission Control Protocol) and IP (Internet Protocol) are in fact two distinct protocols. Strictly speaking, the internet protocol suite TCP/IP also includes a third, equally important protocol: UDP (User Datagram Protocol). The base protocol, IP, serves to ensure that the data packets are sent from one device to another, and that in doing so they follow the optimal routes. This is made possible by so-called IP addresses.
The TCP protocol is based on the IP protocol, and is used for a large number of common network applications, e.g. email and surfing the internet. The TCP protocol establishes a permanent, error-checked connection and ensures that all data packets are sent in the correct order and successfully reconstructed by the receiver (connection oriented protocol). The UDP protocol is used for applications (e.g. audio and video streaming) in which it is acceptable for data packets to occasionally go missing.
The connection is not error-checked, and the delivery of data packets is uncontrolled (connectionless protocol). UDP is considerably leaner and faster than TCP. In applications like the transmission of speech and video, it would also be counter-productive to resend – e.g. a second later – a packet that has gone missing. The UDP protocol is often used in building automation.
Linking KNX (smart home system)to the Ethernet has the following advantages:
- The existing network infrastructure in the building can be used for the KNX (smart home system) main and backbone lines (higher speed, more cost effective, and more convenient)
- Buildings can be monitored and controlled via Ethernet from anywhere in the world
- Several individual sites can be observed and maintained from a central location over the internet
- KNX customer installations can be analysed and programmed remotely over the internet by the designer of the KNX system (bms).
Protocol
The KNX system (bms) uses two Ethernet communication methods – tunneling and routing – both of which use the UDP protocol. Tunneling is used to access the bus from a local network or the internet for purposes of e.g. programming the KNX installation, while routing is used for exchanging telegrams over an Ethernet network, e.g. to couple two KNX TP systems via Ethernet. The KNX protocols for these two communication methods are called KNXnet/ IP routing and KNXnet/IP tunneling. IP communication in KNX can be explained using the OSI reference model (Fig.15).
Figure 15. KNXnet/IP in the OSI reference model
Communication takes place via the application layer (which generates the KNXnet/ IP telegram), the transport layer (UDP), the network layer (IP), and Ethernet – the physical layer. Like with the TP protocol, additional information for the respective layer (the header) is always added to the KNX net/IP information.
Telegram structure in smart home system
The KNX net/IP telegram contains some further information in addition to that in the KNX TP telegram (Fig. 16):
Figure 16. KNXnet/IP telegram
- Header Length The header length is always the same. This information is still sent, however, because the header length may change in a later version of the protocol. The purpose of the header is to identify the start of the telegram.
- Protocol Version this indicates what version of the KNXnet/IP protocol applies.
- KNXnet/IP Service Type Identifier The KNXnet/IP Service Type Identifier indicates the action that is to be carried out.
- Total Length This field indicates the total length of the KNXnet/IP telegram.
- KNXnet/IP-Body This field contains the payload.
KNXnet/IP tunneling (bms)
Tunneling is needed where ETS is to be used to send KNX telegrams in a connection oriented manner within an IP framework (Fig. 17).
Figure 17. Example of KNXnet/IP tunneling: programming of bus devices via Ethernet
In principle this is always the case if a physical address is to be used as the destination address (e.g. when programming the physical address/downloading the application software for KNX devices). In tunneling, communication always takes place via the IP address of the KNXnet/ IP device that is being used for tunneling.
KNXnet/IP routing
Routing is needed for the simultaneous, connectionless transmission of KNX (smart home system) telegrams to several participants via a KNXnet/IP router (Fig. 18).
Figure 18. Example of KNXnet/IP routing: accessing several KNX installations at once via Ethernet
This is equivalent to group communication in e.g. KNX TP. Routing is used for e.g. coupling TP cables. A KNXnet/IP router serving as a line coupler for a KNX TP cable will only send a telegram to the IP side if the corresponding group address appears in the filter table of the KNXnet/IP router. All other KNXnet/IP routers serving as line couplers for other KNX TP lines will only transmit the telegram from the IP side to their KNX TP line provided that the relevant group address appears in the filter tables of the KNXnet/IProuters.