HEMS or Homey EMS

Im working on a homey EMS system that will calculate the solar production of tomorrow in order to plan its strategy to load home batteries and charge your car. First approach is to connect EV’s in general and Tesla, but other EV chargers are also supported, Batteries can be added, just select from you device list. Solar production kan also be monitored. If you want to test it and or help me develop this then please let me know. I already have a version running and am working on integrating dashboard to visualize the planned strategy vs the actuals. I don’t know why this app is not developed any sooner, seems to me like there is a need for this. Of course you can flow like crazy but this is not suitable for everybody.

Meting

•	HomeWizard P1 → grid per fase (L1/L2/L3)
•	HomeWizard kWh-meters → PV per fase
•	Open-Meteo → weer & bewolking
•	ENTSO-E/Tibber → dynamische tarieven (optioneel)

Dagplanning

•	Herberekening op 04:00, 12:00, 19:00, 22:00
•	Uurlijks schema: PV, verbruik, batterij, EV, thermostaat
•	Verbruikshistorie (ConsumptionLearner)
•	Surplus/tekort prognose per uur

Batterij

•	Minimum & doel-SoC
•	Laden bij surplus, ontladen bij tekort/piekuur
•	Bevriezen bij trip-urgentie
•	Marstek per fase

EV-laden

•	Modi: solar_only / solar_and_grid / fixed / fast_charge / off
•	Tesla Wall Connector via lokale REST API
•	Ritdeadline → auto-upgrade naar fast_charge
•	Nachtladen vanuit batterij
•	Dag-specifieke aanwezigheidsplanning
•	Piekuur-blokkade

Warmtepomp

•	Setpoint-offset op surplus/tekort
•	Heating vs cooling richting automatisch
•	Seizoenswissel op basis van temperatuurprognose
•	Respecteert handmatig uitgeschakelde thermostaten

Prioriteitsbeheer

•	Prio 1: batterij minimum + EV-deadline
•	Prio 2: batterij doel + EV standaard + thermostaat
•	Prio 3: dump load (boiler etc.)
•	Piekuur: batterij max ontladen, EV geblokkeerd

Homey-integratie

•	Widgets: EMS Vandaag + EMS Morgen
•	Flow-triggers & acties
•	Virtual device met PV/grid/batterij/EV capabilities
•	Setup-wizard via pair-sessie

Did you find this one: SlimLaden voor ThuisBatterij | Homey ?

Just FYI, the Power by the Hour community app has a great prediction / forecast tool

Yes I did… but this one does not take your EV in the mix, has no load balancing either.

I have this build in as well!

Hi Menno,

I have the hardware that matches your suggested setup: Tesla car and Marstek Venus E3 battery. I still have an older solar array with a dumb converter that I can’t turn off. So I really would like to optimize my own consumption.
Besides this, I can also test with a Dacia Spring. Both cars are already connected through their Homey apps. I also have the ‘Slimladen’ app already to manage the Marstek.

Looking forward to your progress and I am happy to test something if it is needed.

In addition: Up until recently I used the Jedlix app to plan my smart charging of my Tesla. This worked very well, but Jedlix pulled the plug on their own app. The main features I used were a daily departure schedule and the ability to set a different departure in the future. This last one was useful when I didn’t need my car for a day, so I could set the schedule to 2 or 3 days ahead. Than it would wait with charging for the cheapest hours of the next day. Most alternatives I’ve tried so far (ev.energy to name one) only schedule 24 hours in advance.
Second Jedlix had a minimum charge, where it would always charge to straight away, so you could have a minimum range at the ready.
Besides this I already have a flow to limit my car to 5A instead of 16A if I have expected solar remaining in the day, but the energy prices are not low enough. Than I want to maximize my own consumption.
Lastly, I also have my dumb solar converter app in Homey (Goodwe) and off course a P1 meter from Homewizard.

Maybe some inspiration for some features in your app.

Hi Manlet, testing would be great! the app still has some development hours to go and it is a lot of work with testing etc. You can find the Repo here: GitHub - b2hvty299s-ux/com.ems.homey: Homey Energy Management System · GitHub Let me know if you need any help or if we can setup a testing plan.

