How to configue the Ewon Edge/Ewon Cloud data connection to Aws IoT

25 Jan 2025

The Ewon Edge & Cloud solution allows users to read data from their PLC, meters, controllers,... using Siemens (S7), Allen Bradley (Ethernet/IP) and Modbus TCP protocol and forward them to Aws IoT or Azure IoT Hub cloud in MQTTS.

This article covers the configuration of the Aws IoT MQTTS connection in Ewon Cloud.

 

APPLICABLE PRODUCTS

Ewon Edge
Ewon Cloud

PRE-REQUISITES

Your Ewon Edge must be registered to Ewon cloud :

Your Ewon must have some tags defined :

IN THIS ARTICLE

Configure an Aws IoT data connection

  • Open the Ewon devices properties and click "Destinations"
  • Click "Add Destination"
  • Select "AWS IOT" as Platform.
  • Now you have to enter the Endpoint, ThingName, Certificate and the Private key of your device.

We will now explain the easiest method to do and test it with Aws IoT.

  • Connect your AWS IOT environment and create a new device by clicking "Connect one device"
  • Below you already find the Endpoint (Here : a2epkrz323xafw-ats.iot.us-east-1.amazonaws.com ):
  • Click "Next" and enter the "Thing name"
  • Select "Linux/mac OS" and "Node js" for the SDK settings and click "Next"
  • Download the "connection kit". This one is a zip files that contains, amongst other files, your device certificate and key : <Thingname>.cert.pem is your certificate file and <Thingname>.private.key is your key file.


  • Enter the Endpoint, Thingname, certificate and key to the Ewon Cloud menu and click "Add"
  • Click to push the configuration to your device.
  • Go to "Device", select the Device that you want to link to the Data export destination that you have just created, Enable the Publishing and select your destination.
  • The topic you can use depends on the Security policies associated to your device in Aws IoT. By default the topic "sdk/test/js" is always whitelisted while following this procedure.
  • Select the Publishing interval in seconds and click to push the configuration to your device.

Whitelist the Device ID (and other topics) in Aws IoT

You are almost done but one step remains to make it working.  Indeed the Device ID used by the Ewon Edge is the Thing name and this one is not by default whitelisted by Aws IoT.

  • For this, go to your device properties in Aws IoT and select the certificate of your device :
  • Then select the Policy
  • Click "Edit Active version"
  • There you can select the publishing & subscription topic(s) you want to allow as well as the client ids.  To make it easy, you can simply delete "sdk-nodejs-" (keep the *) from the "iot:Connect" policy and "save it as a new version"
  • Then set your new version as the active one

Test your Data connection

Just go to "MQTT test client" and subscribe to the Ewon Edge topic (here : sdk/test/js).
You should now see the json data meessages sent by the Ewon Edge.

© HMS Networks AB 2024