mandulaj / PZEM-004T-v30

Arduino library for the Updated PZEM-004T v3.0 Power and Energy meter
MIT License
256 stars 108 forks source link

reset energy, set max power , read alarm flag. #102

Open iw2fvo opened 1 year ago

iw2fvo commented 1 year ago

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like A clear and concise description of what you want to happen.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Add any other context or screenshots about the feature request here.

iw2fvo commented 1 year ago

good day to all, I am using PZEM 004T v3.0 connected to esp 8266 loaded using Arduino IDE and relevant example sketches. I am not so skill in using "c" and IDE so I would like if someone could indicate to me the code line to be used for :

reset accumulated enrgy set MAX power read alarm flag Thank a lot in advance for any answer. Regards iw2fo(at)yahoo.com

sergiocntr commented 1 year ago

Ciao.

reset accumulated enrgy -> pzem.resetEnergy(); set MAX power -> pzem.setPowerAlarm(watts); read alarm flag -> bool alarm = pzem.getPowerAlarm();

Try and let me know if you need more help.

iw2fvo commented 1 year ago

Thank a lot for the suggestions !   It is OK.I am working now to transmit all the data using the E32 433T30D  LoRa module: do you have some sample code for me please ?Best regards,Ambrogio On Wednesday, February 8, 2023 at 09:43:27 PM GMT+1, sergio contro @.***> wrote:

Ciao.

reset accumulated enrgy -> pzem.resetEnergy(); set MAX power -> pzem.setPowerAlarm(watts); read alarm flag -> bool alarm = pzem.getPowerAlarm();

Try and let me know if you need more help.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

sergiocntr commented 1 year ago

Hi Ambrogio nice to hear that it worked. For LoRa I have no code, I've never used that device. I've searched a bit and I can assure you that Renzo has everything you need https://github.com/xreef/LoRa_E32_Series_Library

If you think the problem here is solved, please close the issue.

margohaux commented 1 year ago

hi! i wanted to reset the energy but the code is error. may i know if you have a reference code to reset energy?