Custom firmware for the Homey Energy Dongle (ESP32-C6) that reads DSMR 5.0 telegrams from a smart meter P1 port and exposes 3-phase electrical data over Zigbee.
Probably also works for other similar hardware.
Should work with any DSMR 5.0 compliant meter (Landis+Gyr, Kaifa, Kamstrup, Iskra, Sagemcom, etc).
Was written for my use case where I had a Homey Energy Dongle but wanted to utilize the Zigbee capability of the C6 instead of wifi. Can probably be improved a bunch and/or support more devices, feel free to write a PR.
Here is an example of how you can use the data in a dashboard

Pre-built firmware is available on the Releases page
The dongle has no dedicated boot button. To enter flash mode:
- Unplug the dongle from USB
- Insert a paperclip into the pinhole reset button and hold it down
- Plug in the USB-C cable while still holding the button
- Release after ~1 second
- Download
zigbee_p1_meter.binfrom the latest release - Open the ESP Web Flasher
- Put the dongle in flash mode (see above)
- Click Connect, select the serial port, and set the flash address to
0x0 - Choose the
.binfile and click Program
Flash via command line
Install esptool (pip install esptool) and download zigbee_p1_meter.bin from the latest release.
Windows:
esptool.py --chip esp32c6 --port COM3 --baud 460800 write_flash 0x0 zigbee_p1_meter.bin
Find your port in Device Manager under Ports (COM & LPT).
macOS / Linux:
esptool.py --chip esp32c6 --port /dev/ttyACM0 --baud 460800 write_flash 0x0 zigbee_p1_meter.binFind your port with ls /dev/cu.usb* (macOS) or ls /dev/ttyACM* (Linux).
Add a new external converter to Z2M, either through the UI or in the file system like described below
- Copy
z2m/homey_p1_meter.mjsto your Z2M data/external_converters directory - Add to
configuration.yaml:external_converters: - homey_p1_meter.mjs
- Restart Z2M and enable pairing
Blue breathing = pairing, green = connected, green blink = telegram rx, purple pulse = OTA, red = no P1 data
After the initial flash, future updates can be done over-the-air through Zigbee2MQTT using the .ota file from the release page.
| Attribute | Unit | Description |
|---|---|---|
power |
W | Total active power (import - export) |
power_phase_a |
W | Active power phase A |
power_phase_b |
W | Active power phase B |
power_phase_c |
W | Active power phase C |
voltage_phase_a |
V | RMS voltage phase A |
voltage_phase_b |
V | RMS voltage phase B |
voltage_phase_c |
V | RMS voltage phase C |
current_phase_a |
A | RMS current phase A |
current_phase_b |
A | RMS current phase B |
current_phase_c |
A | RMS current phase C |
energy |
kWh | Total energy consumed (cumulative) |
produced_energy |
kWh | Total energy returned to grid (cumulative) |
Values update on every DSMR telegram (typically every 10 seconds).