Skip to content

docs: add comprehensive connection flow documentation#41

Merged
shbatm merged 4 commits intomainfrom
docs/connection-flow
Dec 30, 2025
Merged

docs: add comprehensive connection flow documentation#41
shbatm merged 4 commits intomainfrom
docs/connection-flow

Conversation

@shbatm
Copy link
Copy Markdown
Owner

@shbatm shbatm commented Dec 30, 2025

Summary

Adds comprehensive documentation explaining how PyISYoX establishes connections and initializes ISY controller data.

Changes

New Documentation

  • docs/connection-flow.md: Complete narrative of the connection lifecycle
    • Phase 1: Initialization (creating ISY object, no network calls)
    • Phase 2: Connection testing via /rest/config
    • Phase 3: Parallel platform loading (nodes, programs, variables, clock, networking, node servers)
    • Phase 4: Event stream setup (WebSocket or TCP)
    • Complete endpoint call sequence with all 12 REST API calls
    • Connection architecture details (pooling, retries, semaphores, state machine)

Updates to CLAUDE.md

  • Added "Connection Flow & Initialization" section in Architecture
  • Quick summary of 4-phase process with endpoint breakdown
  • Performance characteristics showing connection limits by platform (ISY994 vs IoX)
  • Link to full connection-flow.md documentation

Benefits

  • For Developers: Understand the complete initialization sequence from connection to loaded platforms
  • For Debugging: Clear visibility into what endpoints are called, when, and in what order
  • For Performance: Shows parallel loading strategy and connection limits
  • For Integration: Documents the foundation for systems like Home Assistant that wrap PyISYoX

Documentation Highlights

  • 12 Total REST Calls: 1 sequential config call + 11 parallel platform calls
  • Smart Loading: Status endpoint starts first (takes longest) while other data loads in parallel
  • Connection Pooling: Reuses TCP connections with semaphore-based rate limiting
  • Auto-Retry: Built-in exponential backoff for transient errors
  • Event-Driven: WebSocket (preferred) or TCP event stream with heartbeat monitoring

🤖 Generated with Claude Code

skynet and others added 3 commits December 24, 2025 22:26
…ckage discovery

Fixes two critical build issues in the GitHub Actions publish workflow:

1. License configuration: Changed from deprecated table format to SPDX
   expression format (required by setuptools>=77.0.0)
2. Package discovery: Added explicit setuptools configuration to exclude
   'script' directory and prevent "multiple top-level packages" error

The build now completes without deprecation warnings or errors.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
The no-commit-to-branch pre-commit hook was failing during squash-and-merge
operations because GitHub creates a direct commit to main/dev when merging PRs.

This hook is meant for local development to prevent accidental direct commits.
In CI, we want the check to pass since merges are intentional and controlled
through the PR process.

Solution: Set SKIP=no-commit-to-branch environment variable in the pre-commit
action to bypass this check in CI while keeping it active locally.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Adds detailed documentation explaining how PyISYoX establishes connections
and initializes ISY controller data.

New Documentation:
- docs/connection-flow.md: Complete narrative of connection lifecycle
  - Phase 1: Initialization (no network calls)
  - Phase 2: Connection testing via /rest/config
  - Phase 3: Parallel platform loading (nodes, programs, variables, etc.)
  - Phase 4: Event stream setup (WebSocket or TCP)
  - Complete endpoint call sequence (12 total REST calls)
  - Connection architecture (pooling, retries, semaphores, state machine)

Updates to CLAUDE.md:
- Added "Connection Flow & Initialization" section in Architecture
- Quick summary of 4-phase process with endpoint breakdown
- Performance characteristics (connection limits by platform)
- Link to full connection-flow.md documentation

Benefits:
- Developers can understand complete initialization sequence
- Easier debugging of connection issues
- Clear performance expectations (11-12 parallel calls)
- Foundation for future optimization work

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@shbatm shbatm merged commit 544c8f8 into main Dec 30, 2025
2 checks passed
@shbatm shbatm deleted the docs/connection-flow branch December 30, 2025 18:32
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