A small python script to calculate power and energy from a pulsing led on your elecricity meter. Sends measurement data by MQTT allowing easy integration to a system supporting MQTT such as Home Assistant. Optionally writes status data to files. You can change the save location by modifying the config file to your needs.
Example fstab line for ramdisk:
tmpfs /ramdisk tmpfs defaults,size=20M,gid=33 0 0
- Raspberry pi Zero W
- 3.3 V Arduino LDR comparator board
- Maybe some wires to extend LDR out of the board and to connect the board to Raspberry
- Power supply for Raspi
- Improve averaging function
- Make config handling better