By David Walters, IoT Specialist Partner Solutions Architect at AWS
By Thomas Cummins, IoT Specialist Partner Solutions Architect at AWS
By Brintha Koether, Segment Lead, IoT Hardware at AWS

AWS IoT PartnersGartner forecasts the number of connected devices will reach 25 billion by 2021. Each of those devices require a complex combination of hardware, operating systems, and software to connect to the cloud.

In order to simplify this development for customers, Amazon Web Services (AWS) works with Independent Hardware Vendors (IHV) that can integrate AWS IoT services such as FreeRTOS, AWS IoT Greengrass, and IoT Device SDKs.

IHVs can also use their own MQTT and HTTPS clients on devices, such as microcontrollers, gateways, industrial PCs, PLCs, and SCADA systems and sensors. We qualify these solutions through the AWS Device Qualification Program.

AWS is now extending its IHV and Device Qualification Program to include AWS IoT Core Edge Software. Independent Hardware Vendors develop and maintain qualified IoT Core Edge Software applications and frameworks that run on devices at the edge. Edge software has built-in capability to aggregate and filter data collected at the edge and publish that data to AWS IoT Core.

By providing a consistent implementation across multiple devices, developers can maximize the portability of applications that are built on top of qualified edge software. The software frameworks meet the foundational compatibility, security, and scalability best practices required for large-scale Internet of Things (IoT) applications.

In this post, we will examine three qualified AWS IoT Edge Software offerings from Edge Software IHVs. We’ll look in-depth at how these IHVs solve specific business use cases, and provide real-world implementation examples on how customers can use these software frameworks to connect to AWS IoT.

Beckhoff TwinCAT3

Beckhoff’s TwinCAT3 automation software for control systems enables customers to connect their industrial assets over a variety of industrial protocols, and build sophisticated software applications using their modular software PLC programming framework.

Beckhoff is an APN Advanced Technology Partner with the AWS Industrial Software Competency.

There are a number of different software modules that address different applications and use cases, including connectivity, analytics, robotic motion automation, and human-machine interfaces (HMIs). Various modules can be combined to develop applications specific to a customer’s unique requirements. Supported communications protocols include TCP/IP, BACnet, HTTPS, Modbus-RTU/TCP, OPC UA, OPC DA, and MQTT.

TwinCAT3 applications can be developed using Visual Studio, where all the TwinCAT3 development environment and libraries are fully integrated into the IDE. Developers can choose to use PLC programming logic based on IEC61131-3, C, C++ or MATLAB/Simulink to build their real-time applications.

TwinCAT3 can serve as an IoT gateway to transmit data from the on-premises environment to AWS IoT. TwinCAT3 has a dedicated software module to securely connect, publish, and subscribe to AWS IoT Core using MQTT. Developers can define the MQTT topics within the application.

X.509 certificates are used for mutual authentication, and communication is encrypted using TLS 1.2. Users can take advantage of the native visual configuration interface within TwinCAT3 to configure a TwinCAT PLC to connect to AWS IoT Core.

In Figure 1, the TwinCAT IoT Data Agent is configured to connect a local PLC device and local OPC-UA server. The IoT Data Agent is publishing messages from those assets to AWS IoT Core and AWS IoT Greengrass device to transmit messages and receive cloud-to-device messages.

AWS-IoT-Edge-Software-Partners-1

Figure 1 – TwinCAT IoT Data Agent connection to AWS IoT Core and AWS IoT Greengrass.

TwinCAT3 can interact with AWS IoT Greengrass software running on-premises, either on the same processor or another device within the same local network. Customers can select from a broad range of TwinCAT3 applications to connect and control industrial assets, and use AWS IoT Greengrass to process that data locally and publish to AWS IoT Core.

The following illustration shows the various connection methods to the AWS IoT Core.

AWS-IoT-Edge-Software-Partners-2

Figure 2 – Operational technology connectivity options to AWS IoT Core.

The TwinCAT3 software has the ability to interact with the shadow service within AWS IoT Core, publishing and subscribing to the reserved shadow topics. This makes it simple to synchronize state information between the edge environment and the cloud.

With this capability, developers can build applications that receive updates to the state of edge devices connected to TwinCAT3 via the shadow service, and respond appropriately with actions such as updating dashboards or triggering alerts.

TwinCAT3’s integration with AWS IoT Core makes it simple to build sophisticated industrial IoT applications for a variety of use cases, including asset condition monitoring, predictive maintenance, and predicative quality by leverage AWS services.

Eurotech ESF

Eurotech’s Everyware Software Framework (ESF) is a comprehensive and feature-rich software framework specifically designed to develop and deploy IoT applications at the edge.

