Commit Graph

32 Commits

Author SHA1 Message Date
stswangzhiping
029f7fe0a9 fix: edit openclaw config.yaml directly and restart as sts user
Made-with: Cursor
2026-03-24 14:07:22 +08:00
stswangzhiping
1a63e90055 fix: use full path to find openclaw binary for root service
Made-with: Cursor
2026-03-24 13:13:00 +08:00
stswangzhiping
cefbab28b7 feat: configure openclaw allowedOrigins on activation
Made-with: Cursor
2026-03-24 11:38:58 +08:00
stswangzhiping
86859a5e0d fix: 过滤AP热点IP,改用checkip.amazonaws.com获取外网IP,新增ipplus360地理位置
Made-with: Cursor
2026-03-21 09:20:00 +08:00
stswangzhiping
878f3592bf feat: connect 消息上报 local_ip 和 external_ip
Made-with: Cursor
2026-03-21 08:18:27 +08:00
stswangzhiping
108bea4ed7 fix: use fixed 5s retry on cert-not-yet-valid to avoid 70s exponential backoff before NTP sync
Made-with: Cursor
2026-03-20 08:34:53 +08:00
stswangzhiping
e94e2bb10c fix: add AP net monitor to detect cable unplug within 5s, reduce ping interval to 10s
Made-with: Cursor
2026-03-20 08:14:31 +08:00
stswangzhiping
08fa4eefaa feat: skip WS in AP+no-internet, poll every 5s until network available
Made-with: Cursor
2026-03-20 07:43:51 +08:00
stswangzhiping
c13ed3ba6d fix(vfd): use isApMode() instead of hasInternet() to decide AP vs Err0
Made-with: Cursor
2026-03-19 23:45:16 +08:00
stswangzhiping
8f158eeeb2 fix: turn off LEDs on service start, suppress Err0 before first WS success
Made-with: Cursor
2026-03-19 23:27:42 +08:00
stswangzhiping
9b4287db1d feat(vfd): showConn blink on WS connecting, showErr0 on VPS unreachable
Made-with: Cursor
2026-03-19 23:17:08 +08:00
stswangzhiping
53b9804c72 feat(led): showErr(code) + WS fail>=3 shows ERRa or AP on VFD
Made-with: Cursor
2026-03-19 22:44:56 +08:00
stswangzhiping
e36bec8660 refactor(led): startup all-off, AP shows VFD, WS close no VFD change
Made-with: Cursor
2026-03-19 22:08:47 +08:00
stswangzhiping
d68d673cdc perf(heartbeat): 10s interval, collect metrics every 3rd beat (30s)
Made-with: Cursor
2026-03-19 09:58:48 +08:00
stswangzhiping
5824cf089a feat(ws): unified status_update handler, extract _applyStatus()
Made-with: Cursor
2026-03-19 09:43:29 +08:00
stswangzhiping
16f82d6ab8 feat(ws): handle activated message from server, switch to APPS+time
Made-with: Cursor
2026-03-19 09:24:10 +08:00
stswangzhiping
b4fa850445 feat(display): PIN 改为 4 位,showPinMiddle4 → showPin
Made-with: Cursor
2026-03-19 08:57:44 +08:00
stswangzhiping
e887f5b8e2 fix(display): 不在 ws.open 时 showTime,避免覆盖未激活时的 PIN 显示
Made-with: Cursor
2026-03-19 07:44:28 +08:00
stswangzhiping
57c0a1b6f8 feat(display): 未激活+连网时 VFD 显示 PIN 码中间4位
Made-with: Cursor
2026-03-19 07:37:57 +08:00
stswangzhiping
959a2b67f2 refactor(display): tie VFD display to WS connection state only
Made-with: Cursor
2026-03-18 21:17:36 +08:00
stswangzhiping
90bba5f348 feat: add SETUP/APPS status LEDs (b2/b1), toggle on activation
Made-with: Cursor
2026-03-18 20:25:54 +08:00
stswangzhiping
d66558c9de fix: read dashboard token from ~/.openclaw/openclaw.json instead of running openclaw dashboard command
Made-with: Cursor
2026-03-18 14:00:57 +08:00
stswangzhiping
64f4050014 fix: EROFS dns config, double WS connection, and watchdog timeout
1. EROFS: install.sh pre-writes DNS hijack config to dnsmasq-shared.d
   since /etc may be read-only at runtime. dns-hijack.js gracefully
   falls back to checking if config already exists.

