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 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.
- Change your credentials in
wifisetup.h
. - (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. - Save all files and flash the sketch to your esp32.
- Connect your esp32 to the smart meter. See here how.
Take note that to connect to the esp32 theDATA
signal has to be inverted and level shifted. - 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. - 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.
- 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
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.
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.
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/