Overview gPlug Smart Meter



This function block reads the values of an electricity meter through a gPlug. The gPlug plugs into the customer interface of the meter and supplies grid power, power, voltage and current per phase, and the meter readings for import and export. This makes the grid meter available to the Block Energy Monitor, the Block Energy Manager and the Block Storage Optimizer without an additional current transformer.

The gPlug comes in versions for different meters: gPlugM (M-Bus customer interface, e.g. Landis+Gyr E450 and E570), gPlugD and gPlugD-E (P1 interface, the E version with network cable) and gPlugK (Kamstrup Omnipower). All versions run the Tasmota firmware and are read with this one function block.

The values can arrive in two ways:

The gPlug supplies import and export separately, each as a positive value. The function block combines them into a signed grid power: positive when importing from the grid, negative when exporting. This is the same direction the Energy Monitor, the Energy Manager and the Storage Optimizer expect. Grid power is available in watts and in kilowatts, so it fits each of these blocks without conversion.

If no data arrives for longer than the set monitoring time, the function block reports a communication error. The measured values keep their last state and are not set to 0.

Setup:

Notes:


Outputs

NL
Grid power W
Power at the grid connection in watts. Positive = import, negative = export.
NK
Grid power kW
Same as NL, in kilowatts.
NE
Grid import W
Power drawn from the grid. Always 0 or positive.
NA
Grid export W
Power fed into the grid. Always 0 or positive.
L1–L3
Power L1–L3 W
Power per phase, signed like NL. Only if the meter supplies phase values.
U1–U3
Voltage L1–L3 V
Voltage per phase.
I1–I3
Current L1–L3 A
Current per phase.
ZB
Meter reading import kWh
Total import according to the meter.
ZB1, ZB2
Meter reading import tariff 1/2 kWh
Import split by high and low tariff, if the meter supplies it.
ZE
Meter reading export kWh
Total export according to the meter.
ZE1, ZE2
Meter reading export tariff 1/2 kWh
Export split by tariff, if the meter supplies it.
SN
Meter number
Identification of the meter as text, if the meter supplies it.
KF
Communication error
1 if no valid data arrived within the monitoring time; with HTTP also after three failed requests in a row or a wrong web password.

Parameters

Connection HTTP, MQTT via the controller's broker or MQTT via an external broker.
IP address HTTP only: address of the gPlug in the network.
User, Web password HTTP only, and only if a web password is set on the gPlug. With Tasmota the user is always admin.
Poll interval HTTP only: time between requests in seconds, at least 2. The gPlug is a small device; polling faster than needed gains nothing, since most meters send their values only every 1 to 10 seconds anyway.
MQTT Topic MQTT only: topic of the gPlug as shown on its web page under Configuration → MQTT.
Server, Server port, Broker user, Broker password, TLS, Check certificate MQTT via an external broker only: access to this broker.
JSON group Name under which the gPlug reports its meter values. For the gPlug this is z. Only change it if the meter program was modified.
Key profile Defines the names and units of the values. “Automatic” detects the current and the previous meter program by itself.
Different mapping Only for modified meter programs. Assigns a different value to an output, in the form Output=Name*Factor, several separated by commas, e.g. NE=Pi*1000, U1=V1. A - forms a difference, e.g. NL=Pi-Po*1000. Leave empty to use the key profile.
Monitoring time Seconds without valid data after which the communication error is reported. 0 switches monitoring off. Default 60.
Debug Writes requests and responses to the diagnostics.

See also the general parameters of all function blocks.