- Migrated from websockets to aiohttp for unified HTTP/WebSocket server - Added REST endpoints: /api/pattern, /api/parameters, /api/state, /api/tempo/reset - Implemented color palette API with 8-slot system and selected colors - First selected color (index 0) is used as primary RGB for patterns - All operations now available via simple HTTP requests (no WebSocket needed) - Added comprehensive documentation: FRONTEND_API.md, COLOR_PALETTE_API.md - Added test scripts: test_rest_api.sh, test_color_patterns.py - Updated test/test_control_server.py for new /ws WebSocket path - Configuration persistence via lighting_config.json - Pattern parameters (n1-n4, brightness, delay) controllable via API - WebSocket still available at /ws for legacy support
49 lines
1.4 KiB
Plaintext
49 lines
1.4 KiB
Plaintext
# Lighting Controller Configuration
|
|
|
|
# ==============================
|
|
# WebSocket Configuration
|
|
# ==============================
|
|
# WebSocket URI for the control server
|
|
# Used by UI client and test scripts to connect to the control server
|
|
#
|
|
# Default: Use wlan0 IP for remote connections
|
|
CONTROL_SERVER_URI=ws://10.42.0.1:8765
|
|
#
|
|
# For local development (running on same machine as control server):
|
|
# CONTROL_SERVER_URI=ws://localhost:8765
|
|
#
|
|
# For custom IP (if your Pi has a different address):
|
|
# CONTROL_SERVER_URI=ws://YOUR_PI_IP:8765
|
|
|
|
# Control server WebSocket host (bind address)
|
|
# 0.0.0.0 = listen on all interfaces (allows external connections)
|
|
# localhost or 127.0.0.1 = listen only on localhost (local only)
|
|
CONTROL_SERVER_HOST=0.0.0.0
|
|
|
|
# Control server WebSocket port
|
|
CONTROL_SERVER_PORT=8765
|
|
|
|
# ==============================
|
|
# Transport Configuration
|
|
# ==============================
|
|
# Transport method for LED communication
|
|
# Options: spi, websocket
|
|
TRANSPORT=spi
|
|
|
|
# ==============================
|
|
# Sound Detection Configuration
|
|
# ==============================
|
|
# Audio input device index (use sound.py to list available devices)
|
|
AUDIO_INPUT_DEVICE=1
|
|
|
|
# MIDI TCP configuration
|
|
MIDI_TCP_HOST=127.0.0.1
|
|
MIDI_TCP_PORT=65432
|
|
|
|
# Sound control server configuration
|
|
SOUND_CONTROL_HOST=127.0.0.1
|
|
SOUND_CONTROL_PORT=65433
|
|
|
|
# HTTP API server port (for color palette API)
|
|
HTTP_API_PORT=8766
|