[App][Pro] Homey EMS (HEMS): Smart EMS

This app will take control of your power management devices through Homey only.
By monitoring the energy readings of all of them it makes smart decisions and controls devices to apply HEMS strategies.

Test channel:

I test this app with:
Homewizard P1
Marstek Energy Storage Venus V2
Peblar EV charger Business (community app)
Polestar EV
Solar forecast
Weather underground

I use supporting flows

  • mark the vehicle home/away based on gps location and charger connected state
  • Use Homey energy pricing to mark expensive/cheap hours
  • Ask myself if I will use the car tomorrow before bed time

But it has a config wizard that should allow you to map most homey devices as long as they have the required capabilities to make the system work.

** Widgets **
It includes Flow control graph widgets.
Last 24 hours produces a nice rolling window overview on where your solar went
Last 10 minutes gives a live rolling window.
Day analysis allows you to select a full day in the recent past. It holds less details.
Hour analysis allows you to select the hours from the last 24 hours. It holds less details.

For new the first strategy is: Grid Aware
Requires: P1 meter, Solar inverter
Controls: Battery and EV charger
Input: Weather prediction, solar production prediction EV SOC

How it works, but you can manage a lot:

Main operation
When surplus starts to occur (production exceeds house use) it uses the EV threshold to either prioritize the battery (low surplus is efficient for batteries) OR it prioritize the EV charging. This prevents the battery from competing with the EV.
You can then set a max for the EV charging, when the surplus grows over the max value it will start to include the battery. This threshold bandwidth creates a stable consumer for your surplus.
When the surplus ends by going down at the end of the day, it first stops the battery, then the EV and the remainder goes into the battery. If the battery might already be full, it keeps the EV charging.
Goal: Ensure at the end of day the battery is fully loaded, and the remainder has been send to the EV.

Exception: EV is not present
When this happens the battery is handled with a grid zero operations (by the HEMS). This means it will unload to handle peaks and loads while surplus is available, optimizing the max amount it can store during the day.

Grid awareness
During the surplus hours the grid is overloaded, so the HEMS prevents your house to send additional surplus to the grid. It ensures it only charges and charges (unless everything is full or the EV is not available then it tries to stay at 0). When the shortage hours start (expensive hours, morning evenings) it will use the battery to keep the import low. It will do this till the battery is drained to your safety margin bottom (settable).
It will stop doing this when the expensive hours are done and there is still left, it will safe that till the next peak.
This should stabilize your power usage to a rather nice average.

Influance
You can have influance on the system using modes like ‘EV will be used’. This will tell the HEMS the car WILL leave later on and safes the battery by prioritize the EV with all surplus.
And it will allow for a lower safety margin for the battery SOC, doing this in the morning or night will allow the first expensive period to drain the battery more creating more space for the upcoming sunny day (depends on weather prediction).
EV SOC the car will be used will trigger a night charge cycle to ensure your car is charged to the target SOC, this can be made dynamic by flows. The charge speed is calculated to ensure you hit the goal with the lowest speed the charger can do, preventing load on your grid.

Example
You will get this behavior.
Battery was at its low during the day start, so the morning was all import then when the sun started you see the nice green solar curve in different energy flows. Around it small imports. During the day the grid is overloaded with surplus, so import is cheap and helps the grid, so the HEMS preffers to import over export keeping a safe margin there.

When the sun went down, the battery took over.
The lower darker green is solar power used by the house
The middle green is solar power pushed into the EV charger
The light green top is solar power stored in the battery.
The teal is the house running from the battery.
Multiple widgets included

[Reserved for strategy]

[Reserved for more strategies]

I don’t have a battery configured, but it still stays in the mode to load the battery. What did I configured incorrectly?

I checked, its a bug in my states. If all is full I set it to no destination but if the car is not available away or full I put it into battery as destionation; even if there is no battery.
I will fix this, new test version incomming. Thanks for the feedback.

i also see
HEMS (Homey Energy Management System) | Homey

maybe it’s an idea to join forces with @Menno_De_Braak for one EMS app?
saves development time, and choice stress for the users

P.S. I really like the idea of an EMS app and when they hit the released state i will start playing around with it as i have to switch energy contract in october

I am done, already running this in my setup, with support for all Homey devices, now for several months.
:blush:

then thanks for all the work, will check it out when it is officlially released.
P.S. is also electric floor heating and airco’s embeded?

it looks like a coincident that we both published an app at the same time… Mine is also close to finished but I’m open for a talk…

No they are not. This is my 5th release, the other 4 I was never happy with. Trying to include underfloor heating and airco’s was one of the things that I had in several previous versions. But in all I found they are less responsive to just surpluss needs. Next to my hot water system I hooked them up the the events and use simple flows to manage them linked to main events of the HEMS. The device control I reserved for systems that need active monitoring and control, speed and reliability. The slow systems are easier to hook to the ‘cheap hours’ event etc.
But I designed the app to allow on the same core for multiple strategies, so lets generate those ideas.

So how would you hope the HEMS would include the underfloor heating that require the more calculation power of an app over simple flows?

indeed, it was clear there was a need, so great minds think alike :wink:
I am curious what your approach is, like stated above I set it up to have different device drivers from different strategies, this one is the dream I had for my purpose, but I am sure many people have different dreams and based on my core engine with its device mapper through the repair wizard it is now easy to generate other strategies.
I would be more than happy to include the one your building into this one for example.