Skip to content
/ espem Public
forked from vortigont/espem

Energy monitor with dashboard/metrics collector based on ESP8266/ESP32 controller and PeaceFair PZEM-004T/PZEM-004Tv30 Power Meter

License

Notifications You must be signed in to change notification settings

adukale/espem

 
 

Repository files navigation

BUILD | USAGE | CHANGELOG | PlatformIO CI

Energy monitor based on ESP32 controller and Peacefair PZEM-004Tv30 Power Meter

A code for ESP32 controller and a set of web-tools to gather, analyse, monitor and view stat and graphs for Peacefair PZEM-004Tv30 PowerMeter.

Features

  • WebUI via self-hosted HTTP/WebSocket server
  • Real-time gauges and power charts
  • metrics collector in controller's memory pool
  • data/metrics export via json

Legacy v2.x version

An older ESPEM version 2 was based on 3rd party lib. It's code still available under 2.x branch. ESPEM Ver 3 switched to it's own library pzem-edl. I wrote this lib to overcome limitations of the classic olehs's and mandulaj's libs. Being versatile those libs provided only basic functions talking to PZEM's using Arduino's blocking IO via serial port. New lib uses event-driven approach and provides extendable design API for multiple PZEM communication over single port.

Feature comparison

Version 2.x Version 3.0
ESP8266 YES NO
ESP32 YES YES
PZEM004v30 YES YES
old PZEMv30 YES NO (planned)
PZEM017 (DC version) NO NO (planned)
3 phase option NO YES (in progress)
Time Series Charts YES (Basic) YES (extendable)
TS in PSRAM NO YES

ESPEM WebUI Dashboard

espem ui

ESPEM WebUI Options

espem opts

Additional tools

Under /www there is a set of php/sql scripts that could be hosted undel LAMP to gather and calculate stats over long-term periods. Little bit outdated but still usable. No need for any cloud services, spyware etc... just a raspberry/orangepi running web-server with sqlite/mysql DB. It's possible to collect data from any number of PZEM monitors and store it in the DB for a long-term stats or get a PowerChart sampled data from the espem itself.

An example of exernal daily stats dashboard

espem gauges

Power chart with sampled data

espem sampled data

License

This code is available under the GPLv3 license

About

Energy monitor with dashboard/metrics collector based on ESP8266/ESP32 controller and PeaceFair PZEM-004T/PZEM-004Tv30 Power Meter

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 38.0%
  • PHP 18.2%
  • JavaScript 14.5%
  • HTML 10.9%
  • C 9.0%
  • Shell 4.6%
  • Other 4.8%