IoT gateways and their central role in the Internet of Things
In the Internet of Things, IoT gateways provide an interface between old and new sensors, devices, networks and nodes.
What are IoT gateways?
In telecommunications, the primary purpose of a gateway is to provide a bridge between different types of communication technologies. These can differ in terms of connection types, interfaces, or protocols. For example, your home Internet gateway connects your Local Area Network (LAN) to your Internet Service Provider (ISP). This gateway connects the ISP’s Wide Area Network (WAN) to your LAN using TCP/IP. The IoT gateway follows the same principle of bridging communication for different technologies. It creates a bridge between the IoT sensors / actuators and the Internet. The IoT gateway aggregates data, if necessary, translates the protocols of the sensors and processes the data before transmission.
The IoT gateway handles all communication between the sensors, devices in the field and remote connections such as the Internet, applications, or users. In this communication, the IoT gateways collect the data locally and then usually send it via MQTT or AMQP to a cloud system such as Azure or AWS.
What are IoT gateways needed for?
IoT gateways bring a wide variety of benefits in the context of the Internet of Things. The following three points summarise the core functions.
Equipped with a wide variety of interfaces, protocols, and standards, for example for local installation (edge) or remote data transmission via fixed and mobile networks (connectivity), IoT gateways simplify the collaboration of many different old and new devices in an IoT scenario. They transmit the collected data to the internet or to a central IoT platform or cloud architecture. In this way, they reduce the technical complexity of the systems and keep the necessary investment costs low.
In an IoT system, several sensors or devices are connected to an IoT gateway, which interconnects and transports them with suitable protocols via fixed and/or mobile radio links in the field to form a data stream. This concentration of data achieves both economic effects, e.g., using only one SIM card and a cost-intensive hardware module for the mobile radio link, and effects for IT security, since only the IoT gateway can be reached via the IP address space – but not all devices or sensors.
Local data processing
An IoT gateway also plays a central role in the context of local data pre-processing. This involves, for example, filtering data that is only transmitted in the event of relevant changes, e.g., when limit values are reached – and not continuously. This leads to a significant reduction in the amount of data and the associated operating costs. This function is also useful for triggering a direct, local action without an existing connection to the central platform. In this context, full-fledged analysis programmes are increasingly used as so-called “stream analytics” in the edge, which trigger the defined requirements for computing and storage power. The connection to public cloud systems is also frequently enabled via corresponding software programmes that are operated on the gateway. In addition, gateways sometimes also serve as “trust points”, i.e. as communication anchors in the edge. In this way, they contribute to the highest possible security of IoT cloud communication.
IoT gateways with Node-RED
There are various ways to implement an IoT gateway. For example, it is easy to build an IoT gateway yourself with Node-RED, an open-source software, and a Raspberry Pi. The Raspberry Pi provides the necessary computer and Node-RED the software interface to address or read out the protocols of the sensors and actuators in the field and to establish communication.The innovative low-code platform Node-RED was designed to realise IoT applications, data acquisition, local processing, and cloud integration without programming knowledge. With Node-RED, it is easy to create a connection between old and new industrial technologies in terms of IoT (Internet of Things). It provides a browser-based flow editor that easily connects flows using a variety of network nodes available in the palette. A node always has at least one input or output. Messages are then sent between the nodes, which can be processed or manipulated in a variety of ways. For example, the measurement data of a simple temperature sensor can be formatted into the desired data format and then transmitted to a cloud architecture via MQTT. The following image shows a schematic overview. The left-hand side shows the nodes, which are dragged and dropped into the middle field and then connected to each other according to logic.
Node-RED is especially suited for the development of data acquisition and pre-processing logics. The ready-made components for various communication protocols and general data processing functions make the application even more user-friendly. The visual development tool Node-RED is perfect for use in an industrial IoT environment.
IoT infrastructures in the real world are associated with a variety of challenges and limitations. This results in high demands on the operation of IoT gateways, e.g., on the computing power, the operating system, or the operating temperature of the hardware. For this reason, the implementation of an IoT gateway with a Raspberry Pi is only suitable in smaller IoT environments in the form of a prototype. For large rollouts, one should rely on an industrial computer with a hardened Linux operating system. These are specially evaluated for use in IoT scenarios and offer the prerequisites for long-lasting continuous operation through an appropriate hardware and software solution. With this form of implementation of an IoT gateway, Node-RED can simply be loaded and used as a Docker container.
IoT gateways as a key element in IoT ecosystems
In a world without gateways, our devices could not communicate with the internet or external networks. IoT gateways perform the standard task of a router, namely forwarding packets in multi-hop environments. But they are also able to connect different devices with different technologies.
The IoT gateway is the key element in IoT ecosystems. As a bridge of communication, it connects sensors to the internet, devices to a native cloud application and much more. It helps reduce latency and improve capacity at the edge by pre-processing raw data. The IoT Gateway also provides an additional line of security in these vulnerable environments. The opensource software Node-RED makes it possible to put one’s own IoT projects into action without much previous programming knowledge. Care should be taken to select the appropriate computer for the application. If you are in a prototype environment, a Raspberry Pi is sufficient. As soon as larger and more demanding IoT implementations are involved, an industrial computer should be used.