Solar power with a backup generator: GEN port, ATS and the right way to connect them

Short answer: solar can be combined with a generator, but it is only safe when the system has a proper transfer path. There are three ways to connect: through the GEN port of a hybrid inverter, through an external ATS that switches between grid and generator, or by letting the generator supply a separate group of loads. A grid-tied system without batteries shuts down when the grid fails, so a generator should not be used to "wake it up". This article explains each option, estimates the generator size you need, covers battery charging from a generator and lists the wiring mistakes to avoid, for homes as well as factories that already run standby generators.

SOLIQ ENERGY · Published

Two SolaX hybrid inverters mounted on a wall next to a solar distribution board, with two battery modules below, a SOLIQ system in Tuyen Quang

Why grid-tied systems shut down in an outage

A grid-tied inverter runs synchronised to the voltage and frequency of the grid. When the grid fails, it must disconnect so that it does not push power onto a line that has been switched off for repair. This function is called anti-islanding and is tested to IEC 62116; the Deye datasheet lists both "Anti-islanding Protection" and IEC 62116. It is a safety rule, not a fault. Details and workarounds are covered in the article grid outage: can you still use solar power?.

Off-grid systems are different: they are not connected to the grid, so this constraint does not apply, and a generator is a common supplementary source. That case is covered in the article off-grid solar. This article focuses on hybrid systems (see what is a hybrid solar system) and on grid-tied systems at factories that already have a generator.

Three ways to connect a generator

Swipe sideways to see the full table

Three ways to connect a generator to a solar system
MethodWhere the generator connectsSuitable whenKey points
1. Hybrid GEN portGenerator input port on the inverterHomes with a hybrid system and batteriesInverter selects the source, charges batteries from the generator, has a dry contact to start the generator
2. External ATSInverter grid input, via an ATS that selects grid or generatorInverter without a GEN port, or a large generatorATS must have a neutral (off) position and interlocking so grid and generator are never connected together
3. Separate loadsGenerator feeds its own load panel, bypassing the inverterOnly a few loads need to run (pumps, fans, lights)Fully separated from the solar system; cannot use or charge the batteries
Three ways to connect a generator to a solar system — Summary compiled by SOLIQ from the Deye, SMA and Victron documents listed under Sources. Actual wiring must follow the manual for the exact inverter model and be carried out by an engineer.
Two SolaX hybrid inverters mounted on a wall next to a solar distribution board, with two battery modules below, a SOLIQ system in Tuyen Quang
A SOLIQ hybrid system in Tuyen Quang: two wall-mounted inverters next to the distribution board, with the batteries directly below. A generator, if there is one, connects to a dedicated port or through a transfer switch installed near this board.

The GEN port on hybrid inverters

Many hybrid inverters have a third AC port besides the grid port and the backup load port, called the GEN port. The datasheets for the Deye SG04LP1, SG05LP3 and SG01LP1 all state "Support storing energy from diesel generator". The SG04LP1 user manual (version 12 November 2026) describes this port in some detail, and we use it as the example because we read it directly; for the SG05LP1, SG04LP3 and other models, check the manual for that exact model, as menu names and limits may differ.

According to the SG04LP1 manual, the GEN port can be used in several modes under the Gen Port Use menu:

GEN port modes on the Deye SG04LP1 according to the user manual
ModeWhat the inverter does
Generator InputTakes power from the generator to supply loads and charge batteries; the maximum power drawn from the generator can be set when Gen peak-shaving is enabled
Smart Load OutputUses the port as a switched output: connected loads run only when there is surplus solar power and the battery is full to the set level
Micro Inv InputTakes power from another grid-tied inverter (AC coupling); the hybrid raises the frequency so the other inverter disconnects when the battery is full
GEN connect to Grid inputTells the inverter that the generator is wired to its grid port
GEN port modes on the Deye SG04LP1 according to the user manual — The GEN port is used either for a generator or for a smart load at any one time, never both. In the SG04LP1 manual wiring diagram, the port has its own 40 A breaker.

Two details are worth remembering. First, the inverter has dry contacts (G‑start, G‑valve) to start the generator when the battery falls to a set level, so a generator with electric start runs fully automatically. Second, the manual sets an order of priority: solar first, then battery or grid depending on settings, with the generator as the last backup source. In other words, the generator runs only when it is really needed, which is exactly what users want in order to save fuel.

External ATS

An ATS (automatic transfer switch) selects the input source for the inverter: normally the grid, switching to the generator when the grid fails. The Deye manual includes a "Generator, ATS" wiring diagram and a setting that tells the inverter the generator is connected to the grid port. The advantage of an external ATS is that it works with inverters that have no GEN port, and generator current is not limited by a small GEN port.

The most important technical requirement, according to the SMA guide for grid systems with a backup generator: use an ATS with a neutral position that takes at least 5 seconds to disconnect the inverter from both grid and generator before connecting to the other source; with a manual switch, also hold the off position for at least 5 seconds. The reason is that the inverter needs time to recognise that the source has changed, and the two sources must never be connected together.

