How to Connect Robustel EG5120 to AWS IoT SiteWise via E2C Factory

How to connect Robustel EG5120 with E2C Factory to AWS IoT SiteWise

 

Overview

This guide provides a comprehensive walkthrough for establishing an industrial data pipeline using the Robustel EG5120 edge computing gateway. By leveraging E2C Factory, you will collect data from Modbus devices (such as the S6000U sensor), transmit it securely via MQTT over TLS to AWS IoT Core, and finally visualize that data using AWS IoT SiteWise and Amazon Managed Grafana.

These steps are essential for building scalable Industrial IoT (IIoT) solutions that require real-time monitoring and historical data analysis.

 

What You'll Need

Hardware:

 1 x Robustel EG5120 Industrial Gateway.

 1 x S6000U Sensor (or similar Modbus-enabled device).

 Power supply for the gateway and sensor.

 Ethernet cable with internet access.

Software/Firmware:

 RobustOS Pro firmware.

 E2C Factory App installed on the EG5120.

 An active AWS Account with permissions for IoT Core, SiteWise, IAM, and Managed Grafana.

Prerequisites:

 Basic familiarity with the AWS Management Console.

 Gateway is powered on and connected to the internet.

 

Step-by-Step Configuration Guide

Step 1: AWS IoT Core Configuration

Before the gateway can send data, you must define it as a "Thing" in AWS.

1.  Create an IoT Thing:

 Navigate to IoT Core > Manage > All devices > Things.

 Click Create things > Create single thing.

 Name: EG5120-Gateway.

2.  Generate Certificates:

 Select Auto-generate a new certificate.

 Download the Device Certificate, Private Key, and Amazon Root CA 1.

 Activate the certificate.

3.  Create and Attach Policy:

 Go to Security > Policies > Create.

 Name it EG5120-Policy and use the following JSON to allow connections:

 { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": ["iot:Connect", "iot:Publish", "iot:Subscribe", "iot:Receive"], "Resource": "*" } ] } Attach this policy to your downloaded certificate.

4.  Retrieve Endpoint:

 In IoT Core, go to Settings and copy the Device data endpoint (e.g., xxxxx-ats.iot.us-east-1.amazonaws.com)

Step 2: E2C Factory Configuration

Now, configure the local data collection on the EG5120.

1.  Device Access: Log into the EG5120 web interface and open the E2C Factory app.

2.  Southbound Collection: Create a new device profile for the S6000U sensor. Define the Modbus registers for the variables you wish to collect (e.g., Temperature, Pressure).

3.  Northbound Cloud Connection: * Select AWS IoT as the cloud platform.

 Enter the Endpoint retrieved in Step 1.

 Upload the Certificate, Private Key, and Root CA.

 Set the upload topic to gateway/EG5120/data.

4.  Verify Connectivity: Ensure the status shows "Connected" and data is flowing.

Step 3: AWS IoT Rule & SiteWise Integration

To move data from the MQTT topic into SiteWise, an IoT Rule is required.

1.  Create IAM Role: Create a role named IoTRuleToSiteWiseRole with a trust policy for iot.amazonaws.com and permissions for iotsitewise:BatchPutAssetPropertyValue.

2.  Create IoT SiteWise Model:

 In SiteWise, go to Models > Create model.

 Name: IndustrialGatewayModel.

 Add Measurements: temperature (Double) and pressure (Double).

3.  Create Asset:

 Create an asset from the model named EG5120-Gateway-Asset.

 Note down the Asset ID and Property IDs from the asset details page.

4.  Create IoT Rule:

 In IoT Core > Message Routing > Rules, create a rule: Edge2Cloud_To_SiteWise.

 SQL: SELECT temperature, pressure, timestamp() as ts FROM 'gateway/EG5120/data'.

 Action: Select Send message to IoT SiteWise. Map the JSON fields to the SiteWise Asset and Property IDs recorded earlier.

Step 4: Visualization with Amazon Managed Grafana

1.  Setup Workspace: Create an Amazon Managed Grafana workspace. Ensure IAM Identity Center is enabled for authentication.

2.  Permissioning: Grant your user the Admin role within the Grafana workspace settings and ensure the workspace has the AWSIoTSiteWiseReadOnlyAccess policy.

3.  Configure Data Source:

 Log into Grafana, go to Connections > Data sources.

 Add AWS IoT SiteWise. Select your region and use Workspace IAM Role.

4.  Build Dashboard: Add a new panel, select the SiteWise data source, and choose your EG5120-Gateway-Asset to visualize the temperature and pressure trends.

 

Verification & Testing

 MQTT Test: Use the MQTT Test Client in AWS IoT Core to subscribe to gateway/EG5120/data and verify the JSON payload is arriving.

 Grafana Refresh: Set your Grafana dashboard to refresh every 5 seconds to observe real-time industrial data.

 

Troubleshooting / FAQ

 Q1: What should I check if data is appearing in IoT Core but not in SiteWise?

A: Verify the IAM Role attached to the IoT Rule. Ensure it has iotsitewise:BatchPutAssetPropertyValue permissions and that the Asset/Property IDs in the rule match your SiteWise setup exactly.

 Q2: What should I check if  Grafana cannot find the SiteWise Data Source?

 A: Ensure you have assigned your IAM Identity Center user to the Grafana workspace and that the "Admin" role is explicitly granted.

 Q3: What should I check if Edge2Cloud Pro shows "Disconnected"?

 A: Check the gateway's internet connection and verify that the AWS Endpoint and Certificates are correctly uploaded without extra spaces or formatting errors.


Conclusion

After completing this guide, the Robustel EG5120 edge computing gateway should be configured to collect Modbus data through E2C Factory and publish it to AWS IoT Core over MQTT with TLS. The data can then be routed into AWS IoT SiteWise and visualized in Amazon Managed Grafana. Users should verify that MQTT payloads are received, SiteWise asset properties are updated, and the Grafana dashboard displays the expected industrial data.

 

Revision History

Revision

Date

Author

Notes

v.1.0

2025/10/17

Anson Feng

Initial Release