How lucagoc/pypixelcolor works
pypixelcolor is a Python library and CLI for controlling iPixel LED matrices over Bluetooth LE. The main workflow discovers or selects a device, opens a session, builds a command-specific payload or send plan, and transmits it with acknowledgement handling. The graph also preserves documented image, text, display-setting, clock, and automation capabilities, plus the WebSocket interface. Several command and transport details are represented by their source directories because their implementations were not excerpted; edges are limited to relationships shown in excerpts, the source index, or README.
Main entry points: send_plan.py Send plan · device_session.py Device session · __init__.py Command registry · cli.py CLI
Components 20
User interfaces
- CLI
src/pypixelcolor/cli.py - Python client
src/pypixelcolor/client.py - WebSocket server
src/pypixelcolor/websocket.py
Device connection
- BLE scanner
src/pypixelcolor/scanner.py - Device session
src/pypixelcolor/lib/device_session.py - Device info
src/pypixelcolor/lib/device_info.py
Display commands
- Command registry
src/pypixelcolor/commands/__init__.py - Settings and controls
src/pypixelcolor/commands - Schedule and timer
src/pypixelcolor/commands/set_schedule.py - Image and GIF
src/pypixelcolor/commands/send_image.py
BLE transport
- Send plan
src/pypixelcolor/lib/transport/send_plan.py - ACK manager
src/pypixelcolor/lib/transport/ack_manager.py - Command result
src/pypixelcolor/lib/command_result.py
Text rendering
- Text command
src/pypixelcolor/commands/send_text/__init__.py - Text models
src/pypixelcolor/commands/send_text/models.py - Text encoding
src/pypixelcolor/commands/send_text/encoding.py - Text image processing
src/pypixelcolor/commands/send_text/image_processing.py - Emoji assets
src/pypixelcolor/lib/emoji_manager.py
Other components
- User or script
- iPixel matrix
Connections 29
- User or script → CLI: runs commands
- User or script → Python client: scripts device
- CLI → BLE scanner: scans devices
src/pypixelcolor/cli.py - CLI → Device session: opens session
src/pypixelcolor/cli.py - CLI → Command registry: dispatches commands
src/pypixelcolor/commands/__init__.py - Python client → Device session: uses session
src/pypixelcolor/client.py - Python client → BLE scanner: discovers devices
src/pypixelcolor/client.py - WebSocket server → Device session: uses session
src/pypixelcolor/websocket.py - WebSocket server → Command registry: dispatches commands
src/pypixelcolor/websocket.py - BLE scanner → iPixel matrix: discovers
- Device session → Device info: fetches info
src/pypixelcolor/lib/device_session.py - Device session → Send plan: executes plan
src/pypixelcolor/lib/device_session.py - Device session → ACK manager: registers notifications
src/pypixelcolor/lib/device_session.py - Device session → iPixel matrix: connects BLE
src/pypixelcolor/lib/device_session.py - Command registry → Settings and controls: routes controls
src/pypixelcolor/commands/__init__.py - Command registry → Schedule and timer: routes schedule
src/pypixelcolor/commands/__init__.py - Command registry → Image and GIF: routes images
src/pypixelcolor/commands/__init__.py - Command registry → Text command: routes text
src/pypixelcolor/commands/__init__.py - Settings and controls → Send plan: builds plans
src/pypixelcolor/commands/set_schedule.py - Schedule and timer → Send plan: builds plan
src/pypixelcolor/commands/set_schedule.py - Image and GIF → Send plan: builds plan
src/pypixelcolor/commands/send_image.py - Text command → Send plan: builds plan
src/pypixelcolor/commands/send_text/__init__.py - Text command → Text models: uses models
src/pypixelcolor/commands/send_text/__init__.py - Text command → Text encoding: encodes text
src/pypixelcolor/commands/send_text/__init__.py - Text encoding → Text image processing: renders glyphs
src/pypixelcolor/commands/send_text/encoding.py - Text image processing → Emoji assets: loads emoji
src/pypixelcolor/commands/send_text/image_processing.py - Send plan → ACK manager: waits for ACK
src/pypixelcolor/lib/transport/send_plan.py - Send plan → iPixel matrix: writes BLE data
src/pypixelcolor/lib/transport/send_plan.py - Send plan → Command result: returns result
src/pypixelcolor/lib/transport/send_plan.py