feat!: remove the old API, ports 8081 and 8080 (step 4a)

Step 4a of docs/SECURITY_PLAN.md. Port 80 keeps the eleven HTTP routes of
ADR 0006 and the socket at /ws; everything else moved to protocol 2.

- Port 8081 (ApiRoutes) and the socket on 8080 (SocketEmitter) are gone.
  Protocol 2 owns its frame buffer and loop-task check.
- Port 80 drops every route the old web UI called: reads, edits,
  settings, scans, reboot, /shades.cfg, /discovery. HttpRoutes.cpp holds
  what stays.
- ModelSnapshot, SnapshotSlots and the read documents are gone. The item
  snapshot types stay, as ItemSnapshot, for events, MQTT and the command
  replies.
- Model edits reply only to their protocol 2 op: requestResult goes.
- The settings' toJSON writers, used only by the settings routes, go.
- The _espsomfy_rts._tcp mDNS record moves to port 80, with path=/ws.
- The memory event reports the loop-rate window it closes.
- A deleted room no longer re-publishes its retained MQTT topics.
- e2e: the heap check reads the sync's status; the sync is checked on
  its own instead of against /controller.
- README gets an API and ports section.

BREAKING CHANGE: ports 8081 and 8080 and the old HTTP routes are gone.
Home Assistant needs integration 3.0.0 or newer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
cjkas 2026-10-27 21:49:38 +01:00
parent c91c20d444
commit 2a954aa158
53 changed files with 613 additions and 3549 deletions

View file

@ -86,13 +86,9 @@ The seam through which a shade's behaviour reports what happened: changes for th
Where a request from outside reaches the firmware: an HTTP route, an MQTT command topic or a frame received from a remote.
_Avoid_: controller (it already names the owner of the shade list and the `/controller` read)
**WebUiRoutes**
The HTTP routes on port 80 that the config web UI calls, plus the UI's own files.
_Avoid_: WebUiController, Web
**ApiRoutes**
The HTTP routes on port 8081 that integrations such as Home Assistant call.
_Avoid_: WebApiController
**HttpRoutes**
The HTTP routes on port 80: the web UI's files, login, the file transfers and the three commands for scripts. Everything else is an op on the socket.
_Avoid_: WebUiRoutes, ApiRoutes, WebApiController
**MqttCommands**
The MQTT topics ending in `/set` that command a shade or group.
@ -102,10 +98,6 @@ _Avoid_: MQTTController
What sends the state of rooms, shades and groups, and the Home Assistant discovery config, to the MQTT broker.
_Avoid_: MQTTController
**SocketEmitter**
What pushes state events to WebSocket clients on port 8080. A client can only join or leave a room; it sends no commands.
_Avoid_: WebSocketController
**MqttConnection**
The link to the MQTT broker that MqttCommands and MqttPublisher share: connecting, the root topic and the subscriptions.
_Avoid_: MQTTClass
@ -129,7 +121,7 @@ _Avoid_: increment, push
**Sync**
How a client catches up with the device: the shade model and status, sent item by item at the client's pace, after which events keep it current. It describes no single moment.
_Avoid_: snapshot (a ModelSnapshot is a copy of one moment), initial load
_Avoid_: snapshot (an item snapshot is a copy of one moment), initial load
**Feed**
A stream of events a client subscribes to on its own, such as received remote frames or a frequency scan.
@ -173,10 +165,10 @@ The domain module that carries out shade requests, whichever entry point they ca
The domain module that adds, changes, deletes, links and orders the rooms, shades, groups and repeaters of the shade model.
_Avoid_: ShadeConfig, InstallationEditor
**ModelSnapshot**
A copy of the shade model taken for one read, so the reply describes a single moment.
_Avoid_: InstallationSnapshot
**Item snapshot**
A copy of one room, shade or group, which an event, an MQTT topic or a command reply is written from.
_Avoid_: ModelSnapshot (the whole-model copy the HTTP reads used, removed in 4.0.0)
**LoopQueue**
The single queue through which shade requests, model edits, reads and snapshot requests reach `loop()` from other tasks, in the order they arrived.
The single queue through which shade requests, model edits, socket reads and settings ops, and restores reach `loop()` from other tasks, in the order they arrived.
_Avoid_: web command queue