Off grid setup with Generator backup supply

Post Reply
baz0000
Posts: 10
Joined: Fri Jan 12, 2024 1:09 pm

I have installed a Fox 8Kwh hybrid inverter with a 20Kw battery cube tied to 8Kwh solar panels to generate and store power to my home. The system is set up on self use as off grid and working well.

I wish to add a generator backup for when the solar generation is insufficient to restore the battery charge sufficiently before nightfall. Inputting the generator feed into the grid line what menu settings are required to ensure there is no backflow from the inverter (feed in) once the batteries attain their designated charge level. Can I just set the feed in power to zero in the setting on-grid menu?
Dave Foster
Posts: 1786
Joined: Thu Oct 13, 2022 7:21 pm

I think the best way to do what you want is to connect the generator to your consumer unit/fuse box on the grid side of the main CT meter - then add a second CT clamp from the CT2 input, and clamp it to the generator live feed.

The inverter will see everything the generator produces as external generation (as if it were another solar inverter) - any excess above the house load will be used to charge the batteries automatically no settings required as long as the generators regulation is good enough - when the batteries are full the inverter won’t attempt to use the batteries as long as the generator output covers the house load.

Unless you are running totally off-grid i.e. no connection to the any grid - in which case you will be running in EPS mode - the problem then is that anything that you connect to the grid input will force the inverter to switch back from EPS cutting off your off-grid supplies.
In which case you would need to set the EPS circuit so that it is live when the grid is active i.e. you may need to change the setting on bypass relay and turn UPS on - then connect the generator to the grid input.
When the generator starts there will be a small break in EPS power (~50 milli seconds) and then the inverter will run on the generator supply - if you don't want the inverter to try and back feed set your export limit to 0.
baz0000
Posts: 10
Joined: Fri Jan 12, 2024 1:09 pm

Thanks Dave for your advice. I have wired up the generator input line on the opposite side to the battery shed consumer unit (which is there to feed mains AC to two the tracker controllers). The working set up today is in EPS off grid with no mains tie in at all and no ability (no cable feed) for mains tie in, so if I understand correctly:

Firing up the generator on the grid input for the inverter would override the solar input. This makes sense as the inverter has power limitations so I can see why that would be a safety feature of this input or that input. If I were to only use generator feed battery top off after dark then I wouldn't be wasting solar and the PV1 plus PV2 input would be zero. I assume once the generator power was switched off then things would revert back to seeking EPS, ready for when the new day dawns? Is that a correct assumption? I know if I can get the batteries to 80%+ charge status after dusk then there will be enough to see through the night, even those long cold Winter nights when there will be a good amount of added heating load.

I'll set the 'on grid' feed in power to zero to ensure there is no possibility of back feeding. Using an 8Kwh generator on 20Kw battery storage there should never be a need to run the generator at night for more than a hour and a half. It should all work, so long as the EPS does default back into action automatically as the system set 'self use' work mode come the next day.

I have retained a grid mains switch in the house which I could just flip during the daytime and allow all the solar output to then top off the batteries but I want to run a test to see if we can survive on solar with generator backup at a cost advantage over the easier, from the comfort of the home flip a switch, solar with grid mains as the backup. If we can, then considering going fully off-grid would be a viable option. It's a big decision in the UK to move from a grid supply to go fully off grid as there is a hefty disconnection charge to add into the cost benefit analysis of the figures.
Dave Foster
Posts: 1786
Joined: Thu Oct 13, 2022 7:21 pm

baz0000 wrote: Tue Aug 06, 2024 10:04 am I assume once the generator power was switched off then things would revert back to seeking EPS, ready for when the new day dawns? Is that a correct assumption?
Yes once the inverter detects loss of grid voltage it reverts back to EPS only mode
baz0000
Posts: 10
Joined: Fri Jan 12, 2024 1:09 pm

That is reassuring to be told it'll revert automatically to seeking out the solar input when the mains voltage is zero.

I just need to build a somewhat secure generator enclosure as that is an expensive piece of kit to have sitting outside unsecured. I've looked online for suitable options and they are silly money compared to a DIY effort. Back to the drawing board I'll head.
Andrew37423
Posts: 2
Joined: Tue Jul 25, 2023 12:01 am

