<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Breakdowns - Alexey Krylov</title><description>Systems, markets and applications taken apart - by data, not by feel.</description><link>https://alexey-krylov.dev</link><language>en</language><item><title>Home backup power: a review of my own setup</title><link>https://alexey-krylov.dev/blog/home-backup-power-review</link><guid isPermaLink="true">https://alexey-krylov.dev/blog/home-backup-power-review</guid><description>Grid, inverter and generator in one cascade. What turned up when I drew the diagram of the setup for the first time and walked through it asking about failures.</description><pubDate>Fri, 24 Jul 2026 00:00:00 GMT</pubDate><content:encoded>The backup power setup in my country house worked fine: when the grid goes down, the house switches to an inverter with a battery, and after that to a petrol generator. But there was neither a diagram nor wire labelling in the cabinet.

One day I sat down and reviewed this setup the same way I would review someone else&apos;s system at work: with priorities, failures and the question &quot;what happens if&quot;.

## A cascade of two transfer switches

The setup is built as a cascade of two automatic transfer switches:

```text
GRID ─────────┐
              ├─ switch 1 ─┐
INVERTER ─────┘            ├─ switch 2 ── distribution board, whole house
GENERATOR ─────────────────┘
```

The priority is: grid, then inverter, then generator.

1. the grid is up: both switches sit on the first input, the house is powered from the grid;
2. the grid is down: the smart relay brings up the inverter on its own, without the cloud, and the first switch moves over to it;
3. on a timer the load should move to the generator, if its autostart is allowed;
4. if autostart is not allowed, the inverter runs until the battery is drained.

The battery charges only from the grid. It does not charge from the generator.

## Where the setup fails

On paper the design looked neat, until I walked through it asking about failures.

**In practice there is no automatic generator takeover.** The transfer timer is turned up to the maximum, and the generator is not set to autostart. This was done deliberately, to save fuel. The consequence is unpleasant: in a long outage the battery drains to zero, and the house goes dark.

At that point autostart is no longer possible: the start circuit is powered from the same drained battery. The generator can only be started by hand, with its own starter.

**Autonomy is short and depends heavily on the load.** The backup carries the whole house, there is no load separation. The inverter holds up to 5.5 kW, but by the datasheet estimate the battery lasts 20-25 minutes at that load.

| Load | Datasheet estimate |
|---|---|
| 500 W | about 4 hours |
| 2 kW | about an hour |
| 5.5 kW | 20-25 minutes |

The autonomy numbers in this review come from the datasheet, and that is its weak spot. The real ones appeared later, when I installed a monitor that watches the grid, the inverter and the generator. They turned out better than the estimate: at 500 W the battery holds 5.3 hours. There is a [separate article](/blog/power-monitor-for-a-country-house) about that.

**There is no fuse on the DC side.** This is the main finding of the review. The cables between the battery and the inverter are thick, there are no questions about the cross-section, but there is no separate fuse between them. The only protection is the electronics of the battery itself.

## Overload and short circuit

It is easy to reassure yourself here. There is overload protection, and in two stages: a relay with a power threshold and the inverter&apos;s own protection. But both sit on the section from the inverter to the house.

A short-circuit current on the cable between the battery and the inverter physically bypasses them. A lithium iron phosphate battery of this size delivers thousands of amps in a short circuit, and the battery electronics may not react in time.

A fuse on the battery positive does not duplicate anything: it covers the only section that has no protection at all.

## What else turned up

- traces of heating on the power terminal block of one of the switches. It needs to be retightened and inspected;
- a failure of the smart relay means a failure of the whole inverter stage. The upside is that it brings up the inverter locally and does not depend on the internet;
- the generator&apos;s starter battery drains over months of sitting idle. Then manual start will not work either;
- there is no explicit interlock between the two switches, only a mechanical one inside each;
- the cabinet has neither wire labelling nor a diagram on the door;
- one marking on a breaker matched the model name of the inverter. I lost time before I understood that it is the catalogue number of the breaker itself.

Something good turned up too: protection against electric shock also works in autonomous mode. The residual current devices trip both on the inverter and on the generator, because the neutral is grounded in both modes.

