Refactoring Summary New Project Structure
DMXController/ ├── pyproject.toml # Package configuration ├── scripts/ │ ├── setup_dmx_ola.sh # OLA setup script │ └── repatch_dmx_ftdi.sh # Device re-patching utility └── src/dmx_controller/ ├── init.py # Package exports ├── main.py # CLI entry point ├── core/ │ ├── buffer.py # DmxBuffer class │ ├── constants.py # Configuration & color palette │ └── utils.py # Helper functions ├── controllers/ │ ├── base.py # Base controller class │ ├── fixture.py # Full RGBWYP controller │ └── uv.py # UV-specific controller ├── animations/ │ ├── easing.py # 30+ easing functions │ └── effects.py # Animation engine └── api/ ├── app.py # FastAPI app factory ├── models.py # Pydantic request/response models └── routes.py # REST API endpoints Key Features Added Smooth Animations (easing.py):
30+ professional easing functions (sine, cubic, elastic, bounce, etc.) Pulse/breathing, strobe, color cycles, rainbow Fire, candle, twinkle, and wave effects FastAPI Endpoints (routes.py):
POST /api/v1/color - Set solid color POST /api/v1/animation/fade - Smooth fade POST /api/v1/animation/pulse - Breathing effect POST /api/v1/animation/rainbow - Rainbow cycle POST /api/v1/animation/fire - Fire effect POST /api/v1/uv/on, /uv/pulse, /uv/strobe - UV control Full OpenAPI docs at /docs Usage
pip install -e .
dmx-controller serve --port 8000
dmx-controller demo
python -m dmx_controller serve
python -m dmx_controller.scheduling.wristband
pip install streamlit requests
python -m dmx_controller serve --schedule
streamlit run frontend.py
For Automated Startup Without Manual Intervention Run this once during setup:
chmod +x scripts/repatch_dmx_ftdi.sh
echo "$(whoami) ALL=(ALL) NOPASSWD: /bin/systemctl restart olad" | sudo tee /etc/sudoers.d/dmx-controller