Skip to content

Restructured WLED, Added mDNS stupport for WLED.#237

Merged
nebhead merged 13 commits intonebhead:developmentfrom
VoidLock:development
Sep 5, 2025
Merged

Restructured WLED, Added mDNS stupport for WLED.#237
nebhead merged 13 commits intonebhead:developmentfrom
VoidLock:development

Conversation

@VoidLock
Copy link
Contributor

@VoidLock VoidLock commented Sep 4, 2025

This pull request introduces a major enhancement to WLED integration in PiFire, adding support for profile-based control and a new "Suggested Presets" feature. These changes improve how LED notifications are managed, provide more flexible configuration options, and add new API endpoints for device discovery and profile management. System reboot/shutdown logic is also improved for reliability.

WLED Integration & Notification Improvements

  • Added support for profile-based WLED control, with new settings for enabling profiles, configuring profile numbers for each grill state, and disabling legacy preset modes by default. (common/common.py, blueprints/settings/routes.py) [1] [2]
  • Introduced the "Suggested Presets" feature, allowing PiFire to directly control WLED LED colors and effects based on grill state and events, with user-configurable options for color, brightness, LED count, and night mode. (common/common.py, blueprints/settings/routes.py, docs/WLED_Suggested_Presets.md) [1] [2] [3]

API Extensions for WLED

  • Added new API endpoints for discovering WLED devices on the network, pushing PiFire profiles to WLED, and testing WLED profiles directly from the API. (blueprints/api/routes.py) [1] [2]
  • Updated requirements to include zeroconf for network device discovery. (auto-install/requirements.txt)

System Reliability Enhancements

  • Improved system reboot, shutdown, and supervisor restart logic to use systemd commands with proper error handling and background threading, increasing robustness and compatibility. (common/common.py, blueprints/mobile/socket_io.py) [1] [2]

Introduces a 'Suggested Presets' system for WLED integration, providing automatic LED behaviors for grill states and events. Updates settings backend and UI to support new configuration options, enhances WLED handler with direct color/effect control, adds comprehensive documentation, and includes a test script for validation. Backward compatibility with traditional presets is maintained.
… reboot, shutdown, and restart functions with improved error handling and background execution. Add sudo permissions setup script for seamless operation.
…upport

- Implemented mDNS/Bonjour and HTTP queries for discovering WLED devices.
- Added new API endpoint `/api/wled_discover` for device discovery.
- Enhanced settings UI with a "Find WLED Devices" button and results display.
- Included error handling and user feedback for discovery process.
- Updated requirements to include `zeroconf` package for mDNS support.
- Added profile-based control system to manage WLED LED behaviors based on PiFire states and events.
- Introduced WLEDProfileManager class for handling profile creation, updates, and activations.
- Updated WLED notification handler to support multiple control modes: profile-based, suggested presets, and traditional.
- Defined LED profiles for various PiFire states (e.g., Idle, Booting, Cooking) with customizable settings.
- Implemented API endpoints for pushing profiles to WLED devices and testing profile activations.
- Enhanced error handling and logging for better debugging and monitoring.
- Updated documentation to reflect new profile-based control features and usage instructions.
@nebhead nebhead merged commit 2dff828 into nebhead:development Sep 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants