-
Notifications
You must be signed in to change notification settings - Fork 108
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
pzem-004t v3 reset energy alone after => 60kw #47
Comments
Hey @capblack thats very odd, the specs range should be 0-9999.99kWh according to the datasheet, but truth be told, I could not test it as I don't have such an energy consumption. The video though is private so I can't see it. Would you mind setting it as unlisted instead? |
Hmm that is definitely a strange behavior... Sounds like some sort of a overflow. Could be in the PZEM or in the library code. I can't quite see anything obvious in the library code at the moment but I don't want to straight out blame it on the chip. I will have a closer look at this issue once I get around testing the library next week. Unfortunately, I don't have power consumption quite high enough to test this thoroughly. I will try simulating it somehow but it would be really useful if you could send me the raw numbers that are coming from the PZEM chips. Currently there is no debug mode (will add that to the TODO list). Would you be so kind and modify the library slightly in order to print out the raw response during the value update? If you could add this code: Serial.println("Raw response:");
for(int i = 0; i < 25; i++){
Serial.println(response[i], HEX);
}
Serial.println("End"); after line 379 in the Lines 377 to 379 in e7f2202
Note that this will print the raw response from the PZEMs to the standard Temporary solutionIn case you are reporting the energy to some sort of a database, you can set the code to reset the internal energy counter of the PZEMs with the I have had in mind for a while to perform a rigorous analysis of the true capabilities of the module and compare them to the manufacturer specifications. I would not be too surprised if the datasheet claims are slightly too optimistic. |
Maybe the OP is having a similar problem that was addressed here. |
Hello yes i change the busmaster with standart library and al is ok now no
reset energy ,and can see the acumulated in history thanks for
…On Sun, Feb 28, 2021, 12:05 morganflint ***@***.***> wrote:
Maybe the OP is having a similar problem that was addressed here
<https://community.blynk.cc/t/pzem-004t-v3-0-and-nodemcu-wemos-mini-running-on-blynk-how-to-procedure/39338/61>
.
Basically, it was due to using only 2 of the 4 bytes of the energy
registers, so it resets when it reaches 65532 Wh (65.5kWh).
That was with another library (ModbusMaster), I haven't analyzed if this
one has the same problem, but it's suspicious the OP has the problem around
the same "magic number"
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#47 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AD4KUIEKYDLDUGE4SGGYNODTBIINFANCNFSM4WXK54EA>
.
|
I don't understand if this issue is fixed or not. |
ia have problem, my code idem with examples |
my pzem its reset energy after 65 Wh |
yes i fix the problem , was the totals storage variable had an unsing_intiger, when I changed it to a long fix the bug :) |
can you give me an example |
Yes @capblack, could you push your changes as a pull request. I am quite curious what the issue is. I had a look over the code and I am using uint32_t which should be large enough to hold the energy values. If possible, I would like to avoid going to a long but perhaps its the unsigned nature that's causing the problem. Would have to investigate closer. |
<!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Roboto;
panose-1:2 0 0 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
-->Hi Jakub You coul download full code herehttps://drive.google.com/drive/folders/1W3jGJp451KJDXy7BvQeOkArqFwXoovCk?usp=sharing and you could check it on https://www.youtube.com/watch?v=ekmTViQi_cU be in touch Sent from Mail for Windows From: Jakub MandulaSent: Thursday, March 24, 2022 1:21 PMTo: mandulaj/PZEM-004T-v30Cc: capblack; MentionSubject: Re: [mandulaj/PZEM-004T-v30] pzem-004t v3 reset energy alone after => 60kw (#47) Yes @capblack, could you push your changes as a pull request. I am quite curious what the issue is. I had a look over the code and I am using uint32_t which should be large enough to hold the energy values.If possible, I would like to avoid going to a long but perhaps its the unsigned nature that's causing the problem. Would have to investigate closer.—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
1 similar comment
<!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Roboto;
panose-1:2 0 0 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
-->Hi Jakub You coul download full code herehttps://drive.google.com/drive/folders/1W3jGJp451KJDXy7BvQeOkArqFwXoovCk?usp=sharing and you could check it on https://www.youtube.com/watch?v=ekmTViQi_cU be in touch Sent from Mail for Windows From: Jakub MandulaSent: Thursday, March 24, 2022 1:21 PMTo: mandulaj/PZEM-004T-v30Cc: capblack; MentionSubject: Re: [mandulaj/PZEM-004T-v30] pzem-004t v3 reset energy alone after => 60kw (#47) Yes @capblack, could you push your changes as a pull request. I am quite curious what the issue is. I had a look over the code and I am using uint32_t which should be large enough to hold the energy values.If possible, I would like to avoid going to a long but perhaps its the unsigned nature that's causing the problem. Would have to investigate closer.—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
TTGO T-CALL ESP32 CODE?? |
@123salee could you please be a bit more specific? Is this related to this issue? Do you want example code? Do you have a problem? |
Good day, do you have an example code for pzem004t using ttgo tcall esp32?
I have tried your code for hardserial but i think it is not for ttgo.thanks
…On Tue, Nov 15, 2022 at 12:00 AM Jakub Mandula ***@***.***> wrote:
@123salee <https://github.com/123salee> could you please be a bit more
specific? Is this related to this issue? Do you want example code? Do you
have a problem?
—
Reply to this email directly, view it on GitHub
<#47 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A4FXZDA3MT2TDYIVOK4S7K3WIJOYBANCNFSM4WXK54EA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
<!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--> hello not only for esp8266, but I think it should not be very difficult to adapt it sorry Sent from Mail for Windows From: 123saleeSent: Tuesday, November 15, 2022 2:05 AMTo: mandulaj/PZEM-004T-v30Cc: capblack; MentionSubject: Re: [mandulaj/PZEM-004T-v30] pzem-004t v3 reset energy alone after => 60kw (#47) Good day, do you have an example code for pzem004t using ttgo tcall esp32?I have tried your code for hardserial but i think it is not for ttgo.thanksOn Tue, Nov 15, 2022 at 12:00 AM Jakub Mandula ***@***.***>wrote:> @123salee <https://github.com/123salee> could you please be a bit more> specific? Is this related to this issue? Do you want example code? Do you> have a problem?>> —> Reply to this email directly, view it on GitHub> <#47 (comment)>,> or unsubscribe> <https://github.com/notifications/unsubscribe-auth/A4FXZDA3MT2TDYIVOK4S7K3WIJOYBANCNFSM4WXK54EA>> .> You are receiving this because you were mentioned.Message ID:> ***@***.***>>—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Closing as resolved. |
hello I built an energy meter of 3 faces with pzem-0004T v3 and I have the problem that the faces reset the accumulated energy after the 60kw approximately.
is a bug? thanks
https://youtu.be/ekmTViQi_cU
The text was updated successfully, but these errors were encountered: