How thenewwazoo/lutron-leap-js works
lutron-leap is a TypeScript implementation of Lutron’s LEAP protocol, with Caséta Smart Bridge abstractions. The principal workflow is to discover a bridge, establish a secure LEAP client connection, parse hub responses into typed messages, and expose bridge information, device operations, and subscriptions. Pairing is a separate certificate-enrollment workflow. The README documents discovery and client responsibilities; sampled source confirms message parsing, client/parser wiring, bridge operations, and pairing credentials. BridgeFinder’s implementation was not sampled, so its documented relationships are cited to the README.
Main entry points: BridgeFinder.ts Bridge finder · LeapClient.ts LEAP client · ResponseParser.ts Response parser · Messages.ts Message model
Components 10
Bridge discovery
- Bridge finder
src/BridgeFinder.ts
LEAP protocol
- LEAP client
src/LeapClient.ts - Response parser
src/ResponseParser.ts - Message model
src/Messages.ts - Body types
src/MessageBodyTypes.ts
Bridge operations
- Smart Bridge API
src/SmartBridge.ts
Certificate pairing
- Pairing client
src/PairingClient.ts - Pairing credentials
src/Association.ts
Other components
- Library consumer
- mDNS network
Connections 11
- Library consumer → Bridge finder: discovers bridges
README.md - Bridge finder → mDNS network: searches network
README.md - Bridge finder → Library consumer: returns network info
README.md - Library consumer → LEAP client: constructs client
README.md - Library consumer → Smart Bridge API: uses operations
README.md - Smart Bridge API → LEAP client: sends requests
src/SmartBridge.ts - LEAP client → Response parser: handles responses
src/LeapClient.ts - Response parser → Message model: parses responses
src/ResponseParser.ts - Message model → Body types: parses bodies
src/Messages.ts - Library consumer → Pairing client: requests pairing
README.md - Pairing client → Pairing credentials: uses credentials
src/PairingClient.ts