40260afeeb2b116eb9b6b84a3a93d1475f39e1c5
Bottle Signal-Light UI
A Bottle-based browser interface for the supplied FastAPI signal-light service.
Features
- Mutually exclusive green, yellow, and red controls
- Independent alert buzzer on/off control
- Demo mode on/off control
- All-off command
- Automatic status polling every 1.5 seconds
- Server-side proxy, so the browser does not need CORS access to FastAPI
Run
cd signal_light_ui
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
export SIGNAL_LIGHT_API_URL=http://127.0.0.1:8000
python app.py
Open http://<raspberry-pi-address>:8080.
Configuration
SIGNAL_LIGHT_API_URL— FastAPI base URL, defaulthttp://127.0.0.1:8000SIGNAL_LIGHT_TIMEOUT— upstream timeout in seconds, default3BOTTLE_HOST— Bottle listen address, default0.0.0.0BOTTLE_PORT— Bottle port, default8080BOTTLE_DEBUG— set totruefor debug/reloader
Languages
CSS
29.7%
JavaScript
28.7%
Python
22.7%
Smarty
18.9%