HA integration to control mode scheduler without modbus
Hi all.

I've created a moderately simple HA integration https://github.com/nicois/foxess-contro ... /README.md intended to allow people without modbus to avoid the pain of relying on the mode scheduler provided by the mobile app.

I won't try to repeat what the README says in detail, just the key features:
- you can tell the inverter to charge your battery within a defined window, ensuring you reach your target SoC with a minimum of grid power (ie: where possible, waiting as long as possible to allow solar maximum opportunity to provide what you need). It will switch to self-use afterwards
- you can instruct the inverter to force-discharge during a window at a configured rate until a SoC is reached, at which point it switches to self-use. The FoxESS force-discharge threshold does not do this, instead pulling from the grid when you least want it.

You have finer-grained control too if you want it, but these two "smart" features are probably most of what people are looking for.

I only just created this, and there is a big HACS backlog to be natively listed, so unfortunately you'll need to follow the instructions to add a custom repository.
Don't hesitate to list any feature requests or bugs. This is only a couple of days old, so will still have a few rough edges.
Re: HA integration to control mode scheduler without modbus
This has been evolving pretty quickly, and I wanted to share just one of the recent additions:

Image

If your energy provider pays higher feed-in rates at certain times of the day, smart discharge lets you control how much energy get pushed out, balancing your own consumption needs with the benefits of feeding energy into the grid.

In the above (contrived) example, there's a 55 minute feed-in period where the inverter will discharge at the maximum allowable rate - but it will stop after 1kWh has been fed in. This is useful when your retailer only pays good rates for the first X kWh per day.

You can also set the minimum SoC, which guarantees you will not run out of energy overnight. Whichever limit is reached first will cause your inverter to switch back to self-use mode.
Attachments:
Screenshot_20260409_223155_Home Assistant.jpg
Re: HA integration to control mode scheduler without modbus
You should attach your image, as it is blocked from viewing in some regions.
imgur doesn't work here ;)
Re: HA integration to control mode scheduler without modbus
I've added support for modbus as an option, so those users can also benefit from the more powerful automations offered by this integration. I don't yet have modbus working so I welcome feedback if there are any rough edges with this.

Another notable feature: when using "smart discharge", if it appears the minimum SoC will be reached before the period ends, the discharge rate will be reduced to avoid your hitting that SoC early.

There's also a custom dashboard card to let you see at a glance what's happening:
Screenshot_20260411_205626_Chrome.jpg
Re: HA integration to control mode scheduler without modbus
Looks nice - thanks for your efforts. It looks like it would be a nice easy way to send commands from HA.

I've got modbus working so will keep an eye open for anything
Re: HA integration to control mode scheduler without modbus
I was using the Nathan Marlor Energy Management Intergration, but that has stopped working following this last firmware update. I'll check yours out, as I just need a simple way to start and stop the force charging. Thanks!
Re: HA integration to control mode scheduler without modbus
Just came across this post, of this HA integration .... just wondered how people are getting on with it. I have Modbus integration, and reading through the GitHub .. there seems to be a lot of features in this
Re: HA integration to control mode scheduler without modbus
Turak64 wrote: Wed Apr 29, 2026 8:56 am I was using the Nathan Marlor Energy Management Intergration, but that has stopped working following this last firmware update. I'll check yours out, as I just need a simple way to start and stop the force charging. Thanks!
did you get this working? I've hit the same issue due to the new version :(
Re: HA integration to control mode scheduler without modbus
I came across this when researching what hardware I may have to buy and install to be able to control my FoxESS equipment via Home Assistant, as I was getting frustrated... I have Octopus Intelligent Go, and when it delivered cheap slots to charge the car, it just drained the battery - that meant I spent way too much time checking the dispatch slots, and then going into the FoxESS app and setting a forced charge to ensure the car charged from the grid (and filled the battery at the cheap rate).

I had the old 'view only' integration working OK, but struggled with not being able to control the inverter/battery, so this looked just the ticket - and no hardware to buy!

It is early days, but I now have a Home Assistant automation that sees the cheap dispatch slots, and automatically sets 'force charge' during those periods. It can be challenging to get dispatch slots outside of the 23:30-05:30 period, but the couple I have had looked to have worked OK.

I will update here when I get more data.

Great work Nicois, thanks.
Re: HA integration to control mode scheduler without modbus
Could someone please give a brief overview of how Home Assistant would work with Fox ESS KH10 inverter? I would like some way to schedule my charging/discharging of battery, so I don't have to check it all the time. I'm new to all this, and some questions I have are:
  • Do I need to install and have HA running on a computer or something 24/7? Can it go on Windows or needs it's own VM or what?
  • Does Modbus need some hardware connection to inverter?
  • If I use this integration instead, can it just access the inverter through the cloud API or something, and doesn't need any special hardware added to inverter (as long as inverter is connected to cloud)?
  • Will this use of HA allow scheduling for different days of week and times, or even special dates?
Thanks!
Re: HA integration to control mode scheduler without modbus
HI

I have to start by saying I'm by no means an expert on this or Home Assistant, and I also don't really know what a KH10 inverter is in comparison to my H1, but I'll have a stab at some answers anyway, and others can flesh things out and/or correct me.

Q - Do I need to install and have HA running on a computer or something 24/7? Can it go on Windows or needs it's own VM or what?
A - Yes, Home Assistant needs to be running all the time to offer any form of automation, be that lights, heating or managing your inverter. I happen to run mine on a Raspberry PI 4, but I believe it can run on a Windows VM (https://www.home-assistant.io/installation/windows/).

Q - Does Modbus need some hardware connection to inverter?
A - Until recently (as far as I am aware) you needed to add a bit of hardware (Modbus) to your inverter to allow control over modes and charging. I was never really up for adding hardware to my inverter, so I used the previous 'view only' Home Assistant integration for a while to see what was going on, then resorted to manually changing things in the app, which was painful! I found this integration the other day (it's fairly new), and this DOES allow control of my inverter without adding any hardware.

Q - If I use this integration instead, can it just access the inverter through the cloud API or something, and doesn't need any special hardware added to inverter (as long as inverter is connected to cloud)?
A - Exactly what this does, with this integration you get to see a huge amount of information using the cloud API (assuming your inverter is connected), but you ALSO get to control it.

Q - Will this use of HA allow scheduling for different days of week and times, or even special dates?
A - With Home Assistant the world is your oyster, you can make it do pretty much anything you want, pretty much whenever you want. I use Home Assistant to control all sorts of stuff in my house, but I now use it to discharge the battery overnight (paid export) and then charge it up again during the cheap electric window. I also have Octopus Intelligent, so when that delivers me cheap electric slots for the car during the day, Home Assistant now starts the battery charging at the same time without my intervention.

As I said in my other post, it is early days for me trialling this, but so far things have looked good.
Re: HA integration to control mode scheduler without modbus
I developed this integration against my KH10 so I can guarantee it works fine with it. If you have any problems or identify missing features, don't hesitate to tell me!

I've had a few people asking about whether there's a simpler way to use this, without needing to run HA. There are some online services with free tiers which apparently let you do some of what this integration allows, but Home Assistant provides a lot of control, at the price of needing to install it somewhere in your house, and learn how to configure it all.
Post Reply