Hi,
I have an ESP32 currently monitoring my Electricity Meters (via pulse) x 4, water meter x 1 and various weather sensors. My Electricity data (for 2 meters) is currently uploaded to PVOutput for remote monitoring and the other data to Thingspeak (access via widget on phone). All my data is stored to a SQL database in 5 minute intervals also for periodical analysis.
I would like to add in my Electricity data to the built in Energy feature of HA however I have two queries
1. Can I add in ESPHome functionality into an ESP32 with unique custom code that is doing lots of other things (which I don’t want stored solely in HA). If so any pointers where I can find similar examples (doesn’t need to be energy obviously).
2. Can I expose data on the ESP32 another way which would make those values appear as sensors which HomeAssistant can access and therefore could complete the energy monitoring in HA as well.
Any pointers would be appreciated. Everything I have searched seems to just direct to ESPHome which if I can’t incorporate that into the existing code I have isn’t really a option and also don’t want to have to splice sensor wiring and run a extra ESP just for this functionality). Thanks.
Thinking I will stay with the original plan even though what Chris is suggesting looks like would work it is going to be more involved and I wouldn’t get any of the extra benefits from doing it this way so feel no real reason to go this instead. Also feel MQTT is more versatile for the future and other plans that may be outside HA. Thanks for providing another alternative
In looking at it I took it as I could just add the library and incorporate the functions as needed but assumed many of the benefits to ESPHome would just not function because it was hard coded. Thanks for the clarification. Thankful I had decided on your original idea. Many Thanks.