Well yes I do but in the end it’s helluva lot of work and complex to handle.
There’s no simple answer to your post so I wouldn’t expect any reasonable answers here.
To get an idea of the algorithm complexity, you might want to check out this and this thread.
It’s about combining a heat pump with a dynamic power tariff. That’s the most promising combo in terms of €€€ (or $$$) and complicated to implement all by itself even without PV and EV.
Adding those obviously adds even a lot more complexity to the game.
FWIW, I’m commercially selling an energy management system based on openHAB to do all of this.
Feel free to attempt coding yourself, but it’s been in development for 3+ years and it requires many, many lines of code to handle that complexity
And don’t underestimate how development takes many cycles of testing and optimizing your system.
You can save on average 600€ with hp and ev a year according to a recent study but of course your mileage will vary with your building. There’s also some real world figures in the thread I quoted, amounting to similar amounts.
If that is worth investing a year of work or more now that’s up to you, of course.