Docs: Document color order troubleshooting and resolution in lessons_learned.md

This commit is contained in:
Tobias J. Endres 2025-08-15 22:13:41 +02:00
parent 77059a24aa
commit 9c98604e12

View File

@ -124,7 +124,7 @@ This configuration is still primarily handled **within the WLED device itself**.
* **Total LEDs:** 30 + 20 + 70 + 20 + 41 = 181 LEDs.
* Ensure your WLED device is configured for this total number of LEDs and that the segments are correctly defined to match your physical setup.
* Enable "UDP Realtime" in your WLED settings and ensure it's listening on port 4048 (or the port you specify with `-p`).
* Enable "UDP Realtime" in WLED settings and ensure it's listening on port 4048 (or the port you specify with `-p`).
**Summary of what you need to do for testing:**
@ -134,3 +134,18 @@ This configuration is still primarily handled **within the WLED device itself**.
* Enable "UDP Realtime" in WLED settings and confirm it's listening on the correct port (default 4048).
2. **Build the Grabber:** You will need to compile the modified `Hyperion_Grabber_X11_QT` project.
3. **Run the Grabber:** Execute the compiled application with the appropriate WLED IP address and port.
### Color Order Troubleshooting and Resolution
**Problem:** Initial tests showed only red LEDs, despite sending a sequence of red, green, blue, white, and black.
**Diagnosis:**
* WLED's `/json/cfg` endpoint showed `hw.led.ins[0].order: 0`, which typically means **RGB** color order.
* Our `WledClient` was initially sending RGB, but then a test was performed with a GRB swap based on user input. This caused a mismatch.
**Resolution:**
* Reverted the R and G channel swap in `wledclient.cpp` to ensure data is sent in **RGB** order.
* Confirmed that WLED is listening on UDP port `21324` for Realtime data (from `/json/cfg` `if.sync.port0`).
* After rebuilding and re-running `wled_test`, the LEDs successfully displayed the full color sequence (Red, Green, Blue, White, Black) as expected.
**Conclusion:** The issue was a mismatch between the sent color order (RGB) and the WLED's expected color order (RGB, confirmed by configuration). The `wled_test` program now correctly demonstrates full color control.