Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New PZEM-004T version (protocol changed) #5765

Closed
martindb opened this issue May 8, 2019 · 11 comments
Closed

New PZEM-004T version (protocol changed) #5765

martindb opened this issue May 8, 2019 · 11 comments
Labels
troubleshooting Type - Troubleshooting

Comments

@martindb
Copy link

martindb commented May 8, 2019

There is a new firmware version of the PZEM-004T sensor.
It actualy uses MODBUS RTU protocol. Also now reports power factor and frequency.
It should be great tasmota support it.

modbus_PZEM-004T.txt

@blakadder blakadder added the enhancement Type - Enhancement that will be worked on label May 8, 2019
@curzon01
Copy link
Contributor

curzon01 commented May 8, 2019

I think that's already in - use #define USE_PZEM_AC

A better readable document for these sensors pzem-016_pzem014_user_manual.pdf

The related energy module is xnrg_05_pzem_ac.ino

(edit: add document & file link)

@Giardo84
Copy link

Giardo84 commented May 8, 2019

Pzem-004T v3.0.pdf
I also have a new pzem-004T (v3.0).
I tried to make it work with Tasmota but it doesn't work.
I tried also with Arduino without any result.
The documentation is slightly different from the one posted by you.
In the documentation, the functional diagram shows a TTL interface instead of RS485

@curzon01
Copy link
Contributor

curzon01 commented May 8, 2019

The documentation is slightly different from the one posted by you.
In the documentation, the functional diagram shows a TTL interface instead of RS485

The dox desc are the same protocol, TTL and RS485 are only different physical layer.

@Giardo84
Copy link

Giardo84 commented May 8, 2019

The documentation is slightly different from the one posted by you.
In the documentation, the functional diagram shows a TTL interface instead of RS485

The dox desc are the same protocol, TTL and RS485 are only different physical layer.

OK thanks.
So what modification should be made to make this library work with the pzem-004T (v3.0)?

@curzon01
Copy link
Contributor

curzon01 commented May 9, 2019

So what modification should be made to make this library work with the pzem-004T (v3.0)?

The name of the sensor may be confuse you - PZEM-004T protocol is implemented in module as xnrg_05_pzem_ac.ino and enabled as default in sonoff.bin/sonoff-sensors.bin (#define USE_PZEM_AC).

Have a look into xnrg_05_pzem_ac.ino comment at the beginning you read the following:
Hardware Serial will be selected if GPIO1 = [98 PZEM016 Rx] and GPIO3 = [62 PZEM0XX Tx] - pls try this or use [98 PZEM016 Rx]/[62 PZEM0XX Tx] on other GPIOs

But anyway if you have problems to configure your device it's better to use some of the community channels. Github issues are used for Tasmota software feature requests and bug reporting. Troubleshooting is more effective using an interactive forum.

Support Information

See Wiki for more information.
See FAQ for common questions/answers and links if none of your question is in the list
See Chat for more user experience.
See Community for forum.
See Code of Conduct

@ascillato2 ascillato2 added troubleshooting Type - Troubleshooting and removed enhancement Type - Enhancement that will be worked on labels May 9, 2019
@SeByDocKy
Copy link

SeByDocKy commented May 9, 2019

Hi,

I don't know if it's related or not but I am using also a PZEM-004T (I don't which version but probably the newest)... and I noticed that the informations are freezed after a couple of minutes. I have the last Tasmota build, timeperiod 10.

When it's freezing, after sometime 5min, measurements are back.... I noticed it's freezeing more for low power values.... don't know it's related or not.

If I do a software rebood of my NodeMCU V3, measuresments are back

@Giardo84
Copy link

Giardo84 commented May 9, 2019

ok, it works but there is a little note to make.
In the sonoff configuration it is necessary to set GPIO1 = [62 PZEM0XX Tx] and GPIO3 = [98 PZEM016 Rx].
Physically connecting RX of an ESP01S with the PZEM-004T and TX of the ESP01S with the PZEM-004T RX.

@SeByDocKy
Copy link

ok, it works but there is a little note to make.
In the sonoff configuration it is necessary to set GPIO1 = [62 PZEM0XX Tx] and GPIO3 = [98 PZEM016 Rx].
Physically connecting RX of an ESP01S with the PZEM-004T and TX of the ESP01S with the PZEM-004T RX.

Yes .... THanks ....

In fact I got a V2 and and V3..... Unfortunatly I killed my V2 this afternoom.... tried to fix why informations are freezed after a couple of Minutes. I did some test with the V3.... Seems to suffer from the same symptoms. I will do more test tmr. Thanks anyway

@SeByDocKy
Copy link

Just tested the V3 and new hardware serial setting mentioned above and for me both current (and by consequence power) reading are wrong

Voltage 238 V
0.036 A
0 W
9 VA
9 VAr
0.05
50 Hz
2.565 kWh
11.427 kWh
18.933 kWh

I collected that on with the curent version

@curzon01
Copy link
Contributor

curzon01 commented May 9, 2019

Calibrated?

@meingraham
Copy link
Collaborator

Can't calibrate a PZEM using Tasmota - #3208 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
troubleshooting Type - Troubleshooting
Projects
None yet
Development

No branches or pull requests

7 participants