Update docs: uptime, kontrol, reboot

This commit is contained in:
UA1ZBE
2026-07-22 10:54:17 +03:00
parent 4a05d81585
commit 166fffa2ce
3 changed files with 32 additions and 3 deletions

View File

@@ -116,7 +116,10 @@ All commands are processed in `onGroupDataRecv()`:
| `status` | report state | `status:armed/off temp:±X.XC hall:trig/ok motion:trig/ok bat:X.XXV/USB` |
| `ver` | build date | `build:Mon DD YYYY HH:MM:SS` |
| `scan` | noise floor | `noise:-XXXdBm` |
| `canal <name> <pass>` | change channel and reboot | `canal test 5674 ok` |
| `uptime` | device uptime | `uptime:1d 3h 15m` |
| `kontrol <min>` | auto-status every N min | `kontrol 60 min ok` |
| `kontrol off` | disable auto-status | `kontrol off` |
| `reboot` | reboot device | `rebooting` |
### Response Delay
@@ -124,6 +127,12 @@ All command responses are sent with a **5-second delay** (non-blocking, via `def
The action (relay toggle, armed state change) happens immediately — only the reply text is deferred.
Alerts (`alert:hall`, `alert:motion`) and startup (`poweron`) are sent immediately without delay.
### Special Commands
- **`reboot`** — sends `rebooting` immediately (not deferred), blinks LED 5 times, then `NVIC_SystemReset()`.
- **`uptime`** — calculates uptime from `g_boot_time` (set at boot). Format: `uptime:1d 3h 15m` (days/hours/minutes).
- **`kontrol <min>`** — sets `g_auto_status_interval = min * 60000`. In `loop()`, when `millis() - g_last_auto_status >= interval`, sends status. Range: 11440 minutes.
### Auto-Sent Messages
- **Startup:** `poweron Mon DD YYYY HH:MM:SS` — sent 10s after boot.
- **Hall alert:** `alert:hall` — when armed and reed opens.