Hi baz, did you have any success charging the batteries from your generator, thanks.
baz0000
Posts: 10
Joined: Fri Jan 12, 2024 1:09 pm

No success.

Every hurdle jumped presented a fresh hurdle to get over.

The last hurdle that I gave up on called a failed earthing on the incoming AC feed. Maybe if I tied the generator to an earthing rod this hurdle could have been navigated but there was no guarantee it wouldn't then just be onto the next hurdle. So, I gave up.
Andrew37423
Posts: 2
Joined: Tue Jul 25, 2023 12:01 am

Hi baz,
I too have fought on trying to get the batteries charged, and met with the same earthing issue witch I did manage to get past, but could never get it continuously charge, as the load increased it pulled the generator (5kw) down and seems to fall below required specs.
I'm still playing about with settings and generator speed when I get the opportunity but still jumping as you put it. Do you have your inverter grounded with an earth rod?
baz0000
Posts: 10
Joined: Fri Jan 12, 2024 1:09 pm

Did you get around the earth issue by hooking the generator to a good earth or by deselecting the check earth box in the agent level inverter setup? In the agent level you can also stretch out the voltage and current range if you find your generator is struggling to maintain either under load.

Seeing Fox can monitor the system remotely I figured if you start manipulating these settings then it may well void any warranty claims.
Max Power
Posts: 1
Joined: Sat Jan 25, 2025 10:20 pm

Hi all,
I can confirm this does work, I have it working successfully and stably and will try and remember all details.
Firstly, this thread was deeply useful for supporting my experiments. I live in a house with no grid (but gas and water) and have been running from a Fox KH8 and 10kwh of batteries and 25 panels.
For a while I made do with this and I’d miscommunicated with my installer on what I wanted and they installed an MTS (manual transfer switch) – this saw me though a few dim months as I could switch to a generator directly running the whole house while the batteries had chance to charge. I could also charge a 2.4kWh PowerOak to run the house at night. The generator I was using is a Champion Mighty Atom. I ran it from 19kg propane tanks. It would use about 500g / hour generating 500W (no really, and about 1kg / hour running 1000W)
Alas, this didn’t cut it so I got the installers back and asked them to install a 32A commando next to the generator (but not decom the MTS, which I love) connected to the GRID connector. Note that my house is connected to the EPS connector. I also upgraded my batteries to a “full stack” of 7 / 32kWh. More about this later. They did this but we could not get the generator to power the inverter as it rejected the floating earth on the Champion Mighty Atom. As a solution I created a bonded socket. Given the Mighty Atom is fully enclosed by a plastic cover I was ok with the dangers this can create. An ex Royal Signal told me how to do this so make your own mind up. Hey preso, it worked instantly. Note that you also have to set the batteries to forced charge in the Fox app from 00:01 to 23:59. There are threads on doing this so I won’t go into detail here. Note also, I was doing all of this in December after 16:00 so there was no sun on the panels. In this setup, the inverter hands off completely to the generator and doesn’t draw from the batteries, but WILL draw from the solar. Not sure why exactly, but provision your generator correctly.
Alas, something very strange happened. The inverter slowly ramped up the “mighty” atom until it tripped at a charge rate of about 2200W. It did this three times and eventually stopped drawing extra current at about 2150W but the poor mighty atom was NOT happy. It’s as if the inverter can learn the max supply current it can take, quite smart I guess.
Eventually I found a setting on the inverter which limits the input current. It’s under settings -> Battery -> Max Chg. Cur. You need to know the voltage of your batteries and set the current to something else. I also bought a larger Challenge LPG generator that was rated at 3000W and had an electric starter. I set the current at 3-5 amps, which on a full stack is about 330V so the battery charges at 1000W to 1500W. I do have neighbours-ish so I run it from 16:00 to 20:00 and so I get 4-6kWh of charge into the batteries. The major downside is you HAVE to remember to turn the current back up after or you risk throttling your solar generator. On some of the forums there is apparently a setting you can see via the API / Modbud called “max current on grid” – but I didn’t want to start down that path given my installers would have kittens.
One thing I don’t like is when I turn on the generator and flip with 32A switch you can hear several clicks from the inverter. I don’t know if they are solenoids etc but it’s quite a loud “click click click” as it is negotiating with the input. It’s probably not good for the inverter in the long run. When you turn off the generator I’d say the gap is around 0.5 – 1 second. Everything that doesn’t have a decent survival rate will reset, for example the cooker clock resets, the TV turns off, etc. So if you have, say, a desktop PC and no UPS, yes it will likely turn off. It’s not 50ms for the EPS to come back on, definitely feels a lot longer.
I have to say, as well as this all works, if I get a sunny winter day, with a 20+ panels you can get 10-12kWh (I’m in the SE) so I’ve actually barely needed to use the generator, maybe 30 hours run time all through Dec and Jan… Upgrading the battery tower was absolutely a good move. I’ve set the min Soc to 10% but I’ve not been below 40% for a while.
I had planned to connect the generator to the mains gas, hence the LPG ones, but I just haven’t found the need. To refill a 19kg Calor propane is about £65 and that will generate about 15-20kWh from the generator I have.
It’s all been a bit stressful and it’s looking like I can get a mains connection sometime in 2025. I could probably live forever without it by my wife is a hard NO on that haha.
I hope this helps the next person plan. I was pleasantly surprised that the fox kit could even do any of this. I did a lot of work looking at Victron but 48V was just not enough.
If anyone wants me to write more about this or I’ve missed anything let me know. My installers are gold also so happy to share their details directly with people.
Last edited by Max Power on Sat Jan 25, 2025 11:25 pm, edited 1 time in total.
UK_KH_User123
Posts: 28
Joined: Sat Oct 14, 2023 1:57 pm

