PZIOT-E02 consumption meter – with native okosvillanyora.hu support


The Swiss army knife of phase measurement

The PZIOT-E02 can provide great help in two situations:

1. If you don’t have an electricity meter with a P1 port

In this case, the PZIOT-E02 functions as a standalone phase meter.

  • It can measure voltage, current, power factor, and accumulated consumption on one phase.

  • The data is sent directly to the okosvillanyora.hu cloud via MQTT, allowing you to monitor your consumption on the familiar online interface.

  • This mode is especially ideal for single-phase systems, where the entire household consumption occurs on one phase.

2. If you have an electricity meter with a P1 port – but also have a solar panel system

In this case, you already get the full network data from the smart meter, but you don’t see the exact production data from your inverter. The PZIOT-E02 can then be used to measure the inverter:

  • It should be connected to the phase conductor coming from the inverter, before any load appears on it.

  • Thus, the device shows the inverter’s real output voltage, current, power, and accumulated production—which is not the same as the feed-in data from the electricity meter.

Installation and connection with the ADA P1 Meter

  • During installation, the PZIOT-E02 must be connected to the same Wi-Fi network as the ADA P1 Meter.

  • After startup, in the admin interface accessible at its own IP address, you can select from a dropdown which phase the device is connected to (L1, L2, or L3).

  • This setting is not just a simple label: if provided, the PZIOT-E02 will automatically find the ADA P1 Meter on the network and send its own measurements to the API endpoint.

  • Thus, the ADA P1 manages the data received from both the consumption meter and the PZIOT together, forwarding it to the okosvillanyora.hu cloud.


So there are two clear usage scenarios:

  • as a standalone consumption meter (if you don’t have a P1 port),

  • as an inverter meter supplement (if you have a P1 port).

Installation guide + reset

Wiring
- PZIOT-E02 → according to manufacturer’s schematic.
- Power supply, then connect the PZEM meter head to the desired phase (L1/L2/L3). Feed the phase from top to bottom.
- It is advisable to install a separate circuit breaker for the power supply so the device can be switched on/off.
- First start / setup
- After applying power, the device creates its own Wi-Fi hotspot named ADA-PZEM.
- Connect to the AP, open the setup page via the QR code or at http://192.168.4.1 in your browser (setup).
- Enter the Wi-Fi, (if needed) MQTT, email/device password.
- If there is an ADA P1 Meter device on the network, do not enable the MQTT connection!
- Save → device restarts, then connects to your own network (STA mode).
- Then the web interface is accessible at the local IP.

Reset (factory reset)
The device has a recessed button at the beginning. Press it once briefly to erase settings and restart in AP mode for setup.
The PZIOT-E02 device is an IoT device. The firmware can be erased by pressing and holding the reset button.Therefore, do not press it for long!

Commissioning → Standalone phase measurement (for meters without P1 port):
Single-phase system:
- Connect the PZEM sensor to the single phase (L1).
- On the PZIOT-E02 web interface, set the selected phase (Select: L1).
- On the local UI/JSON you will see voltage, current, instantaneous power and accumulated energy.

Three-phase system
- Select one phase to measure (e.g. L1) and connect the PZEM to it.
- (If you want to measure all three phases separately, you need 3x PZIOT-E02.)
- On the web interface (http://pziot-e02.local) set the phase select matching the wiring (L1/L2/L3).
- The device then continuously measures and provides data for the selected phase on the local interface/API.

Commissioning → with ADA P1 Meter (okosvillanyora.local:8989):
Wiring:
the PZIOT should be connected to the inverter phases before any other load connects.
Local network: the ADA P1 Meter and PZIOT-E02 must be on the same Wi-Fi (otherwise they cannot communicate). 
Phase selection on PZIOT: on the web interface in Phase Select field set which phase to measure (L1/L2/L3).
Data transfer: the PZIOT-E02 automatically transfers phase data to the ADA P1 (local HTTP at okosvillanyora.local:8989) so no separate subscription is needed.
Cloud: the ADA P1 incorporates these “plugins” data and forwards it to the okosvillanyora.hu cloud – so production/phase-level measurements also appear on the usual dashboard. The HMKE.APP automatically shows the home consumption and inverter production.


PZIOT‑E02 ↔ ADA P1 Meter integration


1) Brief overview

The PZIOT‑E02 is an ESP8266-based phase meter/monitor that reads the PZEM module via Modbus and then:

  • outputs its own DSMR/OBIS style “telegram” (HTTP endpoint),
  • optionally publishes to MQTT,
  • if used with ADA P1 Meter, do not tick MQTT in setup!
  • and sends data via HTTP POST as a “plugins” device to the ADA P1 Meter at okosvillanyora.local:8989/write endpoint.

The goal: to have inverter/production (per phase) visible on the P1 meter and incorporated into the okosvillanyora.hu cloud.


2) Main components

Microcontroller: ESP8266 (LittleFS, EEPROM, AP/STA mode)

Sensor / meter: PZEM (Modbus)

Network: Wi-Fi (AP setup → STA), mDNS

Communication: HTTP (REST-like local API), MQTT (retained), HTTP POST to ADA P1

Firmware features: OTA update, factory reset, remote “task” execution


3) Operating modes

3.1 Access Point (AP) setup