forgot to press reply, see other message.

Great idea, just want to point put that a good, open source EMS does already exist and since I only learned about it recently myself, I wanted to share this here: https://evcc.io/

What it lacks is a proper Homey evcc integration (or even evcc itself as an app on homey?). This would immediately support multiple setups (solar, batteries, wall chargers and many EVs).

It doesn’t support predictions fully yet though. You’d have to use a paid AI/ML service at the moment as far as I understand. A better integration of predictions into battery and EV charging is on the roadmap though.

As I said, just food for thought. Carry on. :smiling_face:

Yes that is a very nice app indeed. Also an inspiration on how to develop this one. User interface in homey is limited but the rest should be similar to evcc, perhaps on some points easier. evcc needs to make a lot stuff to make all the different devices work, in Homey devices have their capabilities and are alreary installed so you can just talk to them.

Unfortunately your reasoning falls apart at the Homey ecosystem reality. :frowning: I’ll have to use evcc, for example, because Homey doesn’t have broad support of anything HEM-related. Even Homey Energy is clunky at best. I am actually considering switching to HomeAssistant because you find better and broader integrations there.

Homey Pro was designed for consumer grade smart home and this shows now that I’m looking for a HEM solution. Evcc has a clear advantage in supported devices – one Homey will not be able to compete with, IMO, in the foreseeable future, unfortunately.

Anyhow, please proof me wrong! xD

I’ll follow along here. If you need a tester (Sigenergy hybrid converter & battery, Buderus / Bosch heatpump, Delta wall charger), let me know.

yeah sure let’s go… you can find the repo here: GitHub - b2hvty299s-ux/com.ems.homey: Homey Energy Management System · GitHub

you know how to install this?

I could figure the installation out, yeah.

Homey doesn’t support all my devices, however, as I said before. So this has to wait until Homey does or until your app has found a solution to support more devices.

I’ll include everything in evcc (it supports all my devices OOTB) and expose the devices to homey. Maybe I can make it stop its EMS function so that I can test your app. This won’t happen in the next month, though. I’ll get back to you. :slight_smile:

I’m interested to test your app in my homey pro 26 I wil check next week or maby tommorow the repository. Thank you for your work so far.

Great, looking forward to you findings.

In that case, you can submit an app request here:

There are many developers active in that topic (including myself) who can help add support for your devices.

Goedenavond Menno,

I pulled a copy from your GitHub and started to play with it.

My setup is a little different. I control the Tesla to stop and start charge. I own a Zonneplan Nexus battery which is a different in the sense I cannot control that directly but it will unload if power is asked.

This year I will only load Tesla at cheap hours. But next year I will empty the battery if it is filled by solar.

I changed a few things to make it more to my liking.

I only charge the Tesla to 60% to keep the battery in the optimal condition. I can now set a time/date in the future to schedule the Tesla for a bigger charge if needed. I have this in a widget on the first page of my homey now with some status information too.

I included a predictor for the power prices in the next week. Tesla will use the lowest price time to load in 7 days (weekend hours probably)

Next year after net metering is ended in our country The Netherlands I will use the battery to charge the Tesla if it is charged by solar energy. To be able to do that I included the calculation for household, solar and price.

Last night was the first night it succeeded to stop and start charge on the right moments.

I will be happy to share this if you’re interested, I messaged you on your GitHub too.

Hi Toon,

Great! So you added some features in the EMS app? I do agree on the 60% Tesla charge, i always do 65% but to to be somewhat in the middle of what Tesla recommends I chose 70%. But anyway, i will have look at GitHub!

Very nice to see you are developing a HEMS in Homey. Currently in the orientation phase for the best HEMS, preferably integrated in Homey because all devices that the HEMS needs to control are already connected. Someone else already launched a beta app similar to what you are building as far as I can see. [App][Pro] Homey EMS (HEMS): Smart EMS This app also has nice widget for a Homey dashboard.

Also configured EVCC, looks nice and promising, but can’t get it working for me yet.