I don’t know if they are solenoids etc but it’s quite a loud “click click click” as it is negotiating with the input. It’s probably not good for the inverter in the long run.
Hi Max ... I read your post with interest, thanks for all that information. I just wanted to mention that, as someone who uses a KH with house load via EPS output (but with a grid connection) I can confirm that any time the grid is restored after if has been lost, the inverter shows 'checking' status and makes a series of clicks, takes maybe a minute then it's back on the grid. So, if that's what happens to you, I think it's no cause for concern!

I have a ground rod / earth installed which is required for running full house from EPS output. Do you think if I connected the real earth rod connection to the generator's (model not chosen yet) ground terminal the KH would be happy? And if not, what exactly is a "bonded socket"?

Thanks!
baz0000
Posts: 10
Joined: Fri Jan 12, 2024 1:09 pm

The Fox inverter does throw up a grid earth fault on a generator feed but this can be addressed by unticking the check box on the earth check safety setting. You do need installer/Agent access to the web interface to be able to access the safety settings.
UK_KH_User123
Posts: 28
Joined: Sat Oct 14, 2023 1:57 pm

Dave Foster wrote: Mon Aug 05, 2024 9:33 pm I think the best way to do what you want is to connect the generator to your consumer unit/fuse box on the grid side of the main CT meter - then add a second CT clamp from the CT2 input, and clamp it to the generator live feed.

The inverter will see everything the generator produces as external generation (as if it were another solar inverter) - any excess above the house load will be used to charge the batteries automatically no settings required as long as the generators regulation is good enough - when the batteries are full the inverter won’t attempt to use the batteries as long as the generator output covers the house load.

Unless you are running totally off-grid i.e. no connection to the any grid - in which case you will be running in EPS mode - the problem then is that anything that you connect to the grid input will force the inverter to switch back from EPS cutting off your off-grid supplies.
In which case you would need to set the EPS circuit so that it is live when the grid is active i.e. you may need to change the setting on bypass relay and turn UPS on - then connect the generator to the grid input.
When the generator starts there will be a small break in EPS power (~50 milli seconds) and then the inverter will run on the generator supply - if you don't want the inverter to try and back feed set your export limit to 0.
Hi Dave! The first part of this was a surprise to me and very interesting, yet I'm not sure I understand it for my use case. It seems doing it that way (generator on load side with CT2 for inverter to know what it's doing) would prevent any backfeed to the generator and the inverter would also operate in Islanding mode not using live/neutral/earth from the grid -- I do have an earth rod.

