src.nth.io/

summaryrefslogtreecommitdiff
path: root/main/viewport_state.h
diff options
context:
space:
mode:
authorLuke Hoersten <[email protected]>2026-06-13 21:31:28 -0500
committerLuke Hoersten <[email protected]>2026-06-13 21:31:28 -0500
commitf5b9f2f81fa71361418a475d801eb4adefcbc027 (patch)
tree7f0f35e9c9be5895cf71a03bd24532596e94879f /main/viewport_state.h
parent072504c2dfa19e4311e16e5c445d9cc19680dcf5 (diff)
Reframe protocol as REST peers; mDNS-SD discovery; explicit no-ack
Three structural shifts: 1. Discovery section spells out mDNS-SD. The ESP32 runs the ESP-IDF mdns responder and serves all .local records itself — A, SRV, PTR, TXT. Scrypted browses _scrypted-viewport._tcp.local with a Node mDNS-SD library that hits the multicast layer directly. Scrypted uses the IP from the SRV/A record, NOT OS-level .local hostname resolution. Re-browse every few minutes for DHCP renumbering. Manual host:port fallback for non-mDNS deployments. 2. Drop "callback" framing. The device and Scrypted are HTTP peers, both exposing POST /state with the same body shape {viewport,state}. Either side can push to the other to set state. Section is renamed "Device -> Scrypted POST /state". No new vocabulary or semantics — just the truth about what the protocol is. - state_post_failures (was: callback_failures) - state_client.c (was: callback_client.c) - "callback" replaced with "outbound POST" / "inbound POST" / just "POST /state" throughout. 3. Explicit no-application-level-ack clause. HTTP 2xx is transport- only. Device does not retry, does not block subsequent state changes on the response, does not treat 5xx as anything beyond a counter increment. Idempotency + /frame 409 + each side's idle timer cover every failure mode. Scrypted-side logic must not wait for the device to confirm a state change. Also: Scrypted Integration code in v2 guide rewritten to discover via bonjour-service browse rather than hardcoded viewport-<name>.local URLs. urlFor(name) function resolves the discovered IP per call. mdns_service.c module spec now explicitly notes Scrypted uses the browse, not the hostname.
Diffstat (limited to 'main/viewport_state.h')
0 files changed, 0 insertions, 0 deletions