You can walk through any system the same way, if someone else built it and it &quot;just works&quot;. The question &quot;what happens if&quot; is better asked before the first long outage.</content:encoded><category>lab</category><category>architecture</category><category>diagnostics</category><category>power</category></item><item><title>Raspberry Pi 5: the &quot;reboots&quot; that never happened</title><link>https://alexey-krylov.dev/blog/reboots-that-never-happened</link><guid isPermaLink="true">https://alexey-krylov.dev/blog/reboots-that-never-happened</guid><description>The journal showed the server rebooting, and the culprit turned out to be a clock without a battery. Plus one real outage and noise from Docker.</description><pubDate>Tue, 21 Jul 2026 00:00:00 GMT</pubDate><content:encoded>A small server on a Raspberry Pi 5 that sits at my country house started behaving strangely not long ago: judging by the journal, it was rebooting, and it was unclear when. The power supply was the first suspect, and it turned out to have nothing to do with it.

## Checking the power

Before changing anything, I looked at what the system knows about itself:

```bash
uptime                                    # more than a day
cat /sys/class/net/end0/carrier_changes   # 1
vcgencmd get_throttled                    # throttled=0x0
```

- `uptime` is more than a day - the server did not reboot;
- `carrier_changes=1` - the link came up once at boot and never went down;
- `throttled=0x0` - not a single voltage drop since boot. The line shows 5.03 V, the temperature is 54 °C;
- there are no receive or transmit errors on the interface, and no OOM or kernel panic in the journal either.

Power, the cable and overheating were ruled out right away. The question that remained was where the reboots in the journal came from.

## Where the reboots in the journal come from

The Raspberry Pi 5 has an RTC, but the battery is not included, and my J5 connector was empty. In `dmesg` at startup it looks like this: `rpi-rtc` sets the system time to 1970-01-01, then systemd notices that the time is earlier than the build date and moves the clock forward.

Next, `fake-hwclock` sets the last saved time, and chrony gets the exact time from the network and applies it in one step (`makestep 1 3`). The step can be several days. The time in the journal goes out of order, and `journalctl --list-boots` draws several &quot;boots&quot; instead of one.

You can tell such phantoms apart by one sign: two boot-ids with the same timestamp, where the start of the second equals the end of the first plus one second.

I watched this live: at the start of the investigation the server showed July 8, and a few minutes later it was already the 12th-13th, and `uptime` had not reset.

## A battery for the RTC

First I tried to get by in software and enabled `systemd-time-wait-sync.service`, so that the other services would wait for time synchronization. It did not work: the service waits for a mark from `systemd-timesyncd`, and on this server chrony keeps the time. It hung in `activating` forever, and I had to disable it.

The official battery for the RTC is the Panasonic ML2020. After installing it, `dmesg` shows the correct time at startup, and there are no more phantom boots in the journal.

The ML2020 is rechargeable, and charging has to be enabled separately in `/boot/firmware/config.txt`:

```ini
dtparam=rtc_bbat_vchg=3000000
```

Without this line the battery will run down in a few months, and everything will come back. Charging may be enabled only for rechargeable cells (ML2020, LIR2032). It must not be done with an ordinary CR2032.

## The real outage

One real connectivity outage did turn up after all. Over a day, the watchdog on the server recorded four `no response from ping` lines: one episode of about a minute. Another one, about five minutes long, I caught myself.

The server&apos;s own journal is empty at those moments: `end0` did not go down, the lease was not lost, the settings did not change. The router was answering me, but it had no ARP entry for the server.

The most likely cause is the router itself: one of its scripts spends about 45 seconds iterating linearly over a large address list. It is the router that needs fixing, the server is the victim here.

## Noise in the journal

One of the containers got in the way of the investigation a lot. It crashed six times a day, and the Docker network plugin recreated a virtual interface for it 93 times.

In `networkd` this looks like a solid stream of `Lost carrier` and `Gained carrier`, and next to a complaint about connectivity drops it reads as confirmation of it. These messages have nothing to do with the server&apos;s uplink: all of them are about the container&apos;s virtual interfaces.

## The causes, summed up

- phantom boots - an RTC without a battery;
- a rare real outage - an overloaded router;
- noise in the journal - a crashing container.

None of them has anything to do with the power, which is where I started.

Now, when I hear the complaint &quot;it keeps rebooting&quot;, the first thing I look at is the three values from the first check, and only then do I touch the hardware. It takes less than a minute :)</content:encoded><category>lab</category><category>diagnostics</category><category>linux</category><category>raspberry-pi</category><category>self-hosting</category></item></channel></rss>