I just finished that project today
I think it needs some additional fine tuning with conversion, etc.
If anyone has any suggestions how to make this configuration better, please share
I copied this project from this guide: Here (polish)
Here is what I did:
Assumptions:
- MQTT Broker configured
- ESP Flashing Basics Guide
Hardware:
Steps:
-
Connect photodiode to GPIO Pin (my case GPIO-14), Voltage (3.3V) and GND
-
Flash ESP Easy Mega Here
-
Configure ESP to communictae with MQTT Broket in HA
-
Configure device in ESP:
Note: Values 1/6400 is defined by my electricity couter from provider - it is stated on cover as 6400 impulses / kWh
Note2: Change โCountโ value to: โ(%value%*(1/6400)) * 1000 * 60โ to get value of Watts every 60 seconds -
Configure MQTT sensors in HA:
First one uses Count value and provides power consumption every minute (ESP is set to 60 seconds interval - screen above)
Second one uses Total value and provides input for utility meter component:
-
Place photodiode directed on electricity meter flashing diode:
Duct tape is your friend
Final efect looks like this:
I added cost calculation