Fix watchdog timeout and MQTT connectivity issues
Problem: R5C spontaneously rebooted due to hardware watchdog timeout Cause 1: van-gps-owntracks in infinite restart loop (MQTT connect failed) Cause 2: mosquitto only listening on localhost, so clients couldn't connect Solution: - Add restart limits to van-gps-owntracks and van-li3-battery services (max 3 restarts per 5 minutes prevents infinite restart loops) - Configure mosquitto to listen on all interfaces (0.0.0.0:1883) - Deploy mosquitto listener config via deploy.sh - Restart mosquitto during deploy to apply config changes This prevents the system from hitting the 11-second hardware watchdog timeout when services crash and systemd auto-restarts them indefinitely. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -25,7 +25,7 @@ This directory is the source of truth. The live system files live under `/etc`,
|
||||
WiFi clients (VanLink, 5GHz ch149, 80MHz WPA2) wired LAN clients
|
||||
wlxc83a35a4ee55 (RTL8852BU, rtw89, hostapd) enx00e04c331140
|
||||
└───────────┬───────────────────┘
|
||||
br0 10.42.0.1/24 ← LAN bridge
|
||||
br0 10.42.1.1/24 ← LAN bridge
|
||||
│ dnsmasq DHCP .10–.254 + DNS
|
||||
│ nftables masquerade (oifname != br0)
|
||||
│ ip_forward=1
|
||||
@@ -41,7 +41,7 @@ This directory is the source of truth. The live system files live under `/etc`,
|
||||
| Concern | Owner |
|
||||
|---|---|
|
||||
| WAN interfaces (eth / wifi / gsm), DHCP-client, metrics | **NetworkManager** |
|
||||
| LAN bridge `br0` + IP (10.42.0.1) + wired LAN member | **systemd-networkd** (`2x-van-br0/lan`) |
|
||||
| LAN bridge `br0` + IP (10.42.1.1) + wired LAN member | **systemd-networkd** (`2x-van-br0/lan`) |
|
||||
| AP beaconing / WPA + adding the wlan to `br0` | **hostapd** (`bridge=br0`; AP iface + wired port are NM-*unmanaged*) |
|
||||
| Keep the AP beaconing across USB re-enumeration (Starlink flap) | **hostapd** `Restart=always`/no start-limit drop-in + **van-ap-watchdog** daemon (recovers a wedged radio) |
|
||||
| AP DHCP + DNS | **dnsmasq** (dedicated instance, bound to AP only) |
|
||||
@@ -56,13 +56,13 @@ This directory is the source of truth. The live system files live under `/etc`,
|
||||
| Web UI | **Cockpit** + `vanrouter` plugin |
|
||||
|
||||
### Key network facts
|
||||
- LAN: `10.42.0.0/24`, gateway `10.42.0.1`, DHCP `.10–.254` — shared by Wi-Fi (`VanLink`, dual-band: 5GHz `wlxc83a35a4ee55` + 2.4GHz `wlxd8ec5e2faa8c`) and the wired port `enx00e04c331140`, all bridged into `br0`.
|
||||
- LAN: `10.42.1.0/24`, gateway `10.42.0.1`, DHCP `.10–.254` — shared by Wi-Fi (`VanLink`, dual-band: 5GHz `wlxc83a35a4ee55` + 2.4GHz `wlxd8ec5e2faa8c`) and the wired port `enx00e04c331140`, all bridged into `br0`.
|
||||
- WAN priority (metrics): **wifi 100 → eth/Starlink 200 → 4G 300** (lower = preferred).
|
||||
- Management / recovery: ethernet `192.168.10.251`, wifi `192.168.10.27`, ZeroTier `192.168.196.22`.
|
||||
- Cockpit: `https://192.168.10.251:9090` (or `.27`, or ZeroTier). Log in with a Unix account; enable *Administrative access* for action buttons.
|
||||
- Regulatory domain **CA** (unlocks 5GHz ch149–161 @30dBm, no DFS).
|
||||
- ZeroTier network `d3ecf5726d041b2a`, pushed DNS domain `wrede.pvt` via `192.168.196.115` + `192.168.10.5`.
|
||||
- Home Assistant runs **natively on this host** (Podman Quadlet, host network) at **`http://10.42.0.1:8123`** (name `homeassistant`). The old HAOS VM `ha_van` (`10.42.0.50`) was retired 2026-07-07.
|
||||
- Home Assistant runs **natively on this host** (Podman Quadlet, host network) at **`http://10.42.1.1:8123`** (name `homeassistant`). The old HAOS VM `ha_van` (`10.42.0.50`) was retired 2026-07-07.
|
||||
|
||||
---
|
||||
|
||||
@@ -86,10 +86,10 @@ This directory is the source of truth. The live system files live under `/etc`,
|
||||
| `10-van-ap.network` | `/etc/systemd/network/10-van-ap.network` | brings the AP wlan up with **no** IP (it's a `br0` member; hostapd enslaves it) |
|
||||
| `11-van-ap-2g.network` | `/etc/systemd/network/11-van-ap-2g.network` | same, for the 2.4GHz wlan |
|
||||
| `20-van-br0.netdev` | `/etc/systemd/network/20-van-br0.netdev` | creates the LAN bridge `br0` (STP off) |
|
||||
| `21-van-br0.network` | `/etc/systemd/network/21-van-br0.network` | static `10.42.0.1/24` on `br0` (`ConfigureWithoutCarrier`) |
|
||||
| `21-van-br0.network` | `/etc/systemd/network/21-van-br0.network` | static `10.42.1.1/24` on `br0` (`ConfigureWithoutCarrier`) |
|
||||
| `22-van-lan.network` | `/etc/systemd/network/22-van-lan.network` | enslaves the wired LAN port `enx00e04c331140` to `br0` |
|
||||
| `van-ap-unmanaged.conf` | `/etc/NetworkManager/conf.d/van-ap-unmanaged.conf` | tells NM to leave the AP wlan **and** the wired LAN port alone |
|
||||
| `nftables.conf` | `/etc/nftables.conf` | NAT: `masquerade ip saddr 10.42.0.0/24 oifname != br0` → follows whatever WAN is active |
|
||||
| `nftables.conf` | `/etc/nftables.conf` | NAT: `masquerade ip saddr 10.42.1.0/24 oifname != br0` → follows whatever WAN is active |
|
||||
| `99-van-router.conf` | `/etc/sysctl.d/99-van-router.conf` | `net.ipv4.ip_forward=1` |
|
||||
| `regdomain.service` | `/etc/systemd/system/regdomain.service` | `iw reg set CA` at boot, before NetworkManager |
|
||||
| `rtw89.conf` | `/etc/modprobe.d/rtw89.conf` | 5GHz dongle: `disable_ps_mode=Y` (else AP drops beacon when idle) + blacklists in-kernel rtw89 so the out-of-tree morrownr/rtw89 dkms driver (installed separately, not by deploy.sh) loads instead — see gotchas below |
|
||||
@@ -169,7 +169,7 @@ supply (laptop UPS-style monitor), unrelated hardware and purpose.
|
||||
| `homeassistant.container` | `/etc/containers/systemd/homeassistant.container` | Podman Quadlet: HA Container on the host network (`:8123`), config in `/srv/homeassistant`, host D-Bus mounted for onboard Bluetooth. |
|
||||
|
||||
The `homeassistant` LAN name comes from `ap/van-ap-dnsmasq.conf` (`host-record` →
|
||||
`10.42.0.1`). The retired HAOS VM's domain XML (`ha_van.xml`) lives in git history.
|
||||
`10.42.1.1`). The retired HAOS VM's domain XML (`ha_van.xml`) lives in git history.
|
||||
|
||||
`custom_components/` and `dashboards/` are **not deployed by `deploy.sh`** — HA's
|
||||
`/srv/homeassistant` is hand-managed live config (it has other integrations installed
|
||||
@@ -348,7 +348,7 @@ script's docstring for the full field layout.
|
||||
### Home Assistant (native Podman container)
|
||||
- HA Container runs on the host via a **Podman Quadlet** (`ha/homeassistant.container` →
|
||||
`/etc/containers/systemd/`; systemd generates `homeassistant.service`). **Host network**:
|
||||
HA binds `:8123` directly, so clients use `http://10.42.0.1:8123` (or
|
||||
HA binds `:8123` directly, so clients use `http://10.42.1.1:8123` (or
|
||||
`http://homeassistant:8123`); mDNS/SSDP discovery sees the LAN because there's no bridge
|
||||
or NAT in the way. Config lives in `/srv/homeassistant`.
|
||||
- **Bluetooth**: host BlueZ (`bluetooth.service`) serves the Pi's onboard `hci0` to HA over
|
||||
@@ -359,9 +359,9 @@ script's docstring for the full field layout.
|
||||
(`podman pull ghcr.io/home-assistant/home-assistant:stable`) and restart. After editing
|
||||
the `.container` file: `./deploy.sh` (or install + `systemctl daemon-reload`), then
|
||||
`systemctl restart homeassistant`. Verify:
|
||||
`curl -s -o /dev/null -w '%{http_code}' http://10.42.0.1:8123/` → `200`.
|
||||
`curl -s -o /dev/null -w '%{http_code}' http://10.42.1.1:8123/` → `200`.
|
||||
- History: HA started as a HAOS VM on wayback (libvirt NAT, then bridged onto `br0` at
|
||||
`10.42.0.50` with a legacy-URL DNAT), moved to this Pi as an aarch64 VM 2026-07-06, and
|
||||
`10.42.1.50` with a legacy-URL DNAT), moved to this Pi as an aarch64 VM 2026-07-06, and
|
||||
went native 2026-07-07 — the fixed 2 GiB VM allocation starved the 4 GB Pi. The domain
|
||||
XML (`ha/ha_van.xml`) and the DNAT/hairpin nftables rules are in git history.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user