Commit Graph
17 Commits
Author SHA1 Message Date
Marc Billow ce6985ca3f fix: restore Block2 retry debug logging dropped during port
Task 8's port of retry/retransmit from localthings dropped the per-attempt
timeout/retry log lines (present in coap_dtls.py) — found while gathering
real-device pacing evidence, where the missing logs made retry frequency
impossible to see. Restores both the retry and final-timeout log lines.
2026-07-05 16:51:44 -05:00
Marc Billow ff688f5d5d fix: residual inter-request pacing instead of blind full-interval sleep
pace() slept the entire rate-limit interval every call regardless of how
much of it had already elapsed since the last real send (e.g. spent
processing the previous block's response). Track the last send timestamp
and only sleep the remainder, recovering time already spent between
requests without changing the enforced minimum interval.

Verified against 10.0.0.129/10.0.0.254: multi-block /device/0 fetches
still complete cleanly, faster per sweep, with the same request spacing
guarantee (patch and measurement from QuiteYellow, PR #8 review).
2026-07-05 16:51:17 -05:00
Marc Billow 27480dcb1d fix: pace inter-tier polling; fix stale package-rename references in docs 2026-07-04 17:29:22 -05:00
Marc Billow 3a2d3da3b2 docs: point HA users at localthings, freeze mqtt_demo/samples as reference-only 2026-07-04 17:29:22 -05:00
Marc Billow 70baa3baf0 fix: rate-limit inter-request pacing to avoid RT-OCF request drops 2026-07-04 17:29:22 -05:00
Marc Billow 58df1b242f fix: retry Block2 GETs on timeout, track server-negotiated block size
Ported from localthings fork: bounded per-block retransmission
(_BLOCK_MAX_ATTEMPTS/_BLOCK_ACK_TIMEOUT) instead of a single attempt
per block, SZX renegotiation tracking, and a bugfix moving
conn.send(datagram) inside the try that catches its own SSL errors.
2026-07-04 17:29:22 -05:00
Marc Billow 0fc65339b5 fix: validate device cert chain against OCF root CA instead of VERIFY_NONE 2026-07-04 17:29:22 -05:00
Marc Billow c7232b3df6 fix: isolate subprocess PYTHONPATH in import-isolation test to prevent false pass 2026-07-04 17:29:22 -05:00
Marc Billow 8a6bc8d594 test: verify protocol/ + ocf/ import in isolation from mqtt_demo/
- Add test_import_isolation.py: isolation test that copies protocol/ and ocf/
  to a temp directory without mqtt_demo/ and verifies all modules import
- Add conftest.py: pytest configuration to add repo root to sys.path,
  enabling tests to import protocol/ and ocf/ packages
2026-07-04 17:29:22 -05:00
Marc Billow 4789ac8f55 fix: include .dockerignore in deploy.sh's remote tar package to prevent .env leaking into the image 2026-07-04 16:22:31 -05:00
Marc Billow 5546454097 fix: remove ocf/state_cache.py's stale mqtt_demo-descriptor type dependency 2026-07-04 16:17:44 -05:00
Marc Billow f573dddb14 fix: prevent .env from being baked into mqtt_demo image; fix dangling requirements-bootstrap.txt path 2026-07-04 16:15:44 -05:00
Marc Billow aa9ec0f0d9 refactor: extract mqtt_demo/ — move bridge, config, logger, appliance descriptors 2026-07-04 16:11:10 -05:00
Marc Billow 24fc197a9e refactor: extract ocf/ — fold sensors.index_links into StateCache.index_device_tree 2026-07-04 16:02:08 -05:00
Marc Billow 10773bb8c8 refactor: extract protocol/ — split CoAP wire helpers from DtlsCoapSession 2026-07-04 15:55:12 -05:00
Marc Billow d33b46171a test: characterize CoAP wire encode/decode before extracting protocol/ 2026-07-04 15:50:38 -05:00
Marc Billow cae0592324 test: add pytest as a dev dependency 2026-07-04 15:49:39 -05:00