(cross post from Reddit)
Hi all, I wanted to share my setup with you guys. Electricity prices are kinda crazy right now, and everybody should agree that using renewable energy more efficiently should be on the top of our collective todo list. Unfortunately I do not have the space (not even a balcony) to install solar panels, but I came up with a way to use more renewable energy anyway. A virtual solar panel, if you will.
The idea is simple: Use a battery to store energy when the sun shines, wind blows, and electricity is cheap. Use that stored energy when there is a dreaded dunkelflaute and/or the electricity prices are high.
I get my electricity from Tibber, which means I can get the current and future electricity prices of the day via their API: [Link removed since I am new here]
Tibber is also easily integrated into the energy dashboard of HA, though that is not important for this project.
As battery storage I use an EcoFlow River Pro, which is very comfortably integrated into HA with this plugin by GitHub user vwt12eh8: [Link removed since I am new here]
I then wrote two AppDaemon applications to tie these two together. The first one calls the Tibber API to get the current and future electricity prices. It then creates a plot which I can show in HA as a âwebcamâ, and it provides the price information to other apps via a global variable: GitHub - ast0815/appdaemon-tibber-plot: AppDaemon app to make tibber price plots
The second app takes the price info from Tibber and determines the best charge plan for the battery, using the A* (A-star) algorithm: GitHub - ast0815/appdaemon_battery_manager: Use current and future electricity prices to plan the charging and discharging of batteries
The battery manager app then also actually controls the battery via the entities provided by the EcoFlow plugin, as well as an additional smart plug that is needed to disconnect it from the grid when I want to use the stored energy.
Finally, I also added a function to the Tibber plot app to also display other arbitrary time series, so it can also display the projected charge plan:
^ Example price plot and charge plan from my setup. The A* algorithm determined that it is cheapest to charge the battery (rising grey lines) during low-price hours and use that charge (falling grey lines) during high-price hours. It does consider round-trip efficiency so sometimes it is just best to store the electricity and neither charge nor discharge (flat grey lines).
I do not actually pay hourly electricity prices yet, but I should get that sorted in the next couple of weeks. Until then, this is is actually costing me more, since the EcoFlow itself also uses up some power. It does however already shift my power use to times of low prices, which is well correlated with the fraction of renewables on the grid.
Even when I switch to the hourly electricity prices, I doubt this will ever actually pay off financially. Though that very much depends on how the electricity prices will develop, and whether there will be more or less cost saving possible due to this arbitrage. My main motivation is to make my baseline power loads less CO2 intensive though.
Let me know if you have any questions or suggestions!