smartMeterLogger-esp32
connects to a smart meter (slimme meter) and logs the electricity use every minute to an sdcard. Saved data can be viewed in a html5 compatible browser on your phone/laptop/desktop. You can also compare the current day to a day in the past.
Compiles in the Arduino IDE.
See also the companion app M5EnergyUse that shows the current use and totals for the day on a M5Stack v1.
Use the latest Arduino IDE and the latest ESP32 Arduino Core.
- Format an sdcard with a fat32 filesystem and insert the card in the reader.
- Open the sketch and change your credentials and system setup in
setup.h
. - (Optional) In
setup.h
uncomment#define SH1106_OLED
if you compile for sh1106 instead of ssd1306 and set the i2c pins (and address) for your oled screen.
If you do not use a oled you can leave this setting as it is. - Save all files and flash the sketch to your esp32.
- Connect your esp32 to the smart meter.
Take note that to read from the smartmeter theDATA
signal has to be inverted and level shifted. - If you added a ssd1306/sh1106 oled screen, the ip address (or an error) will be visible on the screen.
If there is no oled you can check the ip address on the serial port in the Arduino IDE. - Browse to the ip address of your esp32 to see your current energy use.
If you have a garbled oled screen you most likely compiled for the wrong oled type.
Try to comment/uncomment //#define SH1106_OLED
in setup.h
to solve this.
- https://github.com/me-no-dev/AsyncTCP
- https://github.com/me-no-dev/ESPAsyncWebServer
- https://github.com/matthijskooijman/arduino-dsmr
Download and install these in the Arduino libraries folder.
The driver library for a ssd1306/sh1106 oled can be installed with the Arduino library manager. Use the ThingPulse driver.
DSMR v5.0.2 P1 Companion Standard.pdf
SmartMeterLogger is developed on LilyGo TTGO T7 boards. The LilyGo TTGO T7 has an external antenna connector and a decent 3.3v LDO.
Without an external antenna the WiFi signal tends to be too poor to be of any use over longer distances and/or through several walls. The board will have to modified slightly to enable the external antenna.
Below you can see how to enable the external antenna. Move the zero ohm resistor from position 1-2 to position 3-4. Or remove the resistor and solder position 3-4 closed.
See this LilyGo issue about the external antenna.
Using the default pins. Use an EMPTY fat32 formatted sdcard on the first boot.
To invert and level shift the signal you can use a bc547 transistor with some resistors. For example like this:
See willem.aandewiel.nl/dsmr-logger-v4-slimme-meter-uitlezer/