How to configue the Ewon Edge/Ewon Cloud data connection to Azure IoT Hub

29 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 Azure IoT Hub 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 Azure IoT Hub connection

  • Open the Ewon devices properties and click "Destinations"
  • Click "Add Destination"
  • Select "Azure" as Platform.
  • Now you have to enter the Connection String OR the Certificate file and the Private key file of your device. Indeed the Ewon Egde supports authentication via

We will now explain the easiest method to do and test it with Azure IoTHub.

  • First, download and install the tool "Azure IoT Explorer"
  • Connect your Azure IOT and copy your IoT Hub Connection String from <YourIotHub> -> Security Settings -> Shared Access Policies -> IoTHubOwner -> Primary connection string.



  • In the Azure IoT Explorer tool, Add a new connection :
  • Paste the Connection String retrieved from your Azure IoT Hub portal

    If the connection is successful, it will give you access to the administrator functionalities of your IoTHub (Create devices, Monitor received messages, send messages to devices...)

  • Click "New" to create a new device.
  • Type a name and select the Authentication method you want to use.
     - The Symmetric key is a password based authentication. The only needed setting you'll have to use is the connection string. The certificate and file won't be used.
     - The X509 self-signed certificate used a unique certificate and a key file for your device. A tool is available to generate these certificates easily : https://tools.ewonsupport.biz/azurehelper/. 
     - The X509 CA signed method allows you to use CA signed certificates for your device. The root or intermediate CA certificate will have to be uploaded in the signing chain to IoT Hub before you register the device. 


    More details on X509 authentication method on https://learn.microsoft.com/en-us/azure/iot-hub/authenticate-authorize-x509
  • Here we will use the Symmetric key for the example.

  • Edit your device and copy the Primary Connection String to the Ewon Cloud > Destination > Connection String
  • Click Add and then on to save and 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 is not used in the case of Azure IoT Hub
  • Select the Publishing interval in seconds and click to push the configuration to your device.

Test your Data connection

Open the Telemetry section and click "Start". You should then see the Json messages sent by your Ewon Edge device.

 

© HMS Networks AB 2024