EMHASS: An Energy Management for Home Assistant

EMHASS creates these on the fly in Home Assistant, Home Assistant doesn’t retain them across restarts.

Your best bet is to re-publish the optimization results again; I think it might when you call publish-data with prefix ‘dh_’ again after restarting HA.

Getting close enough with the soc curve now, thanks for the forcible_discharge_soc tip @RikBast . Now waiting for the sun to come out to see if my automations handle that as well.
I have also added an override for the battery control automation that anytime there is to much power drawn from the grid for a while it will use the battery to do peak shaving to a preset limit and for this a minimum battery percentage is kept behind. (capacity tariff with 15 min average peak value here in Belgium). The same limit I also use in EMHASS as maximum_power_from_grid value. I also use this value for the “Charge Maxcaptar” battery charge mode, p_grid_forecast = maximum_power_from_grid

1 Like


Some weird soc today. Why do it get more than 100% is this by design or a bug?

Update. I figured out why this happens. I wanted to change min allowed soc from 0.3 to 0.5 because of bad weather in case of power loss. But the mpc optim pushed 0.3 as end soc. The. This happens.

This was an eye opener for me as I completely missed that it is possible to have follow grid with emhass? Thanks for that @HansD now I have to rebuild my logic in my automation.

1 Like

@markpurcell Would you happen to have used blueprints in Home Assistant yet?
If so can you have a look @ this Need help to use HA blueprint as software connector

Hi, no I haven’t used blueprints yet, but I think it is a good idea.

@markpurcell Would you be open to help?

@davidusb sorry for this random topic.
I was wondering how doable it is to use mlforecaster with "num_lags": 288, for day_ahead and 5min optimization step?

I’m assuming its unlikely. (remember hearing something about mlforecaster limitations? )
If it is, do you suggest anything arround this issue?
If it does work, what are the runtime parameters you recommend to make it work?

Thanks

1 Like

We have some EMHASS blueprint development happening on discord.

1 Like

With the growing amount of renewable energy in the European grid network, there are unfortunately also far greater fluctuations in the electricity price. At least if you have a dynamic electricity tariff contract. Here in Germany, we have already had fluctuations of 50 cents and more within a few hours this winter. That’s why I would like to use a charging management system. So far I’ve only used EMHASS for the intelligent discharge management of my battery. My first attempts with the setting; “set_nocharge_from_grid: false” in conjunction with “weight_battery_charge: 0.3” did not result in any meaningful optimizations.
Does anyone perhaps already have a working charging management system for their battery and can give me some tips?

Thank you very much.
Thomas

Translated with DeepL.com (free version)

v1.0-alpha-preview (not working yet)

I tried the discord link but keep getting the message: No text channels, you are in a strange place. You don’t have access to text channels or there are none on this server.

Would you know how this comes about, I have a discord account and it is activated.

Looks clear, do you happen to have a link to the blueprint? So I can take a look at how you went about it?

Yes I don’t see the problem.
That will be 24h of lags. It could be even bigger: 48h, 36h, etc.
The only limitation will be of course your hardware.
Test it and check the %CPU load.
Remember that each lag is a regression model that is fitted, so you’ll have 288 models fitted. But for me that is still within reasonable numbers. The global fit will certainly take more time than with the default 48 lags / 30min time step, but how much? I don’t know, it depends on the hardware.

1 Like

I recommend setting weight battery discharge to 0.0 to get meaningful results.

With a setting of 0.3 my battery would never discharge as the price difference would not be high enough.

Can you share your daily optimisation chart?

Ping me on discord and I can give you access.
pos1729

When I look @ post 1729 in this topic I don’t see anything about discord. Can you tell me your’e username on discord or how can I ping you. Never used discord before…

My username is pos1729

Invite link:

I have tested weight_battery_charge: 0 and weight_battery_discharge: 1 (my prices is in Swedish Crowns hance different 1 Crown is fine), but the battery didn’t want to charge. Discharge was almost perfect.