My set up is: main consumer unit fed via EPS output of inverter, EPS in UPS mode, earth rod fitted. When the grid goes down I get quite fast auto-changeover to battery backup and return when grid is back. My generator desire is upon grid failure, I use battery power for a while, then if I suspect grid will not be coming back in a timely manner, I set up and connect and start the generator. I would prefer to then keep the house load minimal and cheifly charge the batteries with the generator power, which would allow me to then shut down the generator and run off batteries until the generator is needed again. With sufficient solar I might not even need the generator, but in winter I certainly would.

Would the set up you describe in the first two paragraphs be suitable for me to use? I think for safety of anyone else operating the system I'd need a switching method that prevented both the grid and generator from ever being simultaneously connected since their power would not be in phase (and maybe other reasons too!).

Thanks!

[EDIT] - It seems another important advantage of connecting as an 'additional generator' (I see the manual suggests this would most likely be another solar inverter or a wind turbine!) would be that the inverter would still know it is in grid-failure mode, and therefore the PE-N bond relay would be closed (making the bond, that is). Otherwise if trying to fool the inverter that the generator IS the grid, the PE-N bond relay would be open (not bonded). Am I right? And that this solves the earthing issues when using a generator?
Dave Foster
Posts: 1786
Joined: Thu Oct 13, 2022 7:21 pm

It’s a complex answer and takes some planning, firstly it is illegal to connect any other generator to the incoming supply connections and so in the event of grid failure you must fully isolate the incoming supply so that anything you do within the home is isolated from the supply connections (usually done with a multi pole changeover switch).

The next problem to consider is that if the grid is disconnected you will have no earth and also no PE-N bond so you must provide your own earth using an earth rod and then create the bond between Neutral and Earth using a 4th pole on the changeover switch.

Once that is done you are then fully isolated from the incoming supply and have a suitably bonded earth connection.

As @Max Power mentioned in a previous post your can then connect your generator to the house feed but getting the inverter to work with it is not always the easiest task and will depend very much on how stable the generator output is, and also as described in that post you have to make changes to parameters such as ‘max charge current’ to avoid over-loading the generator and possibly the inverter trip limits for voltage and frequency tolerance depending on your generators stability.

I’ve got 2 generators a Honda EU22i and a Bohmer W4500; both are approx 2000 watts output and despite the Honda being twice the price it is no more stable than the cheaper Bohmer. Also you cannot run them in eco mode as the regulation is not good enough to maintain the inverter when loads change so they make a lot more noise.

So all of that said you can configure your system to run with a generator feed but it takes some work (as per @Max Powers post) - and because of that and the fact that power failures don’t occur very often for me, I decided not to connect this way. I think it would be a very different decision if you have common or prolonged power failures (or want to run off-grid).

In my current setup I have the changeover switch, earth rod and bonding relay to isolate the incoming supply, and run a subset of loads on EPS (lights, heating and one ring main). I then have a further manual changeover switch to switch between EPS and generator feed.

The downside of that is I have a momentary break during the changeover to the generator but only after the home batteries are exhausted (I have 20kWh storage so less of a problem). But for me it greatly simplifies the solution - I can keep the inverter safety limits set as they should be and don’t need to modify charge settings, plus there is no back feed issue between the inverter and generator .
UK_KH_User123
Posts: 28
Joined: Sat Oct 14, 2023 1:57 pm

:)
Thanks Dave!
Dave Foster wrote: Sun Feb 23, 2025 3:50 pm It’s a complex answer and takes some planning, firstly it is illegal to connect any other generator to the incoming supply connections and so in the event of grid failure you must fully isolate the incoming supply so that anything you do within the home is isolated from the supply connections (usually done with a multi pole changeover switch).
This would all be connected up by a licensed electrician, and exactly, would have them use a multipole changeover switch. I was thinking, besides the off position, one throw should switch L/N/Pe from grid -> inverter AC supply then the other throw would be the generator L/N to the house load somewhere not seen by the inverter's main CT (I might use a power meter instead now for that). Would be something like one of these, https://www.salzergroup.net/documents/r ... itches.pdf, scroll down to find "Changeover Switches with OFF" and "Changeover Switches without Jumpers" (meaning that it is not switching two inputs to one output - It switches power to pass from input 1 to output 1 OR input 2 to output 2 (I'm using incorrect terminology I'm sure). Then as you suggested and as per Fox documentation, use a second CT to measure the generator's contributions to the system.
The next problem to consider is that if the grid is disconnected you will have no earth and also no PE-N bond so you must provide your own earth using an earth rod and then create the bond between Neutral and Earth using a 4th pole on the changeover switch.
If my inverter has sensed grid loss it internally throws a relay to bond neutral to earth.

