Interfacing ESP32 with PZEM 004t

I need to interface my ESP32 with PZEM 004t v3 100A
I used this code but it is stuck at “connecting to PZEM” stage only. And only Rx light glows on PZEM.

Does anyone know how to solve this?

#include <HardwareSerial.h>
#include <PZEM004T.h>

HardwareSerial PzemSerial2(2);
PZEM004T pzem(&PzemSerial2);

IPAddress ip(192,168,1,1);

void setup() {
Serial.begin(115200);
while (true) {
Serial.println(“Connecting to PZEM…”);
if(pzem.setAddress(ip))
break;
delay(1000);
}
}

void loop() {

float v = pzem.voltage(ip);
if (v < 0.0) v = 0.0;
Serial.print(v);Serial.print("V; ");

float i = pzem.current(ip);
if(i >= 0.0){ Serial.print(i);Serial.print("A; "); }

float p = pzem.power(ip);
if(p >= 0.0){ Serial.print§;Serial.print("W; "); }

float e = pzem.energy(ip);
if(e >= 0.0){ Serial.print(e);Serial.print("Wh; "); }

Serial.println();

delay(3000);
}

@PeteKnight Can you help me with this?
I dont understand the meaning of line
IPAddress ip(192,168,1,1);

Before anyone looks at it, you are going to need to format your code to make it more readable.
Put 3 backticks (```) before and after the code.
for example:

code stuff () {
digitalWrite (something, HIGH);
}

Then it formats it in a way everyone can read.

Also, it looks like your issue is more with the device you are trying to interface with and less with Blynk itself.
this forum is for Blynk related issues. Unless you are lucky and someone has experience with that exact device and they spot this you’ll be better off trying a more generic hardware forum or maybe reddit and then coming back once you are ready to interface working code with Blynk.
At that point, the first thing someone is going to tell you is that you are going to need to get rid of that delay in the code, because Blynk and delay() don’t get along at all.

@ashwanikumar please read this topic, and update your post with the missing information, as well as fixing your code formatting…

Pete.