7 Commits

Author SHA1 Message Date
kitadmin 8ea704f7e3 fix: use ingest HTTP API instead of direct Postgres for VPS telemetry; cache speedtest results per interface
- hub/server.py: replace psycopg2 Postgres connection with urllib HTTP call to
  ingest /api/devices endpoint (fleet Postgres is Docker-internal, not reachable
  from the VPS directly)
- telemetry-synology.sh: run_speedtest() now writes per-interface cache files
  (speedtest-result-<iface>); _cached_speedtest() reads cache if < 35 min old;
  _collect_wan() uses cached result so throughput shows in telemetry without
  blocking every 1-min cycle

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-23 03:06:08 +00:00
kitadmin db04341f7c feat: unified fleet telemetry — canonical format, GPS/IP geo, WAN health dashboard
- Rewrite telemetry-synology.sh: canonical GL format (modem_0001/wan keys),
  self-contained metrics (no aiwanbal), Eyeride GPS with IP geo fallback
- Add /api/fleet-telemetry to hub: joins tunnel status with fleet Postgres
- Update dashboard.html: per-device WAN health bars, GPS, signal strength
- Fix hub/ingest.sh normalisation: remap old wan1/wan2 → modem_0001/wan
- Bump SPK version: 0.1-0001 → 0.5.0-0001 for GL parity

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 01:47:02 +00:00
kitadmin 24d8fbd366 fix: revert TUNNEL_LOCAL_SSH_PORT to 2223, fix registry, add incident docs
- wizard.sh + connect.conf: TUNNEL_LOCAL_SSH_PORT back to 2223 (Synology SSH port)
- port-registry: renamed x6340 → x4662 (matches QuickConnect ID)
- port-registry: added MR2200ac mesh satellite note for x4662
- deployment checklist: added kit-connect section, post-deployment rules,
  incident log, and complete fleet port registry table
- memory: added fleet-router-inventory.md with full fleet state
- hub README: updated with current status and locations

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-22 21:20:08 +00:00
kitadmin c8bb08ed35 feat: fleet hub dashboard + /api/fleet endpoint with direct access links
server.py:
- GET / serves dashboard.html (dark-themed fleet console)
- GET /api/fleet returns all registered devices with tunnel status,
  SSH commands, and web dashboard access instructions
- Static file serving via serve_file()

dashboard.html:
- Shows all registered devices from port-registry.json
- Live tunnel status (port-open check on VPS)
- Platform badges (Synology vs GL-XE3000)
- Copy-to-clipboard SSH commands per device
- Web dashboard access via SSH port-forwarding instructions
- Auto-refreshes every 15s

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-22 16:11:10 +00:00
kitadmin 14d46d96a4 fix: daemon hang, postinst mkdir, hub key authorization, boot persistence
SPK daemon fixes (x5925 testing feedback):
- register_with_hub: added --max-time 15 to prevent indefinite hang
- Removed bash 'local' keyword for busybox ash compatibility
- postinst: mkdir -p /usr/local/bin before copying Tailscale binaries
- postinst: chmod +x all bin/*.sh (fixes 644 execute bit bug)
- Added x5925-boot.sh for reboot persistence (stopgap until daemon fixed)

Hub security hardening:
- Added POST /api/authorize-key endpoint with device_id + pubkey
- Keys auto-authorized with restrict,port-forwarding,permitlisten="<port>"
- No shell access allowed — only tunnel forwarding to assigned port
- Server.py updated with input validation on key format
- register.sh --authorize-key subcommand for secure key management

GL daemon: same --max-time fix applied for curl timeout

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-22 04:09:49 +00:00
kitadmin 0c68fb2461 feat: kit-connect + syno-balance SPK builds, busfleet hub registration endpoint
- kit-connect SPK (ipq806x): postinst with hub registration, start-stop-status,
  connect-daemon management, Tailscale + reverse SSH tunnel integration
- syno-balance SPK (noarch, test build): SmartWAN-aware dual-WAN load
  balancer with 6-factor scoring engine, syno-daemon lifecycle
- Busfleet hub: register.sh (port pool 2230-2299), Python HTTP server,
  systemd service, port-registry.json with x4078/x5925 assignments
- .gitignore: exclude SSH keys (*_id_ed25519), SPK artifacts (*.spk)

Gitea releases:
- kit-connect v0.1-0001 → x5925-kit-connect-v1 (production)
- syno-balance v0.1-0001 → syno-balance-test-v1 (prerelease)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-22 00:55:32 +00:00
kitadmin 1005269239 feat: weekly config backup + unified telemetry schema + fleet dashboard
- scripts/backup-config.sh: weekly router config backup to hub (SRM + OpenWrt)
  Runs via cron, exports platform-specific config, POSTs to /api/backup
  Keeps last 10 backups per device on hub

- hub/ingest.sh: fleet hub telemetry normalizer + backup receiver
  Normalises GL (openwrt) and Synology telemetry into single schema
  Adds platform field to GL telemetry for unified dashboard

- hub/dashboard.html: single-pane fleet console
  Shows all routers (GL + Synology) with scores, WAN state, GPS, uptime
  Auto-refreshes every 10s from /api/status endpoint

- 62-point checklist updated with weekly backup section 9b

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-22 00:18:27 +00:00