Summary: thin-edge.io in practice - An experience report by Phoenix Contact
Tags: iot, cumulocity, edge, devices
Published: 2024-03-07 12:14:27

---
title: Summary: thin-edge.io in practice - An experience report by Phoenix Contact
published: true
date: 2024-02-26 14:27:01 UTC
tags: iot, cumulocity, edge, devices
canonical_url: https://tech.forums.softwareag.com/t/summary-thin-edge-io-in-practice-an-experience-report-by-phoenix-contact/291800
---

 

## Overview

This article summarizes the key messages of the IoT Developer Event [thin-edge.io in der Praxis: Ein Erfahrungsbericht von Phoenix Contact](https://groups.softwareag.com/events/details/software-ag-iot-developers-presents-iot-developer-event-thin-edgeio-in-der-praxis-ein-erfahrungsbericht-von-phoenix-contact/) which was held on 14th of Feb. 2024 by Phoenix Contact. The event was held in German only. So, if you are a non-German speaker, you can find the key takeaways in English here. If you are a German speaker, you can watch the recording of the video directly on YouTube.

{% embed https://www.youtube.com/watch?v=FDVYZRk2UjA %}

The full slide deck can be downloaded here:

[PhoenixContact\_Erfahrungsbericht\_full.pdf](https://tech.forums.softwareag.com/uploads/short-url/zlAi98eDVlZoeFQuNedMD3bYm6q.pdf) (3.3 MB)

Let’s start with the [thin-edge.io](http://thin-edge.io) Introduction.

## Introduction [thin-edge.io](http://thin-edge.io)

Never heard about [thin-edge.io](http://thin-edge.io)? No problem, let me introduce the open-source edge framework to you.

[![image](https://global.discourse-cdn.com/techcommunity/optimized/3X/b/0/b07d4051d6fc43da90a73a3fce86f1f8c53c6793_2_690x393.png)](https://global.discourse-cdn.com/techcommunity/original/3X/b/0/b07d4051d6fc43da90a73a3fce86f1f8c53c6793.png "image")

The first step of an IoT project is device integration. Devices are very heterogeneous and support different kinds of IP and non-IP protocols. Especially for the non-IP or non-smart devices, which support any kind of fieldbus or offline protocol, there is an additional gateway needed that connects to the devices and bridges the data to your IoT cloud.

The requirements for the gateways and devices are very different. While the field devices themselves might have a very high data ingestion frequency, a very low processing latency & storage capacity in combination with a proprietary very optimized operating system, the gateway uses in most cases a standard or a customized standard operating system like Linux. This allows flexibility in both directions, to the field devices and to the IoT platforms in the cloud.

[thin-edge.io](http://thin-edge.io) is focused on such gateways, providing a flexible edge framework to support field device connectivity, allow edge analytics and transport the messages to multi-cloud IoT platforms. But there is much more: Let’s check out what capabilities are offered with the shortly [released 1.0.0 version](https://github.com/thin-edge/thin-edge.io/releases/tag/1.0.0).

### 1.0.0 Release

With the release of 1.0.0 [thin-edge.io](http://thin-edge.io) offers full support of a complete device management stack. This includes firmware & software updates, configuration & log management, remote access, health & device monitoring and support of multiple commands like restart.

[![image](https://global.discourse-cdn.com/techcommunity/optimized/3X/1/a/1aaf2d7afcc268467c4feb2ae560950e3a5fe276_2_690x390.png)](https://global.discourse-cdn.com/techcommunity/original/3X/1/a/1aaf2d7afcc268467c4feb2ae560950e3a5fe276.png "image")

Beyond that using [thin-edge.io](http://thin-edge.io) you can fully manage your gateways and connected child devices out of the box.  
It comes with a multi-cloud support, currently supporting:

- AWS IoT
- Azure IoT
- Cumulocity IoT

With its low footprint, it runs on Linux-operated thin gateways only using ~40 MB of RAM and ~8 MB of disk space. It supports any Linux distribution (also custom ones like yocto) with multiple init systems running on almost all common CPU architectures (X86\_64, ARM11, ARM-Corte-A etc.).

It can be easily extended by providing a well-structured plugin concept with already available community plugins like OPC-UA plugin, plugins for Linux package manager (like apt, apk, rpm & snap), a plugin to enable full container management using docker and [much more](https://thin-edge.github.io/thin-edge.io/operate/plugins/).

### Architecture

[![image](https://global.discourse-cdn.com/techcommunity/optimized/3X/d/f/df96a5a335ec9bbb62d00e54580dd8ccc6ec0db5_2_690x385.png)](https://global.discourse-cdn.com/techcommunity/original/3X/d/f/df96a5a335ec9bbb62d00e54580dd8ccc6ec0db5.png "image")

Let’s have a look at the [thin-edge.io](http://thin-edge.io) architecture. The main component is a Mosquitto MQTT Broker. Here all messages are collected and queued. A well-defined [MQTT topic structure API](https://thin-edge.github.io/thin-edge.io/references/mqtt-api/) allows data mappings for multiple target clouds, child device support including device management and easy extensions using plugins.

The whole architecture was designed from the beginning to be lightweight, flexible and extensible.

## Device Partner Program

At Cumulocity we have a device partner program where device partners can use self-tooling to register themselves and certify their devices. In a [device partner portal](https://ecosystem.cumulocity.com/devices/) all (certified) devices are listed including a short summary about the company, device specs and additional assets. Potential customers can search for potential devices and approach the device partner directly.

[![image](https://global.discourse-cdn.com/techcommunity/optimized/3X/e/6/e6337cf559fc8133aa74c1e2f0e167467559d223_2_690x388.png)](https://global.discourse-cdn.com/techcommunity/original/3X/e/6/e6337cf559fc8133aa74c1e2f0e167467559d223.png "image")

The certification process is pretty easy. After registration, you get a tenant, where you register your devices. A certification tool will help to identify the current status of features your device supports. There are some minimum requirements that your device needs to fulfill to get the “Certified Device” tag.

[![image](https://global.discourse-cdn.com/techcommunity/optimized/3X/a/d/adffb03bc151ffd346aa9214cc72b3dbd1d30b55_2_690x386.png)](https://global.discourse-cdn.com/techcommunity/original/3X/a/d/adffb03bc151ffd346aa9214cc72b3dbd1d30b55.png "image")

Here is the good news: [thin-edge.io](http://thin-edge.io) fulfills most of the certification requirements out of the box. Meaning, if you decide to run [thin-edge.io](http://thin-edge.io) on your devices, they are very quickly certified.

Now, let’s check out how Phoenix Contact, a device partner of Cumulocity, made their journey to get their devices certified by using and deciding to use [thin-edge.io](http://thin-edge.io)

## About Phoenix Contact

Phoenix Contact is headquartered in Blomberg, Germany and is a manufacturer of industrial automation, interconnection, and interface solutions. They are a global company with 22.000 employees worldwide.

[![image](https://global.discourse-cdn.com/techcommunity/optimized/3X/2/e/2e0ea2c221569e2700aaedd4af7e60574ed0e2fa_2_690x388.png)](https://global.discourse-cdn.com/techcommunity/original/3X/2/e/2e0ea2c221569e2700aaedd4af7e60574ed0e2fa.png "image")

From Cumulocity’s perspective, Phoenix Contact offers a wide variety of devices and is a global leader in the OT market which makes the combined offering a perfect match. This combination of Cumulocity IT/Cloud expertise and Phoenix Contact OT expertise and devices has been already proven and multiple projects we have implemented together.

[![image](https://global.discourse-cdn.com/techcommunity/optimized/3X/3/d/3d2e8fc69d196e9ff93a4b964e61054d763ac3ad_2_690x388.jpeg)](https://global.discourse-cdn.com/techcommunity/original/3X/3/d/3d2e8fc69d196e9ff93a4b964e61054d763ac3ad.jpeg "image")

Phoenix Contact is an official device partner and lists multiple devices in our [device partner portal](https://ecosystem.cumulocity.com/product-category/device-partner/phoenix-contact-device-partner/).

[![image](https://global.discourse-cdn.com/techcommunity/optimized/3X/7/2/72e2e089e44b116d19cde930cec0da01f32c77f1_2_690x388.png)](https://global.discourse-cdn.com/techcommunity/original/3X/7/2/72e2e089e44b116d19cde930cec0da01f32c77f1.png "image")

### PLCnext

[![image](https://global.discourse-cdn.com/techcommunity/optimized/3X/f/0/f042c1933a7f1c52316844ddcc1ea25073ea0eda_2_690x388.jpeg)](https://global.discourse-cdn.com/techcommunity/original/3X/f/0/f042c1933a7f1c52316844ddcc1ea25073ea0eda.jpeg "image")

In the field of automation, Phoenix Contact offers a wide range of programmable logic controllers (PLCs), industrial PCs (IPCs) and IO systems. While in the past it was sufficient to program PLC logic and operate it on proprietary real-time capable devices, today more flexibility is required in terms of cloud connectivity and the integration of third-party software. [PLCnext Technology](https://www.phoenixcontact.com/en-us/industries/plcnext-technology) opens up PLCs for end customers to flexibly expand their systems and add additional functionality.

[![image](https://global.discourse-cdn.com/techcommunity/optimized/3X/a/f/af2cb6fcdac0dddec2a05bd6f86ad29770a56a9b_2_690x388.jpeg)](https://global.discourse-cdn.com/techcommunity/original/3X/a/f/af2cb6fcdac0dddec2a05bd6f86ad29770a56a9b.jpeg "image")

Parts of the PLCnext open ecosystem:

- **PLCnext Control** – Hardware for the PLCnext Technology ecosystem, which features scalable controllers and is IT secure by design in accordance with IEC 62443.
- **PLCnext Engineer** – PLCnext Engineer software platform, which can be extended flexibly and individually with function add-ins.
- **PLCnext Store** – Open software store with apps ranging from software libraries for accelerated programming to fully programmed apps.
- **PLCnext Community** – Benefit from crowd knowledge, get support, find code examples and stay in touch with Phoenix Contact automation experts.

### PLCnext Control Portfolio

[![image](https://global.discourse-cdn.com/techcommunity/optimized/3X/5/0/5001168be781ae0689fce15309b6c069ec016a7c_2_690x388.jpeg)](https://global.discourse-cdn.com/techcommunity/original/3X/5/0/5001168be781ae0689fce15309b6c069ec016a7c.jpeg "image")

The offering of Phoenix Contact Control devices varies from devices that are very closely attached to machines up to gateways and industrial PCs to aggregate and filter machine data to forward them to any cloud. All of them use the open ecosystem approach of PLCnext Technology. On the left in the picture, you see small industrial control units with an ARM Cortex-A processor. When performance is needed, a BPC computer with an Intel i7 processor might be the right choice. In the middle, you see edge gateways, the EPCs which contain an SSD to store data but also bridge the machine data to other systems.

### PLCnext Architecture

[![image](https://global.discourse-cdn.com/techcommunity/optimized/3X/d/2/d210317d912f1282f73271b9c94cd548ca1e0616_2_690x388.png)](https://global.discourse-cdn.com/techcommunity/original/3X/d/2/d210317d912f1282f73271b9c94cd548ca1e0616.png "image")

As an operating system, PLCnext Linux is used which is a customized Linux based on the yocto framework to harden it against the industrial OT requirements in the field. It is real-time capable and minimized so all unnecessary components, that would allow any potential attacks, are removed.

On top, there is the PLCnext Runtime System running which has been opened by supporting multiple interfaces & SDKs to implement custom extensions. The runtime is programmable using the programming language IEC 61131-3, Matlab Simulink, C# or C++. The PLCnext Store offers pre-build apps that can be deployed to the runtime system.

## PLCnext store App for [thin-edge.io](http://thin-edge.io)

When Phoenix Contact initially started thinking how to integrate to Cumulocity IoT and other cloud platforms. They discussed the use of implementing their own app using the [MQTT SmartREST Interface](https://cumulocity.com/docs/device-integration/mqtt/) for Cumulocity and others for other clouds or using [thin-edge.io](http://thin-edge.io) as a multi-cloud solution.

[![image](https://global.discourse-cdn.com/techcommunity/optimized/3X/f/c/fc03e1602c17bf6fffda647b2a72cf4ded279bd5_2_690x388.png)](https://global.discourse-cdn.com/techcommunity/original/3X/f/c/fc03e1602c17bf6fffda647b2a72cf4ded279bd5.png "image")

The decision was quickly made not to invest in any custom app due to effort and time constraints but to use [thin-edge.io](http://thin-edge.io) to benefit from the additional functionality like device management capabilities which are offered out of the box.

[thin-edge.io](http://thin-edge.io) is packaged as an app deployed on the Linux runtime system and containing all relevant components. Another main benefit is that additional functionality is added to [thin-edge.io](http://thin-edge.io) over time. In comparison to a custom native app, this new functionality comes out of the box.

If a custom app would have been built, most likely the feature set would have been reduced to just sending measurements because no additional time and resources are available to maintain & develop new functionality.

Another main benefit is that using [thin-edge.io](http://thin-edge.io) the device certification process went very smoothly with almost all necessary requirements already met resulting in a certificate in the end. This convinced Phoenix Contact once more that using [thin-edge.io](http://thin-edge.io) was the right way to go.

[![image](https://global.discourse-cdn.com/techcommunity/optimized/3X/3/9/39485332750131ba7ae9366212b2a4773a135382_2_531x500.jpeg)](https://global.discourse-cdn.com/techcommunity/original/3X/3/9/39485332750131ba7ae9366212b2a4773a135382.jpeg "image")

Let’s have a look at what is part of a PLCnext App. A PLCnext App is a SquashFS filesystem container with all required packages installed. In regards to [thin-edge.io](http://thin-edge.io) the Mosquitto MQTT Broker, [thin-edge.io](http://thin-edge.io) mapper, additional plugins and a bunch of bash scripts are used to perform the mapping between the device capabilities to [thin-edge.io](http://thin-edge.io) operations.

[![image](https://global.discourse-cdn.com/techcommunity/optimized/3X/8/f/8f8d6eb7cd49dfcfa701273f84661857ebf69745_2_690x388.jpeg)](https://global.discourse-cdn.com/techcommunity/original/3X/8/f/8f8d6eb7cd49dfcfa701273f84661857ebf69745.jpeg "image")

### [thin-edge.io](http://thin-edge.io) integration

The main task of the integration was to make [thin-edge.io](http://thin-edge.io) run on Phoenix Contact devices which don’t use any common package manager like apt or init-system but custom ones. thin-edge was shipped as Debian package in version 0.8.1 which couldn’t be used because systemd was a requirement. So they were repackaged with added custom scripts for the legacy init system.

So for the software management custom install and remove scripts were created. Same for the legacy sysv-init system to start & stop services.  
[thin-edge.io](http://thin-edge.io) is very flexible by allowing defining custom init scripts in a system.toml so this was not a big deal. In 1.0.0 additional functionality has been added which makes it even easier to adapt thin-edge and some scripts might reduced or even removed.

[![image](https://global.discourse-cdn.com/techcommunity/optimized/3X/8/b/8bdfc8586ae674082401e9d3afba7335147b8e72_2_690x388.png)](https://global.discourse-cdn.com/techcommunity/original/3X/8/b/8bdfc8586ae674082401e9d3afba7335147b8e72.png "image")

The thin-edge app should be easy to use for end customers. So the capability of thin-edge to create test certificates and upload them to Cumulocity to register the device is used. Before registering the device a Python script is used to collect system information and add them to the device object using a `inventory.json` where custom, hardware and software fragments can be defined.

Another plugin was developed to handle the software management capabilities of [thin-edge.io](http://thin-edge.io) out of the cloud. The plugin concept works here very well as only an executable or script must be available to allow the installation of software, which were provided to list, install or remove software. All the cloud transport of the software installation lifecycle is handled out of the box by [thin-edge.io](http://thin-edge.io), only the local functionality must be provided and integrated to [thin-edge.io](http://thin-edge.io).

[![image](https://global.discourse-cdn.com/techcommunity/optimized/3X/c/a/ca2a186ad86020af98c7ea76a216d6289c60a94e_2_690x388.png)](https://global.discourse-cdn.com/techcommunity/original/3X/c/a/ca2a186ad86020af98c7ea76a216d6289c60a94e.png "image")

## Support & Feedback

What happens if something is not working as intended? Phoenix Contact started very early with [thin-edge.io](http://thin-edge.io) and not everything was working right away which resulted in several issues created in the open-source project. The positive about that is that the project and team are very active: It was always possible to discuss the issues with developers which very often resulted in direct help & solution. Some other things like bugs were tracked and fixed in a very short time period.

Also very positive is the openness of the system to get the correlated debug output and logs to tackle down issues.

Overall this was an excellent development experience with the [thin-edge.io](http://thin-edge.io) project team.

[![image](https://global.discourse-cdn.com/techcommunity/optimized/3X/5/6/561abb20eb4a849b77f021b7deea3ec3227dcdc0_2_690x388.png)](https://global.discourse-cdn.com/techcommunity/original/3X/5/6/561abb20eb4a849b77f021b7deea3ec3227dcdc0.png "image")

## Next steps & Outlook

Phoenix Contacts wants to invest in using additional capabilities of [thin-edge.io](http://thin-edge.io). Firmware updates are planned using [rauc updates](https://rauc.io/) which is a tool to support A/B updates for embedded Linux systems. [thin-edge.io](http://thin-edge.io) supports this but it must be adopted.

Also, a Certification Authority (CA) should be integrated to issue trusted certificates directly integrated into the device management.

[![image](https://global.discourse-cdn.com/techcommunity/optimized/3X/0/e/0e140a98fb7ec904d0241da23821dd4bdb047337_2_690x388.jpeg)](https://global.discourse-cdn.com/techcommunity/original/3X/0/e/0e140a98fb7ec904d0241da23821dd4bdb047337.jpeg "image")

## References

- [thin-edge.io](http://thin-edge.io)
- [Software AG Device Partner Portal](https://ecosystem.cumulocity.com/product-category/device-partner/phoenix-contact-device-partner/)
- [Cumulocity IoT Platform Connector App](https://www.plcnextstore.com/permalinks/apps/latest/60002172000584)
- [PLCnext Technology ePaper](https://www.phoenixcontact.com/assets/2018/interactive_ed/101_1120557/index.html#0)
- [PLCnext Store – ready-to-use Apps](https://www.plcnextstore.com/)
- [PLCnext Info Center](https://www.plcnext.help/te/About/Home.htm)
- [PLCnext Store Info Center](https://store.plcnext.help/st/Home.htm)


[Read full topic](https://tech.forums.softwareag.com/t/summary-thin-edge-io-in-practice-an-experience-report-by-phoenix-contact/291800)