Skip to content

A simple smartmeter (slimme meter) reader for the esp32. Compiles in the Arduino IDE.

License

Notifications You must be signed in to change notification settings

CelliesProjects/smartMeterReader-esp32

Repository files navigation

smartMeterReader-esp32

About

smartMeterReader-esp32 is a serial to websocket bridge between your DSMR 5 smartmeter and the rest of your network.
Websocket clients connected to ws://ip-address/raw get the raw dsmr telegram pushed every second.
Also included is a http webserver so you can see your current energy use and the daily usage figures on your smartphone or pc browser.
No app required!

This software is no longer supported!

This app will no longer be updated (and no bug fixes) but you can use smartMeterLogger that has the same functionality and also saves the usage history to an sdcard.

Another handy app is M5-energyUse which is an app for an M5Stack v1 that connects to the smartMeterLogger and shows your energy use continously on the display.

screenshot

screenshot

How to use

  1. Change your credentials in wifisetup.h.
  2. (Optional) In smartMeterReader-esp32.ino uncomment #define SH1106_OLED if you compile for sh1106 instead of ssd1306 and set the i2c pins (and address) for your oled screen.
  3. Save all files and flash the sketch to your esp32.
  4. Connect your esp32 to the smart meter. See here how.
    Take note that to connect to the esp32 the DATA signal has to be inverted and level shifted.
  5. If you added a ssd1306/sh1106 oled screen, the ip address 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.
  6. Browse to the ip address of your esp32 to see your current energy use.

If you have a garbled screen you most likely compiled for the wrong oled type.
Try to comment/uncomment #define SH1106_OLED to solve this.

Needed libraries

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 P1 port standard specifications

DSMR v5.0.2 P1 Companion Standard.pdf

Hardware

ESP32: LilyGo TTGO T7 with external antenna

My personal preference is for the LilyGo TTGO T7. The LilyGo TTGO T7 is a good board with 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.

T7 pic

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.

external-config

See this LilyGo issue about the external antenna.

Level shifter / inverter

To invert and level shift the signal you can use a bc547 transistor with some resistors. For example like this:

invert-and-level-shift

See willem.aandewiel.nl/dsmr-logger-v4-slimme-meter-uitlezer/

Some board variants

board no oled

board sh1106

board ssd1306