ESP-DSMR
Both my father and I are interested in the power we consume. So when we both got a so-called "Smart Meter" we quickly started looking for ways to get the data out of the meter and onto the computer screen. This project culminated in the ESP-DSMR application.
The ESP-DSMR is an ESP32-based device for reading data from a dutch smart meter using the P1 port. The back-end is an ESPAsyncWebServer offering some REST endpoints using ArduinoJSON written in C++, with a responsive React front-end built with Material-UI.
What sets this project apart from all the other DSMR-readers, is that this one takes power directly out of the P1 port. In the future, we also want to offer multiple ways of sending DSMR data and showing live data on the app dashboard and ESP screen.
The preferred hardware for running ESP-DSMR is the M5stickc or M5stick-plus. We chose this device because it offered us all the features we required, namely:
- ESP32 with 4MB flash
- Battery
- Screen
- Proto-head for creating a connection with the P1 port
Specifically, the battery was important to us. Currently, there are many DSMR V4 meters in the Netherlands, that only supply 100ma over the P1-port. This is not enough for an ESP to be able to send wifi bursts, which will result in crashes. However, by using a battery and only sending data in longer intervals, the average power consumption can stay below 100ma.
You connect the Rj12 connector to the meter and once it's powered up you can connect to the ad-hoc wifi network. Most devices will redirect you to the captive portal, which will greet you with the login screen
After logging in you cansetup the connection to your home wifi network using the wifi page:
After setting the wifi credentials the ESP-DSMR will connect to the network and when successful, will stop the ad-hoc network after the last connected client (your device) disconnects.
For now, the ESP-DSMR works using a serial to TCP conversion. Or Ser2Net. Using the serial page, the serial connection can be configured and a TCP socket will be opened on the specified port. Other DSRM services like DSMR integration of Home Assistant or DSMR-reader can then connect to it. Look for instructions
Off-course my work is not yet done. We are still looking to incorporate more functionality into the device such as:
- Low-power mode for V4 meters
- MQTT with home assistant autodiscover
- Current values on the ESP screen
- Dashboard on the web interface showing some small graphs