{"id":18965513,"url":"https://github.com/celliesprojects/smartmeterlogger-esp32","last_synced_at":"2025-04-19T12:51:38.482Z","repository":{"id":55406688,"uuid":"316561077","full_name":"CelliesProjects/smartMeterLogger-esp32","owner":"CelliesProjects","description":"smartMeterLogger-esp32 connects to a smart meter and logs the electricity use per minute to an sdcard. Saved data can be viewed in a html5 compatible browser. Compiles in the Arduino IDE.","archived":false,"fork":false,"pushed_at":"2023-02-14T13:58:49.000Z","size":2339,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-29T08:04:46.247Z","etag":null,"topics":["dsmr-to-websocket","dsmr5","esp32-arduino","slimme-meter","smartmeter"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CelliesProjects.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-11-27T17:20:58.000Z","updated_at":"2025-03-19T09:30:48.000Z","dependencies_parsed_at":"2024-11-08T14:35:39.678Z","dependency_job_id":"20b04722-3787-46a4-9ab6-008fef00086f","html_url":"https://github.com/CelliesProjects/smartMeterLogger-esp32","commit_stats":{"total_commits":91,"total_committers":2,"mean_commits":45.5,"dds":0.01098901098901095,"last_synced_commit":"0e250d6c1860efd83ce17dfc630bb9bfdefeea2c"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CelliesProjects%2FsmartMeterLogger-esp32","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CelliesProjects%2FsmartMeterLogger-esp32/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CelliesProjects%2FsmartMeterLogger-esp32/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CelliesProjects%2FsmartMeterLogger-esp32/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CelliesProjects","download_url":"https://codeload.github.com/CelliesProjects/smartMeterLogger-esp32/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249201118,"owners_count":21229004,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dsmr-to-websocket","dsmr5","esp32-arduino","slimme-meter","smartmeter"],"created_at":"2024-11-08T14:29:48.004Z","updated_at":"2025-04-16T05:32:34.636Z","avatar_url":"https://github.com/CelliesProjects.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# smartMeterLogger-esp32\n\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/5abe0cc3faa54a05a6acfe6b68e5eac6)](https://app.codacy.com/gh/CelliesProjects/smartMeterLogger-esp32?utm_source=github.com\u0026utm_medium=referral\u0026utm_content=CelliesProjects/smartMeterLogger-esp32\u0026utm_campaign=Badge_Grade)\n\n## About\n\n`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.\n\nCompiles in the Arduino IDE.\n\nSee also the companion app [M5EnergyUse](https://github.com/CelliesProjects/M5-energyUse) that shows the current use and totals for the day on a M5Stack v1.\n\n## Screenshots\n\n![homepage](https://user-images.githubusercontent.com/24290108/190145362-c3f6d9c5-b6c4-4021-999b-009468b346af.png)\n\n![daggrafiek](https://user-images.githubusercontent.com/24290108/190145677-0206855c-0bdd-43c4-a79b-dd22dcc20211.png)\n\n![select](https://user-images.githubusercontent.com/24290108/190147164-d3d2fc5b-c7e4-45ad-9924-6707d72e6681.png)\n\n![compare](https://user-images.githubusercontent.com/24290108/190146801-1e97c788-b5f3-4310-b483-e797b78c5fe2.png)\n\n## How to setup and flash\n\nUse the [latest Arduino IDE](https://github.com/arduino/arduino-ide/releases/latest) and [the latest ESP32 Arduino Core](https://github.com/espressif/arduino-esp32/releases/latest).\n\n1.  Format an sdcard with a fat32 filesystem and insert the card in the reader. \n2.  Open the sketch and change your credentials and system setup in `setup.h`.\n3.  (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.\u003cbr\u003eIf you do not use a oled you can leave this setting as it is.\n4.  Save all files and flash the sketch to your esp32.\n5.  Connect your esp32 to the smart meter.\u003cbr\u003eTake note that to read from the smartmeter the `DATA` signal has to be [inverted and level shifted](#level-shifter--inverter).\n6.  If you added a ssd1306/sh1106 oled screen, the ip address (or an error) will be visible on the screen.\u003cbr\u003eIf there is no oled you can check the ip address on the serial port in the Arduino IDE.\n7.  Browse to the ip address of your esp32 to see your current energy use.\n\nIf you have a garbled oled screen you most likely compiled for the wrong oled type.\u003cbr\u003eTry to comment/uncomment `//#define SH1106_OLED` in `setup.h` to solve this.\n\n## Needed libraries\n\n- [https://github.com/me-no-dev/AsyncTCP](https://github.com/me-no-dev/AsyncTCP)\n- [https://github.com/me-no-dev/ESPAsyncWebServer](https://github.com/me-no-dev/ESPAsyncWebServer)\n- [https://github.com/matthijskooijman/arduino-dsmr](https://github.com/matthijskooijman/arduino-dsmr)\n\nDownload and install these in the Arduino libraries folder.\n\nThe driver library for a ssd1306/sh1106 oled can be installed with the Arduino library manager. Use the ThingPulse driver.\n\n## DSMR v5 P1 port standard specifications\n\n[DSMR v5.0.2 P1 Companion Standard.pdf](https://github.com/matthijskooijman/arduino-dsmr/blob/master/specs/DSMR%20v5.0.2%20P1%20Companion%20Standard.pdf)\n\n## Needed or supported hardware\n\n### ESP32: LilyGo TTGO T7 with external antenna\n\nSmartMeterLogger is developed on LilyGo TTGO T7 boards. The LilyGo TTGO T7 has an external antenna connector and a decent 3.3v LDO.\u003cbr\u003eWithout 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. \n\n![T7 pic](img/t7.jpg)\n\nBelow 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.\n\n![external-config](https://user-images.githubusercontent.com/17033305/78676790-34fd1080-78e7-11ea-8bb0-aee88efe75a6.jpg)\n\nSee [this LilyGo issue](https://github.com/LilyGO/ESP32-MINI-32-V1.3/issues/4#issuecomment-610394847) about the external antenna.\n\n### SD card reader\n\n![card reader](img/sdboard.png)\n\nUsing the default pins.\nUse an EMPTY fat32 formatted sdcard on the first boot. \n\n### Level shifter / inverter\n\nTo invert and level shift the signal you can use a bc547 transistor with some resistors. For example like this:\n\n![invert-and-level-shift](https://willem.aandewiel.nl/wp-content/uploads/2019/04/DSMR_LevelShifter_Circuit-300x251.png)\n\nSee [willem.aandewiel.nl/dsmr-logger-v4-slimme-meter-uitlezer/](https://willem.aandewiel.nl/index.php/2019/04/09/dsmr-logger-v4-slimme-meter-uitlezer/)\n\n### Some board variants\n\n![board no oled](img/board_no_oled.png)\n\n![board sh1106](img/board_sh1106.png)\n\n![board ssd1306](img/board_ssd1306.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcelliesprojects%2Fsmartmeterlogger-esp32","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcelliesprojects%2Fsmartmeterlogger-esp32","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcelliesprojects%2Fsmartmeterlogger-esp32/lists"}