davidusb-geek / emhass

emhass: Energy Management for Home Assistant, is a Python module designed to optimize your home energy interfacing with Home Assistant.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature request: startup penalty

werdnum opened this issue · comments

I am using emhass to control my pool pump based on Amber electricity prices. Often, the solution EMHASS comes up with switches the pump on and off repeatedly, which is probably a bit more switching than I'd like. The pump also runs faster (2x energy consumption) for the first few minutes, which probably negates the benefit from running at 22c/kWh rather than 23c/kWh.

I think I'd like to alter the algorithm to allow specifying a penalty (in minutes or cents) for each startup. That way, the optimiser can split the usage in two if it really helps, but won't stop and start every 30 minutes when the power price fluctuates slightly over the day.

Turning on the option to make it a continuous load with just one startup is not an option for you?

I have this somewhat working in a branch. Want to clean it up before sending a PR.

Hi, ok nice feature!
The annoying part will be to add a new user-defined input variable to control this.
I think that by default no penalty should be applied on the number of startups. Then if the user desires as it was your case, this option can be activated.
This has been a constant struggle, add parameters so that this optimization can be highly configurable, but at the same each new parameter adds more complexity and the people complain about how all this is hard to setup.
But go ahead these are nice features. Try to add some lines to test_optimization.py to quickly test the desired/expected behavior of the feature.

This is included in the just released new version.
Closing this for now but reopen if eneded.