Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Node that compares max and min price #210

Open
Heddan76 opened this issue Oct 30, 2024 · 1 comment
Open

Node that compares max and min price #210

Heddan76 opened this issue Oct 30, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@Heddan76
Copy link

It would be nice with a node that compare max and min price. And if the difference is bigger than x öre output 1 activates.

I use my battery for pricearbitrage and Lowest Price-node for charging at lowest price and discharging at highest price of the day. But its only worth doing this if the difference between max and min price is more than 80öre. Because of taxes, wear of the battery and so on...

With this new node it would be possible to choose differerent saving strategys from day to day based on how volatile the electrice price are the next 24 hours.

@ottopaulsen
Copy link
Owner

Interesting idea. Let me elaborate. So let us use Output 1 for spending from battery. Send true to start spending and false to stop spending. Then let us use Output 2 for charging the battery. Send true to start charging and false to stop charging.

The algorithm would analyse a period the same way as Lowest Price does. It will start by finding the costliest and the cheapest hour. If the price difference is >= x it would charge the cheapest hour and spend the costliest hour. Then it would find the next costliest and the next cheapest, compare them and do the same with those. When the difference is < x it would do nothing. Both outputs would be false both hours and for all remaining hours.

What other config would be required?
I guess a maxHoursPerChargingSequence and a maxHoursPerSpendingSequence would be useful. If one of those limits are reached it would stop searching for more hours, as it would then risk to start charging on more expensive hours and be done charging before the cheapest hour comes, and similar on spending.

It could also calculate a saving for each pair of hours.

This algorithm assumes that spending and charging takes the same amount of time. That may not always be the case. Maybe some kind of configuration is necessary for handling that too. This would make it more complex, but it is probably possible. Maybe a chargeDischargeRatio or hoursChargingPerHourSpending.

Does this make sense?
My immediate thought is that it sounds possible.

@ottopaulsen ottopaulsen added the enhancement New feature or request label Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants