Compare commits

...

15 Commits

Author SHA1 Message Date
kitadmin 30953399b6 fix: null gateway latency; skip aiwanbal generic modem_type for carrier detection
- Gateway ping latency is LAN RTT (<1ms), not WAN latency; set to null so
  dashboards don't show misleading sub-ms values for Eyeride-NAT'd interfaces
- aiwanbal reports modem_type=generic for wired ISP ports; treat same as none
  so carrier detection falls through to gateway IP pattern matching (AT&T etc.)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-23 03:48:32 +00:00
kitadmin 088c256f58 fix: ping local gateway instead of curl when ICMP gives 100% loss
curl --interface fails for root on Synology due to policy routing. Pinging the
local gateway (e.g. Eyeride at 192.168.10.1) works reliably and confirms the
WAN path is up even when internet ICMP is NAT-blocked.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-23 03:38:03 +00:00
kitadmin bbbc873bdb fix: HTTP fallback probe when ICMP reports 100% loss (Eyeride NAT blocks ICMP)
Eyeride 5G device passes HTTP traffic but drops ICMP, causing false 100% loss.
When ping gives 100% loss, try curl --interface to confirm connectivity; if
HTTP probe succeeds, correct loss to 0% and derive latency from connect time.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-23 03:31:47 +00:00
kitadmin 8f2d6a7cbd fix: sanitize _mtime with tr to prevent ash arithmetic crash on Synology
stat output can include non-numeric chars on some RT2600ac firmware versions,
causing 0 to fail. Strip with tr -cd '0-9' before arithmetic.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-23 03:29:10 +00:00
kitadmin a4ba9f8fcd fix: ash-compatible arithmetic in _cached_speedtest; clean up speedtest null guards
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-23 03:26:04 +00:00
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 8a648dc637 feat: smart WAN role detection, aiwanbal integration, speedtest support
- Auto-detect cellular vs fiber/Starlink regardless of physical port:
  aiwanbal modem_type → Eyeride subnet (192.168.10.x) → gateway patterns
- Integrate aiwanbal/SmartAiBalancer state as primary data source when
  available (fresh <120s); fall back to self-collected ping metrics
- Add carrier detection: AT&T for fiber gateways, Eyeride for cellular
- Add run_speedtest() with speedtest-cli/iperf3/curl download fallback
- Extract jitter (mdev) from ping output for richer metrics
- Consistent canonical GL format: modem_0001=cellular, wan=ethernet/fiber

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 02:29:49 +00:00
kitadmin 8dba04a1d0 fix: auto-detect WAN roles — cellular vs fiber
- Detect Eyeride cellular interface by checking 192.168.10.x subnet
- Map correctly: ethernet/fiber → wan, Eyeride 5G → modem_0001
- Add carrier detection: AT&T for fiber gateways, Eyeride for cellular
- Fix sel_primary: fiber is active by default unless cellular route exists
- Fixes console showing 'on cellular' when actually on AT&T fiber

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 02:19:18 +00:00
kitadmin 58ac96fd3c fix: prevent double-ping fallback corrupting WAN metrics
- sudo ping returns exit 1 on any packet loss, which triggered the
  || fallback to direct ping, causing duplicate output concatenation
- Now check exit code explicitly: only fall back on exit >= 2 (real error)
- Fixes loss_pct showing 100100 instead of 100 on failed WANs

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 02:10:35 +00:00
kitadmin 91373df27d fix: sanitize newlines in telemetry output for valid JSON
- ipgeo_gps: pipe curl output through tr -d to strip newlines
- _ping_iface: pipe printf output through tr -d for newline safety

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 01:57:56 +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 d86a7e49b5 feat: BusyBox-compatible telemetry script for Synology
Uses sed instead of grep -P for BusyBox ash compatibility.
Writes JSON to temp file to avoid shell escaping issues.
Posts to fleet hub ingest at 167.172.237.162:8080.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-22 23:13:57 +00:00
kitadmin 879f97c843 fix: x4078 remote recovery + daemon wait-wedge bug + SPK rebuild
- docs/incident-log: mark x4078 recovered remotely via Tailscale (no
  physical access needed); document the recovery steps and root cause
- connect-daemon.sh: remove bare `wait` that wedged the retry loop
  forever on the setsid'd tailscaled child — once the tunnel failed the
  daemon could not self-heal until the package was restarted; now the
  main loop falls through start_tunnel (already blocking+retrying) and
  restarts the whole cycle cleanly
