docs: serial parameter, settings/hangup endpoints, single-worker rule, cool-down prerequisite for 1c
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SyJ2ip3Krb6dtdv2cXua44
This commit is contained in:
1 parent
d393a149f8
commit
080e8f4704
3 files changed
+25
No files matched your search
@@ -177,10 +177,22 @@ via a thread-safe `_LiveCache` (plain Python dict + `threading.Lock`):
|
||||
| `POST` | `/device/monitor/start` | Sends SUB 0x96; immediately evicts status cache |
|
||||
| `POST` | `/device/monitor/stop` | Sends SUB 0x97; immediately evicts status cache |
|
||||
| `POST` | `/device/call_home` | Reads, patches specified fields, writes back to device |
|
||||
| `GET` | `/device/settings` | Recording settings in the shared model, either series; serial required; never cached |
|
||||
| `POST` | `/device/hangup` | Releases a held Series-4 line now; `{"hung_up": bool}` |
|
||||
|
||||
**Cache bypass** — All cached endpoints accept `?force=true` to skip the cache and
|
||||
force a fresh read from the device.
|
||||
|
||||
**Serial-named requests (Series 3 and 4)** — `/device/info`, `/device/connect`,
|
||||
`/device/monitor/status` and `/device/settings` accept `serial` (`UM...` = Series 4
|
||||
Micromate, `BE...`/`BA...` = Series 3 MiniMate Plus) and return one shared model
|
||||
for either series. Serial-named requests are **not cached** and ignore `force`.
|
||||
Without `serial` the legacy Series-3 behaviour is unchanged. Any other `/device/*`
|
||||
route given a `UM` serial answers **501** ("not supported for Series 4 yet"), and a
|
||||
serial-less request at an address holding a Series-4 line answers **409** (use
|
||||
`POST /device/hangup` first). Series-4 lines are held open between requests, so
|
||||
SFM must run a **single uvicorn worker**: locks and held lines are per process.
|
||||
|
||||
**Cache stats** — `GET /cache/stats` returns hit/miss counts and TTL info; `DELETE /cache/device`
|
||||
clears the device cache immediately.
|
||||
|
||||
|
||||
Reference in new issue
Block a user