As part of the smart home, energy meters play important role in evaluation and checking of system efficacy.
I coded the small executable file being able to read measured values, modify ID, set power alarm value and reset counter of energy meter PZEM-004T. In that way I can have more than one meter on the same bus (TXs should be separated by diodes and pullup resistor should be present on receiver's RX).
The protocol used is ModBus RTU, therefore adequate CRC calculations during transmission and reception were used. Device should be connected to PC by 4 wires (GND, RX, TX, Vdd) of serial port with TTL levels (i.e. USB converter usually).
Both versions (V3.0 as well as V4.0) of PZEM-004T modules are supported and were successfully tested.
At the following link, you can download executable file: ModBus_RTU_PZEM004T.exe