- SPK rebuilt (32839680 bytes) with the daemon fix included
- Also documents the two latent lessons: (1) a field router is only
  inaccessible when ALL three paths fail; (2) always check Tailscale +
  QuickConnect before assuming a truck roll is required

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-22 22:23:53 +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 44566d9563 chore: add built kit-connect SPK for direct download
Includes fixes: which-vs-command-v for SRM busybox compat,
TUNNEL_LOCAL_SSH_PORT default 22, merged authorized_keys.
32MB SPK for Synology RT2600ac/RT6600ax (ipq806x).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-22 20:22:18 +00:00
185 changed files with 1671 additions and 270 deletions
+1
View File
@@ -0,0 +1 @@
{"sessionId":"a109bdc4-2fd1-49a3-803f-c3c3b4858c99","pid":3141099,"procStart":"375768368","acquiredAt":1784001797642}
@@ -0,0 +1,2 @@
x¥’_OÛ0Å÷œOq±˜(ÚÒ$‚í)h
R¥2¡6Û BVÚÜ.V
@@ -0,0 +1,3 @@
x‘ËnÛ@ E»ÖWÜE6”ÚÖkd9mQ7)QÂÚ ó "ÁÒŒª!ñßw MÖåŽä½Ä!)Í0tY}p$㉊“8I ÑÈ‚1Ê ¡R’‘o™mrÁ‹¦Éƒ‘O¤ØÖw“DåÉF0•SœJƔܲ´ˆYá
‰hD¢XÀgך û¾'R>´\ã3¿dßNtî;}êÜJšá+¢|i¶IS„¯zFGÿçÄl'3{û·'d«(ÌV1žŽᨧÜtÆÓáXá¥s-ÄÜ44­§K9>½iV¶Ýáy´uÓ½b±¯Âß~ÈãáîK¼¼ySÕÒø½¤Ãâçñð ÖqGhºžìò&À;Ýh¬[×M?Ûvý£¶¤Õ•Cu÷
£ÑÎʼh×
@@ -0,0 +1,2 @@
x²▌1nц0 E;Кэ"-≥TQИ■)[/@K4bь√WzШ:WхъчПС╤╝S
Ьжv3И)▄Х┴╓0&
@@ -0,0 +1,2 @@
xŽ;nÃ0D]óÛ0(rù3ŒÀ©R¥óVË%,H¢…)|{3WÈtóðÞÖuj`p8µCuEbò)S±â9C]ô±ƒµAµÓ!µA.˜\²Áø<æ"ztK×3
f¶FLzPôÛžÛŸË"¾ùëInô×î³¼–©ÎS»ð¶~À¢I¼pÖ=ªÓþ±ÉÿÖj_¨^a¥c†ýÌ/ä­ŠzÑ#LŠ
@@ -0,0 +1,3 @@
x};0ù¤³1ª$nº¸øJ`7
4bÛ´÷ÆÃ·a±CÓœóûhÞª<¤kºøaHJa›#‡ %»Ð‹NV¹ƒ%½59Ϋ ëëá¥ËE«hÙGP 1\Bûžk-ï‘n I©^²ò‘5FaÝh„ƒöÆZõ_+}²>1à²xŸça…Àj>îäch½@.×{ºÏR2ŽlÈÄ“»ÇS_|!'›˜ÒdMg
”h˜ÿÒhØÊÝ]Ð_ùc
@@ -0,0 +1,3 @@
xťŹÁNä0 †÷ܧřOhŃ2¨iÚÎĐ
¸ěi/\Ń’ÔŮF“¦Uś€Fw'x|ňoű·?ež]BW÷?R$ÂĐ!¬>ŘFŽ]×R'{Ó´µPÝa¬{­MOµäP­*RH{a„´¶¤ŃŇĘúAěűZ7µmmßÚşé›ao*•Ó´DÜyOÍźIܨwu{¤“wáčŇĄYćßűC3´ť~Ő%ŞR-ډľç®tć¸äbżB"O3Ąxşä Ć“
yeěŔĘ8©D;ë<!ůš‚™đDŃYGcUíđ@«W†đ˛Ť\ăĎ.MxÄÎ~Č8;ŰFľúiçuŤÄ\<‘÷xV1¸đź±ĚŽąäŰĆOU( RH×?uXźÎ Íý;߬r>G‚ÎÖRd”[Łăă¬ĎeĂHŢ•*ŚŰÓ%-§¬ aĘ1Toq§n
@@ -0,0 +1 @@
xŽAjÃ0E»Ö)f0òH²¬RB®ºëÆ£llËÁQ¹}Ü+ôo>ïÃÏÛºNº‹€%õCÌ:8ÙEQç]VßöQضˆÒ%ÅÁYs§]J…¾sž¬Ud
@@ -0,0 +1,4 @@
xŽAjÃ0E»Ö)fÒXòH!”
]e× ŒFcblËÁQ¹}Ý+äo>ïÃ/벌
¶©BJ¢¡d‹ÒGÒeè˜óà|Áœ V
±ÅÜyÓÚ€„<†0ÆÜÇΫƂ=e$0u„ÒÙèÊ`øÙnë—yÖ

Some files were not shown because too many files have changed in this diff Show More