Commit Graph

12 Commits

Author SHA1 Message Date
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
Pi User
e78a8727b2 Add .env support for transport and sound device configuration
- Add python-dotenv support to control_server.py and sound.py
- Load TRANSPORT from environment variable (default: spi)
- Load AUDIO_INPUT_DEVICE from environment variable (default: 7)
- Load all port configurations from environment variables
- Update .env.example with comprehensive configuration options
- Create .env file with sensible defaults for Pi
- Transport, sound device, and network settings now configurable via .env
2025-10-03 20:19:55 +13:00
Pi User
e4a83e8f0d Add segmented_movement pattern with n4 parameter support
- Add n4 parameter to control server, LED bar receiver, and test script
- Create segmented_movement pattern with alternating forward/backward movement
- Pattern supports n1 (segment length), n2 (spacing), n3 (forward speed), n4 (backward speed)
- Fix test script to send all messages instead of just the first one
- Add segmented_movement to patterns_needing_params for proper parameter transmission
- Pattern intelligently handles all cases: alternating, forward-only, backward-only, or static
- Implements repeating segments with configurable spacing across LED strip
2025-10-03 19:54:43 +13:00
Pi User
fbeb365932 pipenv: add sound-run; sound.py: --input-device flag 2025-10-01 23:31:00 +13:00
Pi User
ed35d6b838 pipenv: add send-net; networking: use SPI; add networking test 2025-10-01 23:31:00 +13:00
Pi User
f9188b694e ESP32 SPI/ESP-NOW working; add watch scripts; sender colors RGB 2025-10-01 22:56:24 +13:00
Pi User
5a05ee99a1 Add ESP32-C3 SPI slave with ESP-NOW, Raspberry Pi test tools, and updated project structure
- ESP32-C3 SPI slave project with ESP-NOW broadcast functionality
- Raspberry Pi SPI master test tools and CLI for JSON communication
- Merged src/ directory from full branch with lighting controller code
- Updated Pipfile with system install scripts and ESP32 monitoring
- Added comprehensive test suite for SPI communication
2025-10-01 21:08:28 +13:00
Pi User
aa9b5bb324 Merge full branch: bring in src/ directory and update project structure 2025-10-01 20:48:28 +13:00
937fb1f2f9 Separate UI and control logic with WebSocket communication
- Create UI client (src/ui_client.py) with MIDI controller integration
- Create control server (src/control_server.py) with lighting logic
- Implement WebSocket protocol between UI and control server
- Add startup script (start_lighting_controller.py) for all components
- Update Pipfile with new scripts for separated architecture
- Add comprehensive documentation (README_SEPARATED.md)
- Fix LED connection stability with heartbeat mechanism
- Fix UI knob display and button highlighting
- Maintain backward compatibility with existing MIDI mappings
2025-09-28 12:36:25 +13:00
ddbf4a00f4 Add run script 2025-09-08 23:17:50 +12:00
9fc58a827b Move to src. Add midi and sound 2025-09-07 21:15:42 +12:00
f302be85c0 Use Pipenv 2025-07-11 21:33:13 +12:00