No description
- Python 100%
| img | ||
| .gitignore | ||
| config.sample.py | ||
| dashboard.json | ||
| main.py | ||
| README.md | ||
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:
You can display the values saved in InfluxDB using Grafana like this if you like:

