This is something i've been trying to do for several years (optimise when battery is charged based on next day forecast and predicted load) Awesome idea to use AI. Would you consider writing this up in a blog format so others with less AI knowledge could try to "follow along" ?
I love this level of AI usage. AI has helped, and your HA works even smarter. It's a great level of nighttime home entertainment. :) Thanks for sharing!
I was thinking to build a similar solution, but with the automation implemented as a finite-state-machine, because our events/needs are crazy asynchronous. It would be nice to give a look at the prompt you used, just to eventually catch some inspiration. Great video, as usual!
I have been working with GPT to create some amazing out of my stations in my home that I would have never have been able to do on my own. This is truly an amazing tool
I have also become addicted to using AI to write my HA automations. AI has changed my concept of "good enough". It's not terribly difficult to say, "please rewrite this to consider if my wife is home alone on a Tuesday in July and needs to dry her hair before our usual date night which always starts after 4pm on days when there is no rain because I will be playing golf with my friends with a 12:30 tee time, unless I have something else on my calendar in the afternoon on that day. I always need at least an hour to get ready after my last appointment". Copy...Paste...Enjoy Date Night!!
Interesting approach. I have realized excess-energy charging two electric cars with a function in node-red. The function I programmed in JAVA together with ChatGPT. It does what it should except to some small problems when connecting a car and updating status correctly. This is mostly due to the node-red function being retriggered on every data input. On the other hand I have very easy input smoothing there. Like smoothing out solar fluctuations and so on. I have it running continously for adjusting the car charge-power though. I think that makes a lot of sense and really makes sure that clouds don't make the car charge from the battery during the day. Also I added a couple of practical buttons like "override charge" for each car, and a number to set the override-charge power, so that I can push a button and the car of choice charges whenever I want it, no matter where the energy is coming from. Also a button "night charge" which charges the car of choice to a limit value with a specified charge power. In case I need a fully charged car the next day. What I didn't integrate at all are your ideas about the cost of the battery-energy and scheduling according to weather. I'll look into that. But I had never heard of App-Deamon before and now I will probably tell GPT to take my JAVA script and move it to python. Thank you for that input! The smoothing I may still do in node-red though. I will have to see how easy it is in python. I'd certainly make it a long running script though. Not just triggered every 15 minutes.
That's quite a good example. Can Home Assistant modulate the charging speed of your car (to let the pump run at the same time when the PV power isn't great)?
@@bruxy70 I probably didn't pay attention enough but does the script do it? Have you measured the efficiency of charging at different powers (I believe a lower charging speed isn't always more efficient as the air conditioning pump is running for longer...on cars that use air conditioning during charging)
@@NicksStuff Yes, the script is setting a helper with the charging power. You are right about the efficiency. The script does not deal with it. OTOH, when charging from PV I kind of do not care. And when it charges from grid it charges full power.
the problem with generative Ai is that you cannot relay on its results... genAi nature is to provide you slightly different solutions each and every time. you can play with "temperature" model parameter, which makes it more strict in responses. but on the current level, it is nightmare to debug this. I believe it is much convenient to write script for that purpose. by utilizing simple logic you can program most of your scenarios. and it will give you stable and expected results
This is why I do not use LLM to do the actual control, but to develop the automation that then works consistently. It might not work right out of the box, this is why I was showing how I tuned that in Cursor. And hey, it works. And it is generally a good start, I can always (let it) rewrite the pieces that do not work exactly the way I want.