Skip to content

Move the bridge demo into its own document - #88

Merged
QuiteYellow merged 1 commit into
mainfrom
docs/extract-bridge-demo
Sep 12, 2026
Merged

QuiteYellow merged 1 commit into
mainfrom
docs/extract-bridge-demo

Conversation

@QuiteYellow

Copy link
Copy Markdown
Owner

First of the README split. The file was 1188 lines serving a library consumer, an appliance owner, a bridge deployer and a contributor at once, and pyproject sets readme = "README.md", so a pip install smartthings-local reader also got Unraid deployment steps.

docs/bridge-demo.md takes the bridge material: what it exposes, how it is configured and deployed, per-appliance coverage, config keys, MQTT topics, entity counts. 245 lines moved, README down to 944.

Two of those sections were in the wrong parent

"What the demo bridge gives you" and "Under the hood" were h3 children of "BLE OCF framing", so a codec section owned the bridge's architecture. That was the real reason the material was hard to find.

The judgement calls

  • Per-appliance notes went with the bridge. The capability tables are written around the bridge's poll tiers and entity behaviour, so they read as bridge coverage. A library consumer wanting the same protocol facts has "Traps to avoid" and the API reference.
  • Repo layout stayed, promoted to h2. It orients anyone in the repo, including the library tree, and its ## Reference parent left with the bridge config.
  • Traps to avoid stayed. OBSERVE path selection, leaving /oic/sec/* alone, one session per peer: those are protocol lessons that outlive the demo.
  • Parts 1 to 4 stopped being a sequence once 3 and 4 moved, so the numbering is gone from all four, and the three prose references to "Part 1" and "Part 2" now name their sections.
  • The four library sections that were also h3 children of "BLE OCF framing" are reparented under a new Library reference h2.

A guard for the dependency this created

docs/bridge-demo.md now links back into the README, and the README links out to the docs. A cross-file anchor breaks silently: GitHub serves the page and does not scroll, so a renamed heading leaves no trace. A test walks the links between the README and every file in docs/, checks the target file exists, and checks the anchor matches a heading there. Confirmed by renaming a target heading and watching it fail.

What this did not fix

"BLE OCF framing" still owns 234 lines covering three library topics under one heading: the codec, the authentication providers (CertificateAuth, PskAuth, validate_identity) and OwnerPSK derivation. Authentication is the one thing every consumer needs, and it has only prose to find it by, which leaves it unlinkable and absent from the sidebar. Sorting that out is the library-reference pass, and its own change.

Validation

798 tests pass on Python 3.11, 3.12, 3.13 and 3.14, and on the dependency floor. check_share_safety.py is clean. Line accounting checks out: 245 lines left the README, and the new file is 258 including its own 13-line header.

The README was 1188 lines serving a library consumer, an appliance owner, a
bridge deployer and a contributor at once, and it is also the PyPI
description, so a `pip install` reader got Unraid deployment steps.

docs/bridge-demo.md takes the bridge material: what it exposes, how it is
configured and deployed, per-appliance coverage, config keys, MQTT topics
and entity counts. 245 lines moved, README down to 944.

Two sections moved that were parented wrong rather than merely low. "What
the demo bridge gives you" and "Under the hood" were h3 children of "BLE
OCF framing", so a codec section owned the bridge's architecture.

Per-appliance notes went with it because the tables are written around the
bridge's poll tiers and entity behaviour. Repo layout stayed and became an
h2, since it orients anyone in the repo and its parent heading left with
the bridge reference. Traps to avoid stayed: those lessons are about the
protocol, not the demo.

Parts 1 to 4 stopped being a sequence once 3 and 4 moved, so the numbering
is gone from all four and the three prose references to "Part 2" and
"Part 1" now name their sections.

The four library sections that were also h3 children of "BLE OCF framing"
are reparented under a new "Library reference" h2.

A test walks the links between README and docs/ and fails when a
cross-file anchor points at a heading that no longer exists, which is the
dependency this extraction created. GitHub serves the page without
scrolling in that case, so nothing else would have caught it.
@QuiteYellow
QuiteYellow merged commit 1f1b165 into main Sep 12, 2026
8 checks passed
mbillow pushed a commit to mbillow/SmartThings-Local that referenced this pull request Sep 17, 2026
Third and last step of the README split, leaving it a library document.

docs/appliance-compatibility.md takes "Is your appliance compatible?", the
tested combinations and the firmware-family caveat. docs/certificates.md
takes how the AC14K_M credential is obtained, why it works and how durable
it is.

The certificate keeps an entry point in the README, as "Getting a
certificate" under Authentication. A client certificate is a prerequisite
for opening any session, and the README is also the PyPI description, so a
pip install reader needs the one command rather than a link alone. The
reasoning left; the command stayed.

"How the app keeps in sync with the appliance" went to docs/bridge-demo.md,
which is where it should have gone in QuiteYellow#88. It describes the bridge's push
versus poll behaviour and the diagnostic entities it publishes, so it sits
with the architecture rather than between two appliance sections.

The link test from QuiteYellow#88 earned itself here: bridge-demo.md pointed at
README.md#firmware-families-a-limitation, and that heading had just moved
into the compatibility doc. GitHub serves a page with a stale fragment
without complaint, so nothing else would have caught it.

Both new files had their subsections promoted from h3 to h2, since with the
h1 title above them they skipped a level.

README 1188 lines at the start of the split, 804 now.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant