I’ve been working on it for a bit, and it’s been controlling my car and HWS well today. I’ve heavily inspired by PV Excess Optimizer but as an addon to help simplify configuration.
The addon will attempt to respond in real-time to your grid usage to optmise controllable loads (EV Charger, pool pump, HWS etc) in response to solar generation and other loads.
It’s functional, but certainly the CSS could use a bit of polish, and a number of features aren’t supported yet (Home battery, run once, overnight charging etc). I’ve looked at predbat and emhass but found the predictive nature of them too challenging to set up. I want something that just responds to the sunlight available.
I tried using the latest version (1.3.68), but unfortunately, I couldn’t get it to work.
Here’s the output from the log when starting the service:
[09:04:56] INFO: Starting solar optimiser service...
[09:04:56] INFO: Contents of /data before operations:
total 12
drwxr-xr-x 2 root root 4096 May 18 09:04 .
drwxr-xr-x 1 root root 4096 May 18 09:04 ..
-rw------- 1 root root 27 May 18 09:04 options.json
[09:04:56] INFO: Setting data directory permissions...
[09:04:56] INFO: Setting file permissions...
[09:04:56] INFO: Final data directory state:
total 12
drwxr-xr-x 2 root root 4096 May 18 09:04 .
drwxr-xr-x 1 root root 4096 May 18 09:04 ..
-rw-r--r-- 1 root root 27 May 18 09:04 options.json
s6-rc: info: service legacy-services successfully started
nginx: [alert] could not open error log file: open() "/var/lib/nginx/logs/error.log" failed (13: Permission denied)
2025/05/18 07:04:56 [emerg] 111#111: mkdir() "/data/nginx/tmp/client_body" failed (2: No such file or directory)
s6-rc: info: service legacy-services: stopping
[07:04:57] INFO: Service restart after closing
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped
It seems like there’s a permission issue or a missing directory (/data/nginx/tmp/client_body).
The service starts and shuts down immediately afterward.
Looking forward to an update – and thanks a lot for all your hard work!
thanks for providing this addon and the quick fixes to the issues raised on github - that really helped a lot.
Im just about to start playing arround and wanted to ask for some guidance:
The Grid Power should be negative if energy flows from the house to the grid, right?
What exactly does the Power Optimization enables this addon to do? Should it be switched on in when using the addon?
After setting up the sensor, the addon will activate the switch given more energy is available then used? Is there a way to set a threshold for the activation or is this automatically dependent on the solar genation?
Is there a way to activate and deactivate this while operating, like switching to another loading mode if, for example, the car needs to be charged up until its limit?
Sorry for this obviously basic questions, but i wasnt able to find an answer.
1: yes grid power should be negative if energy feeding out of the grid, positive if energy flowing in. I intend to be able to accept two sensors (solar production and total power use) in future
2: that should probably default to on, since that’s the thing that makes the app run at all. If you want to charge your car during the day then you should turn this off and the app will stop controlling loads. The app won’t do anything overnight if you need to extra charge your car with off peak.
At the moment the app tries to use every available watt of solar based on your grid sensor and what your devices use. I have a 3600w water heater, so once the house is exporting 3600+ watts the app will turn it on. What use case do you have in mind?
I’ll aim to put a lot of hover text on all the inputs in a future patch.
Thanks for your reply and that helped a lot in understanding.
So my idea of use cases are first that i plan to have multiple options that one can select c(“SoC”, “PV Excess”, “Off”) that have their own purpose and if one other than PV would be selected the addon should stop operating. And as far as i understood you turning the optimization off should do the trick, but i only can control it via the webpage.
The other idea is the one with the threshold, which could be helpful in wintertimes, when there is never enough energy to fully be on excess, but supported loading would be sufficient. So i could think about dividing the power by an integer necessary to act as the threshhold thingi.
While writing this, i think the main question here is, if there are any controls which i can enact upon the addon out of home assistant to control its functioning.
I’m currently using my own automation, but i might try this addon. (after building it as stand-alone docker container).
I’m setting a minimum amperage today when i know i need the car charged at some point in time. This could be used to set a time for departure to adjust this minimum over the time delta.
I"ve just released the first update. You can now specify a minimum amount of energy a device requires each day, and if the system can’t get enough out of your solar it’ll try to do it with your off peak power.
It also has a (niche) free mode, where it’ll just max out everything where power is free