No description
Find a file
2026-03-13 23:07:00 +01:00
img update Readme 2026-03-13 23:06:11 +01:00
.gitignore 🎉 init 2026-03-13 22:24:17 +01:00
config.sample.py 🎉 init 2026-03-13 22:24:17 +01:00
dashboard.json updat Readme and add grafana dashboard 2026-03-13 22:54:00 +01:00
main.py 🎉 init 2026-03-13 22:24:17 +01:00
README.md fix image link 2026-03-13 23:07:00 +01:00

ESP32 + light sensor sensor = electricity meter in InfluxDB

Written in MicroPython. Use something like a LM393 photodiode light sensors and attach it to your electricity meter.

Installation

  • Download MicroPython here
  • Then flash it to your microcontroller, ESP32 for example:
esptool.py -p /dev/ttyACM0 erase_flash
esptool.py -p /dev/ttyACM0 --baud 460800 write_flash 0 ESP32_GENERIC_C3-20251209-v1.27.0.bin

Use Thonny (graphical IDE) or ampy (CLI) to flash the files to the microcontroller.

Example with ampy:

ampy --port /dev/ttyACM0 put config.py
ampy --port /dev/ttyACM0 put main.py

Attach the light sensors directly on the impuslse LED on you electricity meter like this:

An electricity meter with a ESP32 and light sensors attached to it

You can display the values saved in InfluxDB using Grafana like this if you like:

Grafana Dashboard for esp32-powermeter