- Add python-dotenv support to control_server.py and sound.py - Load TRANSPORT from environment variable (default: spi) - Load AUDIO_INPUT_DEVICE from environment variable (default: 7) - Load all port configurations from environment variables - Update .env.example with comprehensive configuration options - Create .env file with sensible defaults for Pi - Transport, sound device, and network settings now configurable via .env
41 lines
1.1 KiB
Plaintext
41 lines
1.1 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 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=7
|
|
|
|
# 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
|