/smart-energy-meter-esp32

Smart energy meter using ESP32, view via website

Primary LanguageC++

Live Energy Meter Meter

Measure the power + gas usage of a smart meter, and display in a web page for only 5 EURO

smart meter

webpage

Hardware

  • ESP32

  • 1K resistor

  • RJ11 plug + wire (ordinairy telephone cable)

  • SMR 5.0 Smart meter

Connection

Use a normal phone cable with 4 wires. The two outer positions of the plug (RJ11) are not used. Also the green cable is not used. Use a 1K OHM resistor (Brown-Black-Red-Gold) between data (yellow) and plus (black) Wires Plug

Connect the plug to the smart meter P1 port

configure static IP

See in settings.h, under user settings

Manual

The led blinks every second when a new measure is received. The led blinks 3 times quickly as well if there is no wifi connection. Press the BOOT button to reboot and see if connection works (of course you should have your wifi access point working). If you want to reconfigure your wifi access point, press the BOOT button for about 5 seconds. Then wait for reboot and Connect to the WIFI manager. You will find access point ENERGY_METER with your phone or PC, then navigate in the browser to: http://192.168.4.1/

Website

Navigate to the web address you configured in the WIFI manager. The application will generate this website.

  • Current watt consumption, a graph with the last 120 second measurements and 1 hour of average watt consumption per minute.
  • last 100 measurements per 5 minutes.
  • last 100 measurements per hour.
  • last 100 measurements per day.

Everything is calculated in average WH for electicity for the time units and total consumption of gas in M3 per time unit. Water is not yet measured.

Wifi

This will allow to specify the access point. Then navigate to the dynamic ip address (see log of the ESP), or the static IP address you provided in the settings.h

More to come! (Longer trend power consumption and gas consumption per 5 minutes)

Website

Example telegram

This is the data generated by the P1 port of the smart energy meter.

1-3:0.2.8(50)
0-0:1.0.0(230826174135S)
0-0:96.1.1(4530303531303035353633303232333230)
1-0:1.8.1(001483.717*kWh)
1-0:1.8.2(001939.753*kWh)
1-0:2.8.1(000000.000*kWh)
1-0:2.8.2(000000.000*kWh)
0-0:96.14.0(0001)
1-0:1.7.0(00.076*kW)
1-0:2.7.0(00.000*kW)
0-0:96.7.21(00013)
0-0:96.7.9(00004)
1-0:99.97.0(3)(0-0:96.7.19)(200421104404S)(0000001031*s)(220317133432W)(0000000536*s)(220721131323S)(0000016966*s)
1-0:32.32.0(00016)
1-0:32.36.0(00000)
0-0:96.13.0()
1-0:32.7.0(229.8*V)
1-0:31.7.0(000*A)
1-0:21.7.0(00.076*kW)
1-0:22.7.0(00.000*kW)
0-1:24.1.0(003)
0-1:96.1.0(4730303338353635353235333034313230)
0-1:24.2.1(230826174001S)(00414.955*m3)
!66C9
/XMX5LGF0000425630423

Based on

https://github.com/bartwo/esp32_p1meter