I'm familiar with all the charging settings and have it very accessible with a Home Assistant dashboard page!

I'll talk it over with my electrician but this is a great knowlege for me to have now for that conversation.
UK_KH_User123
Posts: 28
Joined: Sat Oct 14, 2023 1:57 pm

Question - in this arrangement, using CT2 (or two meters), does the inverter 'know' it is off-grid (grid is down) when it sees no current on the grid CT/meter but does see current on the 'additional generator' CT/meter? Does this set up prevent all backflow from the inverter to the generator? My main concern in trying this is not to fry the expensive generator I just bought!

Anyone reading can attempt to pull up the manual for this wiring diagram. In the file named EN-KHKAC -Manual-V1.2.pdf it is on page 24. I also have a pdf called System.schematic.pdf (origin github TonyM1958/HA-FoxESS-Modbus/wiki/How-does-it-work) which is a great resource. Can't find it this minute except on my computer!
Dave Foster
Posts: 1786
Joined: Thu Oct 13, 2022 7:21 pm

Hmm reading back all of what you’ve said, I think I have been getting confused as to what you are trying to achieve here; from what you said of your use case CT2 isn’t going to work and I can see why you are concerned about back flow.

So if I am reading through your use case correctly ( a schematic would be helpful to confirm ) you are intending to have a changeover switch that isolates the grid when grid fails and a connection point for your generator that effectively can only be connected when grid is off - the generator looks as if it were the grid, the inverter will be in EPS bypass mode and your loads are on the EPS side.

If that is the case the generator should be connected on the grid side of CT1 and any generation will be seen by the inverter as if it were coming from the grid.

Set up like this and walking through the grid fail mode - on grid loss there would be 0 volts / 0 frequency and the inverter would see no utility. The grid changeover isolator will isolate the grid, the inverter will fail over to EPS and the earth is being provided by a separate earth rod, a P-EN bond will be in place, you would run like that on battery for as long as you have sufficient battery power.

When the batteries are getting low you would connect and start the generator - and once the output has settled the inverter would sense grid volts and frequency present and assuming within tolerance it will go through the checking and start process switching back from EPS to normal mode (loads still connected to EPS in UPS mode) - note the grid isolation changeover isolator must still be open.

As per @Max Power posted you would need to set your max charge current to a small number, but *most* importantly you must set your export power to zero so there is no back flow to the generator if solar generation peaks.

The generator would be providing power as if it were the grid, CT1 would measure import/export/loads as it normally does - the inverter cannot back flow to the generator, charge current is set low and the inverter will be set to force charge.

When the grid power returns the changeover isolator will close then generator will be automatically isolated, the inverter will go through it’s start up process and you will set the export power limit to your G99 limit or maximum, battery charge current back to 40A.

Is that what you were thinking ?
UK_KH_User123
Posts: 28
Joined: Sat Oct 14, 2023 1:57 pm

Exactly Dave, on all counts!

Thanks for going through it all again, I know it is a lot. I was hoping that using CT2 was some sort of magic potion that would solve some issues. I think you are confirming for my set up there is no benefit to doing that.

To be more clear, my concern about backflow is more the little spikes one gets when in self-use mode and the inverter is trying to keep grid at 0. As you know, when loads come on and off the inverter sometimes will pull from the grid or push to the grid for a few seconds before equilibrium is achieved.

My plans are pretty modest, in the sense that I would be attending and watching the set up closely when the generator is being used. I imagine it happening between sunset and bed time (no solar, and not annoying neighbours too late) and generally being in force charge -- so the above quick export spikes should not happen anyway.

That all said, of course the more foolproof I could design it, the better! I wish modbus had the ability to control the export power -- I'll just have to leave myself instructions not to forget that step, and where in the menu tree it is in the inverter front panel.