ESF is commercially supported and built on top of the open source software framework Eclipse Kura that’s contributed and maintained by Eurotech, an APN Select Technology Partner.

ESF provides a full device abstraction layer allowing customers to manage the operating system, networking, local, and cloud connectivity from software APIs or local web interface. For example, customers can configure Ethernet settings from the web interface or with a few lines of Java code.

The ESF Cloud Connector for AWS IoT Core, built with the AWS IoT Java Device SDK v2.0, provides natively-integrated connectivity with AWS IoT Core, device shadow support, and follows best practices for AWS IoT Core functionality.

In Figure 3, you can see ESF’s software architecture and how it connects to AWS IoT.

AWS-IoT-Edge-Software-Partners-3

Figure 3 – Everyware Software Framework connection to AWS IoT Core.

ESF has an extensive set of field protocols that can be plugged into the framework with over-the-air device management, or distributed by the Eclipse Marketplace. Examples of supported field protocols include Modbus, OPC-UA, S7, FANUC, J1939, J1979, BACnet, IEC 60870-5-101, IEC 60870-5-104, DNP3, and M-bus.

To interact with these connected assets quickly, ESF provides a visual application composer called ESF Wires. Customers interact with the framework by using blocks and lines that describe assets and data flows.

In the following example, you can see an ESF Wires application that connects to a Modbus device and publishes data to AWS IoT Core.

AWS-IoT-Edge-Software-Partners-4

Figure 4 – ESF Wires application to connect a Modbus asset to AWS IoT Core.

The Modbus.Polling.Timer component defines a set interval to poll the Modbus asset rev_per_minute_plc. ESF reads the Modbus register %IX1.5, rev_per_min, and then calls the AWSIoTPublisher component.

AWSIoTPublisher defines the topic in which the data should be published on; in this case ‘data/modbus/motor’. The data arrives on the specified topic in AWS IoT Core, which can be seen from the AWS IoT Core Test Console.

AWS-IoT-Edge-Software-Partners-5

Figure 5 – Modbus data arriving on AWS IoT Core from ESF.

In addition to visual application prototyping, customers can develop IoT applications using the ESF Java libraries, which expose both physical and field-bus protocols over the same Java API used by Wires.

Dependency management is handled by OSGI (Open Service Gateway Initiative), which allows developers to quickly deploy applications and add new drivers to the software stack without interrupting the existing applications.

In this code snippet, you can see how to perform the same workflow as the ESF Wires example above using the Java APIs.

// First, import all the needed classes.
import org.eclipse.kura.asset.Asset;
import org.eclipse.kura.asset.AssetService;
import org.eclipse.kura.channel.ChannelRecord; // Add a private variable to your class.
private AssetService assetService; // Set the methods used by OSGI to inject the required dependencies on the AssetService and the AWS IoT Connection
public void bindAssetService(final AssetService assetService) { if (this.assetService == null) { this.assetService = assetService; }
} public void unbindAssetService(final AssetService assetService) { if (this.assetService == assetService) { this.assetService = null; }
} // The AWS IoT Connection publisher injected by OSGi is already configured with the proper destination topic
public void setAwsIotPublisher(CloudPublisher cloudPublisher) { this.cloudPublisher = cloudPublisher; this.cloudPublisher.registerCloudConnectionListener(ExamplePublisher.this); this.cloudPublisher.registerCloudDeliveryListener(ExamplePublisher.this);
} public void unsetAwsIotPublisher(CloudPublisher cloudPublisher) { this.cloudPublisher.unregisterCloudConnectionListener(ExamplePublisher.this); this.cloudPublisher.unregisterCloudDeliveryListener(ExamplePublisher.this); this.cloudPublisher = null;
} // In the main method, use the asset service to get the rev_per_minute_plc Modbus Asset
Asset modbusAsset = this.assetService.getAsset(“rev_per_minute_plc”);
List<ChannelRecord> readData = modbusAsset.readAllChannels(); // Getting the “rev_per_minute” channel read from the specific Asset
Optional<ChannelRecord> revPerMinute = channelRecords.stream().filter(channelRecord -> "rev_per_minute".contentEquals(channelRecord.getChannelName())).findFirst(); // If the data is available, prepare the message and publish
if (revPerMinute.isPresent()) { KuraPayload mqttPayload = new KuraPayload(); mqttPayload.addMetric("rev_per_minute", revPerMinute.get().getValue().getValue()); KuraMessage message = new KuraMessage(mqttPayload); this.cloudPublisher.publish(message);
}

ESF runs on Linux-based devices, including the following devices listed in the AWS Partner Device Catalog:

CloudRail

CloudRail’s integrated hardware and software offering enables customers to connect more than 12,000 industrial sensors to AWS IoT. The CloudRail.Box allows you to easily connect industrial sensors and actuators (IO-Link, digital, 4-20mA analog) directly to AWS IoT Core, AWS IoT Greengrass, and AWS IoT SiteWise.

