Commit Graph

79 Commits

Author SHA1 Message Date
3ee7b74152 fix(api): stabilize palette and preset endpoints
Made-with: Cursor
2026-03-21 23:15:08 +13:00
98bbdcbb3d chore: add dev watch command to Pipfile scripts
Made-with: Cursor
2026-03-21 23:15:00 +13:00
a2abd3e833 data: refresh db JSON fixtures
Made-with: Cursor
2026-03-21 20:17:33 +13:00
550217c443 ui: data-bwignore on AP password fields for password managers
Made-with: Cursor
2026-03-21 20:17:33 +13:00
2d2032e8b9 esp32: log startup and UART receive for debugging
Made-with: Cursor
2026-03-21 20:17:33 +13:00
81bf4dded5 docs: update msg.json example payload
Made-with: Cursor
2026-03-21 20:17:33 +13:00
a75e27e3d2 feat: device model, API, static UI, and endpoint tests
Made-with: Cursor
2026-03-21 20:17:33 +13:00
13538c39a6 tests: skip browser tests when no driver; try Firefox after Chrome
Made-with: Cursor
2026-03-21 20:17:33 +13:00
7b724e9ce1 tests: point model tests at db/ and align palette assertions
Made-with: Cursor
2026-03-21 20:17:33 +13:00
aaca5435e9 chore: gitignore local settings.json (session secret)
Made-with: Cursor
2026-03-21 20:17:33 +13:00
b64dacc1c3 Stop ignoring esp32; drop esp32 rules from .gitignore
Made-with: Cursor
2026-03-21 20:08:24 +13:00
8689bdb6ef Restore esp32 MicroPython sources (main, benchmark_peers)
Adjust .gitignore to ignore esp32/* except *.py so firmware .bin stays untracked.

Made-with: Cursor
2026-03-21 19:59:52 +13:00
c178e87966 Ignore esp32 folder 2026-03-21 19:53:19 +13:00
dfe7ae50d2 Add led-tool and led-driver submodules 2026-03-21 19:52:59 +13:00
8e87559af6 Add led-tool and led-driver as submodules 2026-03-21 19:52:14 +13:00
aa3546e9ac Remove obsolete scripts and root config files
Drop clear-debug-log, install, run_web, send_empty_json, esp32 helpers,
and root msg.json/settings.json in favor of current layout.

Made-with: Cursor
2026-03-21 19:47:29 +13:00
b56af23cbf Add scripts: start, copy ESP32 main, install boot service
Made-with: Cursor
2026-03-15 23:43:27 +13:00
ac9fca8d4b Pi port: serial transport, addressed ESP-NOW bridge, port 80
- Run app on Raspberry Pi: serial to ESP32 bridge at 912000 baud, /dev/ttyS0
- Remove ESP-NOW/MicroPython-only code from src (espnow, p2p, wifi, machine/Pin)
- Transport: always send 6-byte MAC + payload; optional to/destination_mac in API and WebSocket
- Settings and model DB use project paths (no root); fix sys.print_exception for CPython
- Preset/settings controllers use get_current_sender(); template paths for cwd=src
- Pipfile: run from src, PORT from env; scripts for port 80 (setcap) and test
- ESP32 bridge: receive 6-byte addr + payload, LRU peer management (20 max), handle ESP_ERR_ESPNOW_EXIST
- Add esp32/main.py, esp32/benchmark_peers.py, scripts/setup-port80.sh, scripts/test-port80.sh

Made-with: Cursor
2026-03-15 17:16:07 +13:00
0fdc11c0b0 ESP-NOW: STA interface, notify browser on send failure
- Activate STA interface before ESP-NOW to fix ESP_ERR_ESPNOW_IF
- Notify browser on send failure: WebSocket sends error JSON; preset API returns 503
- Use exceptions for failure (not return value) to avoid false errors when send succeeds
- presets.js: handle server error messages in WebSocket onmessage

Made-with: Cursor
2026-03-08 23:47:55 +13:00
91bd78ab31 Add favicon route and minor cleanup
- Add /favicon.ico route (204) to avoid browser 404
- CSS formatting tweaks
- Pipfile trailing newline

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-20 11:49:11 +13:00
2be0640622 Remove WiFi station (client) support
- Drop station connect/status/credentials from wifi util and settings API
- Remove station activation from main
- Remove station UI and JS from index, settings template, and help.js
- Device settings now only configure WiFi Access Point

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-20 11:49:04 +13:00
0e96223bf6 Send tab defaults with presets.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-08 19:40:22 +13:00
d8b33923d5 Fix heartbeat LED pin.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-08 19:40:14 +13:00
4ce515be1c Update Python dependencies for device tooling.
This adds ampy support and refreshes lockfile versions.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-08 13:51:28 +13:00
f88bf03939 Update browser tests for mobile preset layout.
This keeps UI checks aligned with the new tab/preset flows.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-08 13:51:21 +13:00
7cd4a91350 Add favicon handler and heartbeat LED blink.
This keeps the UI console clean and makes device status visible.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-08 13:51:15 +13:00
d907ca37ad Refresh tabs/presets UI and add a mobile menu.
This improves navigation and profile workflows on smaller screens.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-08 13:51:09 +13:00
6c6ed22dbe Scope presets to active profiles and support cloning.
This keeps data isolated per profile while letting users duplicate setups quickly.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-08 13:51:02 +13:00
00514f0525 Add in-app settings menu and fix settings API
Move WiFi and device name configuration into a modal menu, reuse existing settings endpoints, and harden settings serialization and startup for MicroPython.
2026-01-29 00:54:20 +13:00
cf1d831b5a Align controller backend and data with new presets
Update palettes, profiles, tabs, preset sending, and ESPNow message format to match the new preset defaults and driver short-field schema.
2026-01-29 00:04:23 +13:00
fd37183400 Update frontend for presets, tabs, and help
Align frontend with new preset ID usage and shortened driver fields, improve tab/preset interactions, and refine help and editor UI.
2026-01-28 23:27:50 +13:00
5fdeb57b74 Extend endpoint and browser tests for ESPNow and UI
Add coverage for /presets/send and updated tab/preset UI workflows in HTTP and Selenium tests.
2026-01-28 04:44:41 +13:00
1576383d09 Update tab UI, presets interactions, and help
Refine tab presets selection and editing, add per-tab removal, improve layout, and provide an in-app help modal.
2026-01-28 04:44:30 +13:00
8503315bef Add ESPNow preset send backend support
Implement ESPNow helper model, WebSocket forwarding, and /presets/send endpoint that chunks and broadcasts presets to devices.
2026-01-28 04:43:45 +13:00
928263fbd8 Remove Python cache files from version control
- Remove __pycache__ directories that should not be tracked
- These are now ignored via .gitignore
2026-01-27 13:05:22 +13:00
7e33f7db6a Add additional configuration and utility files
- Add install script and message configuration
- Add settings controller and templates
- Add ESP-NOW message utility
- Update API documentation
2026-01-27 13:05:09 +13:00
e74ef6d64f Update main application and dependencies
- Update main.py and run_web.py for local development
- Update microdot session handling
- Update wifi utility
2026-01-27 13:05:07 +13:00
3ed435824c Add Selenium dependency for browser tests 2026-01-27 13:05:04 +13:00
d7fabf58a4 Fix MicroPython compatibility issues in Model class
- Fix JSONDecodeError handling (use ValueError for MicroPython)
- Fix sys.print_exception argument issues
- Improve error handling in load() method
- Add proper file persistence with flush() and os.sync()
2026-01-27 13:05:02 +13:00
a7e921805a Update controllers to return JSON and fix parameter handling
- Fix decorator parameter order issues with @with_session
- Return JSON responses instead of HTML fragments
- Add proper error handling with JSON error responses
- Fix route parameter conflicts in delete and update endpoints
2026-01-27 13:05:01 +13:00
c56739c5fa Refactor UI to use JavaScript instead of HTMX
- Replace HTMX with plain JavaScript for tab management
- Consolidate tab UI into single button like profiles
- Add cookie-based current tab storage (client-side)
- Update profiles.js to work with new JSON response format
2026-01-27 13:05:00 +13:00
fd52e40d17 Add endpoint tests and consolidate test directory
- Add HTTP endpoint tests to mimic browser interactions
- Move old test files from test/ to tests/ directory
- Add comprehensive endpoint tests for tabs, profiles, presets, patterns
- Add README documenting test structure and how to run tests
2026-01-27 13:04:56 +13:00
f48c8789c7 Add browser automation tests for UI workflows
- Add Selenium-based browser tests for tabs, profiles, presets, and color palette
- Test drag and drop functionality for presets in tabs
- Include cleanup functionality to remove test data after tests
- Tests run against device at 192.168.4.1
2026-01-27 13:04:54 +13:00
80ff216e54 Update preset format with n7/n8 parameters
- Add n7 and n8 fields to preset definitions
- Update preset data format
2026-01-17 21:40:38 +13:00
1fb3dee942 Update tab storage to 2D grid format
- Change presets from flat array to 2D grid layout
- Add presets_flat array for backward compatibility
- Support 3-column grid layout for preset positioning
2026-01-17 21:40:37 +13:00
a4502055fb Add test utilities and scripts
- Add test directory with main.py, p2p.py, ws.py
- Add send_empty_json.py WebSocket test script
2026-01-17 21:40:11 +13:00
6e61ec8de6 Add P2P communication module
- Implement ESP-NOW async communication
- Support sending string, dict, or bytes data
- Use asend for async broadcast messaging
2026-01-17 21:40:10 +13:00
48d02f0e70 Update watch script path in Pipfile
- Fix watch script to use relative paths
2026-01-17 21:40:08 +13:00
cacaa3505e Add pattern definitions endpoint
- Add /definitions endpoint to pattern controller
- Load pattern.json with fallback paths for local dev and MicroPython
2026-01-17 21:40:07 +13:00
97ffc69b12 Add drag-and-drop for presets and colors, max_colors validation, and 2D grid layout
- Add drag-and-drop to reorder presets in tabs (2D grid layout)
- Add drag-and-drop to reorder colors within presets
- Add max_colors field to pattern definitions
- Hide color section when max_colors is 0
- Validate color count against pattern max_colors limit
- Store presets in 2D grid format (3 columns)
- Remove left panel from tab content, show only presets
- Update color palette to show swatches instead of hex codes
- Improve preset editor UI with visual color swatches
2026-01-17 00:58:50 +13:00