modem: add van-sms-watch to archive inbound SMS + Pushover alert

Polls ModemManager for SMS on the EC25's own flash storage, appends each
inbound message to /var/log/van-sms.jsonl, pages via Pushover (shared
van-battery creds), then deletes it from modem storage so it doesn't
silently fill up. MMS can't be decoded (WAP-push notification needs the
carrier's separate MMS APN) — detected and paged as notification-only.

Wired into deploy.sh; installed/verified live on the Pi (backlog SMS
archived + paged successfully) ahead of committing.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Andreas Wrede
2026-08-21 15:12:54 -04:00
co-authored by Claude Sonnet 5
parent e5e776405a
commit d002058701
3 changed files with 266 additions and 1 deletions
+9 -1
View File
@@ -150,6 +150,12 @@ dpkg -s mobile-broadband-provider-info >/dev/null 2>&1 \
# port rather than through the hub. This just pages if it ever recurs.
install -D -m0755 failover/van-modem-watch /usr/local/sbin/van-modem-watch
install_rendered failover/van-modem-watch.service /etc/systemd/system/van-modem-watch.service
# SMS archive + Pushover relay: polls ModemManager for inbound SMS, appends
# each to /var/log/van-sms.jsonl, pages via Pushover, then deletes it from
# the modem's own flash storage (small, fills up silently otherwise). MMS
# can't be fetched here (see script docstring) — notification-only paging.
install -D -m0755 modem/van-sms-watch /usr/local/sbin/van-sms-watch
install -D -m0644 modem/van-sms-watch.service /etc/systemd/system/van-sms-watch.service
echo "== cockpit plugin =="
install -d /usr/share/cockpit/vanrouter
@@ -251,7 +257,7 @@ systemctl restart systemd-resolved
# its wait-online would just stall network-online.target. NM-wait-online covers WANs.
systemctl mask systemd-networkd-wait-online.service >/dev/null 2>&1 || true
systemctl unmask hostapd >/dev/null 2>&1 || true
systemctl enable regdomain.service hostapd hostapd-2g van-ap-dnsmasq nftables systemd-networkd van-failover van-thermal van-nvme-watch van-ap-watchdog van-ap-watchdog-2g van-wlan-watchdog van-modem-watch van-gps-owntracks van-li3-battery >/dev/null 2>&1 || true
systemctl enable regdomain.service hostapd hostapd-2g van-ap-dnsmasq nftables systemd-networkd van-failover van-thermal van-nvme-watch van-ap-watchdog van-ap-watchdog-2g van-wlan-watchdog van-modem-watch van-sms-watch van-gps-owntracks van-li3-battery >/dev/null 2>&1 || true
# bluetooth: host BlueZ serves the onboard hci0 to the HA container over D-Bus
systemctl enable --now bluetooth >/dev/null 2>&1 || true
systemctl start homeassistant || warn "homeassistant failed to start (podman/quadlet — check journalctl -u homeassistant)"
@@ -259,6 +265,7 @@ systemctl start esphome || warn "esphome failed to start (podman/quadlet — che
systemctl start frigate || warn "frigate failed to start (podman/quadlet — check journalctl -u frigate)"
systemctl restart van-thermal
systemctl restart van-nvme-watch
systemctl restart van-sms-watch
systemctl restart van-gps-owntracks
systemctl restart van-li3-battery
# Pick up unmanaged-devices changes so NM releases/keeps the right interfaces.
@@ -287,3 +294,4 @@ echo " cat /run/van-failover/state.json"
echo " cat /run/van-thermal/state.json"
echo " cat /run/van-nvme-watch/state.json"
echo " journalctl -u van-li3-battery -n 20"
echo " journalctl -u van-sms-watch -n 20 ; tail -f /var/log/van-sms.jsonl"