Adding a new meter and PVD communication

Introduction

The document describes the mechanism and method of data acquisition from electricity meters. For this we use the IEC-62056 energy protocol and communication with energy meters using edge-computing devices equipped with the PVD application.

This tutorial shows the steps and how to get data from an external device to your system. Using the PVD application dedicated to Windows/Linux systems as well as embedded computing/edge computing devices, we can implement this solution for this type of device, but also for other protocols and types of devices. The mechanism will remain the same, only the configuration of the parameters of the devices and the PVD application will change.

PVD application documentation is in the user manual section. It contains all the information necessary to run and deploy this application on supported architectures.

Task: A new electricity meter was connected to the data acquisition system. This is the same type of meter as the existing ones and it is connected to the same bus as several other meters. Communication with the device via the RS-485 bus and the IEC-62056 energy protocol. Connect the device to the system so that the measurements of this device appear in the application and can be used in data analysis and in the operation of the AMAGE system.

Meter definition and connection design

The counter in this case is a POZYTON counter of the sEAB type. Each meter is identified by its serial number. In the photo we see this counter. The device type, exact configuration and serial number of the device are marked.

energy adding new energy meter pvd f8bd6
Figure 1. counter with configuration information

The meter has been connected to the existing measurement infrastructure. The meter was mounted on the TL-4 meter board and connected to the RS-485 bus in accordance with the diagram below.

energy adding new energy meter pvd ba72a
Figure 2. connection diagram to the existing installation

From what we can see, it has been connected next to the TL4-* meters and, according to the sequential numbering, it should receive the TL4-P7 identifier. We need to add such a counter to the system.

Adding a counter to the system

We run the AMAGE application (log in via a web browser). We go to the resource structure view. In this case, we display a list of element groups and go in this structure to a group of counters from the TL4 table. We filter the view and get a view of the current counters installed there:

energy adding new energy meter pvd 6dcc0
Figure 3. current structure of the system
On the view, the filter dialog has been displayed and docked permanently in the view. How to do this is described in the main user manual. The filter is available in the pull-out panel with the text Filter

Viewing the current meter, we can see its basic parameters (serial number, type, etc.) and parameters definable for the type specific for this meter model (sEAB manufactured by POZYTON).

energy adding new energy meter pvd 18e68
Figure 4. an existing counter of the same type

Going to the view of the type of element defining this resource, we see parameters that all resources of this type have. The view of any parameter (element type edition mode) and the properties of a given parameter are marked in the drawing. The additional information includes the parameter identifier (0.8.0) corresponding to the query code for the IEC-62056 protocol.

energy adding new energy meter pvd 08b91
Figure 5. definition of meter type and energy parameters

We return to the list of resources and choose to add a new resource. The appropriate group of elements (counters on TL4) will be selected automatically. Select the type of device - here type sEAB.

energy adding new energy meter pvd 07e63
Figure 6. we add a new counter - type selection

Next, we define the basic data of the counter. Its serial number etc.

energy adding new energy meter pvd 11b82
Figure 7. we define the basic data of the meter (S/N)

For the sake of order, we additionally generate an identifier number that can be used to print a label with a QR/Datamatrix code for quick identification by mobile devices.

energy adding new energy meter pvd f78e0
Figure 8. we generate the identifier code - QR printout
Label printing and personalization are described in a separate document/tutorial on labels and report design.

As a result of this action, we get a new electricity meter available in the system. It has all the parameters that come from a given element type.

energy adding new energy meter pvd 07f3f
Figure 9. newly created counter

Now it remains for us to configure the PVD application so that it starts reading the parameters of this energy meter and sends them to the main system to the appropriate parameters visible in the details of the given device.

PVD communication configuration

To enable communication in the PVD application, we need information about what we will read (what device, what properties, e.g. registers) and where we will save the read values in the main system.

In the resource details view, select an action from the context menu to generate a parameter mapping in JSON format.

energy adding new energy meter pvd ed8b1
Figure 10. generation of parameter mapping JSON files

The result is a file that contains pairs - parameter name and parameter UUID code. The UUID code is a unique identifier for a given parameter. It is a globally (worldwide) unique code, which allows unambiguous determination of these values.

energy adding new energy meter pvd 2398b
Figure 11. generation result - JSON file

Having such a mapping, we proceed to the configuration of the PVD application. This application has a so-called IEC-62056-21 suppliers. The configuration is in JSON format and contains information about serial ports for communication with meters and meter parameters.

