Skip to content

A WiFi enabled PowerMeter for AC Voltage, Current and Power. Implementing a nice looking Web-Interface, a RESTful API, OpenHAB 1 & 2 Callbacks and a MQTT client.

License

Notifications You must be signed in to change notification settings

thorsten-l/ESP8266-PZEM004T

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ESP8266-PZEM004T

A WiFi enabled PowerMeter for AC Voltage, Current and Power. Implementing a nice looking Web-Interface, a RESTful API, OpenHAB 1 & 2 Callbacks and a MQTT client.

Precompiled Firmware

Find the precompiled firmware in the firmware directory.

Compile

This is a PlatformIO project.

Firmware Reset

  1. Power on the PowerMeter (plug in)
  2. Press down and hold the Button during the first 5s
  3. Release Button when the WiFi LED starts rapidly fast blinking
  4. The firmware reset ends after about 30s indicated by a permanent WiFi LED on.

Default Settings

After a firmware reset the following values are set.

value description
WiFi SSID PowerMeter-esp id SSID in accesspoint mode
IP Address 192.168.192.1 ip address in accesspoint mode
Admin password admin Setup admin password
OTA Hostname wifi-socket-1 Over The Air hostname
OTA Password otapass OTA firmware upload password
OpenHAB Callback Enabled false
OpenHAB Version 1 Callback for OpenHAB version 1 or 2
OpenHAB Item Voltage PowerMeter1Voltage
OpenHAB Item Current PowerMeter1Current
OpenHAB Item Power PowerMeter1Power
OpenHAB Host 192.168.1.1
OpenHAB Port 80
OpenHAB Use Authentication false
OpenHAB User user  
OpenHAB Password password  
OpenHAB SendingInterval 60 interval time in seconds 
MQTT Enabled false  
MQTT ClientId PowerMeter1  
MQTT Host 192.168.1.1
MQTT Port 80
MQTT Use Authentication false
MQTT User user  
MQTT Password password  
MQTT Topic Voltage powermeter1/voltage  
MQTT Topic Current powermeter1/current  
MQTT Topic Power powermeter1/power  
MQTT Topic JSON powermeter1/json  sending all values in JSON format
MQTT Sending Interval 60  interval time in seconds

Hardware

hardware description pins
ESP8266 Mainboard WEMOS D1 mini lite
OLED Display WEMOS OLED Shield D1 (SCL,GPIO5), D2 (SDA,GPIO4)
AC Digital Multifunction Meter PZEM004T Module D5 (RX,GPIO14), D6 (TX,GPIO12)
WiFi LED LED + 150Ω Resistor D0 (GPIO16)
Button Touch button D7 (GPIO13)

References

About

A WiFi enabled PowerMeter for AC Voltage, Current and Power. Implementing a nice looking Web-Interface, a RESTful API, OpenHAB 1 & 2 Callbacks and a MQTT client.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published