Skip to content

georgemihaila/esp8266-power-meter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

ESP8266 Power meter

What is this?

Got one of those power meters at home that blink an LED? You can track and monitor your home power consumption using an ESP8266 and a DSMR Reader server instance.

Requirements

  • a local DSMR Reader instance
  • 1x ESP8266
  • 1x 4.7k ohm resistor
  • 1x photoresistor
  • 1x SSD1306 OLED Display
  • 1x DS1307 RTC

Setup

  • ESP8266
  1. Wiring

Wiring should be pretty straightforward. Pull the photoresistor down using the resistor and use A0 as input. The display and the RTC both use I2C, so they can be wired in parallel. For the NodeMCU, the SCL pin is D1 and the SDA pin is D2.
Final result: alt text

  1. Code

Upload the code on the ESP8266 and you're good to go.

How does the code work?

At startup,

  1. The SSD1306 is initialized
  2. A wireless connection is established
  3. The latest meter position is taken from the DSMR Reader server
  4. World Time API is used for synchronizing the DS1307 if necessary
  5. A calibration is done.

During runtime, the ESP8266 calculates the consumption based on the interval between two LED blinks, assuming a 1W / blink base meter level. It then logs the reading to the server and displays it.

Results

I've been running this for quite a while. This is how my DSMR Reader dashboard looks like. It's pretty very accurate.

alt text

Releases

No releases published

Packages

No packages published

Languages