pzem 004t v3.0 I need the direction of the current

I use solar power. That is very necessary for me. The documentation is only v1.0 version. have not produced now. I need your help

By convention, the flow of the current is always from higher (positive) potential to lower (negative) potential.

I want to detect the direction of electric current with pzem 004t v3.0

Why are you expecting reversals?

I use solar energy. inverter consumed or produced

Doesn't your charge controller take care of all that?

I want to monitor energy consumption or production

Hy,

I guess, you want to measure the current on the AC side where the inverter is connected to the mains?

Knowing the very short Datasheet of the PZEM004 only, I would not know how to get the direction of the current out of it. Maybe there is a hidden function, but I doubt.

If you'd use the PZEM017, then you would probably need two of them. One for each way, because it measures DC.

Or you make a little circuit with Comperators (LM339 for example) where you measure the phase across the current transformer (secondary side). Could get powered by the 3,3V LDO on the PZEM004. Then you have current and phase and can thus determine the current flow.

As I'm currently working with the PZEM004 myself maybe, you can answer my question. I don't get responses from it. Have you used the command from the datasheet = B0 C0 A8 01 01 00 A1, HEX? This works for you?
Have you used Uart with 9600, 8N2?

BR