47 Commits

Author SHA1 Message Date
9cf1855b51 UI: Add rate limiting to brightness control
- Add 100ms minimum interval between brightness updates to backend
- Keep UI responsive with immediate local brightness updates
- Prevent backend overload from rapid MIDI CC33 changes
- Add time import for rate limiting functionality
- Add debug output to show when updates are sent vs rate limited
- Improve smoothness and reduce network traffic
- Protect lighting controller from too many rapid parameter changes
2025-10-04 10:02:47 +13:00
763a2053ad UI: Remove knobs section and make window responsive
- Remove knobs section (CC38-45) to simplify interface
- Make window fit screen with cross-platform maximization
- Use weight-based grid resizing instead of fixed minimum sizes
- Add responsive layout with expandable frames
- Fix Linux compatibility for window maximization
- Disable window geometry loading to maintain maximized state
- Elements now resize proportionally to fit any screen size
- Cleaner, more focused interface without redundant controls
2025-10-04 09:53:48 +13:00
324fa463be UI: Make all elements 50% bigger for better touch interface
- Increase window size from 1800x1200 to 2700x1800
- Scale all font sizes by 50% (14pt → 21pt, 12pt → 18pt, etc.)
- Make all buttons and controls 50% larger
- Increase grid minimum sizes from 140x70 to 210x105
- Scale button dimensions from 14x4 to 21x6 characters
- Increase padding and spacing by 50% (6px → 9px)
- Make border widths thicker (2px → 3px)
- Improve touch-friendliness and readability
- Maintain proportional scaling across all UI elements
2025-10-04 09:29:59 +13:00
aaf515d8f4 UI: Fix MIDI dropdown contrast and device detection
- Improve MIDI dropdown contrast with better colors (#FFFFFF text on #2C2C2C background)
- Add bold font and larger size for better visibility
- Fix MIDI device detection to show all available devices
- Add port validation to only show accessible MIDI devices
- Use direct widget reference instead of searching for dropdown
- Add delayed initialization to ensure UI is ready before populating dropdown
- Improve debugging output for MIDI port detection
- Add placeholder text 'No MIDI device selected' when no devices available
- Restore window geometry persistence for proper window positioning
2025-10-04 09:20:14 +13:00
7beca0cf53 UI: improve MIDI Combobox contrast in dark theme (field/list colors, selection highlight) 2025-10-04 02:16:35 +13:00
ace47b7835 UI: default CONTROL_SERVER_URI -> ws://10.42.0.1:8765 2025-10-04 02:13:21 +13:00
9045b10631 UI: MIDI 44–47 -> Color 2, 48–51 -> Color 1; label 'alternating' as 'alternating pulse'; MIDI note 39 sends 'ap'; fix async UI scheduler usage (no create_task) 2025-10-04 02:09:55 +13:00
f2e775f6f5 UI: replace 'on' with pattern 'alternating_phase' (MIDI note 36, grid label/icons); remove WebSocket usage; per-pattern parameters with state hydration; REST-only palette/state/parameters 2025-10-04 01:01:32 +13:00
a654527dc3 UI: Color palette REST integration, MIDI 44–51 color slot selection, Color 1/2 previews with next indicator and click-to-select target; use REST for pattern changes and parameter updates (brightness, delay, n1–n3); send colors only on confirm; load palette on startup; fix NoneType await issue in async handlers 2025-10-03 23:40:20 +13:00
Pi User
0906cb22e6 Add .env file support for UI client configuration
- Use python-dotenv to load environment variables
- Add CONTROL_SERVER_URI environment variable for WebSocket connection
- Create .env.example with configuration examples
- Update Pipfile to include python-dotenv dependency
- Allows easy configuration for running UI on desktop pointing to Pi
2025-10-03 20:08:36 +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
f4e9f8fff7 fix: prioritize delay_change in control server test 2025-10-02 20:49:20 +13:00
Pi User
d57fce77fb update: misc changes 2025-10-01 23:31:00 +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
1844a2e4c5 Update SPI JSON sender to led-bar format: {"settings":{...}, "save":false} and tooling scripts 2025-10-01 21:34:29 +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
ed5bbb8c18 Add MIDI device persistence functionality
- Add configuration file system to remember MIDI device selection
- Load saved MIDI device preference on application startup
- Automatically save MIDI device selection when changed
- Handle device disconnection gracefully with fallback
- Smart initialization with validation and error handling
- Create config.json for storing device preferences
- Improve user experience by eliminating need to re-select device
2025-09-27 23:29:06 +12:00
f9c3d08b0f Add MIDI controller dropdown selection
- Add MIDI port detection and listing functionality
- Create dropdown widget for MIDI controller selection in GUI
- Implement dynamic MIDI controller switching without restart
- Add refresh button to scan for new MIDI devices
- Add status indicator showing connection status
- Add comprehensive error handling for MIDI operations
- Fix initialization timing issues with GUI widgets
- Support graceful fallback when no MIDI devices available
2025-09-27 23:11:42 +12:00
e5cf15d7b0 Fix rainbow pattern step range in lighting controller
- Change step calculation from beat_index % 2 to beat_index % 256
- Provides full 0-255 step range for rainbow pattern color cycling
- Fixes rainbow pattern that was limited to only 0 or 1 step values
- Alternating phase patterns still use % 2 for proper phase offset
2025-09-19 01:29:08 +12:00
c40b5629bf Fix pattern highlighting in lighting controller GUI
- Add pattern name mapping to translate between MIDI handler names and GUI display names
- Fixes highlighting for patterns with underscores (sequential_pulse, alternating_phase, n_chase)
- Now properly highlights selected patterns in the button grid
2025-09-19 01:15:29 +12:00
a4a00021d8 Fix missing n3 attribute and async function issue
- Add missing self.n3 = 1 attribute to MidiHandler initialization
- Fix update_rgb async function to properly yield control with await asyncio.sleep(0)
- Resolves TypeError about expecting coroutine but getting None
- Application now working properly with buttons and dials functional
2025-09-19 00:07:37 +12:00
f2dcdabf29 Fix indentation errors and reduce debug output
- Comment out all debug logging statements to reduce console noise
- Fix empty if/else blocks by adding pass statements
- Remove beat logging, TCP server logging, and MIDI debug messages
- Keep only essential info, warning, and error messages
- Revert radiate delay separation back to using main delay parameter
2025-09-19 00:02:51 +12:00
5f7db51851 Add rate-limited parameter updates and message type system
- Rate limit parameter updates to 100ms minimum interval
- Send immediate updates if rate limit allows, otherwise queue
- Process pending updates during beat handling
- All knob changes (CC30-37) now trigger parameter updates
- Add message type field: 'b' for beats, 'u' for updates
- Optimize message type to single letters to save packet space
- Prevents ESP-NOW network flooding during rapid knob adjustments
- All packets stay under 230-byte limit with automatic splitting
2025-09-18 22:11:17 +12:00
fcbe9e9094 Implement full parameter sending on pattern change and periodic updates
- Send all parameters when pattern changes (may require 2 packets if >200 bytes)
- Send periodic parameter updates every 8 beats to keep bars synchronized
- Beat packets remain minimal for performance
- All packets stay under 230-byte limit
2025-09-18 21:58:39 +12:00
36dfda74b2 Update GUI layout and MIDI CC mappings: CC36=n3, CC37=delay, remove B1/B2 references 2025-09-18 20:35:31 +12:00
8d0c9edf5d ws: adopt nested {'0': {...}} payloads
midi: bind patterns to notes 36+; beat triggers selected pattern; include n index; CC map: 30=R 31=G 32=B 33=brightness 34=n1 35=n2 36=delay; send n1/n2 raw 0-127

gui: show n1 and n2 in status
2025-09-17 20:22:11 +12:00
1da2e30d4c midi: init read of CCs on startup (delay, brightness, RGB, beat enable); track bpm/pattern for GUI\nmain: integrate MidiHandler; add status panel for delay/brightness/RGB/pattern/BPM 2025-09-14 05:23:46 +12:00
9ff38aa875 midi: add CC29 tempo reset, CC37 brightness; local beat flag; logging\nsound: add control server with RESET_TEMPO; logging; always send BPM 2025-09-14 04:53:24 +12:00
3b869851b8 Add patterns 2025-09-09 21:40:27 +12: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
b77b29415c Make colors bigger and add more Y padding 2025-07-12 14:21:33 +12:00
5b248a5726 Add temple of techno settings 2025-07-12 10:38:54 +12:00
62611c73c9 Add extra patterns that use a single color 2025-07-12 10:38:33 +12:00
f7f7acbdbf Intial version 2025-07-12 01:18:04 +12:00
c77fd30f8f Done a heap 2025-07-12 00:55:30 +12:00
65774837c7 Change to websocket 2025-07-11 21:33:50 +12:00
f302be85c0 Use Pipenv 2025-07-11 21:33:13 +12:00
910c225542 Inital working version 2025-05-18 22:10:14 +12:00
9d35fb5002 Add config 2025-01-04 19:44:13 +13:00
cc45c919f5 Ignore venv, pycache and config 2025-01-04 19:43:23 +13:00
161fd5e12f Add multiple servers 2024-08-30 17:35:26 +12:00
d1b9de736f Initial commit 2024-08-30 17:23:16 +12:00