- Replace segment-based calibration with core parameters (leds_top/right/bottom/left); segments are now derived at runtime via lookup tables - Fix clockwise/counterclockwise edge traversal order for all 8 start_position/layout combinations (e.g. bottom_left+clockwise now correctly goes up-left first) - Add pixel layout preview overlay with color-coded edges, LED index labels, direction arrows, and start position marker - Move "Add New Device" form into a modal dialog triggered by "+" button - Add display index selector to device settings modal - Migrate from requirements.txt to pyproject.toml for dependency management - Update Dockerfile and docs to use `pip install .` Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
6.1 KiB
Installation Guide
Complete installation guide for WLED Screen Controller server and Home Assistant integration.
Table of Contents
Server Installation
Option 1: Python (Development/Testing)
Requirements:
- Python 3.11 or higher
- Windows, Linux, or macOS
Steps:
-
Clone the repository:
git clone https://github.com/yourusername/wled-screen-controller.git cd wled-screen-controller/server -
Create virtual environment:
python -m venv venv # Windows venv\Scripts\activate # Linux/Mac source venv/bin/activate -
Install dependencies:
pip install . -
Configure (optional): Edit
config/default_config.yamlto customize settings. -
Run the server:
# Set PYTHONPATH export PYTHONPATH=$(pwd)/src # Linux/Mac set PYTHONPATH=%CD%\src # Windows # Start server uvicorn wled_controller.main:app --host 0.0.0.0 --port 8080 -
Verify: Open http://localhost:8080/docs in your browser.
Option 2: Docker (Recommended for Production)
Requirements:
- Docker
- Docker Compose
Steps:
-
Clone the repository:
git clone https://github.com/yourusername/wled-screen-controller.git cd wled-screen-controller/server -
Start with Docker Compose:
docker-compose up -d -
View logs:
docker-compose logs -f -
Verify: Open http://localhost:8080/docs in your browser.
Option 3: Docker (Manual Build)
cd server
docker build -t wled-screen-controller .
docker run -d \
--name wled-controller \
-p 8080:8080 \
-v $(pwd)/data:/app/data \
-v $(pwd)/logs:/app/logs \
--network host \
wled-screen-controller
Home Assistant Integration
Option 1: HACS (Recommended)
-
Install HACS if not already installed:
- Follow instructions at https://hacs.xyz/docs/setup/download
-
Add Custom Repository:
- Open HACS in Home Assistant
- Click the three dots menu → Custom repositories
- Add URL:
https://github.com/yourusername/wled-screen-controller - Category: Integration
- Click Add
-
Install Integration:
- In HACS, search for "WLED Screen Controller"
- Click Download
- Restart Home Assistant
-
Configure Integration:
- Go to Settings → Devices & Services
- Click "+ Add Integration"
- Search for "WLED Screen Controller"
- Enter your server URL (e.g.,
http://192.168.1.100:8080) - Click Submit
Option 2: Manual Installation
-
Download Integration:
cd /config # Your Home Assistant config directory mkdir -p custom_components -
Copy Files: Copy the
custom_components/wled_screen_controllerfolder to your Home Assistantcustom_componentsdirectory. -
Restart Home Assistant
-
Configure Integration:
- Go to Settings → Devices & Services
- Click "+ Add Integration"
- Search for "WLED Screen Controller"
- Enter your server URL
- Click Submit
Quick Start
1. Start the Server
cd wled-screen-controller/server
docker-compose up -d
2. Attach Your WLED Device
curl -X POST http://localhost:8080/api/v1/devices \
-H "Content-Type: application/json" \
-d '{
"name": "Living Room TV",
"url": "http://192.168.1.100",
"led_count": 150
}'
3. Configure in Home Assistant
- Add the integration (see above)
- Your WLED devices will appear automatically
- Use the switch to turn processing on/off
- Use the select to choose display
- Monitor FPS and status via sensors
4. Start Processing
Either via API:
curl -X POST http://localhost:8080/api/v1/devices/{device_id}/start
Or via Home Assistant:
- Turn on the "{Device Name} Processing" switch
5. Enjoy Ambient Lighting!
Your WLED strip should now sync with your screen content!
Troubleshooting
Server Won't Start
Check Python version:
python --version # Should be 3.11+
Check dependencies:
pip list | grep fastapi
Check logs:
# Docker
docker-compose logs -f
# Python
tail -f logs/wled_controller.log
Home Assistant Integration Not Appearing
- Check HACS installation
- Clear browser cache
- Restart Home Assistant
- Check Home Assistant logs:
- Settings → System → Logs
- Search for "wled_screen_controller"
Can't Connect to Server from Home Assistant
-
Verify server is running:
curl http://YOUR_SERVER_IP:8080/health -
Check firewall rules
-
Ensure Home Assistant can reach server IP
-
Try http:// not https://
WLED Device Not Responding
-
Check WLED device is powered on
-
Verify IP address is correct
-
Test WLED directly:
curl http://YOUR_WLED_IP/json/info -
Check network connectivity
Low FPS / Performance Issues
- Reduce target FPS (Settings → Devices)
- Reduce
border_widthin settings - Check CPU usage on server
- Consider reducing LED count
Configuration Examples
Server Environment Variables
# Docker .env file
WLED_SERVER__HOST=0.0.0.0
WLED_SERVER__PORT=8080
WLED_SERVER__LOG_LEVEL=INFO
WLED_PROCESSING__DEFAULT_FPS=30
WLED_PROCESSING__BORDER_WIDTH=10
Home Assistant Automation Example
automation:
- alias: "Auto Start WLED on TV On"
trigger:
- platform: state
entity_id: media_player.living_room_tv
to: "on"
action:
- service: switch.turn_on
target:
entity_id: switch.living_room_tv_processing
- alias: "Auto Stop WLED on TV Off"
trigger:
- platform: state
entity_id: media_player.living_room_tv
to: "off"
action:
- service: switch.turn_off
target:
entity_id: switch.living_room_tv_processing