Update readme with visual curve editor documentation

- Added visual curve editor section
- Updated config documentation for flat curve structure
- Added curve editor troubleshooting
- Added mode API endpoint documentation
This commit is contained in:
dawie 2026-01-30 18:54:17 +02:00
parent 12c17bf6f4
commit e2d1a8f74f

View File

@ -7,9 +7,11 @@ This usermod allows WLED to control PWM PC fans based on GPU temperature data re
- **Web API Integration**: Receives GPU temperature via HTTP API
- **Fixed Speed Mode**: Set a constant fan speed (0-100%)
- **Temperature Curve Mode**: Automatically adjusts fan speed based on temperature
- **Up to 10 Curve Points**: Define custom temperature-to-speed mappings
- **Visual Curve Editor**: Interactive web-based graph editor at `/gpu-fan.htm`
- **Up to 5 Curve Points**: Define custom temperature-to-speed mappings
- **Safety Fallback**: Automatically runs at 100% if temperature data is lost
- **WLED UI Integration**: Control and monitor from the WLED web interface
- **Live Temperature Display**: See current GPU temp and fan speed in real-time
## Hardware Requirements
@ -35,7 +37,7 @@ This usermod allows WLED to control PWM PC fans based on GPU temperature data re
### Option 1: Using platformio_override.ini (Recommended)
1. Copy `GPU_Fan_Controller.cpp` to `wled00/usermods/GPU_Fan_Controller/`
1. Copy the `GPU_Fan_Controller` folder to `wled00/usermods/`
2. Create or edit `platformio_override.ini` in the WLED root directory:
@ -53,6 +55,11 @@ custom_usermods = GPU_Fan_Controller
pio run -e esp32dev_gpu_fan -t upload
```
4. Upload the custom page (optional but recommended):
```bash
pio run -e esp32dev_gpu_fan -t uploadfs
```
### Option 2: Manual Integration
1. Copy `GPU_Fan_Controller.cpp` to `wled00/usermods/GPU_Fan_Controller/`
@ -62,6 +69,20 @@ pio run -e esp32dev_gpu_fan -t upload
-D USERMOD_GPU_FAN_CONTROLLER
```
## Visual Curve Editor
Access the visual curve editor at: `http://YOUR_WLED_IP/gpu-fan.htm`
![Curve Editor Screenshot](curve-editor.png)
Features:
- **Drag points** on the graph to adjust temperature/speed mappings
- **Live temperature indicator** shows current GPU temp on the graph
- **Real-time updates** - see fan speed change as you adjust
- **Table view** for precise value entry
- **Add/remove points** - use 2-5 curve points
- **Mode toggle** - switch between Fixed and Curve modes
## Configuration
### Via WLED Web Interface
@ -73,7 +94,9 @@ Navigate to Config → Usermods to configure:
- **mode**: 0 = Fixed, 1 = Curve
- **fixed-speed**: Speed percentage when in fixed mode
- **timeout-ms**: Temperature timeout in milliseconds (default: 10000)
- **curve**: Array of temperature/speed points
- **curve-t1 to curve-t5**: Temperature points (°C)
- **curve-s1 to curve-s5**: Speed points (%)
- **curve-points**: Number of curve points to use (2-5)
### Via JSON API
@ -83,13 +106,11 @@ Navigate to Config → Usermods to configure:
"enabled": true,
"mode": 1,
"fixed-speed": 50,
"curve-count": 4,
"curve": [
{"temp": 30, "speed": 30},
{"temp": 50, "speed": 50},
{"temp": 70, "speed": 75},
{"temp": 85, "speed": 100}
]
"curve-points": 4,
"curve-t1": 30, "curve-s1": 30,
"curve-t2": 50, "curve-s2": 50,
"curve-t3": 70, "curve-s3": 75,
"curve-t4": 85, "curve-s4": 100
}
}
```
@ -124,6 +145,21 @@ Content-Type: application/json
}
```
### Set Mode
```http
POST /json/state
Content-Type: application/json
{
"GPU-Fan": {
"mode": 1
}
}
```
Where mode: 0 = Fixed, 1 = Curve
### Get Status
```http
@ -217,6 +253,11 @@ Speeds between points are linearly interpolated.
3. Check firewall settings
4. Test with: `curl -X POST http://ESP32_IP/json/state -H "Content-Type: application/json" -d '{"GPU-Fan":{"temperature":50}}'`
### Curve not saving
1. Make sure to click "Save" in the curve editor
2. Check the browser console for errors
3. Try refreshing the page and re-saving
### WLED doesn't show the usermod
1. Ensure the build flag `-D USERMOD_GPU_FAN_CONTROLLER` is set
2. Rebuild and re-upload the firmware
@ -229,6 +270,7 @@ Speeds between points are linearly interpolated.
- **Default GPIO**: 13 (configurable)
- **Update Interval**: 2 seconds
- **Safety Timeout**: 10 seconds (runs at 100% if no temperature data)
- **Max Curve Points**: 5
## License