ottopaulsen / node-red-contrib-power-saver

A Node-RED node to saver money by turning off when the power is most expensive
Other
70 stars 17 forks source link

Feature: Best Save with Moving Average #155

Open Nornode opened 1 year ago

Nornode commented 1 year ago

First of all, Thanks again for an excellent and super useful add-on to Home Assistant and NodeRed!

To my question/feature request.

I recently got an electric car for my home, I want to charge it as cheaply as possible. Let's say I want to consume/charge either X kWh, charge Z% of battery or €Y W hours on average per 24h - and I don't care when I do it as long as I get most bang for the buck pay the least for it.

How can I achieve this strategy with a complex energy price development like it is today:

Screenshot 2023-02-13 at 15 18 19

Let's say I would like to charge the battery on the above strategy as much as possible for €2 5h/day on average every 24h as cheaply as possible. Recently the prices for tomorrow got announced and assuming I spent today's budget in the morning hours (e.g h00-h07) the obvious choice is to spend tomorrow's "budget" already today?

If tomorrow the prices are increasing even further, do charge when it's cheapest again, If they are decreasing, don't charge at all...

Is this possible to achieve somehow?

ottopaulsen commented 1 year ago

Pretty advanced requirement :-) Maybe you can get something like that by combining two Lowest Price (LP) nodes and a Schedule Merger. One LP from 00:00 to 00:00 on lets say 2 hours. Another LP from 12:00 to 12:00 on 2 hours. With the above prices that would give you two hours in the morning and two in the evening. Not sure that it would always give what you want, though, and I guess you would get two more hours the next day anyway.

You could use dynamic config to get it to charge for €x, but you would have to calculate hours on based on price using some other means. Maybe the override function also can help you achieve something, but this will get rather complex.

The LP has a price limit feature that also may help you.

Nornode commented 1 year ago

Yes, I was thinking about it afterwards, it may be too specific involving data typically not handled by the nodes. Forget the more specific requirements with kWh, € or battery...

One can make it more straightforward using data the nodes are custom to time. In cases like the above, how do I spend the least cash on average when prices like this occur?

I mean it's pretty clear a "lowest price strategy" would benefit from spending tomorrow's hourly "budget" already today when it knows it will always be more expensive tomorrow, right?

I understand with heaters and boilers, it matters when energy is consumed, with cars, less so.