Resilience pass: bulletproof recovery + FWS / fault polling + EG4 discovery refresh

This commit is contained in:
2026-04-28 18:10:00 -04:00
parent 04720c3b92
commit 7688fc1dd3
11 changed files with 267 additions and 16 deletions

View File

@@ -0,0 +1,15 @@
[Unit]
Description=Periodic re-resolve of LVX6048 hidraw symlinks (transient-failure backstop)
# Belt-and-suspenders against the udev RUN+= path: if the inverter is still
# enumerating at hot-plug time and the resolver finds no PI18-responsive
# device, this timer keeps trying every few minutes. The resolver itself is
# idempotent — runs that don't change anything are no-ops.
[Timer]
OnBootSec=2min
OnUnitActiveSec=5min
AccuracySec=15s
Unit=lvx-resolve-links.service
[Install]
WantedBy=timers.target

View File

@@ -10,6 +10,11 @@ Group=dialout
ExecStart=/home/noise/.local/bin/powermon -C /home/noise/.config/powermon/powermon.yaml
Restart=always
RestartSec=10
# Disable systemd's default rate-limiter: when the inverter is briefly
# unreachable (sunrise cold-start / USB hiccup), we want to keep retrying
# every 10s indefinitely — not give up after 5 failures in 10s like the
# default StartLimitBurst=5 / StartLimitIntervalSec=10s would.
StartLimitIntervalSec=0
[Install]
WantedBy=multi-user.target

View File

@@ -1,3 +1,7 @@
[Unit]
# Wants= instead of Requires=: a failed/inactive resolver should NOT latch
# powermon into a permanently-failed state. powermon's own Restart=always
# handles the retry loop until /dev/lvx6048-1 reappears (e.g. after the
# resolve-links periodic timer next runs successfully).
After=lvx-resolve-links.service
Requires=lvx-resolve-links.service
Wants=lvx-resolve-links.service

View File

@@ -10,6 +10,8 @@ Group=dialout
ExecStart=/home/noise/.local/bin/powermon -C /home/noise/.config/powermon/powermon2.yaml
Restart=always
RestartSec=10
# Disable systemd's default rate-limiter (see powermon.service for rationale).
StartLimitIntervalSec=0
[Install]
WantedBy=multi-user.target

View File

@@ -1,3 +1,7 @@
[Unit]
# Wants= instead of Requires=: a failed/inactive resolver should NOT latch
# powermon into a permanently-failed state. powermon's own Restart=always
# handles the retry loop until /dev/lvx6048-2 reappears (e.g. after the
# resolve-links periodic timer next runs successfully).
After=lvx-resolve-links.service
Requires=lvx-resolve-links.service
Wants=lvx-resolve-links.service