ESPSomfy-RTS/docs
cjkas c4d20908a5 refactor: serve the read routes from a ModelSnapshot that loop() fills
/controller, /discovery, /rooms, /shades, /groups, /room, /shade and /group
now take a SnapshotSlots slot, queue a fill on the LoopQueue and send a
chunked response whose body waits (RESPONSE_TRY_AGAIN) until loop() has
copied the shade model into the slot. SnapshotWriter then streams the
document from that copy a unit at a time, so each document describes one
moment. At most two reads run at once; a third gets 503. A slot's 5.6 KB
snapshot is allocated only while a read holds it, and its atomic state
decides whether loop() or the read frees it when the read goes away first.

The JSON of each item is unchanged and now lives in ModelSnapshot.cpp,
where the native tests check it. Replies still written on the web server
task copy their one item with SomfySnapshot.cpp, so serializing a group
no longer calls updateFlags(), which emitted groupState and published MQTT
from async_tcp.

Also: every read route is chunked and leaves out an item too big for its
3 KB unit, like /controller did; /discovery drops its timing log; the
SOMFY_MAX_* limits move to ShadeTypes.h.

21 new native tests, 292 in all. Flash: esp32devdbg +440 bytes, esp32dev
+2,064 bytes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 14:04:29 +02:00
..
adr docs: plan domain modules behind a LoopQueue 2026-10-15 21:38:43 +02:00
KNOWN_ISSUES.md refactor: serve the read routes from a ModelSnapshot that loop() fills 2026-10-16 14:04:29 +02:00
LOOP_QUEUE_PLAN.md refactor: serve the read routes from a ModelSnapshot that loop() fills 2026-10-16 14:04:29 +02:00
NICE_TO_HAVE.md docs: add agent testing instructions and the RMT transmit idea 2026-10-16 09:11:17 +02:00
SOMFY_SPLIT_PLAN.md refactor: move the transports into entryPoints and outputs 2026-10-15 19:41:49 +02:00