In this case, we already have an existing configuration. In this case, we are looking for an already existing TL4-P6 counter in the file. We can see its configuration and all data. We will use this data to copy and create a new configuration for the new meter.

energy adding new energy meter pvd 312d3
Figure 12. finding the previous meter in the current PVD configuration
A detailed description of the configuration with examples is available in the PVD application user manual.

In order to use the already defined data that we downloaded from the system to a format compatible with PVD, we must get rid of the names of the parameters and leave only the parameter identifier in the first element of each pair in accordance with the IEC-62056-21 protocol.

energy adding new energy meter pvd 57b9b
Figure 13. modifying the mapping file to match the format for IEC-62056
For details of the parameters, their properties and names, refer to the documentation of the communication protocol of the selected device.

The mapping created in this way: <IEC-62056-21 parameter> → <UUID code of the parameter in the system> is pasted into the meter mapping.

According to the system design, a current transformer in the range of 750/5A was used for the measuring circuit. This is visible in the documentation. In order to properly scale the meter measurements to the actual results (and not those measured on the secondary side of the transformer), we must multiply the numerical parameters by 150 (750/5).

In addition, therefore, we set the multiplier parameter to 150. The other parameters remain the same. We get the counter mapping ready:

energy adding new energy meter pvd 3203b
Figure 14. ready mapping

We place such mapping after the TL4-P6 counter in the same section of the communication protocol and port (in this case COM10).

energy adding new energy meter pvd 3a564
Figure 15. ready configuration of the new meter

The system configuration is ready for testing and production deployment. However, in order to quickly check only a given meter, we will make a few (temporary) modifications to the meter and PVD configuration file.

Testing

To quickly test communication with a given meter, we will use a small modification of the configuration file. We do it because other meters are connected on the same bus and communication over the RS-485 bus is sequential. We would have to wait until all other meters are read. So, for testing, we turn off all other buses and counters. We do this by setting the enabled flags to false.

energy adding new energy meter pvd f967b
Figure 16. disable all other counters and serial ports

We get a ready file for testing - only one bus switched on and only one counter (our new counter).

We proceed to the tests. We disable the PVD service responsible for communication with these meters on the edge device.

energy adding new energy meter pvd 7a62b
Figure 17. disabling the PVD service on the edge computer
The PVD application can be run multiple times on one edge computer and each of them can deal with one of the communication areas.

We make a copy of the current configuration and replace it with the prepared test configuration. Please note the appropriate supplier path for your PVD instance.

energy adding new energy meter pvd a3093
Figure 18. a copy of the current configuration and replacement is a test one

Additionally, we change the 'recipient' of the data. The default was the AMAGE system and its REST interface, as seen in the core-config.json file. There we have the rest plugin enabled.

energy adding new energy meter pvd 6c5a5
Figure 19. change of recipient of data from the AMAGE system (REST communication)

We modify this and change the recipient to the test recipient c-example. This will not send measurements to the AMAGE system in case of correct communication. Sometimes it is required to verify the measurements, see if we have defined the parameters and possible scaling correctly. The changed configuration file contains only the recipient who will save the read measurements locally in the application log.

energy adding new energy meter pvd 7f1f8
Figure 20. change to test customer
Other 'recipients' are described in the PVD documentation. For example export to CSV format (for visualizations/charts). Please note that multiple recipients can be enabled (same as vendors).

We restart the PVD instance.

energy adding new energy meter pvd 69cff
Figure 21. we start the PVD instance

We go to the PVD application log directory and verify the appropriate log file. On the screen we can see the correct reading from the meter with the given serial number and the read values.

energy adding new energy meter pvd ba5e2
Figure 22. we check the communication log
On the last screen, the serial number (S/N) does not correspond to the initial number by definition in the AMAGE system, because this meter was not yet connected at the moment. The log shows correct communication with another meter for demonstration purposes.

Summary

At this stage, we have configured the energy meter and entered the configuration and tests. We confirmed the correct reading of the data from the meter. The last step is to disable the PVD, replace the IEC provider configuration with the target one (with the appropriate counters enabled), change the receiver to the target REST AMAGE interface and restart the PVD. The data in the system will be updated and you will be able to view historical records in the history of the device’s parameters.

Task completed :)

The Howto is based on system version 1.17.0.2 (03.2022) and presents features that may not be available in your system. Ask AMAGE about making this functionality available.
Due to ongoing development of the system, some screens or configuration files may look slightly different, but will still retain the full functionality described here. This does not affect the core functionality described in this document.