I’m working with 30min timesteps, as my solcast PV forecast has that time resolution.
I noticed that every now and then, the speed issue is resolved automagically, but it only lasts for a few minutes. After these few minutes of joy, the time to load data from HA drastically increases again (a call to get 1 day measurements for 1 sensor takes up to 3 minutes…)
Result of my further investigation:
removing the homeassistant_v2.db SQLite database file solves the issue, but I then lose all of my history of course. Too bad, it is what it is.
Sorry for polluting this EMHASS topic; in the end, the issue was not at all related to EMHASS. It was rather EMHASS suffering from slows data retrieval from HASS.
What I can tell it keeps the promise to finish at 0.13. I have enough battery so my typical pattern is to charge to ~80-90% SOC and discharge to 13% SOC. Is there any way to force emhass to fully charge the batteries to 100% and even keep them at 100% for some time before discharge cycle begins? In todays case I would like to start charging at 03:00 with the full power and switch to discharging at 06:00.
Why would you like to buy electricity to reach 100% SOC if the charge EMHASS predicts and reaches is enough to cover your next day consumption?
You may find yourself buying that today and maybe in two days you are able to charge the batteries through PV so at no cost.
I use MPC and feed in the tariffs. Don’t really know whats the correct efficency. I’ll experiment with something lower than default. Currently SOC forecast doesn’t hit 100%, if I lower the efficiency then the real SOC will probably exceed the forecast?
Mine was just an example, I meant “why buy today if you can buy tomorrow”. That said… have you tried to increase the target and minimum allowed SOC? If you max reach 80-90% you could try with increasing by 10-20% and see what happens. But also there are several things we do not know and may affect this approach (if you discharge to grid for example).
“why buy today if you can buy tomorrow” is really good question, but very hard to answer. If you average it out, it doesn’t matter if the charge/discarge cycle happens at the higher or lower SOC, daily energy consumption is still the same. Being at higer SOC gives at least one advantage, you have some spare power in case of power cut. If I increase the SOCtarget, then if the daily consumption happens to be higer I end up charging at some mid-day lower point, which is not optimal either. I don’t discharge to grid.
Then you could try to differentiate SOCmin and SOCtarget. Keep current SOCmin and increase SOCtarget, in my experience unless really needed (unexpected higher consumption) you would not go below target. You could change these and run a simulation. For example I use SOCmin = 0 and target = 0,2.
The real efficiencies of today’s power electronics are quite high, normally >95%.
But you could define a fake lower efficiency as a penalty factor for using your battery and then maybe try to orient its behavior as you desire. In the near future I will be adding real explicit penalty weights to account for battery degradation for example.
Why don’t upgrade to the latest version: bookworm
That’s the debian version I’m using for Python 3.11.
But anyhow as we said we are working with containers so this shouldn’t matter.
I have problems supporting armfh architectures for now, but armv7 are supported. Can we double check your architecture?
Please post the results of: uname -m or dpkg --print-architecture
If you are on armhf you should stick with the add-on version v0.4.2
A little late reaction, but Christmas time is always quit busy!
As you suggested and as-well planned for the future by myself, I installed a fresh new Debian bookworm on my Raspberry Pi4. On top of that a fresh install of Home Assistant Supervised. After restoring my last HASS backup I could succesfully update EMHASS from 0.4.2 to 0.5.3 and everything is running very nicely.
For the record, here is my architecture:
I will leave EMHASS running for a week or 2 and after that I hope to get the mlforcaster working too. Fingers crossed.
Many thanks for all your suggestions here and off course for the beautiful EMHASS project.
Okay I’m totally lost.
Always get infeasible or results that are not logical. It only wants to run both loads I have at the same time at night. Or split the running times although I stated set_def_constant for both loads to 1. The results are more or less the same if I change max grid power to 9000.
Hi, sorry for the late answer on this issue.
With the current formulation there seems to be a problem when setting both set_def_constant and treat_def_as_semi_cont to True.
I got into this and just found another analog formulation where these two options can live normally together.
Its a working in progress but it will be released as soon as possible: https://github.com/davidusb-geek/emhass/pull/142
I’ve noticed that my battery never quite makes it to 100% charge with EMHASS (maybe 95%) unless I intervene and top it up manually. It’s a 5 year old sonnen eco 9.43 10kWh (9kWh usable) LFP battery. It no longer drops below about 12% charge, unless something goes wrong as seen lately where it will drop from 12% to 0% suddenly (haven’t figured that one out yet).
I’ve got the following settings in the EMHASS configuration.
What have other people set up for this scenario?
Should I change the charge and discharge efficiency to something lower?
Should min/max/target state of charge be something else?
Any thoughts appreciated.
I find I get to 100% most days if there is a good spread of prices between midday and sunset.
The last couple of days this hasn’t been a good spread so it hasn’t gone all the way to 100%. This is with 95% efficiency. I have also recently reduced efficiency to 70% to prevent exports at low price.
I’ve just released a new version of the add-on v0.5.4: https://github.com/davidusb-geek/emhass-add-on/releases/tag/v0.5.4, it should be available soon.
This version solves these infeasibility issues with set_def_constant and treat_def_as_semi_cont.
In any case always check the optimization status, which is now a sensor on Home Assistant. If the status is infeasible one should not even bother to understand the numerical results because they can get pretty wild.
With AusGrid you definitely want to get to 100% each day.
How you do charge?
Do you follow SOC forecast or battery power forecast?
Maybe update your battery automation to put a bit more in the tank.
I have noticed I need to set maximum power to 16667 W, to get the battery power forecast to reach 15000 W, which I presume is a function of the efficiency ~ 0.9. I was thinking about raising this as an issue as I specify output power with Powerwall after losses, but EMHASS seems to want me to specify output power before losses. How do out batteries perform?