AWS-IoT-Edge-Software-Partners-6

Figure 6 – Connection of IO Link sensors to AWS IoT via CloudRAIL.Box.

The CloudRail.Box is a platform enabling fast implementations of Industrial Internet of Things (IIoT) and Industry 4.0 automation projects. Based on a simple plug-and-play approach, the platform reduces complexity and eases configuration of and integration to industrial equipment.

Using the CloudRail.Box, connecting an industrial sensor to AWS IoT takes less than a minute instead of days or even weeks. Here are the steps.

Step 1: Plug In Compatible Industrial Sensors

CloudRail works with any sensor that supports the IO-Link standard, digital sensors, and even analog ones using an IO-Link adapter. Sensors are being connected to so-called IO-modules, which talk to the CloudRail.Box via Ethernet.

While the CloudRail.Box needs to sit in a cabinet (IP20), the IO-modules are IP67 and can be mounted directly on the machine. One CloudRail.Box supports hundreds of IO-modules at the same time.

AWS-IoT-Edge-Software-Partners-7

Figure 7 – Connecting IO Link Sensors to CloudRail.Box.

Step 2: Select the Sensor

The CloudRail.Box automatically detects all connected IO-modules and sensors. Using the CloudRail Device Management Cloud web app, you can configure the CloudRail.Box deployment using the Box Configuration tool, as shown in Figure 8 below.

Once the IO-modules and sensors are discovered, select one and click Next. In this example, we’ll connect an RFID reader to AWS IoT.

AWS-IoT-Edge-Software-Partners-8

Figure 8 – Configuring an RFID IO Link sensor.

Step 3: Select AWS Service and Name the Device

CloudRail supports several AWS IoT services. Users can choose between a direct connection to AWS IoT Core or AWS IoT SiteWise, or connect the sensor to a local AWS IoT Greengrass instance running on the CloudRail.Box.

AWS-IoT-Edge-Software-Partners-9

Figure 9 – Setup the connectivity to AWS IoT Core.

Step 4: Auto Device Provisioning and Documentation

CloudRail automatically provisions sensors as new devices in the AWS IoT Core device registry through an API, retrieves the necessary X.509 certificates, and configures the local MQTT client. All this happens automatically in the background. The user just gets the generated MQTT topic, as well as documentation about the data schema.

AWS-IoT-Edge-Software-Partners-10

Figure 10 – Configure the AWS IoT Thing from the CloudRail Device Management platform.

Step 5: Sensor is Connected to AWS IoT Core

The sensor now sends data to AWS IoT Core in a well-structured and automatically generated JSON object. This allows developers to immediately start building applications on top of it without the need of understanding the sensor or performing data transformations.

AWS-IoT-Edge-Software-Partners-11

Figure 11 – RFID data arriving on AWS IoT Core from CloudRail.Box.

Built on Kunbus Revolution Pi Connect hardware technology, the CloudRail.Box connects industrial sensors and actuators to AWS IoT services with a simple plug-and-play approach.

Revolution Pi is an open, modular, and inexpensive industrial PC with EN 61131-2 / IEC 61131-2 compliance, slim DIN-Rail form factor, and standard industrial 24V power supply.

The CloudRail.Box has firmware pre-installed that automatically connects to and is managed remotely by the CloudRail Device Management Cloud. This is a central place to manage your CloudRail.Box, including remote firmware upgrades, deployment of edge computing functions, and orchestration of the data streams from your connected IO-modules and the attached sensors/actuators.

AWS-IoT-Edge-Software-Partners-12

Figure 12 – CloudRail Device Management Cloud.

This managed configuration platform is hosted by CloudRail and enables customers to configure their CloudRail.Box devices to publish data directly to AWS IoT Core, AWS IoT SiteWise, or an AWS IoT Greengrass instance which runs locally on the CloudRail.Box.

All data coming from the sensors connected to a CloudRail.Box device always flows directly to AWS IoT Core. No process data ever passes through the CloudRail cloud. This means lower latency, and no data privacy issues.

CloudRail provides a platform for customers to build rapid prototypes and proof of concepts, and is suitable up to a large scale deployment.

Summary

Choosing qualified AWS IoT Edge Software from APN Partners can significantly speed up development time by providing rich AWS IoT integration out of the box.

Instead of focusing on integrating AWS IoT connectivity and features, you can focus on building the applications that immediately bring value to your business.

Customers looking for qualified devices or edge software are able to search through the AWS Partner Device Catalog. We have more than 300 solutions from 150 AWS IoT Partners, including everything from cameras in building security to programmable logic controllers used in manufacturing environments.