I will suggest to use arduino IDE to full erase the flash HERE
you must have Sonoff Generic (18) for PZEM to work like your post HERE
I will wait until you solve this problem then we can continue.