Device SSID: ADA-PZEM (password: 12345678)

Purpose: Wi-Fi data, email, device password, fixed okosvillanyora.hu MQTT data sending.

After saving, device switches to STA mode and connects to the network.

3.2 Station (STA)

Local webserver and APIs run.

PZEM query → processing → JSON/telegram update.

Scheduled sends: MQTT (if configured), and POST to ADA P1.


4) Setup process (first-run)

Power on – device starts in AP mode.

Connect to the AP (ADA-PZEM).

Setup page – enter SSID/password, email, optional MQTT data.

Save and reboot – device comes up in STA mode, accessible via mDNS (e.g. http://pziot-e02.local).

Select phase on admin page (L1/L2/L3/–), saved to EEPROM.


5) Data flow and timing

PZEM reading: cyclic Modbus queries – voltage [V], current [A], PF, frequency [Hz], power [kW], accumulated energy [kWh] (internal counter).

Energy accumulation: internal logic calculates totalEnergy_kWh (filtered, time-based integration), manually resettable.

JSON update: new v2 JSON generated at least every 10 sec (local display/MQTT).

ADA POST: per-selected-phase values sent by HTTP POST to ADA P1.


6) PZEM reading (brief)

Fields calculated from raw register values:

Voltage (V), Current (A), Power (W → kW), Apparent power (VA), Reactive power (kVAR), Frequency (Hz), Power Factor (PF)

Error handling: checks Modbus success, updates partial values only on success.


7) DSMR/OBIS telegram generation

PZIOT arranges measured data into OBIS key-based “telegram” string (e.g. 1-0:32.7.0(V), 1-0:1.7.0(kW), 1-0:1.8.0(kWh), etc.).

CRC16 calculated over telegramContent, appended at end in !XXXX format.

Local endpoint: GET /api/telegram – cleaned, valid telegram or “No valid P1 telegram…”.

Note: key pairs and translations are maintainable in source code; see attached OBIS/language tables.


8) Local API endpoints (short list)

GET / – admin UI (graphs, settings)

GET /api/telegram – current P1-style telegram (with CRC)

GET /api/json – current JSON

GET /api/reset-energy?k= – set accumulated energy (default: 0)

GET /api/save-phase?phase=l1|l2|l3|- – save chosen phase to EEPROM

POST /factoryreset – factory reset

GET /restart – restart (redirects to IP)


9) ADA P1 Meter integration

Target endpoint: http://okosvillanyora.local:8989/write

Request body (example):

{

"device": "plugins",

"values": [

{"index": 8, "name": "PZEM_total_l1", "value": 123.456, "unit": "kWh"},

{"index": 9, "name": "PZEM_voltage_l1", "value": 231.0, "unit": "V"},

{"index": 10,"name": "PZEM_power_l1", "value": 0.842, "unit": "kW"}

]

}

Index allocation per phase (base + fields):

L1 → baseIndex = 7 → total = +1 → 8, voltage = +2 → 9, power(kW) = +3 → 10

L2 → baseIndex = 10 → 11, 12, 13

L3 → baseIndex = 13 → 14, 15, 16

The PZIOT updates measurement before each send (readPZEM()), then sends data in the shown structure. P1 accepts these as “plugins” and incorporates them in its data model/cloud sync.


10) MQTT publishing (optional)

Topic: dsmr/ (where device identifier is derived from MAC)

Payload: v2 JSON.

Retained: yes.

Connection: based on MQTT server/port/user/password entered during setup.


11) OTA update

On startup, version check: if new firmware available, HTTP update runs.

On error no factory reset, device continues on old firmware.


12) Remote “tasks”

Device periodically queries a user-associated URL.

Command example: resetTotal → internal totalEnergy_kWh reset, then feedback.


13) EEPROM and factory reset

Stored data: Wi-Fi SSID/password, email, device password, MQTT parameters, selected phase.

Factory reset: callable via HTTP; clears configuration, sets device to AP mode.


14) Security, token, authentication

v2 JSON contains user/field IDs, MD5-based token generated (MAC + email combination).

Communication between PZIOT and P1 happens on local network.


15) Related concepts / keys

OBIS keys: 1-0:32.7.0 (voltage), 1-0:31.7.0 (current), 1-0:1.7.0 (instantaneous power), 1-0:1.8.0 (total active energy), 1-0:14.7.0 (frequency), etc.

Translations: HU/EN labels (for UI/JSON presentation).


17) Samples

17.1 /api/telegram (excerpt)

/PZIOTE2A1B2C3…

1-0:32.7.0(231.000*V)

1-0:31.7.0(0.742*A)

1-0:1.7.0(0.842*kW)

1-0:1.8.0(123.456*kWh)

...

!ABCD

17.2 /api/json (v2, excerpt)

{
  "username": "user@example.com",
  "wifi_ssid": "MyWiFi",
  "local_ip": "192.168.1.50",
  "mac_address": "AA:BB:CC:DD:EE:FF",
  "meter_serial_number": "PZIOTE2AABBCC",
  "voltage_l1": 231.0,
  "current_phase_l1": 0.742,
  "active_power_import": 0.842,
  "active_energy_import_total": 123.456,
  "frequency": 50.01,
  "power_factor": 0.98
} 


Comments

No comments yet. Be the first!