Peacefair PZEM-004T v3.0 Modbus to the cloud with an ESP32

Peacefair·Energy meters·Modbus RTU (RS-485)Datasheet-derived

The hobbyist single-phase AC energy monitor: a PCB with a split-core CT, sold with a TTL serial header. It speaks Modbus RTU, so through a TTL-to-RS-485 adapter (or the RS-485 version of the board) it reads like any other meter.

The Synacl ESP32 gateway reads the Peacefair PZEM-004T v3.0 over Modbus RTU (RS-485). This catalog entry carries the register map, scaling and connection defaults below, so adding it in the app is a pick from a list rather than a form filled in from the datasheet — and it is the same data an AI agent gets from the list_catalog MCP tool.

Needs a recent gateway firmware — 16-bit signed and 32-bit (int32 / float32) Modbus registers. The app warns when the selected gateway is older; update it from the gateway page first.

Registers · 6 tags

TagUnitAddress (hex / dec)FunctionFormatWord orderScale
Voltage
voltage_r_phase
V0x0000 / 0FC04 input registeruint16× 0.1
Current
current_r_phase
A0x0001 / 1FC04 input registeruint32low word first (CDAB)× 0.001
Active power
power_active_total
W0x0003 / 3FC04 input registeruint32low word first (CDAB)× 0.1
Energy
energy_import_active
kWh0x0005 / 5FC04 input registeruint32low word first (CDAB)× 0.001
Frequency
frequency_grid
Hz0x0007 / 7FC04 input registeruint16× 0.1
Power factor
power_factor_total
0x0008 / 8FC04 input registeruint16× 0.01

Addresses are 0-based wire addresses — what goes in the request frame — shown as hex and decimal. A datasheet that numbers registers from 30001 / 40001 is one higher. 32-bit values occupy two consecutive registers. Engineering value = raw × scale + offset; the gateway sends the raw reading and Synacl scales it.

Connection defaults

Baud rate9600
Framing8N1 — 8 data bits, no parity, 1 stop bit
Unit ID (slave address)1

Wiring

The v3 board's 5 V TTL header (5V, RX, TX, GND) needs a TTL↔RS-485 converter before it can join the gateway's RS-485 bus: converter A to the gateway's A, B to B, GND common. Power the board's TTL side from 5 V. The CT clamps around ONE conductor (live or neutral, not both).

Notes

Set it up in three steps

  1. Flash the gateway from the browser
    Plug an ESP32 dev board into USB, open the free web flasher in Chrome or Edge and write the Synacl gateway firmware. It asks for Wi-Fi and pairs the gateway with your account — nothing to install, about two minutes.
  2. Add the Peacefair PZEM-004T v3.0 from the catalog
    In the app open Devices → Add device and choose “Start from a catalog device”, then pick Peacefair PZEM-004T v3.0. The Modbus RTU (RS-485) settings and every tag in the table above are filled in; choose the gateway it is wired to, change the unit ID or baud rate if yours differs, and save. How the catalog picker works →
  3. Watch the live data arrive
    The gateway receives the new configuration over MQTT within seconds and starts polling. Readings show on the device page and in any dashboard widget you bind to them; add a rule for alerts, keep history for reports, or let an AI agent read it over MCP.

How this entry was verified

Datasheet-derived — derived from the vendor datasheet and not yet confirmed on hardware — please report a mismatch.

Bench-verified means Synacl ran this entry on real hardware. Datasheet-derived means the map was transcribed from the vendor's documentation, so a register may be off by one or in the other word order on your unit — a two-line email fixes it for everyone.

Report a register mismatch · Vendor datasheet ↗ · All catalog devices

Try it on your own hardware

Synacl is free for five devices — no card, no sales call. Flash a gateway from the browser, add the Peacefair PZEM-004T v3.0 from the catalog, and see live data in a few minutes.