Tutorial: Connecting a Simulated Meter to EnOS Edge via IEC104 Protocol


This guide describes how to connect the Edge IIoT Gateway device to the cloud for Edge delivery engineers and third-party partners. Take the electricity meter as an example.

Before You Start

Make sure that you have created and connected Edge gateway assets in the EnOS Management Console. For more information, see Registering Edge Gateway Device.

Step 1: Register Device to EnOS

Define a Private Model

  1. Log in to EnOS Management Console, and select Models to open the Model page.

  2. Go to the Private page. Click the New Model and provide the following information:

    • Identifier: Meter_for_tutorial
    • Model Name: Meter_for_tutorial
    • Created From: No
    ../_images/tutorial_create_model.png
  3. Click OK to save the basic information of the private model.

  4. From the list of created models, find the model that needs feature definition and click the view button view.

  5. Click the Feature Definition tab and click Edit > Add > Create Custom Feature.

  6. Provide the following information in the pop-up window to create features for 4 measurement points. The 4 measurement points that you created represent Ua, active power, reactive power and Ia for the electricity meter

    Measurement Point Feature Type Name Identifier Point Type Data Type Unit Quality Indicator
    1 Measurement Points Ua Meter.Ua AI double Electric Potential: volt | V No
    2 Measurement Points P Meter.ActivePower AI double Power: kilowatt | kW No
    3 Measurement Points Q Meter.ReactivePower AI double Power: KiloVolt Ampere Reactive | kVar No
    4 Measurement Points Ia Meter.Ia AI double Electric Current: ampere | A No
  7. Click Confirm. Click Publish at the bottom of this page.

Create a Product

  1. In the EnOS Management Console, select Device Management > Products.
  2. Click New Product, and provide the following information in the New Product window.
    • Product Name: Meter_product
    • Asset Type: Device
    • Model: Meter_for_tutorial
    • Onboarding Method: Only EnOS IoT
    • Certificate-Based Authentication: Disabled
  3. Click OK to save the configuration.
../_images/tutorial_create_product.png

Register a Device

  1. In the EnOS Management Console, select Device Management > Device Assets.
  2. Click New Device, and provide the following information in the New Device window.
    • Product: Meter_product
    • Device Name: Meter_1
    • Timezone/City: UTC+08:00
  3. Click OK to save the configuration.
../_images/tutorial_create_device.png

In this step, you need to create the following 4 meters:

../_images/tutorial_device_list.png

Step 2: Configure a Template to Map Data Points

A device template maps data collected from a device to the model measurement points defined on EnOS Cloud using a protocol.

For more information about flexible template configuration In EnOS Edge, see Access Templates.

Create a Template

  1. In the EnOS Management Console, select EnOS Edge > Template > Private Template.
  2. Click New Template, and provide the following information in the Add Template window.
    • Template Name: Meter_template
    • Brand: Envision
    • Device Type: Envision sample
    • Version: v1.0
    • Model: Meter_for_tutorial
  3. Click Confirm to save the configuration.
../_images/tutorial_add_template.png

Edit a Template

  1. Click the  edit to enter the Edit Template page of the template that you just created.

  2. In the “Step 1: Edit Point Table”, click the template and go to the Public Protocol tab.

  3. Search for the IEC104_Gateway_X86 protocol and click the download button to download its standard point file (point.xlsx).

  4. Download Original_Point_Info_en.xlsx and double-click it. As shown below, each meter has the same set of measurement points to collect data including Ua, Ia,, active power, and reactive power. Thus, you can determine to map the data in the same access template.

    ../_images/tutorial_source_points.png
  5. Double-click the standard point file (point.xlsx).

  6. Fill in the following information on the point sheet of the point file .

    ../_images/tutorial_point_file.png


    • In actual scenario, you need to fill in the point sheet according to the Readme sheet of the point file and the description row of original device point table (Original_Point_Info.xlsx).
    • You can fill in identifiers of meter model points in the alias column for Auto-mapping. This step is a prerequisite to enable the Auto-mapping function.
  7. Back to the Edit Template page and click the upload button to upload the edited point file (point.xlsx) under the “Step 1: Edit Point Table” session.

    ../_images/tutorial_edit_template.png
  8. Click Auto-mapping under the “Step 2: Map Model Point” to map device measurement points to model measurement points.

  9. (Optional) Auto-mapping function only supports EQUAL mapping. If you need to use other formulas, click the Mapping Points mapping of the measurement point. In the Collect tab, click Add Formula and select the formula. See Point Mapping Formulas.

  10. Click Save to save the configuration.

Step 3: Configure Connectivity Information

Add a Connection

  1. In the EnOS Management Console, go to EnOS Edge > Edge Management.

  2. Click the view button view of the target Edge device to go to the Edge Details page.

  3. Go to the Access > Ethernet tab and click add to add a connection.

  4. Provide the following information in the Add Connection window:

    • Connection Name: Connection_for_tutorial
    • Connection Mode: TCP/IP Client
    • Primary Interface: The IPv4 address of your laptop. For port, you can give it a random integer greater than or equal to 1000.
    • Protocol Type: IEC104
    • Protocol Version: No action is required. But you might have to modify the configuration if you use other protocols or as needed.
  5. Click Confirm to save the configuration.

    ../_images/tutorial_add_connection1.png

Add a Device

  1. In Access > Ethernet tab, click to expand the connection you just created and click New Device.
  2. Under the “Step 1: Edit Point Table” in the Add Device window, select the product Meter_product we just created and check the devices Meter_1, Meter_2, Meter_3, and Meter_4.
  3. Under ”Step 2: Map Model Point”, select the template Meter_for_tutorial.
  4. Click Save to save the configuration.
../_images/tutorial_add_device.png

Edit the Offset Range for Devices

You need to edit the offset range for each device to calculate the information body address of each measurement point. And then the system can collect the data from the corresponding address bits.

Calculation Method: [Information body address] = [Information body start address] + [Offset]. (The information body address bit of the AI measurement point starts from 16385.)

  1. Go to Access > Ethernet tab and click to expand the connection you created.
  2. Click the view button of the device to go to the Edit Device window.
  3. Enter the logical address and AI offset according to the original point table (Original_Point_Info.xlsx).

The offset configuration items for this tutorial are shown in the following table:

AI measurement point AI offset Logical address
Meter_1 0-3 1
Meter_2 4-7 2
Meter_3 8-11 3
Meter_4 12-15 4

Publish Edge

Click Publish to distribute the configured resource package to the Edge devices.

Step 4: Simulate Data using the Protocol Simulator

Configure the Protocol Simulator

Use a protocol simulator to simulate and send data to the cloud. For more information, contact the Edge Team (edge-support@univers.com).

View the Simulation Data in EnOS Management Console

  1. In the EnOS Management Console, go to EnOS Edge > Edge Management.
  2. Click the view button of the target Edge device to go to the Edge Details page.
  3. In Access > Ethernet tab, click to expand the connection created before.
  4. Click the view button of the sub-device. When the connection status of the sub-devices is Connected, the data are connected to the cloud.
../_images/tutorial_status.png