Open Source Industrial IoT Gateway Based on .NET6

What is an Industrial IoT Gateway

An Industrial IoT Gateway (IIoT Gateway) is a hardware device or software program that serves as a bridge between local devices (such as PLCs, barcode scanners, robots, CNC machines, non-standard upper computers, etc.) and cloud systems (such as IoT platforms, SCADA systems, MES systems, etc.). All data flowing between devices and the cloud passes through the IoT gateway, as shown in the figure below:Open Source Industrial IoT Gateway Based on .NET6

Data Flow Direction

  1. Communication from Device to Cloud (Data Collection)

  2. Communication from Cloud to Device (Reverse Control)

  3. Communication from Device to Device (M2M)

Open Source Industrial IoT Gateway Based on .NET6

  1. Benefiting from the long-term accumulation of .NET in industrial control and medical fields, there are indeed many communication-related DLLs, source codes, and projects scattered online, but there has been no open-source project based on B/S architecture, which is also the original intention of this project.

  2. Relying on the open-source, cross-platform, and high-performance characteristics of .NET6, as well as the low-code development method of the WTM framework, we quickly established the gateway application. Currently, telemetry and attribute uploads have been completed, and reverse control is under development.

Open Source Industrial IoT Gateway Based on .NET6

  1. Project Address

  • github:iotgateway: https://github.com/iioter/iotgateway/

  • gitee:iotgateway: https://gitee.com/iioter/iotgateway/

  • Project Documentation: http://42.193.160.84/

  • Online Experience: http://42.193.160.84:518/

Features of the Open Source Gateway

  • Cross-Platform Operation

  1. It can run on both Windows and Linux systems;

  2. It can run on a host or through Docker;

  3. It can run on x86 hosts or ARM32, ARM64 embedded development boards.Open Source Industrial IoT Gateway Based on .NET6Open Source Industrial IoT Gateway Based on .NET6

  • Built-in Multiple Drivers

Drivers can be seen as an intangible asset of a company. Currently, it provides complete protocols for Modbus, Siemens full series PLCs, Mitsubishi QPLC, Omron PLC, ABPLC, MTConnect CNC machines, etc. Of course, you can also implement your own drivers through driver Demos or integrate popular IoTClient (Coder’s Life), HSL (Mr. Hu), and other provided drivers for integration.Open Source Industrial IoT Gateway Based on .NET6

  • Computational Expressions

Similar to scripting languages like JS, C# can also be dynamically compiled and executed as a script. You can modify expressions at any time to perform secondary calculations on data, not just multiplication calculations.Open Source Industrial IoT Gateway Based on .NET6

  • MQTT Service

Built-in MQTT Server, which can be integrated with your business system by subscribing to data. Of course, the gateway can also act as an MQTT client, pushing data to your MQTT service.Open Source Industrial IoT Gateway Based on .NET6

Open Source Industrial IoT Gateway Based on .NET6

  • OPCUA Service

Built-in OPCUA Server, which allows your industrial control system to easily obtain data. Note that the OPCUA-related functions in the project are only for learning and testing purposes. If you use the OPCUA protocol, please contact the OPC Foundation for authorization; any disputes arising are unrelated to this project.Open Source Industrial IoT Gateway Based on .NET6

  • Digital Twin 3D Visualization

By using three.js, a digital twin demo was built. The front end subscribes to data changes through a WebSocket-based MQTT protocol to obtain real-time data updates, rather than relying on WebAPI polling.

Open Source Industrial IoT Gateway Based on .NET6

Open Source Industrial IoT Gateway Based on .NET6

  • Online Configuration

Seamlessly integrates online configuration projects, allowing you to quickly design and deploy your visualization applications.Open Source Industrial IoT Gateway Based on .NET6

Open Source Industrial IoT Gateway Based on .NET6

Why Do We Need an IoT Gateway

  • Protocol Conversion

Facing devices from different eras, manufacturers, and protocols can be quite a headache. The IoT gateway helps you shield protocol differences and convert them into commonly used IoT protocols (such as MQTT, HTTP, etc.) to output to the platform, giving you more time to focus on business development on the platform side.

  • Ensure Security

All IoT devices are potentially vulnerable to external influences and attacks. However, the IoT gateway adds another layer between the Internet and the devices themselves, significantly reducing the number of devices connected to the Internet. The gateway becomes the first line of defense, preventing unauthorized control of IoT devices from external parties.

  • Easy Expansion

Given the highly decentralized nature of industrial sites, as the number of connected devices continues to increase, the ongoing integration of devices with different protocols can only be managed and controlled through gateways, rather than the previously painful upgrades that affect everything.

  • Data Processing

  1. Data Preprocessing

Such as scaling, offset processing, etc. This helps in the development of edge computing, as it is a simple application of edge intelligence.

  1. Data Filtering

Sending all the massive data generated by devices to the platform is certainly overwhelming. On one hand, transmission, processing, and storage all have costs; on the other hand, only a portion may need attention, such as changing production quantities, which should only be uploaded when there is a change. Continuously pushing unchanged values is meaningless.

  1. Data Summary and Aggregation

In some scenarios, different variables from different devices or the same device need to be aggregated before sending to the platform. Some raw data may not have particularly high value, and this can also alleviate some of the pressure on the platform side.

  1. Data Caching

Network communication is not 100% reliable. During disconnections, the IoT gateway needs to temporarily store data and send it to the cloud when the network is restored. It also needs to store the control strategies from the cloud to ensure timely execution of control processes.

Leave a Comment

Your email address will not be published. Required fields are marked *