A generator is connected to the installation only through a changeover switch, which prevents the grid and the generator from supplying the house at the same time and prohibits any back-feeding of voltage onto the distributor's network. For a villa, backup is generally provided for some of the circuits (lighting, fridge, pumps, alarm, internet), which often requires 5 to 15 kVA depending on the equipment chosen. "Makeshift" connection through a power socket is prohibited and dangerous.
Partial or full backup?
| Option | Backed-up circuits | Consequence |
|---|---|---|
| Partial backup | Lighting, food refrigeration, pumps and booster, gate, alarm, router, a few sockets | Smaller generator, a "backed-up" sub-board to be provided |
| Full backup | The whole house, including air conditioning | Generator sized on the power assessment, often three-phase, high cost and diesel consumption |
For sizing, start from the power assessment of the backed-up circuits, then take into account the starting currents of motors (pumps, air conditioning compressors), which can be several times the rated current. An undersized generator stalls or fails to start the pump.
The changeover switch: manual or automatic
- Manual changeover switch: a three-position switch (grid, off, generator). You start the generator and then switch over. A simple, economical solution.
- Automatic transfer switch: it detects the outage, starts the generator, transfers the load, then returns to the grid when power is restored. Essential for a guesthouse, a clinic or a house that is often unoccupied.
- In both cases, the device must make it physically impossible to connect the two sources in parallel (mechanical and electrical interlocking) and must also switch the neutral.
Earthing, plant room and nuisance
- Earthing: the generator frame is connected to an earth electrode; the earthing system and RCD protection must remain effective when the generator supplies the house.
- Plant room: ventilated, with exhaust gases discharged outside, away from bedroom windows and neighbours; never in a closed garage or an unventilated basement.
- Noise: an enclosed (soundproofed) generator is preferable in a residential area.
- Fuel and maintenance: secure diesel storage, regular no-load and on-load tests, oil changes as specified by the manufacturer.
Indicative prices in Morocco
According to sales listings found in Morocco in 2026, a small 1 kVA portable generator costs around 3,400 DH, a 5 to 6 kVA unit around 8,000 to 10,000 DH, while a new 15 kVA diesel generator is listed at around 80,000 DH. On top of these amounts come the changeover switch, wiring, the backed-up sub-board, earthing and possibly the civil works for the plant room. Indicative prices, highly variable depending on the brand, engine and condition; ask for a full quote.
What about alternatives? For short outages and limited needs (internet, alarm, lighting), an inverter with batteries may be enough, silent and fuel-free. Combined with a photovoltaic installation, it also provides daytime autonomy (see solar and Law 82-21). The choice depends on the duration and frequency of outages in your area.
The role of the design office
The design office defines the circuits to back up, sizes the generator and its cables, chooses the changeover switch and organises the board in two parts (normal and backed-up). It checks consistency with the earthing and the location of the plant room.
Frequently asked questions
Can a generator be plugged into a household socket?
No: it is prohibited and dangerous, as the generator can send voltage back onto the grid. The connection is made through a changeover switch that separates the two supplies.
What generator power for a villa?
For partial backup (lighting, refrigeration, pumps, alarm, internet), often 5 to 15 kVA; full backup including air conditioning requires a generator sized on the power assessment.
Manual or automatic changeover switch?
A manual one is enough if someone is there to switch over. An automatic one is essential for a guesthouse, a house that is often unoccupied or equipment that must not stop.
A project in the pipeline?
SIGMA ICC designs reinforced concrete, electrical, plumbing and HVAC systems and supervises sites for villas, riads, hotels and shops.
Sources : IZI by EDF, installer un inverseur de source · Selectra, brancher un groupe électrogène sur le tableau.