From 190c8bc9828ae2f4b6b057322e550391dbd0d8c6 Mon Sep 17 00:00:00 2001 From: jimmy Date: Wed, 4 Nov 2026 20:47:00 +1300 Subject: [PATCH] feat: seed a default profile at first boot A store with no profile gets a default one, using the seed POST /profiles already creates plus a starter palette. db/ now holds those records instead of stored data, and the unused db/presets/*.bin files are gone. Co-Authored-By: Claude Opus 5.5 --- README.md | 2 +- db/device.json | 2 +- db/group.json | 2 +- db/output.json | 2 +- db/palette.json | 2 +- db/preset.json | 2 +- db/presets/1.bin | Bin 127 -> 0 bytes db/presets/10.bin | 3 --- db/presets/11.bin | 2 -- db/presets/12.bin | 1 - db/presets/13.bin | 2 -- db/presets/14.bin | 2 -- db/presets/15.bin | Bin 145 -> 0 bytes db/presets/2.bin | Bin 118 -> 0 bytes db/presets/3.bin | 2 -- db/presets/30.bin | 2 -- db/presets/31.bin | Bin 126 -> 0 bytes db/presets/32.bin | 2 -- db/presets/33.bin | 1 - db/presets/34.bin | Bin 126 -> 0 bytes db/presets/35.bin | 2 -- db/presets/36.bin | 1 - db/presets/37.bin | Bin 150 -> 0 bytes db/presets/38.bin | Bin 162 -> 0 bytes db/presets/39.bin | 3 --- db/presets/4.bin | Bin 170 -> 0 bytes db/presets/40.bin | 4 ---- db/presets/41.bin | 2 -- db/presets/42.bin | 2 -- db/presets/43.bin | Bin 166 -> 0 bytes db/presets/44.bin | 2 -- db/presets/45.bin | 3 --- db/presets/46.bin | 3 --- db/presets/47.bin | 2 -- db/presets/48.bin | 2 -- db/presets/49.bin | 2 -- db/presets/5.bin | Bin 140 -> 0 bytes db/presets/50.bin | 2 -- db/presets/51.bin | Bin 146 -> 0 bytes db/presets/52.bin | Bin 156 -> 0 bytes db/presets/53.bin | 2 -- db/presets/54.bin | 3 --- db/presets/55.bin | 4 ---- db/presets/56.bin | 1 - db/presets/57.bin | 1 - db/presets/58.bin | 2 -- db/presets/59.bin | 3 --- db/presets/6.bin | 2 -- db/presets/60.bin | 4 ---- db/presets/61.bin | Bin 149 -> 0 bytes db/presets/62.bin | 3 --- db/presets/7.bin | 3 --- db/presets/8.bin | Bin 143 -> 0 bytes db/presets/9.bin | 2 -- db/profile.json | 2 +- db/scene.json | 23 +------------------- db/sequence.json | 2 +- db/zone.json | 2 +- docs/API.md | 2 +- main/api.c | 1 + main/api_util.h | 1 + main/res_profile.c | 53 ++++++++++++++++++++++++++++++++------------- 62 files changed, 51 insertions(+), 124 deletions(-) delete mode 100644 db/presets/1.bin delete mode 100644 db/presets/10.bin delete mode 100644 db/presets/11.bin delete mode 100644 db/presets/12.bin delete mode 100644 db/presets/13.bin delete mode 100644 db/presets/14.bin delete mode 100644 db/presets/15.bin delete mode 100644 db/presets/2.bin delete mode 100644 db/presets/3.bin delete mode 100644 db/presets/30.bin delete mode 100644 db/presets/31.bin delete mode 100644 db/presets/32.bin delete mode 100644 db/presets/33.bin delete mode 100644 db/presets/34.bin delete mode 100644 db/presets/35.bin delete mode 100644 db/presets/36.bin delete mode 100644 db/presets/37.bin delete mode 100644 db/presets/38.bin delete mode 100644 db/presets/39.bin delete mode 100644 db/presets/4.bin delete mode 100644 db/presets/40.bin delete mode 100644 db/presets/41.bin delete mode 100644 db/presets/42.bin delete mode 100644 db/presets/43.bin delete mode 100644 db/presets/44.bin delete mode 100644 db/presets/45.bin delete mode 100644 db/presets/46.bin delete mode 100644 db/presets/47.bin delete mode 100644 db/presets/48.bin delete mode 100644 db/presets/49.bin delete mode 100644 db/presets/5.bin delete mode 100644 db/presets/50.bin delete mode 100644 db/presets/51.bin delete mode 100644 db/presets/52.bin delete mode 100644 db/presets/53.bin delete mode 100644 db/presets/54.bin delete mode 100644 db/presets/55.bin delete mode 100644 db/presets/56.bin delete mode 100644 db/presets/57.bin delete mode 100644 db/presets/58.bin delete mode 100644 db/presets/59.bin delete mode 100644 db/presets/6.bin delete mode 100644 db/presets/60.bin delete mode 100644 db/presets/61.bin delete mode 100644 db/presets/62.bin delete mode 100644 db/presets/7.bin delete mode 100644 db/presets/8.bin delete mode 100644 db/presets/9.bin diff --git a/README.md b/README.md index 5c0e009..8424260 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ make test-browser HOST= # Selenium UI tests (needs selenium and chromedriv - `led-driver/` (submodule): MicroPython firmware for the ESP32 LED drivers. - `led-tool/` (submodule): `led-cli`, configures drivers over serial and updates the controller over Ethernet (`led-cli --ota HOST`). - `led-simulator/` (submodule), `espnow-sender/`: test helpers. -- `db/`: stored zones, presets and devices, importable with `PUT /db/`. +- `db/`: the records a controller starts with (the `default` profile the firmware seeds at first boot, plus pattern metadata), importable with `PUT /db/`. - `test/api/`: the API tests (`test/api/README.md`); `test/browser/`: the UI tests. ## Docs diff --git a/db/device.json b/db/device.json index afa437a..9e26dfe 100644 --- a/db/device.json +++ b/db/device.json @@ -1 +1 @@ -{"e8f60a16e074": {"id": "e8f60a16e074", "name": "mirror", "type": "led", "transport": "wifi", "address": "192.168.1.199", "default_pattern": null, "zones": []}, "e8f60a16d51c": {"id": "e8f60a16d51c", "name": "mirror", "type": "led", "transport": "wifi", "address": "192.168.1.77", "default_pattern": null, "zones": []}, "e8f60a170d68": {"id": "e8f60a170d68", "name": "mirror", "type": "led", "transport": "wifi", "address": "192.168.1.217", "default_pattern": null, "zones": []}, "588c81a1182c": {"id": "588c81a1182c", "name": "dj", "type": "led", "transport": "wifi", "address": "192.168.1.114", "default_pattern": null, "zones": []}, "dcb4d99988c8": {"id": "dcb4d99988c8", "name": "roof", "type": "led", "transport": "wifi", "address": "192.168.1.158", "default_pattern": null, "zones": []}, "48f6ee2097c0": {"id": "48f6ee2097c0", "name": "roof", "type": "led", "transport": "wifi", "address": "192.168.1.246", "default_pattern": null, "zones": []}, "48f6ee211d8c": {"id": "48f6ee211d8c", "name": "roof", "type": "led", "transport": "wifi", "address": "192.168.1.55", "default_pattern": null, "zones": []}, "dcb4d99b0e34": {"id": "dcb4d99b0e34", "name": "roof", "type": "led", "transport": "wifi", "address": "192.168.1.167", "default_pattern": null, "zones": []}, "588c81a337fc": {"id": "588c81a337fc", "name": "inner", "type": "led", "transport": "wifi", "address": "192.168.1.110", "default_pattern": null, "zones": []}, "588c81a32e1c": {"id": "588c81a32e1c", "name": "outer", "type": "led", "transport": "wifi", "address": "192.168.1.250", "default_pattern": null, "zones": []}, "e8f60a16f288": {"id": "e8f60a16f288", "name": "mirror", "type": "led", "transport": "wifi", "address": "192.168.1.249", "default_pattern": null, "zones": []}, "e4b323c53870": {"id": "e4b323c53870", "name": "speaker1", "type": "led", "transport": "wifi", "address": "192.168.1.23", "default_pattern": null, "zones": []}, "e8f60a16eba4": {"id": "e8f60a16eba4", "name": "speaker2", "type": "led", "transport": "wifi", "address": "192.168.1.31", "default_pattern": null, "zones": []}, "e8f60a1707c0": {"id": "e8f60a1707c0", "name": "speaker3", "type": "led", "transport": "wifi", "address": "192.168.1.134", "default_pattern": null, "zones": []}, "e8f60a16fb14": {"id": "e8f60a16fb14", "name": "speaker4", "type": "led", "transport": "wifi", "address": "192.168.1.30", "default_pattern": null, "zones": []}, "e8f60a16e57c": {"id": "e8f60a16e57c", "name": "speaker5", "type": "led", "transport": "wifi", "address": "192.168.1.63", "default_pattern": null, "zones": []}, "e8f60a16f1b4": {"id": "e8f60a16f1b4", "name": "speaker6", "type": "led", "transport": "wifi", "address": "192.168.1.224", "default_pattern": null, "zones": []}, "e4b323c5ad6c": {"id": "e4b323c5ad6c", "name": "speaker7", "type": "led", "transport": "wifi", "address": "192.168.1.94", "default_pattern": null, "zones": []}, "588c81a200d8": {"id": "588c81a200d8", "name": "speaker8", "type": "led", "transport": "wifi", "address": "192.168.1.122", "default_pattern": null, "zones": []}, "a085e34efaec": {"id": "a085e34efaec", "name": "alleyway", "type": "led", "transport": "wifi", "address": "192.168.1.22", "default_pattern": null, "zones": []}, "e8f60a16f94c": {"id": "e8f60a16f94c", "name": "speaker10", "type": "led", "transport": "wifi", "address": "192.168.1.195", "default_pattern": null, "zones": []}, "e8f60a1701a8": {"id": "e8f60a1701a8", "name": "speaker9", "type": "led", "transport": "wifi", "address": "192.168.1.179", "default_pattern": null, "zones": []}} \ No newline at end of file +{} \ No newline at end of file diff --git a/db/group.json b/db/group.json index 858b5d0..9e26dfe 100644 --- a/db/group.json +++ b/db/group.json @@ -1 +1 @@ -{"1": {"name": "Main Group", "devices": ["1", "2", "3"]}, "2": {"name": "Accent Group", "devices": ["4", "5"]}} \ No newline at end of file +{} \ No newline at end of file diff --git a/db/output.json b/db/output.json index 0967ef4..9e26dfe 100644 --- a/db/output.json +++ b/db/output.json @@ -1 +1 @@ -{} +{} \ No newline at end of file diff --git a/db/palette.json b/db/palette.json index 257bf58..c70f2c1 100644 --- a/db/palette.json +++ b/db/palette.json @@ -1 +1 @@ -{"1": ["#FF0000", "#00FF00", "#0000FF", "#FFFF00", "#FF00FF", "#00FFFF", "#FFFFFF", "#000000"], "2": [], "3": [], "4": [], "5": [], "6": [], "7": ["#FF0000", "#00FF00", "#0000FF", "#FFFF00", "#FF00FF", "#00FFFF", "#FFFFFF", "#000000"], "8": [], "9": [], "10": [], "11": [], "12": ["#890b0b", "#0b8935"]} \ No newline at end of file +{"1": ["#FF0000", "#00FF00", "#0000FF", "#FFFF00", "#FF00FF", "#00FFFF", "#FFFFFF", "#000000"]} \ No newline at end of file diff --git a/db/preset.json b/db/preset.json index 6d6ce9a..e08ee66 100644 --- a/db/preset.json +++ b/db/preset.json @@ -1 +1 @@ -{"1": {"name": "on", "pattern": "on", "colors": [], "brightness": 32, "delay": 100, "auto": true, "n1": 0, "n2": 0, "n3": 0, "n4": 0, "n5": 0, "n6": 0, "n7": 0, "n8": 0, "profile_id": "1", "palette_refs": []}, "2": {"name": "off", "pattern": "off", "colors": [], "brightness": 0, "delay": 100, "auto": true, "n1": 0, "n2": 0, "n3": 0, "n4": 0, "n5": 0, "n6": 0, "n7": 0, "n8": 0, "profile_id": "1"}, "3": {"name": "rainbow", "pattern": "rainbow", "colors": [], "brightness": 32, "delay": 100, "auto": true, "n1": 2, "n2": 0, "n3": 0, "n4": 0, "n5": 0, "n6": 0, "n7": 0, "n8": 0, "profile_id": "1", "palette_refs": []}, "4": {"name": "transition", "pattern": "transition", "colors": ["#0000FF", "#FF00FF", "#FF0000", "#00FF00", "#FFFF00", "#00FFFF"], "brightness": 32, "delay": 5000, "auto": true, "n1": 0, "n2": 0, "n3": 0, "n4": 0, "n5": 0, "n6": 0, "n7": 0, "n8": 0, "profile_id": "1", "palette_refs": [2, 4, 0, 1, 3, 5]}, "5": {"name": "chase", "pattern": "chase", "colors": ["#006b12", "#2b02c0"], "brightness": 66, "delay": 150, "auto": true, "n1": 4, "n2": 4, "n3": 5, "n4": 1, "n5": 0, "n6": 0, "n7": 0, "n8": 0, "profile_id": "1", "palette_refs": [null, null]}, "6": {"name": "pulse", "pattern": "pulse", "colors": ["#f5e400"], "brightness": 255, "delay": 300, "auto": true, "n1": 200, "n2": 0, "n3": 0, "n4": 0, "n5": 0, "n6": 0, "n7": 0, "n8": 0, "profile_id": "1", "palette_refs": [null]}, "7": {"name": "circle", "pattern": "circle", "colors": ["#ffbb00", "#000000"], "brightness": 64, "delay": 10, "auto": true, "n1": 25, "n2": 120, "n3": 27, "n4": 0, "n5": 0, "n6": 0, "n7": 0, "n8": 0, "profile_id": "1", "palette_refs": [null, 7]}, "8": {"name": "blink", "pattern": "blink", "colors": ["#FF0000", "#00FF00", "#0000FF", "#FFFF00"], "brightness": 255, "delay": 1000, "auto": true, "n1": 0, "n2": 0, "n3": 0, "n4": 0, "n5": 0, "n6": 0, "n7": 0, "n8": 0, "profile_id": "1"}, "9": {"name": "warm white", "pattern": "on", "colors": ["#FFF5E6"], "brightness": 255, "delay": 100, "auto": true, "n1": 0, "n2": 0, "n3": 0, "n4": 0, "n5": 0, "n6": 0, "n7": 0, "n8": 0, "profile_id": "1", "palette_refs": [null]}, "10": {"name": "cool white", "pattern": "on", "colors": ["#E6F2FF"], "brightness": 200, "delay": 100, "auto": true, "n1": 0, "n2": 0, "n3": 0, "n4": 0, "n5": 0, "n6": 0, "n7": 0, "n8": 0, "profile_id": "1"}, "11": {"name": "red", "pattern": "on", "colors": ["#FF0000"], "brightness": 64, "delay": 100, "auto": true, "n1": 0, "n2": 0, "n3": 0, "n4": 0, "n5": 0, "n6": 0, "n7": 0, "n8": 0, "profile_id": "1", "palette_refs": [null]}, "12": {"name": "blue", "pattern": "on", "colors": ["#0000FF"], "brightness": 255, "delay": 100, "auto": true, "n1": 0, "n2": 0, "n3": 0, "n4": 0, "n5": 0, "n6": 0, "n7": 0, "n8": 0, "profile_id": "1"}, "13": {"name": "rainbow slow", "pattern": "rainbow", "colors": [], "brightness": 255, "delay": 150, "auto": true, "n1": 1, "n2": 0, "n3": 0, "n4": 0, "n5": 0, "n6": 0, "n7": 0, "n8": 0, "profile_id": "1"}, "14": {"name": "pulse slow", "pattern": "pulse", "colors": ["#FF6600", "#FF00FF", "#FFFF00"], "brightness": 127, "delay": 100, "auto": true, "n1": 2000, "n2": 1000, "n3": 1000, "n4": 0, "n5": 0, "n6": 0, "n7": 0, "n8": 0, "profile_id": "1", "palette_refs": [null, 4, 3]}, "15": {"name": "blink red green", "pattern": "blink", "colors": ["#FF0000", "#00FF00"], "brightness": 255, "delay": 500, "auto": true, "n1": 0, "n2": 0, "n3": 0, "n4": 0, "n5": 0, "n6": 0, "n7": 0, "n8": 0, "profile_id": "1"}, "30": {"name": "rainbow slow", "pattern": "rainbow", "colors": [], "brightness": 255, "delay": 150, "auto": true, "n1": 1, "n2": 0, "n3": 0, "n4": 0, "n5": 0, "n6": 0, "n7": 0, "n8": 0, "profile_id": "2"}, "31": {"name": "DJ Rainbow", "pattern": "rainbow", "colors": [], "brightness": 220, "delay": 60, "n1": 12, "n2": 0, "n3": 0, "n4": 0, "n5": 0, "n6": 0, "n7": 0, "n8": 0, "profile_id": "2"}, "32": {"name": "DJ Single Color", "pattern": "on", "colors": ["#ff00ff"], "brightness": 220, "delay": 100, "n1": 0, "n2": 0, "n3": 0, "n4": 0, "n5": 0, "n6": 0, "n7": 0, "n8": 0, "profile_id": "2"}, "33": {"name": "DJ Transition", "pattern": "transition", "colors": ["#ff0000", "#00ff00", "#0000ff"], "brightness": 220, "delay": 250, "n1": 0, "n2": 0, "n3": 0, "n4": 0, "n5": 0, "n6": 0, "n7": 0, "n8": 0, "profile_id": "2"}, "34": {"name": "DJ Rainbow", "pattern": "rainbow", "colors": [], "brightness": 220, "delay": 60, "n1": 12, "n2": 0, "n3": 0, "n4": 0, "n5": 0, "n6": 0, "n7": 0, "n8": 0, "profile_id": "2"}, "35": {"name": "DJ Single Color", "pattern": "on", "colors": ["#ff00ff"], "brightness": 220, "delay": 100, "n1": 0, "n2": 0, "n3": 0, "n4": 0, "n5": 0, "n6": 0, "n7": 0, "n8": 0, "profile_id": "2"}, "36": {"name": "DJ Transition", "pattern": "transition", "colors": ["#ff0000", "#00ff00", "#0000ff"], "brightness": 220, "delay": 250, "n1": 0, "n2": 0, "n3": 0, "n4": 0, "n5": 0, "n6": 0, "n7": 0, "n8": 0, "profile_id": "2"}, "37": {"name": "tranistion2", "pattern": "transition", "colors": ["#FF0000", "#FFFF00"], "brightness": 128, "delay": 1000, "n1": 0, "n2": 0, "n3": 0, "n4": 0, "n5": 0, "n6": 0, "n7": 0, "n8": 0, "profile_id": "1", "palette_refs": [0, 3]}, "38": {"name": "Colour Cycle", "pattern": "colour_cycle", "colors": ["#FF0000", "#000000"], "brightness": 255, "delay": 100, "auto": true, "n1": 1, "n2": 0, "n3": 0, "n4": 0, "n5": 0, "n6": 0, "n7": 0, "n8": 0, "profile_id": "1", "palette_refs": [0, null]}, "39": {"name": "flicker", "pattern": "flicker", "colors": ["#ae00ff"], "brightness": 255, "delay": 50, "auto": true, "n1": 100, "n2": 0, "n3": 0, "n4": 0, "n5": 0, "n6": 0, "n7": 0, "n8": 0, "profile_id": "1", "palette_refs": [null]}, "40": {"name": "flame", "pattern": "flame", "colors": ["#ffc800", "#00FFFF", "#0000FF"], "brightness": 64, "delay": 50, "auto": true, "n1": 32, "n2": 1000, "n3": 50, "n4": 100, "n5": 0, "n6": 0, "n7": 0, "n8": 0, "profile_id": "1", "palette_refs": [null, 5, 2]}, "41": {"name": "twinkle", "pattern": "twinkle", "colors": ["#78C8FF", "#508CFF", "#B478FF", "#64DCE8", "#A0C8FF"], "brightness": 64, "delay": 300, "auto": true, "n1": 200, "n2": 40, "n3": 2, "n4": 10, "n5": 0, "n6": 0, "n7": 0, "n8": 0, "profile_id": "1", "palette_refs": [null, null, null, null, null]}, "42": {"name": "radiate", "pattern": "radiate", "colors": ["#a600ff", "#ffff00"], "brightness": 32, "delay": 2001, "auto": true, "n1": 100, "n2": 900, "n3": 900, "n4": 0, "n5": 0, "n6": 0, "n7": 0, "n8": 0, "profile_id": "1", "palette_refs": [null, null]}, "43": {"name": "test meteor rain", "pattern": "meteor_rain", "colors": ["#FF5000", "#0080FF"], "brightness": 255, "delay": 100, "auto": true, "n1": 100, "n2": 10, "n3": 240, "n4": 0, "n5": 0, "n6": 0, "n7": 0, "n8": 0, "profile_id": "1", "palette_refs": [null, null]}, "44": {"name": "test scanner", "pattern": "scanner", "colors": ["#00ff04"], "brightness": 32, "delay": 3, "auto": true, "n1": 10, "n2": 7, "n3": 0, "n4": 0, "n5": 0, "n6": 0, "n7": 0, "n8": 0, "profile_id": "1", "palette_refs": [null]}, "45": {"name": "test gradient scroll", "pattern": "gradient_scroll", "colors": ["#FF0000", "#00FF00", "#0000FF", "#00FFFF", "#FF00FF"], "brightness": 50, "delay": 60, "auto": true, "n1": 2, "n2": 0, "n3": 0, "n4": 0, "n5": 0, "n6": 0, "n7": 0, "n8": 0, "profile_id": "1", "palette_refs": [null, null, 2, 5, 4]}, "46": {"name": "test comet dual", "pattern": "comet_dual", "colors": ["#ffffff", "#000000", "#00FFFF", "#FF00FF"], "brightness": 200, "delay": 20, "auto": true, "n1": 500, "n2": 1, "n3": 10, "n4": 0, "n5": 0, "n6": 0, "n7": 0, "n8": 0, "profile_id": "1", "palette_refs": [null, null, 5, 4]}, "47": {"name": "test sparkle trail", "pattern": "sparkle_trail", "colors": ["#88CCFF", "#FF00FF", "#FFFF00"], "brightness": 255, "delay": 300, "auto": true, "n1": 24, "n2": 100, "n3": 0, "n4": 0, "n5": 0, "n6": 0, "n7": 0, "n8": 0, "profile_id": "1", "palette_refs": [null, 4, 3]}, "48": {"name": "test wave", "pattern": "wave", "colors": ["#00B4FF"], "brightness": 200, "delay": 60, "auto": true, "n1": 12, "n2": 180, "n3": 1, "n4": 0, "n5": 0, "n6": 0, "n7": 0, "n8": 0, "profile_id": "1"}, "49": {"name": "test plasma", "pattern": "plasma", "colors": ["#FF0066", "#0000FF", "#00FFFF"], "brightness": 64, "delay": 60, "auto": true, "n1": 5, "n2": 10, "n3": 10, "n4": 0, "n5": 0, "n6": 0, "n7": 0, "n8": 0, "profile_id": "1", "palette_refs": [null, 2, 5]}, "50": {"name": "test segment chase", "pattern": "segment_chase", "colors": ["#000000", "#f5f5f5"], "brightness": 200, "delay": 60, "auto": true, "n1": 10, "n2": 4, "n3": 1, "n4": 0, "n5": 0, "n6": 0, "n7": 0, "n8": 0, "profile_id": "1", "palette_refs": [null, null]}, "51": {"name": "test bar graph", "pattern": "bar_graph", "colors": ["#00FF00", "#102010"], "brightness": 200, "delay": 60, "auto": true, "n1": 60, "n2": 0, "n3": 0, "n4": 0, "n5": 0, "n6": 0, "n7": 0, "n8": 0, "profile_id": "1"}, "52": {"name": "test breathing dual", "pattern": "breathing_dual", "colors": ["#FF0088", "#00AAFF"], "brightness": 200, "delay": 60, "auto": true, "n1": 128, "n2": 1, "n3": 0, "n4": 0, "n5": 0, "n6": 0, "n7": 0, "n8": 0, "profile_id": "1"}, "53": {"name": "test strobe burst", "pattern": "strobe_burst", "colors": ["#FFFFFF"], "brightness": 200, "delay": 60, "auto": true, "n1": 3, "n2": 60, "n3": 400, "n4": 0, "n5": 0, "n6": 0, "n7": 0, "n8": 0, "profile_id": "1"}, "54": {"name": "test rain drops", "pattern": "rain_drops", "colors": ["#e60000", "#e5a50a"], "brightness": 200, "delay": 20, "auto": true, "n1": 200, "n2": 2, "n3": 0, "n4": 0, "n5": 0, "n6": 0, "n7": 0, "n8": 0, "profile_id": "1", "palette_refs": [null, null]}, "55": {"name": "test fireflies", "pattern": "fireflies", "colors": ["#a51d2d", "#000000"], "brightness": 255, "delay": 300, "auto": true, "n1": 50, "n2": 100, "n3": 0, "n4": 0, "n5": 0, "n6": 0, "n7": 0, "n8": 0, "profile_id": "1", "palette_refs": [null, 7]}, "56": {"name": "test clock sweep", "pattern": "clock_sweep", "colors": ["#FFFFFF", "#202020"], "brightness": 200, "delay": 60, "auto": true, "n1": 1, "n2": 5, "n3": 0, "n4": 0, "n5": 0, "n6": 0, "n7": 0, "n8": 0, "profile_id": "1"}, "57": {"name": "test marquee", "pattern": "marquee", "colors": ["#FFFFFF"], "brightness": 200, "delay": 60, "auto": true, "n1": 10, "n2": 10, "n3": 0, "n4": 0, "n5": 0, "n6": 0, "n7": 0, "n8": 0, "profile_id": "1", "palette_refs": [null]}, "58": {"name": "test aurora", "pattern": "aurora", "colors": ["#2CC88C", "#5078FF", "#A050DC"], "brightness": 200, "delay": 60, "auto": true, "n1": 3, "n2": 40, "n3": 0, "n4": 0, "n5": 0, "n6": 0, "n7": 0, "n8": 0, "profile_id": "1", "palette_refs": [null, null, null]}, "59": {"name": "test snowfall", "pattern": "snowfall", "colors": ["#FFFFFF"], "brightness": 200, "delay": 200, "auto": true, "n1": 150, "n2": 5, "n3": 0, "n4": 0, "n5": 0, "n6": 0, "n7": 0, "n8": 0, "profile_id": "1", "palette_refs": [null]}, "60": {"name": "test heartbeat", "pattern": "heartbeat", "colors": ["#FF2840"], "brightness": 200, "delay": 60, "auto": true, "n1": 120, "n2": 80, "n3": 500, "n4": 0, "n5": 0, "n6": 0, "n7": 0, "n8": 0, "profile_id": "1"}, "61": {"name": "test orbit", "pattern": "orbit", "colors": ["#FFFFFF", "#00B4FF", "#FF0077"], "brightness": 200, "delay": 60, "auto": true, "n1": 3, "n2": 1, "n3": 0, "n4": 0, "n5": 0, "n6": 0, "n7": 0, "n8": 0, "profile_id": "1"}, "62": {"name": "test palette morph", "pattern": "palette_morph", "colors": ["#FF0000", "#0000FF", "#FF00FF"], "brightness": 200, "delay": 1000, "auto": true, "n1": 100, "n2": 10, "n3": 100, "n4": 0, "n5": 0, "n6": 0, "n7": 0, "n8": 0, "profile_id": "1", "palette_refs": [null, null, 4]}, "63": {"name": "cyan", "pattern": "on", "colors": ["#00FFFF"], "brightness": 6, "delay": 0, "n1": 0, "n2": 0, "n3": 0, "n4": 0, "n5": 0, "n6": 0, "n7": 0, "n8": 0, "profile_id": "1", "palette_refs": [5]}, "64": {"name": "twinkle2", "pattern": "twinkle", "colors": ["#FF0000", "#FFFFFF", "#FF00FF"], "brightness": 127, "delay": 200, "n1": 64, "n2": 128, "n3": 1, "n4": 10, "n5": 0, "n6": 0, "n7": 0, "n8": 0, "profile_id": "1", "palette_refs": [0, 6, 4]}, "65": {"name": "pink", "pattern": "on", "colors": ["#ff8605"], "brightness": 32, "delay": 0, "n1": 0, "n2": 0, "n3": 0, "n4": 0, "n5": 0, "n6": 0, "n7": 0, "n8": 0, "profile_id": "1", "palette_refs": [null]}, "66": {"name": "green", "pattern": "on", "colors": ["#00FF00"], "brightness": 6, "delay": 0, "n1": 0, "n2": 0, "n3": 0, "n4": 0, "n5": 0, "n6": 0, "n7": 0, "n8": 0, "profile_id": "1", "palette_refs": [1]}, "67": {"name": "purple", "pattern": "on", "colors": ["#f500ff"], "brightness": 6, "delay": 0, "n1": 0, "n2": 0, "n3": 0, "n4": 0, "n5": 0, "n6": 0, "n7": 0, "n8": 0, "profile_id": "1", "palette_refs": [null]}} \ No newline at end of file +{"1": {"name": "on", "pattern": "on", "colors": ["#FFFFFF"], "brightness": 255, "delay": 100, "n1": 0, "n2": 0, "n3": 0, "n4": 0, "n5": 0, "n6": 0, "n7": 0, "n8": 0, "profile_id": "1", "auto": true, "id": "1"}, "2": {"name": "off", "pattern": "off", "colors": [], "brightness": 0, "delay": 100, "n1": 0, "n2": 0, "n3": 0, "n4": 0, "n5": 0, "n6": 0, "n7": 0, "n8": 0, "profile_id": "1", "auto": true, "id": "2"}, "3": {"name": "rainbow", "pattern": "colour_cycle", "colors": [], "brightness": 255, "delay": 100, "n1": 2, "n2": 0, "n3": 0, "n4": 0, "n5": 0, "n6": 0, "n7": 0, "n8": 0, "profile_id": "1", "auto": true, "id": "3"}, "4": {"name": "Colour Cycle", "pattern": "colour_cycle", "colors": ["#FF0000", "#00FF00", "#0000FF"], "brightness": 255, "delay": 100, "n1": 1, "n2": 0, "n3": 0, "n4": 0, "n5": 0, "n6": 0, "n7": 0, "n8": 0, "profile_id": "1", "auto": true, "id": "4"}, "5": {"name": "transition", "pattern": "transition", "colors": ["#FF0000", "#00FF00", "#0000FF"], "brightness": 255, "delay": 500, "n1": 0, "n2": 0, "n3": 0, "n4": 0, "n5": 0, "n6": 0, "n7": 0, "n8": 0, "profile_id": "1", "auto": true, "id": "5"}, "6": {"name": "flicker", "pattern": "flicker", "colors": ["#FFB84D"], "brightness": 255, "delay": 80, "n1": 30, "n2": 0, "n3": 0, "n4": 0, "n5": 0, "n6": 0, "n7": 0, "n8": 0, "profile_id": "1", "auto": true, "id": "6"}, "7": {"name": "flame", "pattern": "flame", "colors": [], "brightness": 255, "delay": 50, "n1": 35, "n2": 2600, "n3": 0, "n4": 0, "n5": 0, "n6": 0, "n7": 0, "n8": 0, "profile_id": "1", "auto": true, "id": "7"}, "8": {"name": "twinkle", "pattern": "twinkle", "colors": ["#78C8FF", "#508CFF", "#B478FF", "#64DCE8", "#A0C8FF"], "brightness": 255, "delay": 55, "n1": 72, "n2": 140, "n3": 2, "n4": 6, "n5": 0, "n6": 0, "n7": 0, "n8": 0, "profile_id": "1", "auto": true, "id": "8"}} \ No newline at end of file diff --git a/db/presets/1.bin b/db/presets/1.bin deleted file mode 100644 index 5cc0bf0897c1c9f9aa6697bd3304f7a4b36d1477..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 127 zcmV-_0D%8cQd3khc$_uPK@P$&3GLIC9fd;(P{Py>;IUAgH2A^uKO3tvXN zd+`UHUW5o?I83QlQvS!A6ww*+jLm613=UV#k7s3?+t7#LFj7fxMBjA|X{mx(bs-1# hh^^w@*cv+{7<=Pj99JfldoFazWBbG7`vW4yEe#q@H$wmb diff --git a/db/presets/10.bin b/db/presets/10.bin deleted file mode 100644 index 07765fa..0000000 --- a/db/presets/10.bin +++ /dev/null @@ -1,3 +0,0 @@ -PRST1xœ%ÎÁ -Â0Ð_‘ñšCSµJîæ'D$¶« ÄÝ’¦ˆˆÿntOovæ²opxz‘´zޱ ¦P -e®µp={I’g¸ÖÇηÞãlpÍñ>¦¹mÓ ” ÎþrXŠÀ•¼�[¸Zq«l”­²S:e¯þLYn1Ñ%õ‹Ï ¥/ï \ No newline at end of file diff --git a/db/presets/11.bin b/db/presets/11.bin deleted file mode 100644 index 24b726b..0000000 --- a/db/presets/11.bin +++ /dev/null @@ -1,2 +0,0 @@ -PRST1xœ%ÎA …á»<·,J5\Å4 Ê $84SX4Æ»‹eõåÍlþؽ B -‹+…„ÛÎÜæ#§,+ì ‡@Æ�Iá.ñù*Lk{ŒÆ(xJnƒÕààjɰE*)°†m';ÇΩc:çÎ¥sÝY$‡˜h޾uè½*Qëš…Â?†kJÓ÷Ï=5ß \ No newline at end of file diff --git a/db/presets/12.bin b/db/presets/12.bin deleted file mode 100644 index 79f7e65..0000000 --- a/db/presets/12.bin +++ /dev/null @@ -1 +0,0 @@ -PRST1xœ%ÎA л|·, ŠÐK˜ÆP;*  ……1Þ݉3›—ÿÿf>àø"̹ ÖØU–¢°Ä[É¥nì¬Ü8b2˜kz<Ó&Ãà½ÁB9¾œµ±·‚Ðj'vRñ ì•ƒâ•£rRÎÖZî)Ó5-ò‡Ã÷yÒ-€ \ No newline at end of file diff --git a/db/presets/13.bin b/db/presets/13.bin deleted file mode 100644 index a944503..0000000 --- a/db/presets/13.bin +++ /dev/null @@ -1,2 +0,0 @@ -PRST1xœEÎÁ -Â0Ð_‘9ç`«Qɯˆ”Ô®ˆ»e“RDüwsðô˜™Ë¼ÁñIИx”uS²¬p˜c­¤ü¬»J-ç‹Ã¨éþ¨LÅrï½ÃD9¾:¿uˆK„ª 9pg¥Ñ#ØÂ»Æ¾á‡Æ±qú1«ÜR¦!Mö¡Ãç ��1 \ No newline at end of file diff --git a/db/presets/14.bin b/db/presets/14.bin deleted file mode 100644 index 09b3817..0000000 --- a/db/presets/14.bin +++ /dev/null @@ -1,2 +0,0 @@ -PRST1xœ=ÎÝ -!†á[‰¯StK[¼€½‰ˆ°v*ÁTü!"º÷Ü¤Žžá�9˜¼¹4bu™VÙ…¢)…’ÿåVÎÁ…”¡÷XO“RœãÀpJöz+žr[ R2ÌäÌzäœÁÔ KªÄàE;àKõ´èÓæß¶Ð ²£:»Îø%¦p±ŽŽvn? ¼?�¨2ú \ No newline at end of file diff --git a/db/presets/15.bin b/db/presets/15.bin deleted file mode 100644 index 360a16d7c1b9fbd639784ecf6cc2bd4400f0e606..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 145 zcmV;C0B-+KQd3khc$_uPF%H5o3T|w#88-B&LsTrN^(gt$pU*sI}Ex^$y%+yJ5CCtgz1)hS&ml4CTAIuktZdxBtW14#(0!C{2jTDET^J0Qzx=;Yeb>@w;b#~6) YIXFk>v@)rb+UQ!x{vPrD0pQ&$Ql`u{KL7v# diff --git a/db/presets/3.bin b/db/presets/3.bin deleted file mode 100644 index b685dfd..0000000 --- a/db/presets/3.bin +++ /dev/null @@ -1,2 +0,0 @@ -PRST1xœUÎÁ -Â0ЙsM5Uò+"²µ«â¦lSDÄwiNž³3‡ý@èɈPJ2–fª•Uþn×’‹.ˆ§³Ã¨éþ¨Â‹å>‡‰3½}×9ÐZ bÕ•ÄÛÀè­‘]cß�¡qh7f-·”ù’&ûÁãûF9/. \ No newline at end of file diff --git a/db/presets/30.bin b/db/presets/30.bin deleted file mode 100644 index cae5e4f..0000000 --- a/db/presets/30.bin +++ /dev/null @@ -1,2 +0,0 @@ -PRST1xœEÎÁ -Â0Ð_‘9ç`«Qɯˆ”Ô®ˆ»e“RDüwsðô˜™Ë¼ÁñIИx”uS²¬p˜c­¤ü¬»J-ç‹Ã¨éþ¨LÅrï½ÃD9¾:¿uˆK„ª 9pg¥Ñ#ØÂ»Æ¾á‡Æ±qú1«ÜR¦!Mö¡Çç �“1 \ No newline at end of file diff --git a/db/presets/31.bin b/db/presets/31.bin deleted file mode 100644 index 32cbc665767aed7d1a99b285916d72bec2049870..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 126 zcmV-^0D=EdQd3khc$_`Wu?hk)5CqU)k*QO7@jNB9m8GqSn#86QgV?A;dpZBCEf0oY0~cf(qW(+p9q~sZV(!; gdW3IX8LhE4I%8vOe~ePDDbqO(`s?xj03x(2n1_cv9smFU diff --git a/db/presets/32.bin b/db/presets/32.bin deleted file mode 100644 index 7fc5e4c..0000000 --- a/db/presets/32.bin +++ /dev/null @@ -1,2 +0,0 @@ -PRST1xœ%ͽÂ0 àW©Ž5C~•&VÆ -¡@�)uª4K…xwR<}ç»Á° —ks n#86QgV?A;dpZBCEf0oY0~cf(qW(+p9q~sZV(!; gdW3IX8LhE4I%8vOe~ePDDbqO(`s?xj03x(2n1_cv9smFU diff --git a/db/presets/35.bin b/db/presets/35.bin deleted file mode 100644 index 7fc5e4c..0000000 --- a/db/presets/35.bin +++ /dev/null @@ -1,2 +0,0 @@ -PRST1xœ%ͽÂ0 àW©Ž5C~•&VÆ -¡@�)uª4K…xwR<}ç»Á° —ks V7$S}In9q7TXQk3or6iiJ%{J35*9u- zc2KZj^gBEMQ9uU91}o?Uz2Gdk2(E(Rz?Rb*BF EG~jMXZU6uP diff --git a/db/presets/38.bin b/db/presets/38.bin deleted file mode 100644 index 49e4d5f7de4b8bf2b77d50c49877c7dcef6f2c39..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 162 zcmV;T0A2r3Qd3khc$_VcK@Ng25Jj(IKHDw;MNPLPy#yho!k{FzC8b>uWEap#*#H0l diff --git a/db/presets/39.bin b/db/presets/39.bin deleted file mode 100644 index cafc2f6..0000000 --- a/db/presets/39.bin +++ /dev/null @@ -1,3 +0,0 @@ -PRST1xœUÎÁ‚0„áw¯=¤jú*†� -[m\[²”ƒ1¾»…ž<}ÉÌåÿ ºÁÂsŸ$P˜]Î$ño'Y`¯88ÒÚ{ô -7 ÷GŽ´”£5Fa"voX£Üšl–•bÛè2ÆvãXé*¦rªœ+—�Y’LC˜JM³·1•ºAÈo5qeî¿?ªð9± \ No newline at end of file diff --git a/db/presets/4.bin b/db/presets/4.bin deleted file mode 100644 index c55dbec33abe742721f0f96ed9aca88cc8ef053c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 170 zcmV;b09F4`Qd3khc${UAOAf*?3`FnZZoTM-6qEz>5~!*Ibsi{1GC08p?>td3()2LJ#7 diff --git a/db/presets/40.bin b/db/presets/40.bin deleted file mode 100644 index 99b5690..0000000 --- a/db/presets/40.bin +++ /dev/null @@ -1,4 +0,0 @@ -PRST1xœMÎÁ‚0„áw¯=$û*†� -[%Y[RÚ1¾»…^<}ÉÌåÿÀ™7ƒ`åPa51rpËäŇ tÇÅک׃Â#,ÏWt¼å£ª{…™Åì V+˜=(†Ä -®5m¶Õ�ίk@×B[è -·B²oáq™sMu¶ çº1°=z\¾?µ¦8> \ No newline at end of file diff --git a/db/presets/41.bin b/db/presets/41.bin deleted file mode 100644 index d5608ab..0000000 --- a/db/presets/41.bin +++ /dev/null @@ -1,2 +0,0 @@ -PRST1xœm�Á‚0 †ß¥\wÈ`ÙMQ^Â2¥èâÜÈ1ÆøînÌ‹‰—~í—?Mû#ïüC™›F 0IïÑ™w¶ÚºÄ²š7¼mƒËåMêveýuU¹o°WAQ´�5X2Nä8BÜ;©hv¤·SÌ�_BäÉq(,œ’Äð·Ýg?ÇtEŽÖÖæ­ÒZ³f -·èÏdÍJcŒÂ$žß “ÞÒ Jq…PƒÚ¼…t)ÏЂº] ¨À蜜w,q¶ÎËè¦\Wï­^ríÅ–º°y¯Ê¾?Ýh>¡ \ No newline at end of file diff --git a/db/presets/43.bin b/db/presets/43.bin deleted file mode 100644 index a75bfbd4f13d935144ee7fc9ec8efe8e64fe2d3d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 166 zcmV;X09pS~Qd3khc$_VcF%E+;3;@4^%$gxkXi*-JPgDq{#k7$^f{Yoes(-H`EI#Y( z;l2>vj9`Fq>Stb*HU`UcrO>>&+2Y zd8xHlFk)~YFpaEk;{=9jLj|z{(~65Vm`ZRt-(v%2N1JiYxMg$)7D|&3IQUWGsv|X^ U#14eh9u~I{)IR#(AGCQw6(Pk+^8f$< diff --git a/db/presets/44.bin b/db/presets/44.bin deleted file mode 100644 index b5769af..0000000 --- a/db/presets/44.bin +++ /dev/null @@ -1,2 +0,0 @@ -PRST1xœEÎM -Â0à«Ès›Eÿ¢’ôE$¶£â¤$Ó…ˆww0 góÁ{o1o°„ŠìÊì™)Ã`õ"”Y‹6§˜r�›°ÇFgƒk÷‡0-:k Šþ×7~“'y#ná¥Ó™ÒÃ逇Э*ÇÊéÇšÓ-Dº„Eiñù¹L2‡ \ No newline at end of file diff --git a/db/presets/45.bin b/db/presets/45.bin deleted file mode 100644 index 5fd8816..0000000 --- a/db/presets/45.bin +++ /dev/null @@ -1,3 +0,0 @@ -PRST1xœ=ŽA‚0E¯B>Û. -*š€KC*ŒØ¤¶¤Æxw�Í{™7‹y!ØÁ€)s5';9 -\å1Eï¡°XfJA~mø·1ú˜2ÌußkÙÕZo^ls\®ÉÍw”å¸mµÂDÞ>a:Q»r„á´’Bh¤ Z)aW°/8tÇ‚ÓKŠ7çip“üÙàý)<¡ \ No newline at end of file diff --git a/db/presets/46.bin b/db/presets/46.bin deleted file mode 100644 index d63bd28..0000000 --- a/db/presets/46.bin +++ /dev/null @@ -1,3 +0,0 @@ -PRST1xœ-ÎÁ‚0Ð_!õ‡Šdo½ô'Œ!ª’”–”å`Œÿî<½ÍÌöƒèfû•‹!Íž‹qs -‹cö9J·Çý?RHy]QZkŒÖ’•Zc-n -÷<=_ý*“Zk…Ñ÷µrº�ˆóæbê„T ¨N ÙÅóA{p9èv–œSðý4Êc¾?6Ð \ No newline at end of file diff --git a/db/presets/47.bin b/db/presets/47.bin deleted file mode 100644 index 5fc7934..0000000 --- a/db/presets/47.bin +++ /dev/null @@ -1,2 +0,0 @@ -PRST1xœ5ÎA‚0…á«�Ƕ @DÒ- —0ÆT©ÚX[2ÆxwGª³ù&ý»˜‚yXh°M\¤ÙÐÝÛ‚É8…Ù0[ -’åø/çè#%è=ʾ†q”·r\…¹ë�ƒMò¥©*…Ézó„îd5 Gh¦Å*„Zz+6b-1l ¿´™m¦Ëì2ýÊLñâä"7Éy5ÞÎã:G \ No newline at end of file diff --git a/db/presets/48.bin b/db/presets/48.bin deleted file mode 100644 index 6ca57e3..0000000 --- a/db/presets/48.bin +++ /dev/null @@ -1,2 +0,0 @@ -PRST1xœ-ÎÁ Ð_1ã•ÔZŽúÆ´«’ 4°Õã¿»Š§7;sÙ¢»,˜ -/îNP˜3å(í¿8¥�r�Ýa©õ¶ìŽÙ_®©ÈÐh­0RpOØN¢›9ÁržI!XÓˆ�ØËW„ö{­+]eSéL9�} ƒåƒ÷ªù0¿ \ No newline at end of file diff --git a/db/presets/49.bin b/db/presets/49.bin deleted file mode 100644 index 94ac457..0000000 --- a/db/presets/49.bin +++ /dev/null @@ -1,2 +0,0 @@ -PRST1xœ=ÎA -Â0ЫÈw›EZ5JÐK‘ÑŽZH“�L"ÞÝÁ€«7üÿóF¤…á!\e“Õ…`�I„KÔüÝRH¥Â�؃µÎálp-óã)‘«½µzÁ;=i•/eeƒØi¦ô:Sv�=¼îâ¡áÇÆéG.é>¾Ì“¾Òáó,‘1¸ \ No newline at end of file diff --git a/db/presets/5.bin b/db/presets/5.bin deleted file mode 100644 index b8f4c5edde41f1cc714ed5c1ddf2da7cf767781b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 140 zcmV;70CWFPQd3khc$`hnF%H5o3d= z_aFQMhX=u7oI@cftf5xQ{FjVrNx8tC(Rr_BBZRFNfI4SJc!Nds@` zq#`mHc=1oTI*oqU2&b~ML9n@n3hv7xbIhDFb>^J8{8%O4=Y_j@NRL^(KV^e8pxS^( A_W%F@ diff --git a/db/presets/52.bin b/db/presets/52.bin deleted file mode 100644 index f9f450eafa760c0c71cf653566eb85c8aa41b794..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 156 zcmV;N0Av49Qd3khc$__sK@Ng25Jj&-zFQUr6`StZ^b*F9DkC(hEh)po81L@H8dvXS z-e1fM(LD$TOeK#j#QQ;yRAY51jE3MsEJXY8z1N^808lDfoM1R_R3kPpO{+y(5y2itCh<^kEa(bO1^SC6r@Id{_)*?# K@csbjWja¸8™OõS¨ËÒ`äÙ¾A]Zíª¤²²�¯@M¢ÎÉ7 v;÷-hã˜é2§Ìyg‘pŸf¦1ýTáû^ -7˜ \ No newline at end of file diff --git a/db/presets/54.bin b/db/presets/54.bin deleted file mode 100644 index b2b063e..0000000 --- a/db/presets/54.bin +++ /dev/null @@ -1,3 +0,0 @@ -PRST1xœ5ÎÍ -Â0àW)ã5‡þh­¹ú"%ÚU5)›íAÄww5xú–™9ì Á=BI -v>Ç%Á`q"ÄA»o<þãKœ#'Ø#6‡²ï†'ƒ3ûÛ]%-ê²4˜hvOØVO·J„^É T°M­ÖªÒÀê"l3»L›Ùgº Ç«Ÿiô“þSáý�Œ5% \ No newline at end of file diff --git a/db/presets/55.bin b/db/presets/55.bin deleted file mode 100644 index 1a379b3..0000000 --- a/db/presets/55.bin +++ /dev/null @@ -1,4 +0,0 @@ -PRST1xœMαÂ0 Ð_A×5CZ ´™Q~!¨ ‘BR%î€ÿŽE¦gÝÝà7¢{ ˜ -ofŸiž -ÇL9JõŸÞRH¹ÀœÐX{Ô½–¬µµ£ÆYášýýÁ‘ŠL:­& -îÓËéVN0œWRˆ­dB3[Ä]e_é+‡ÊðcÉiö�.~’¿Z|¾¡ 61 \ No newline at end of file diff --git a/db/presets/56.bin b/db/presets/56.bin deleted file mode 100644 index 114eea7..0000000 --- a/db/presets/56.bin +++ /dev/null @@ -1 +0,0 @@ -PRST1xœ5ŽAƒ E¯b¾[¨U+WiŒ¡2¶¦ `š¦éÝ ’nxÌ›Y¼Œ|ùPÌÚÎ�¿ˆ60l2r&.?ýýlµuâ‚Rõ|àCt%Wuß5®n½Ýƒ!OjÎiùN¹ ÜN ¦‚¨¢35DÑ@¤é”Ñft}ÆùÀæì²jšVÓª#TSL�-)ËìZ³ôŒßQ•AÓ \ No newline at end of file diff --git a/db/presets/57.bin b/db/presets/57.bin deleted file mode 100644 index 33712c0..0000000 --- a/db/presets/57.bin +++ /dev/null @@ -1 +0,0 @@ -PRST1xœEÎ1Â0 Ы Ïš¡i¡ €K „5)MÚÔâîXÍ€—gùÿÁD72‹lF—砃ɉpŽüo÷R^@glOëàbpËþù’È‹mÓ ÜÔëêŠ$�äÂÑ‚:¥ÕšÒ�¬²i/î+}åP9®L9=|à«ô‹ïæg2ä \ No newline at end of file diff --git a/db/presets/58.bin b/db/presets/58.bin deleted file mode 100644 index a10d1a3..0000000 --- a/db/presets/58.bin +++ /dev/null @@ -1,2 +0,0 @@ -PRST1xœ=ÎÍ -Â0àW‘é5‡ô?ìM"} ‰vÕBMJ’D|wSž¾afû†5O!rˆ;³zç #{›úuu³ótDQi­”N]ÑÊ^ Öö²•�“ÀÅO÷G´Òq%¥Àȳy�ºÍ(ú•l ª¨I“­AM¦Ít™>£~,Þݦ™ÏÓ˜þ+ñùÚ¦5ó \ No newline at end of file diff --git a/db/presets/59.bin b/db/presets/59.bin deleted file mode 100644 index f7f2eba..0000000 --- a/db/presets/59.bin +++ /dev/null @@ -1,3 +0,0 @@ -PRST1xœMÎÁ -Â0 àW‘×Ú©SzTñ%D¤ºLµm†ˆøîfëÅ\¾äOù ¸'Á‚)ó"‡øêœ÷P3¥ ›¿ð}Lö„ê8—dÕNöÒ�®©¿?8P–“Zk…–¼{Ã6Òº‘#,§‘‚™öb k„%ì4­ -ëBSض3CŠ]ïéÒ·ò—Á÷……6 \ No newline at end of file diff --git a/db/presets/6.bin b/db/presets/6.bin deleted file mode 100644 index b7e56a1..0000000 --- a/db/presets/6.bin +++ /dev/null @@ -1,2 +0,0 @@ -PRST1xœMÎK -Â0…á½§ÜT£’tR$Ú«âMÉc âÞm�ˆ£þ39Oˆ»3,¦2Car¥p’¿rŽ!¦ {ÀЍï‰0(œ’¿ÞŠpž‡Î…‘ƒ{À"WK„-©²‚hXMK•î;Ëú—6° ¦±mìûSŠøèÇù’Æë »0Ø \ No newline at end of file diff --git a/db/presets/60.bin b/db/presets/60.bin deleted file mode 100644 index 2b685aa..0000000 --- a/db/presets/60.bin +++ /dev/null @@ -1,4 +0,0 @@ -PRST1xœMÎA‚0Ы˜ï¶‹RÉ€KcŠŒBR[Ò c¼»­l\½Éÿùɼáí“ANr˜ÙFÙ -V+ÂÑçê?½b 8ö½éj�‹Â—Ç,žS.ŒÖ -;ûµù´›�Ä�|ªL½uŨ)_ƒ -ÍN»sÞé~¬1ÜÇ×eÊ/Uø|Æœ5 \ No newline at end of file diff --git a/db/presets/61.bin b/db/presets/61.bin deleted file mode 100644 index e58e9cc4ebc1dad40ceb20826b491759dfec1c93..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 149 zcmV;G0BZkGQd3khc$_uP%?iRW5Cq^?k?A#u^v72A=%FuBL{htIpe7~V9z=Y1mj?Ip z4Z|GvgWz5ag77Mbm_{!!Seyu_p!L7G#W|)GG@$7B)2^`g+~m~v)^;5(24nJ%rvzSg zTv=-{@$BB9R-@Y_f+THh5K2(3RG?C+K{^Oc=9pÛ. -*š€KCªŒBRÚ¦ c¼»ÅÙ¼7óÿb>ðv"0Í\D눙Š)¤8@!ZÙ’—xOºò.¤抲mµŒÜJ­W϶:n -÷4¾ö4K¹ÖZ¡'gß0�¨]8ÀpZHÁW0ÕVðõÞô˜ÇŒSF“qθlˆ)/export` | Profile bundle (see Import and export) | | POST | `/profiles/import` | Body: `{"bundle": {...}, "name"?, "apply"? (default true)}` or the bundle itself. Reply `{"": profile, "id": ""}`, 201 | -A new profile gets an empty palette, eight presets (`on`, `off`, `rainbow` (`colour_cycle`), `Colour Cycle`, `transition`, `flicker`, `flame`, `twinkle`) and a zone `default` that lists them and names driver `1`. With `seed_dj_zone` it also gets three `DJ …` presets in a zone `dj` naming driver `dj`. +A store with no profile gets one at boot, `default`, with the same seed and a starter palette. A new profile gets an empty palette, eight presets (`on`, `off`, `rainbow` (`colour_cycle`), `Colour Cycle`, `transition`, `flicker`, `flame`, `twinkle`) and a zone `default` that lists them and names driver `1`. With `seed_dj_zone` it also gets three `DJ …` presets in a zone `dj` naming driver `dj`. ## Presets — `/presets` diff --git a/main/api.c b/main/api.c index e6ac129..bf5c29c 100644 --- a/main/api.c +++ b/main/api.c @@ -510,6 +510,7 @@ esp_err_t api_register(httpd_handle_t server) { store_lock(); api_settings_defaults(); + api_seed_defaults(); api_migrate_sequences(); api_migrate_zones(); api_migrate_groups(); diff --git a/main/api_util.h b/main/api_util.h index a5192bc..e8e035a 100644 --- a/main/api_util.h +++ b/main/api_util.h @@ -54,6 +54,7 @@ bool api_preset_in_profile(const cJSON *rec); // Bring records written by older versions into the current shape (at boot) void api_migrate_sequences(void); +void api_seed_defaults(void); void api_migrate_zones(void); void api_migrate_groups(void); diff --git a/main/res_profile.c b/main/res_profile.c index bde2669..8a5a076 100644 --- a/main/res_profile.c +++ b/main/res_profile.c @@ -222,28 +222,20 @@ static bool truthy(const cJSON *v) return cJSON_IsTrue(v) || (cJSON_IsNumber(v) && v->valuedouble != 0); } -// POST /profiles: the profile, an empty palette, the seed presets and a "default" zone (plus a "dj" -// zone with seed_dj_zone) -static esp_err_t create_profile(httpd_req_t *req) +// The profile with fields applied, the palette (taken over), the seed presets and a "default" zone +// (plus a "dj" zone with dj), all saved; returns the profile, its id in pid +static cJSON *seed_profile(const cJSON *fields, cJSON *palette, bool dj, char *pid, size_t plen) { - cJSON *body = api_body(req); - if (!body) { - return ESP_OK; - } - bool dj = truthy(cJSON_GetObjectItem(body, "seed_dj_zone")); - cJSON_DeleteItemFromObject(body, "seed_dj_zone"); - - char palid[16], pid[16], zid[16], djid[16]; - api_add("palette", cJSON_CreateArray(), palid, sizeof(palid)); + char palid[16], zid[16], djid[16]; + api_add("palette", palette, palid, sizeof(palid)); cJSON *prof = cJSON_CreateObject(); cJSON_AddStringToObject(prof, "name", ""); cJSON_AddStringToObject(prof, "type", "zones"); cJSON_AddArrayToObject(prof, "zones"); cJSON_AddArrayToObject(prof, "scenes"); - api_merge(prof, body); - cJSON_Delete(body); + api_merge(prof, fields); api_set(prof, "palette_id", cJSON_CreateString(palid)); - api_add("profile", prof, pid, sizeof(pid)); + api_add("profile", prof, pid, plen); cJSON *zones = cJSON_CreateArray(); seed_zone(pid, "default", "1", true, SEED, sizeof(SEED) / sizeof(SEED[0]), zid, sizeof(zid)); @@ -257,10 +249,41 @@ static esp_err_t create_profile(httpd_req_t *req) store_save("preset"); store_save("zone"); store_save("profile"); + return prof; +} + +// POST /profiles: seed_profile with an empty palette ("dj" zone with seed_dj_zone) +static esp_err_t create_profile(httpd_req_t *req) +{ + cJSON *body = api_body(req); + if (!body) { + return ESP_OK; + } + bool dj = truthy(cJSON_GetObjectItem(body, "seed_dj_zone")); + cJSON_DeleteItemFromObject(body, "seed_dj_zone"); + + char pid[16]; + cJSON *prof = seed_profile(body, cJSON_CreateArray(), dj, pid, sizeof(pid)); + cJSON_Delete(body); engine_groups_changed(); return send_keyed(req, "201 Created", pid, prof); } +// A store with no profile (first boot, or after an erase) gets one to start from; db/ holds the same records +void api_seed_defaults(void) +{ + if (store_coll("profile")->child) { + return; + } + cJSON *fields = cJSON_CreateObject(); + cJSON_AddStringToObject(fields, "name", "default"); + char pid[16]; + seed_profile(fields, + cJSON_Parse("[\"#FF0000\",\"#00FF00\",\"#0000FF\",\"#FFFF00\",\"#FF00FF\",\"#00FFFF\",\"#FFFFFF\",\"#000000\"]"), + false, pid, sizeof(pid)); + cJSON_Delete(fields); +} + static const cJSON *profile_zones(const cJSON *prof) { const cJSON *z = cJSON_GetObjectItem(prof, "zones");