Well, this won’t work!
The D1 Mini/pro has one and a half UARTS.
UART0 is connected to he USB socket and also to pins Tx and Rx. And is used for programming the device.
UART1 is Tx only and is connected to pin D4.
If you need to have Tx/Rx communications with a peripheral such as the PZEM then you’ll need to use UART0. If you also want to use a serial monitor to see debug output then you could connect an FTDI to D4.
According to the specifications given for v.3.0 of PZEM-004T it measures/reports also the frequency and the power factor. I’m not sure if the library https://github.com/olehs/PZEM004T is able to read these new electricity parameters.
Did you run any test how to read those parameters apart voltage,current, power and energy ?
I know @PeteKnight suggested it already to you, so…Why don’t you try with simple USB<–>serial (TTL) bridge, like FT232 (or many other) connected to PC,using official PZEM software (or ANY terminal) and verify if your unit is OK or not…
I will carry out the steps you described with the FW Tasmota in order to try if everything works. You have been very kind, as soon as all this is done you will update on the process and the operation. Thank you very much for the help you are giving us.