Add CONTROL_SERVER_HOST to allow external connections

- Add CONTROL_SERVER_HOST environment variable (default: 0.0.0.0)
- Server now binds to all interfaces by default for external access
- Update .env and .env.example with new host configuration
- Allows UI clients to connect from other machines on the network
This commit is contained in:
Pi User
2025-10-03 20:24:20 +13:00
parent e78a8727b2
commit aa9f892454
3 changed files with 11 additions and 4 deletions

View File

@@ -15,6 +15,11 @@ CONTROL_SERVER_URI=ws://10.42.0.1: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
@@ -29,7 +34,7 @@ TRANSPORT=spi
# Sound Detection Configuration
# ==============================
# Audio input device index (use sound.py to list available devices)
AUDIO_INPUT_DEVICE=7
AUDIO_INPUT_DEVICE=1
# MIDI TCP configuration
MIDI_TCP_HOST=127.0.0.1