In this article, we will describe creating a remote metering system of a consumed electricity built on the basis of a device NetPing IO v2, an electricity meter and a monitoring system PRTG Network Monitor. This system allows to take readings remotely from a pulse output, which may be subsequently sent to a PC.
The system will be on demand everywhere, where is a geographically distributed network of electricity consumers with a necessity to take readings on each consumer individually. This may be a network of individual households, summer cottages, garages and apartment buildings. Using the system guarantees taking instant and precise readings of a consumed electricity from every metering device. The system eliminates errors in manual taking readings from electricity meters and makes controllers, who control a correct delivery of data from meters, unnecessary.
To organize a remote assessing of electricity from power meters, required when forming a monthly electricity payment, there is a need to have:
- a remote monitoring device NetPing IO v2;
- electricity meters with a pulse output;
- a PC to collect and store information by the installed monitoring system PRTG Network Monitor;
- a local/global data network
Electricity meters equipped with pulse outputs will be used as a device to assess the amount of a consumed electricity in the system. A pulse output of an electricity meter is connected to an IO line of a NetPing IO v2 device. One electricity meter can be connected to each IO line. As a result, NetPing IO v2 supports connecting up to four electricity meters. The device NetPing IO v2 reads pulses from a pulse output of a meter and stores readings to a built-in flash memory. It is possible to request data from the device NetPing IO v2 via a TCP/IP network for a PC to collect and store information. This may be used to count a monthly electricity bill.
General View of the System
Configuring the System of Assessing Electricity in PRTG Network Monitor
We will store electricity readings taken from a meter in the monitoring system PRTG Network Monitor, where it is possible not only to store data, but also to create various diagrams to visualize them.
To assess the amount of electricity, there is a need to add the devices NetPing IO v2 into PRTG Network Monitor and configure polling of devices. There is a need to connect to a web interface and get authorized to add devices into the PRTG:
Before adding NetPing IO v2 devices to PRTG, it is recommended to add a group to determine a hierarchic order and a total functionality of all devices, which are in a group. To add a group manually, go to the tab «Devices», menu item «Add Group»:
At the page «Add Group» choose «Main probe», where a new group will be created and click the button «Continue >»:
Then fill in all requested parameters of the second step when creating a new group, the page «Add Group to Group Local probe»:
Group name – is a group name used to identify it. On default, the name will be displayed in a device tree and in all error messages.
Tags – tags group objects in the PRTG system, and allow to filter them according to the requested functionality.
Credentials for SNMP devices – credentials used to connect to devices for monitoring and controlling them via an SNMP protocol. When using NetPing IO v2, there is a need to specify settings just the same way as showed on the screenshot above. Community «SWITCH» is a default value.
To configure parameters «Credentials for SNMP devices», there is a need to inherit parameters, configured at the first PRTG start in the configurator Guru, checking the checkbox «inherit from Main probe», or unchecking the checkbox «inherit from Main probe» and filling in an offered form with corresponding parameters taken from the web page «Settings» of a web interface of a device NetPing IO v2.
After configuration of parameters of a group is completed, click the button «Continue >». A new group «NetPing» will appear on the page «Group Root»:
Afterward, click the button «Add Device», which is located under the name of the group «NetPing» to add NetPing IO v2:
Otherwise, it is possible to add new devices using a top menu, a tab «Devices», a context menu item «Add Device»:
Then a process of adding a new device is performed in two steps. The first step is performed on the page «Add devices», particularly by selecting a parameter «Add device to an existing group» and specifying a previously created group «NetPing» for a device being added. Click the button «Continue >» to proceed to the second step of a configuration:
Doing the second step, there is a need to fill in main parameters highlighted in red at the page «Add Device to Group NetPing»:
Device Name – is a name used to identify a device. On default, a name will be displayed in the device tree and in all error notifications.
IP Version – choose a version of an IP protocol to connect to a new device.
IPv4-Address/DNSName – an IP address or a DNS name of a new device.
Tags – tags group objects in the PRTG system, and allow to filter them according to a required functionality.
Device Icon – choose an icon for a device from the list. The icon will be displayed in a device tree. If necessary, you can add your own icon. To do that, you should place a file with the icon by the following path: C:\Program Files (x86)\PRTG Network Monitor\webroot\icons\devices\
Sensor Management – select a type of a device detection. In the example, a manual mode of adding with no automatic device detection will be regarded. To examine the modes of automatic detection and additional settings more precisely, refer to the article «PRTG Manual: Add a Device» via the link http://www.paessler.com/manuals/prtg/add_a_device.
Credentials for SNMP devices – they are data used to connect to devices for monitoring and controlling them via an SNMP protocol. In the example, the parameters are inherited from the group «NetPing». If there is a need to specify parameters different from the inherited ones, one should uncheck a checkbox «inherit from Monitoring server room».
After clicking the button «Continue», the device NetPing IO v2 will be added to the page «Group Root». It is possible to add any number of NetPing IO v2 devices with connected electricity meters into the PRTG Network Monitor monitoring system in the same way:
Now there is a need to add polling parameters of electricity meters to NetPing IO v2 devices into the PRTG using an oidlib file.
To add polling parameters of an electricity meter to NetPing IO v2, there is a need to choose a tab «Sensors» in the main menu and click the item «Add Sensor»:
Such start of adding sensors will consist of two steps. To add sensors to the device more quickly, there is a need to click the button «Add Sensor» of the context menu of a NetPing IO v2 device. The second variant will shorten adding sensors to the one-step action:
An SNMP technology is used to collect data parameters from NetPing devices. In the window «Add Sensor to Device NetPing IO v2 - an electricity meter №1 [192.168.129.100] (Step 1 of 2)» it is better to set filters by parameters «TARGET SYSTEM TYPE?» and «TECHNOLOGY USED?» while adding sensors, just as it is shown at the picture. Afterward, you should choose a proper type of added sensors «SNMP Library»:
Choose a necessary oidlib file for NetPing IO v2 in the list «Please select a library file»:
OID libraries (oidlib) files – are files that are used in the PRTG to monitor and control devices using an SNMP protocol. Oidlib files are obtained by converting MIB (Management Information Base) files using specific software named MIB Importer (http://www.paessler.com/tools/mibimporter).
It is obvious from the list above that there is no oidlib library for NetPing IO v2. To import the required library into the PRTG, there is a need to download a prepared file of OID library from the official web site (http://www.netpingdevice.com/products/netping-io-v2).
A downloaded file of the OID library [Pub] DKSF 253.5.R OL.oidlib is required to be copied to the server in the folder by path C:\Program Files (x86)\PRTG Network Monitor\snmplibs. Update the list «Please select a library file» afterward and then choose the file from the list and click «OK»:
The PRTG will offer to choose necessary data to add them to «NetPing IO v2 - electricity meter №1»:
Then click «Continue». A table with polling values will appear at the page of the device «NetPing IO v2 - electricity meter №1»:
Therefore, the data was chosen, according to which the monitoring system PRTG Network Monitor will be polling NetPing IO v2 devices by three parameters. The same way data are added for other NetPing IO v2 devices.
Description of OIDs, requested by the monitoring system PRTG Network Monitor, is given in the table below:
A coefficient for converting pulses into kWh while using the device together with electricity meters for an IO line n (n=1..4). It sets the amount of pulses for 1 kWh, 3600 on default
|.22.214.171.124.4.1.25728.9700.1.1.3.n||npElecPower||Gauge32||READ||Average power (Watts), which is registered by an electricity meter, connected to an IO line n (n=1..4). An average sliding period is 5 min. A value is calculated according to frequency of pulses from an electricity meter.|
|.126.96.36.199.4.1.25728.9700.1.1.4.n||npElecEnergy||Counter32||READ||An electricity meter for an IO line n (n=1..4). It is calculated by dividing the accumulated number of pulses by a coefficient for converting «pulses to 1 kWh». It is reset to zero when a device is cut off power.|
After adding NetPing IO v2 devices and data into the PRTG Network Monitor, it is possible to create a user map to visualize them, and add necessary readings of meters in a certain moment of time to it as well as diagrams of power consumption for the last month.
To create such map, there is a need to click the tab «Maps» of the main menu and choose the item «Add map»:
Fill in all required fields at the page «Add Map (Step 1 of 2)» and click «Continue to step 2»:
Map Name – is a map name.
Map Width – is a map width.
Map Height – is a map height.
Background Image (optional) – is a choice of a background image for a map.
In a map constructor mode «Map Designer» it is possible to add data on average power for each meter and corresponding diagrams for the last 30 days. To do that, in the right part of a constructor (area «Properties») choose a suitable icon for an electricity meter from the list, data on its average power for the moment «Status Icon» -> «Name and status» and diagrams «30 days (Large Fonts)». Drag all these on the map one by one. Choose a necessary device with certain reading «np elec: 1/Average power of an electricity meter №n» (where n is a number of a meter) out of the list in the left part of the constructor (area «Device Tree») and drag it on the map. On the diagrams, you will see not only average power (in W), but also downtime of a NetPing device (in %).
As a result of configuration described above, the monitoring system PRTG Network Monitor allows to draw all necessary information on a map for a user, making it convenient to browse and analyze polling data from electricity meters, connected by pulse outputs to input-output lines of NetPing IO v2 devices.
Moreover, the monitoring system PRTG allows to view readings taken from meters, in the form of the table with current data as well as data for 2 days, 30 days, and a year besides drawing diagrams on a user's map:
The last step of the setting is to configure monthly email notifications on consuming electricity for a designated destination. To configure monthly notifications, there is a need to click the tab «Reports» of the main menu and choose the item «Add Report»:
Configure a new report in a window «Add Report» according to the picture below:
Report Name – is a name of a report under creation.
Template – is a template, which determines a report appearance. It is chosen out of the list of preset reports.
Timezone – is a timezone, which will be used when displaying time in a report.
Add Sensors Manually – is choosing necessary readings (OID parameter), which will be displayed in a monthly report. To assess consuming electricity in kWh, there is a need to choose «np elec: 1/electricity meter» – an electricity meter for an IO line n (n=1..4).It is calculated by dividing accumulated number of pulses by a coefficient for converting «pulses into 1 kWh».
Report Schedule – this parameter determines a schedule when a report will be made. As setting a monthly report is examined in this example, there is a need to choose a parameter «Every specific day of a month», which implies running a report on a certain day of a month.
Specify Day – is displayed when choosing a parameter «Every specific day of a month». It specifies a certain day of a month when a report will be made.
Scheduled Processing – is choosing a final action when a report is formed. A chosen parameter «Save report to disk and send it by email» means the report will be stored at a local PC disk and later sent by e-mail to a preset recipient.
Email Address – is an email address, where monthly e-mail notifications will be sent.
Reported Period – determines a time lapse for which the data will be a part of a report.
Report Period Type – this parameter determines data from what period of time will be included into a report.
Day Period – is a moment of time when a previously configured report will be formed.
After a report configuration is completed, it needs to be saved with the button «Save». Reports for other electricity meters are created the same way. Created reports are placed into the table «Reports» of the PRTG Monitoring System:
The last step of configuring the PRTG Network Monitor monitoring system will be configuring a system setting of email notifications delivery. To do that, there is a need to go to the tab «Setup» and choose the item «Notification Delivery» out of a system menu.
This menu item is designed to determine a method of sending e-mail notifications by the monitoring system.
SMTP Delivery Mechanism – is about choosing a mechanism of sending e-mail notifications. SMTP relay server built in the PRTG is used in the example.
Sender Email – is the email, which will be used as a sender of all e-mail notifications.
Sender Name – is a name, which will be used as a sender of all e-mail notifications.
HELO Ident – is a HELO identification for an SMTP, it must be unique.
As a result of the configuration described above, monthly reports were created, which would be formed on the basis of data received from electricity meters using NetPing IO v2 devices:
The system of assessing electricity consumption, described in the example, allows to fully organize collecting and storing of data. The system provides an opportunity to assess obtained data, and allows to send e-mail notifications to technical staff.
Similarly, you can keep track of water and gas consumption if meters have a pulse output, which can be connected to NetPing IO v2 to request data.