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
| Method | Where the generator connects | Suitable when | Key points |
|---|---|---|---|
| 1. Hybrid GEN port | Generator input port on the inverter | Homes with a hybrid system and batteries | Inverter selects the source, charges batteries from the generator, has a dry contact to start the generator |
| 2. External ATS | Inverter grid input, via an ATS that selects grid or generator | Inverter without a GEN port, or a large generator | ATS must have a neutral (off) position and interlocking so grid and generator are never connected together |
| 3. Separate loads | Generator feeds its own load panel, bypassing the inverter | Only a few loads need to run (pumps, fans, lights) | Fully separated from the solar system; cannot use or charge the batteries |

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:
| Mode | What the inverter does |
|---|---|
| Generator Input | Takes 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 Output | Uses 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 Input | Takes 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 input | Tells the inverter that the generator is wired to its grid port |
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
| Scenario | Priority loads | Battery charge current | Generator (kW, estimate) | Generator (kVA, estimate) |
|---|---|---|---|---|
| Small home, slow charging | 2 kW | 20 A (≈ 1.0 kW) | ≈ 3.8 kW | ≈ 4.7 kVA |
| Typical home, 5 kW hybrid | 3 kW | 40 A (≈ 2.0 kW) | ≈ 6.3 kW | ≈ 7.9 kVA |
| Home with several air conditioners | 5 kW | 80 A (≈ 4.1 kW) | ≈ 11.4 kW | ≈ 14.2 kVA |
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
| Mistake | Consequence | How to avoid it |
|---|---|---|
| Plugging the generator into the building wiring through a socket or a male-to-male cord | Power flows back onto the grid, endangering line workers; equipment damage | Use a transfer switch with interlocking |
| Connecting the generator to the hybrid backup (EPS) output | Two sources feeding against each other, possible inverter damage | The generator goes only to the GEN port or the grid port, never to an output |
| Small generator with unstable voltage and frequency | Inverter refuses the source or keeps disconnecting | Choose a generator with spare capacity, reduce charge current, test it |
| Sources not separated at the ATS | Grid and generator connected at the same time | ATS 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 damaged | Reverse power control |
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
| Situation | Leaning towards |
|---|---|
| Home with frequent long outages, needs power for several days | Hybrid with batteries and a GEN port, generator starting automatically by battery level |
| Existing hybrid without a GEN port, generator already on site | External ATS into the inverter grid port |
| Only a pump or a few lights needed during outages | Generator feeds a separate load panel, bypassing the solar system |
| Factory with an existing generator and a grid-tied system | Grid-tied with reverse power control and a transfer system |
| Rare outages, only wants to cut electricity bills | Grid-tied without batteries; compare with the grid-tied or hybrid tool |
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.



