5 Commits

Author SHA1 Message Date
0c6ccb90af Fix sound service audio device handling and revert to simple configuration
- Modified sound.py to handle audio device errors gracefully with retry loop
- Reverted lighting-sound.service to simple configuration without complex dependencies
- Sound service now working reliably with beat detection at ~147 BPM
- Both lighting-control and lighting-sound services running successfully at boot
2025-10-04 10:01:29 +13:00
8ad7f41d77 Add new pattern 'alternating_pulse' (ap): odd beat pulses color1 on odd bars, even beat pulses color2 on even bars; preserve existing alternating_phase; compact payloads and white guard retained 2025-10-04 01:58:02 +13:00
dc6d48a44b alternating_phase: compact per-bar overrides to stay <230 bytes; swap grouping flip; avoid pure white by sending 254,254,254 to work around strip edge-cases; add API logging improvements 2025-10-04 01:44:05 +13:00
43feb5938f backend: per-pattern parameters (n1-n4, delay) with persistence; REST responses include loaded params; logging of API inputs; alternating_phase: alternate colors between selected palette color 1/2 across bars with compact payload under 230 bytes; docs: add PER_PATTERN_PARAMETERS.md 2025-10-04 01:10:40 +13:00
Pi User
6f9133b43e Add complete REST API for lighting control
- Migrated from websockets to aiohttp for unified HTTP/WebSocket server
- Added REST endpoints: /api/pattern, /api/parameters, /api/state, /api/tempo/reset
- Implemented color palette API with 8-slot system and selected colors
- First selected color (index 0) is used as primary RGB for patterns
- All operations now available via simple HTTP requests (no WebSocket needed)
- Added comprehensive documentation: FRONTEND_API.md, COLOR_PALETTE_API.md
- Added test scripts: test_rest_api.sh, test_color_patterns.py
- Updated test/test_control_server.py for new /ws WebSocket path
- Configuration persistence via lighting_config.json
- Pattern parameters (n1-n4, brightness, delay) controllable via API
- WebSocket still available at /ws for legacy support
2025-10-03 23:38:54 +13:00