I confirmed with the generator company that it has a floating neutral and that the chassis ground is tied to the ground on the 13A and 32A output connectors. So it seems I do have to find a way to tie Neutral to Earth when in the changeover switch is in the generator position, although actually I think I could do this in the wiring between the generator connection to the house and the changeover switch.
Dave Foster
Posts: 1786
Joined: Thu Oct 13, 2022 7:21 pm

UK_KH_User123 wrote: Wed Feb 26, 2025 7:46 pm To be more clear, my concern about backflow is more the little spikes one gets when in self-use mode and the inverter is trying to keep grid at 0. As you know, when loads come on and off the inverter sometimes will pull from the grid or push to the grid for a few seconds before equilibrium is achieved.

My plans are pretty modest, in the sense that I would be attending and watching the set up closely when the generator is being used. I imagine it happening between sunset and bed time (no solar, and not annoying neighbours too late) and generally being in force charge -- so the above quick export spikes should not happen anyway.
If you were running solely on self use mode with a large inverter and small genset I think there's a good chance the backflow when a large load switches off could upset the generator. In your case I think you are saying that you will run the generator to charge the batteries at dusk - so you will only be running with it set to Force Charge mode. In that mode the batteries will be set to charge (not discharge) and the generator itself will effectively be powering your house loads (you must be careful not to switch anything big on/off to overload the generator), as all generator power will be incoming and there should be no significant power spikes. You could belt and brace it by setting the max battery discharge current to 0 and then there is no way it can generate power.
UK_KH_User123 wrote: Wed Feb 26, 2025 7:46 pm That all said, of course the more foolproof I could design it, the better! I wish modbus had the ability to control the export power -- I'll just have to leave myself instructions not to forget that step, and where in the menu tree it is in the inverter front panel.
Whilst the modbus integration does not directly support the export power limit register it might be possible for you to access it.
in HA try going to Developer Tools, ACTIONS, choose Foxess - Modbus:Read Register, select your device in the list, set the start address to 46616, count of 2, try as holding and input - and see what the response is.

(that is the export limit register for the latest protocol spec)

You can also try the earlier spec set the start address to 41012, count of 1, input - and again see what the response is.
UK_KH_User123
Posts: 28
Joined: Sat Oct 14, 2023 1:57 pm

You're amazing Dave! Thanks.

I'm on KH10.5 Master 1.4 / Slave 1.01 / ARM 1.37 (that's Manager I guess).

Reading input registers, also same for holding registers:

Code: Select all

values:
  "46616": 0
  "46617": 9000
Reading input register 41012

Code: Select all

values:
  "41012": 9000
This matches my current Settings > On-Grid > Export Control > ExportLimitPwr.

Exploring a bit:

46618 = 500
46619 = 480

500 is probably 50.0 A which is my InportLimitCur and 480 is probably 48.0 A which is my ExportLimitCur.

If I write 5000 to 46617 I get an error. But at least I can read it.

The FoxESS HA integration is very helpful and I appreciate that it takes work to maintain. Is the reason that this register, for example, is not available in the integration just because FoxESS continues to make undocumented changes and it's too much effort to keep up?
Dave Foster
Posts: 1786
Joined: Thu Oct 13, 2022 7:21 pm

If you use the new register map as it is a 32 bit register (2 addresses), you must make 2 writes together i.e. start address 46616 set the values to '0, 5000' and that should work just fine.

As you say -

46618 is a single register for Import Current Limit (scale 10)
46619 is a single register for Export Current Limit (scale 10)

The integration does its best to keep up with all the main registers for multiple inverters, but then there are different maps for the same inverter depending on the firmware version (there are 3 just for the KH) so it gets very difficult to manage.
UK_KH_User123
Posts: 28
Joined: Sat Oct 14, 2023 1:57 pm

Yes, thanks ... if I try to write values 0,8000 starting at 46616 it works.

Is the crowd-sourced current state of registers published somewhere?
Dave Foster
Posts: 1786
Joined: Thu Oct 13, 2022 7:21 pm

UK_KH_User123 wrote: Thu Feb 27, 2025 5:29 pm Is the crowd-sourced current state of registers published somewhere?
The older ones are in the integration wiki under protocol documents but the latest is under non disclosure and can’t be openly published.
Post Reply