3 Phase Energy Monitoring using 3 PZEM 004-T and nodemcu (esp8266)
Using weemos d1 mini in this configuration is not recomended
This guide will help you set up multiple PZEM-004T devices using a single pair of RX and TX pins on a NodeMCU ESP8266 board. It uses ESPHome to communicate with the devices and send the data to Home Assistant.
- NodeMCU ESP8266 board
- One or more PZEM-004T devices
- Home Assistant installed and configured
- Ensure that only one PZEM-004T device is connected to the UART bus at a time.
- Load the
change-address.yaml
file for each PZEM-004T device. - Set the
new_address
variable to a unique value between 0x01 and 0xF7. - Flash the firmware to the NodeMCU ESP8266 board and let it boot.
- After the boot, check for a log containing
PZEM Addr set
. - Repeat these steps for each PZEM device.
Suggestion: Write down the updated address on the yellow portion of the PZEM; this will make your life much easier later.
Suggestion: Avoid using the 0x01
address, as new devices have that address by default. When you add new devices later, it will be much easier to manage the addresses.
- Load the code in the
power-meter.yaml
file in your ESPHome for the device. - Change the addresses in the configuration to match your PZEM-004T device addresses.
- Flash the code to your NodeMCU ESP8266 or ESP32 board.
- Enjoy detailed data on your power consumption habits through Home Assistant.