When the generator supplies power through the ATS, the inverter must know that it is a generator and not the grid, so that it does not push solar power back into the generator. SMA uses a digital signal from an auxiliary contact on the ATS to report "generator active" and enable generator reverse power protection. If your system has no such signal, ask your engineer how to handle it.

How big should the generator be?

There is no single formula; manufacturers recommend different things. SMA puts generator power at around 80–120% of the battery inverter rated power, ideally below 100%. Victron lists a minimum size for each unit (for example 8 kVA for a 5000 VA unit) and notes that a larger generator is usually better. Another manufacturer recommends twice the inverter system power, warning that many portable generators struggle to hold voltage and frequency when running above about 80% load. The safest approach is therefore to add up exactly what the generator has to carry.

The generator has to carry the running loads plus the battery charging power. The table below is a SOLIQ estimate based on two assumptions: the generator should run at no more than about 80% of its capacity, and generator kVA ratings assume a power factor of 0.8. Charging power is calculated as charge current × 51.2 V (48 V nominal battery), ignoring losses.

Swipe sideways to see the full table

Estimated generator size by load and battery charge current (assumptions below)
ScenarioPriority loadsBattery charge currentGenerator (kW, estimate)Generator (kVA, estimate)
Small home, slow charging2 kW20 A (≈ 1.0 kW)≈ 3.8 kW≈ 4.7 kVA
Typical home, 5 kW hybrid3 kW40 A (≈ 2.0 kW)≈ 6.3 kW≈ 7.9 kVA
Home with several air conditioners5 kW80 A (≈ 4.1 kW)≈ 11.4 kW≈ 14.2 kVA
Estimated generator size by load and battery charge current (assumptions below) — Calculation: (load + charge current × 51.2 V) ÷ 0.8 = kW; ÷ 0.8 again = kVA. The 40 A charge current comes from the example in the Deye SG04LP1 manual; the other values are assumptions. Lowering the charge current reduces the generator size. Large motors (pumps, air conditioners) draw a higher starting current, so the generator must be sized up accordingly.

If your existing generator is smaller than the table suggests, Victron recommends reducing the AC input current and the DC charge current of the charger so the generator is not overloaded. On hybrid inverters with a GEN port, Deye's Gen peak‑shaving function does exactly this: it limits the power drawn from the generator, and the panels and battery cover the shortfall.

Charging batteries from a generator

After several days without sun and with the battery empty, a generator can recharge the battery. On the Deye SG04LP1, the Gen Charge setting enables charging from the GEN port; the Start value sets the battery percentage at which the inverter starts the generator (30% in the manual example); the A value sets the maximum charge current when only the generator is available (40 A in the example). Gen Force forces the generator to start regardless of other conditions.

Practical tips: set a low start level so the generator runs less often, and a moderate charge current so the generator runs at a steady load instead of wasting fuel on a high charge current. Disable generator charging entirely if you only want the generator to supply loads. To size the battery so the generator runs less, see the battery runtime tool.

Risks to avoid

Common wiring and operating mistakes when adding a generator
MistakeConsequenceHow to avoid it
Plugging the generator into the building wiring through a socket or a male-to-male cordPower flows back onto the grid, endangering line workers; equipment damageUse a transfer switch with interlocking
Connecting the generator to the hybrid backup (EPS) outputTwo sources feeding against each other, possible inverter damageThe generator goes only to the GEN port or the grid port, never to an output
Small generator with unstable voltage and frequencyInverter refuses the source or keeps disconnectingChoose a generator with spare capacity, reduce charge current, test it
Sources not separated at the ATSGrid and generator connected at the same timeATS with a neutral position and a transfer delay of at least 5 seconds
Panels pushing power into the generator (grid-tied factory)Generator is reverse-loaded and may be damagedReverse power control
Common wiring and operating mistakes when adding a generator — Summary compiled by SOLIQ from Deye, SMA and Victron documents; no figures are given because they depend on the specific equipment.

Two general rules: do not wire anything yourself without electrical training, and always switch off the breaker before touching any cable. The Deye manual also notes that the neutral and earth conductors of the loads must be earthed correctly, otherwise the backup function may behave abnormally during an outage.

Factories with large generators and grid-tied solar

Many factories already had standby generators before installing grid-tied solar on the roof, a common setup at FDI manufacturing plants in Vietnam. When the grid fails, the grid-tied system still shuts down under the anti-islanding rule. If the generator then starts and supplies the factory, the grid-tied inverters may treat the generator as a "grid" and restart unless they are disconnected. This creates two problems: the generator runs in parallel with solar, and if the panels produce more than the load, the surplus is pushed back into the generator, which is not designed to absorb power.

