- 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
48 lines
539 B
JSON
48 lines
539 B
JSON
{
|
|
"color_palette": [
|
|
{
|
|
"r": 255,
|
|
"g": 0,
|
|
"b": 0
|
|
},
|
|
{
|
|
"r": 0,
|
|
"g": 255,
|
|
"b": 0
|
|
},
|
|
{
|
|
"r": 0,
|
|
"g": 0,
|
|
"b": 255
|
|
},
|
|
{
|
|
"r": 128,
|
|
"g": 0,
|
|
"b": 128
|
|
},
|
|
{
|
|
"r": 255,
|
|
"g": 179,
|
|
"b": 255
|
|
},
|
|
{
|
|
"r": 0,
|
|
"g": 255,
|
|
"b": 255
|
|
},
|
|
{
|
|
"r": 255,
|
|
"g": 255,
|
|
"b": 255
|
|
},
|
|
{
|
|
"r": 255,
|
|
"g": 128,
|
|
"b": 128
|
|
}
|
|
],
|
|
"selected_color_indices": [
|
|
0,
|
|
1
|
|
]
|
|
} |