GithubHelp home page GithubHelp logo

celliesprojects / smartmeterreader-esp32 Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 1.0 1.82 MB

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

License: MIT License

C++ 34.27% HTML 19.72% C 46.01%
dsmr-reader slimme-meter esp32 arduino-ide web-interface web-application dsmr serial-to-websocket dsmr-to-websocket

smartmeterreader-esp32's Introduction

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

smartmeterreader-esp32's People

Contributors

celliesprojects avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

ash-labs

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.