The principle of the solution: limit solar output so that it never exceeds the factory load while the generator is the source. A reverse power controller measures power at the connection point and curtails the inverters, in the same way as "zero export", which SMA describes as not allowing active power to flow into the grid. SMA also has a dedicated generator reverse power function in Sunny Island systems. For grid-tied systems without this function, another option an engineer may propose is to use an ATS contact to disconnect the inverters when the generator is the source.

Specific Vietnamese regulations on operating a generator together with grid-tied solar were outside the scope of our research, so this article does not cite any clauses. Factory projects need a design by a qualified engineer. Investment in factory rooftop solar in general is covered in the article solar investment for factories; selling surplus power and preventing export to the grid are covered in grid-tied load following and selling surplus power.

Which option suits your site

Selection guide (a starting point for discussion with an engineer, not a verdict for every site)
SituationLeaning towards
Home with frequent long outages, needs power for several daysHybrid with batteries and a GEN port, generator starting automatically by battery level
Existing hybrid without a GEN port, generator already on siteExternal ATS into the inverter grid port
Only a pump or a few lights needed during outagesGenerator feeds a separate load panel, bypassing the solar system
Factory with an existing generator and a grid-tied systemGrid-tied with reverse power control and a transfer system
Rare outages, only wants to cut electricity billsGrid-tied without batteries; compare with the grid-tied or hybrid tool
Selection guide (a starting point for discussion with an engineer, not a verdict for every site)

For a home hybrid system, see the hybrid storage systems page, the article how to choose a hybrid inverter and the grid-tied or hybrid tool. If you need an inverter with a GEN port, ask for the exact model when requesting a quote. The distribution board, transfer switch and generator connection fall under the solar distribution board. SOLIQ surveys your loads, selects the right connection method and quotes an all-inclusive package with no extra charges.

Sources and limitations

Details on the GEN port come from Deye manuals and datasheets (mainly the SG04LP1); ATS principles and generator reverse power protection come from SMA documents; generator sizing comes from SMA, Victron and one other manufacturer. Items "not stated in the sources reviewed": generator frequency and voltage tolerances for each Deye model, transfer time for each model, and ATS and generator prices. Figures marked "estimate" are SOLIQ calculations with stated assumptions. Manufacturers may update their documents; at installation, check the manual for the exact model and firmware version.

Quick FAQ

It depends on the system. A grid-tied system without batteries disconnects when the grid fails (anti-islanding, tested to IEC 62116), so the whole building goes dark even in full sun. A hybrid system with batteries and a backup port keeps supplying priority loads during an outage; in daytime, while the panels still get sun, the hybrid uses both solar and battery power. A generator is only an extra source for when the battery is empty and there is no sun.

Do not do it yourself. A grid-tied inverter needs voltage and frequency as stable as the grid; small generators fluctuate easily, so the inverter either will not start or runs intermittently. More importantly, if the generator and the solar system are both connected to the distribution board without a proper transfer switch, power can flow back into the generator or the utility line. Have an engineer install a transfer switch or redesign the system as a hybrid.

You need a safe way to transfer between grid and generator: an automatic transfer switch (ATS) or a manual changeover switch. Some hybrid inverters have a dedicated GEN port, so no external ATS is needed because the inverter selects the source itself. If the generator connects to the inverter grid port, you need an ATS or an interlock so that the grid and generator are never connected at the same time.

As an estimate, with priority loads of about 3 kW and a battery charge current of about 40 A (≈ 2 kW), the generator should be around 6–7 kW, or roughly 8 kVA. This matches the 8 kVA minimum Victron lists for its 5000 VA unit. Lowering the charge current allows a smaller generator. The exact figure must be calculated from the actual loads on site.

Yes, if the hybrid inverter supports charging from a generator. The Deye SG04LP1 user manual has a Gen Charge setting that lets you set the battery level at which the generator starts automatically and the maximum charge current when only the generator is available. Charging from a generator consumes fuel, so it is usually used only when the battery is empty and there is no sun.

Usually the inverter is not damaged; it disconnects or refuses the source when the generator voltage or frequency falls outside the permitted range. Victron warns that some generators change voltage or frequency when the load changes. To reduce the risk: choose a generator with spare capacity and an automatic voltage regulator (AVR), limit the charge current, and test the settings before handover.

While the generator is running, solar output must never exceed the factory load, so that no power is pushed back into the generator. You need a reverse power control (which measures power at the connection point and curtails the inverters) and a transfer system with interlocking. Design and commissioning must be done by an engineer; do not wire it yourself.

This article gives no prices because they depend on the generator type, the ATS current rating and the wiring, and our research found no reliable published dealer prices. Get a specific quote after an engineer has surveyed your loads. SOLIQ quotes all-inclusive packages with no extra charges; if the system includes a generator, this is stated clearly in the quote.

Data sources

Read next

Leave your number,we will call you back

A SOLIQ engineer calls back within 5–15 minutes during business hours (GMT+7)

Turnkey quote, no extra costs

or call+84 902 262 101Get an online quote