2. Double WS: add _connectionStarted guard to prevent _proceedWithConnection
   from being called twice (via event + hasInternet check).

3. Watchdog: move _startSdNotify() to start() beginning so READY=1
   is sent immediately, not delayed until network is ready.

Made-with: Cursor
2026-03-16 12:54:46 +08:00
stswangzhiping
f58db93b64 fix: wait for NM auto-reconnect before starting AP on reboot
After WiFi is configured and device reboots, NetworkManager needs
a few seconds to auto-connect to saved WiFi. Without waiting,
AP starts immediately and occupies wlan0, preventing NM reconnect.

- Add hasSavedWifiConnection() to check for saved WiFi profiles
- Wait up to 20s for NM auto-connect before falling back to AP
- First boot (no saved WiFi) still starts AP immediately

Made-with: Cursor
2026-03-16 12:27:25 +08:00
stswangzhiping
b42e59fab8 feat: AP always-on mode - hotspot stays until WiFi STA connects
Redesign provisioning from one-shot blocking to persistent background manager:
- AP hotspot starts at boot regardless of eth0 status
- Captive portal runs alongside AP for WiFi configuration
- AP automatically shuts down only when WiFi STA connects
- WiFi drops at runtime -> AP auto-restarts
- WiFi connect fails -> AP auto-restarts for retry
- client.js no longer blocks on network; connects WS when ready

Made-with: Cursor
2026-03-16 12:18:35 +08:00
stswangzhiping
eb9f4ab1c3 feat: add WiFi provisioning for headless devices (AP + Captive Portal)
- Add lib/network.js: WiFi scan, connect, AP hotspot via nmcli
- Add lib/dns-hijack.js: dnsmasq management for DNS hijack + DHCP
- Add lib/captive-server.js: embedded HTTP captive portal with WiFi setup page
- Add lib/provisioning.js: orchestrator (detect network -> AP mode -> wait -> exit)
- Update client.js: call ensureNetwork() before WS connection
- Update install.sh: auto-install dnsmasq dependency

Made-with: Cursor
2026-03-16 08:58:51 +08:00
stswangzhiping
b3770d21d4 feat: add structured logging, process watchdog, and systemd hardening
- Add lib/logger.js: timestamped structured logging with 5MB x 5 file rotation
- Add lib/watchdog.js: generic child process supervisor with rate-limited restarts
- Enhance client.js: WS ping/pong liveness detection, uncaughtException/unhandledRejection handlers, systemd sd-notify integration
- Refactor frpc.js: FrpcManager now delegates to Watchdog instead of manual spawn/exit
- Enhance install.sh: environment file, log directory, systemd resource limits, security hardening, WatchdogSec=60
- Replace all console.log/warn/error with structured logger across modules

Made-with: Cursor
2026-03-16 07:31:19 +08:00
stswangzhiping
c0c445b61d feat: add ttyd terminal support, parallel startup in frpc.js
Made-with: Cursor
2026-03-15 21:39:05 +08:00
stswangzhiping
64cd7432e1 fix: getDashboardInfo uses spawn+Promise to handle long-running process
Made-with: Cursor
2026-03-15 14:09:41 +08:00
stswangzhiping
516d0d26ee feat: integrate frpc manager and send dashboard info via WebSocket
Made-with: Cursor
2026-03-15 11:10:33 +08:00
stswangzhiping
a9a7816e16 fix: show claw_id in activation box, remove noisy startup logs
Made-with: Cursor
2026-03-14 22:46:49 +08:00
stswangzhiping
222c38a707 feat: initial clawd implementation - WebSocket daemon for claw box
Made-with: Cursor
2026-03-14 20:41:26 +08:00