Files
cuframes-composer/docker/templates.json
T
gx e54d55371c templates.json: tpl_3 теперь 4 камеры + temp_chart-узкий
Было: tpl_3 = main + 2 preview + temp_chart (rs=4) + ha_chat.
При 4 active композитор выбирал tpl_3 (waste=1 vs tpl_4 waste=0 — wait,
tpl_3 имел 3 cam cells, при 4 active брал tpl_4=quad без виджетов).

Стало: tpl_3 = main + 3 preview + temp_chart (rs=2, низ-право) + ha_chat.
4 cam cells, при 4 active best-fit выбирает tpl_3 (waste=0, раньше в registry
чем tpl_4 → tie-breaker за tpl_3). Виджеты остаются видимыми.

Geometry validated: 36+4+4+4+4+12=64 микроячеек, no overlaps.

Hot-reloaded via reload_templates ZMQ в проде.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-07 19:17:56 +01:00

131 lines
7.1 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
"version": 1,
"grid_cols": 8,
"grid_rows": 8,
"_doc": "Phase 11b — набор layouts на 8×8 микро-сетке. Свободные camera-cells при нехватке motion-камер заполняются остальными drawable из pool (cfc::Composer::maybe_relayout). Widget cells показывают placeholder (тёмно-серый + название); реальные виджеты — Phase 12+.",
"templates": [
{
"name": "tpl_1",
"_desc": "Одна камера во весь экран.",
"cells": [
{"col": 0, "row": 0, "cs": 8, "rs": 8, "role": "camera", "order": 0}
]
},
{
"name": "tpl_3",
"_desc": "Главная 1440×810 + 3 превью 480×270 + temp_chart 480×270 (низ-право) + ha_chat снизу.",
"cells": [
{"col": 0, "row": 0, "cs": 6, "rs": 6, "role": "camera", "order": 0},
{"col": 6, "row": 0, "cs": 2, "rs": 2, "role": "camera", "order": 1},
{"col": 6, "row": 2, "cs": 2, "rs": 2, "role": "camera", "order": 2},
{"col": 6, "row": 4, "cs": 2, "rs": 2, "role": "camera", "order": 3},
{"col": 6, "row": 6, "cs": 2, "rs": 2, "role": "widget", "widget": "temp_chart"},
{"col": 0, "row": 6, "cs": 6, "rs": 2, "role": "widget", "widget": "ha_chat"}
]
},
{
"name": "tpl_4",
"_desc": "Quad 2×2 — 4 камеры 960×540 (16:9). order=0 — top-left.",
"cells": [
{"col": 0, "row": 0, "cs": 4, "rs": 4, "role": "camera", "order": 0},
{"col": 4, "row": 0, "cs": 4, "rs": 4, "role": "camera", "order": 1},
{"col": 0, "row": 4, "cs": 4, "rs": 4, "role": "camera", "order": 2},
{"col": 4, "row": 4, "cs": 4, "rs": 4, "role": "camera", "order": 3}
]
},
{
"name": "tpl_5",
"_desc": "Главная + 4 превью справа стопкой, снизу — widget.",
"cells": [
{"col": 0, "row": 0, "cs": 6, "rs": 6, "role": "camera", "order": 0},
{"col": 6, "row": 0, "cs": 2, "rs": 2, "role": "camera", "order": 1},
{"col": 6, "row": 2, "cs": 2, "rs": 2, "role": "camera", "order": 2},
{"col": 6, "row": 4, "cs": 2, "rs": 2, "role": "camera", "order": 3},
{"col": 6, "row": 6, "cs": 2, "rs": 2, "role": "camera", "order": 4},
{"col": 0, "row": 6, "cs": 6, "rs": 2, "role": "widget", "widget": "ha_chat"}
]
},
{
"name": "tpl_6",
"_desc": "Главная + 3 правых + 2 нижних, остаток нижней строки — widget.",
"cells": [
{"col": 0, "row": 0, "cs": 6, "rs": 6, "role": "camera", "order": 0},
{"col": 6, "row": 0, "cs": 2, "rs": 2, "role": "camera", "order": 1},
{"col": 6, "row": 2, "cs": 2, "rs": 2, "role": "camera", "order": 2},
{"col": 6, "row": 4, "cs": 2, "rs": 2, "role": "camera", "order": 3},
{"col": 0, "row": 6, "cs": 2, "rs": 2, "role": "camera", "order": 4},
{"col": 2, "row": 6, "cs": 2, "rs": 2, "role": "camera", "order": 5},
{"col": 4, "row": 6, "cs": 4, "rs": 2, "role": "widget", "widget": "info"}
]
},
{
"name": "tpl_7",
"_desc": "Главная + 3 правых + 3 нижних, угол — widget.",
"cells": [
{"col": 0, "row": 0, "cs": 6, "rs": 6, "role": "camera", "order": 0},
{"col": 6, "row": 0, "cs": 2, "rs": 2, "role": "camera", "order": 1},
{"col": 6, "row": 2, "cs": 2, "rs": 2, "role": "camera", "order": 2},
{"col": 6, "row": 4, "cs": 2, "rs": 2, "role": "camera", "order": 3},
{"col": 0, "row": 6, "cs": 2, "rs": 2, "role": "camera", "order": 4},
{"col": 2, "row": 6, "cs": 2, "rs": 2, "role": "camera", "order": 5},
{"col": 4, "row": 6, "cs": 2, "rs": 2, "role": "camera", "order": 6},
{"col": 6, "row": 6, "cs": 2, "rs": 2, "role": "widget", "widget": "ha_chat"}
]
},
{
"name": "tpl_8",
"_desc": "1+3+4 — главная + 3 правых + 4 в нижней строке (без widget).",
"cells": [
{"col": 0, "row": 0, "cs": 6, "rs": 6, "role": "camera", "order": 0},
{"col": 6, "row": 0, "cs": 2, "rs": 2, "role": "camera", "order": 1},
{"col": 6, "row": 2, "cs": 2, "rs": 2, "role": "camera", "order": 2},
{"col": 6, "row": 4, "cs": 2, "rs": 2, "role": "camera", "order": 3},
{"col": 0, "row": 6, "cs": 2, "rs": 2, "role": "camera", "order": 4},
{"col": 2, "row": 6, "cs": 2, "rs": 2, "role": "camera", "order": 5},
{"col": 4, "row": 6, "cs": 2, "rs": 2, "role": "camera", "order": 6},
{"col": 6, "row": 6, "cs": 2, "rs": 2, "role": "camera", "order": 7}
]
},
{
"name": "tpl_9",
"_desc": "3×3 (cells по 2×2 микроячейки в области 6×6, остаток — widget).",
"cells": [
{"col": 0, "row": 0, "cs": 2, "rs": 2, "role": "camera", "order": 0},
{"col": 2, "row": 0, "cs": 2, "rs": 2, "role": "camera", "order": 1},
{"col": 4, "row": 0, "cs": 2, "rs": 2, "role": "camera", "order": 2},
{"col": 0, "row": 2, "cs": 2, "rs": 2, "role": "camera", "order": 3},
{"col": 2, "row": 2, "cs": 2, "rs": 2, "role": "camera", "order": 4},
{"col": 4, "row": 2, "cs": 2, "rs": 2, "role": "camera", "order": 5},
{"col": 0, "row": 4, "cs": 2, "rs": 2, "role": "camera", "order": 6},
{"col": 2, "row": 4, "cs": 2, "rs": 2, "role": "camera", "order": 7},
{"col": 4, "row": 4, "cs": 2, "rs": 2, "role": "camera", "order": 8},
{"col": 6, "row": 0, "cs": 2, "rs": 6, "role": "widget", "widget": "temp_chart"},
{"col": 0, "row": 6, "cs": 8, "rs": 2, "role": "widget", "widget": "ha_chat"}
]
},
{
"name": "tpl_16",
"_desc": "4×4 — 16 камер 480×270 (16:9), полностью покрывает 8×8.",
"cells": [
{"col": 0, "row": 0, "cs": 2, "rs": 2, "role": "camera", "order": 0},
{"col": 2, "row": 0, "cs": 2, "rs": 2, "role": "camera", "order": 1},
{"col": 4, "row": 0, "cs": 2, "rs": 2, "role": "camera", "order": 2},
{"col": 6, "row": 0, "cs": 2, "rs": 2, "role": "camera", "order": 3},
{"col": 0, "row": 2, "cs": 2, "rs": 2, "role": "camera", "order": 4},
{"col": 2, "row": 2, "cs": 2, "rs": 2, "role": "camera", "order": 5},
{"col": 4, "row": 2, "cs": 2, "rs": 2, "role": "camera", "order": 6},
{"col": 6, "row": 2, "cs": 2, "rs": 2, "role": "camera", "order": 7},
{"col": 0, "row": 4, "cs": 2, "rs": 2, "role": "camera", "order": 8},
{"col": 2, "row": 4, "cs": 2, "rs": 2, "role": "camera", "order": 9},
{"col": 4, "row": 4, "cs": 2, "rs": 2, "role": "camera", "order": 10},
{"col": 6, "row": 4, "cs": 2, "rs": 2, "role": "camera", "order": 11},
{"col": 0, "row": 6, "cs": 2, "rs": 2, "role": "camera", "order": 12},
{"col": 2, "row": 6, "cs": 2, "rs": 2, "role": "camera", "order": 13},
{"col": 4, "row": 6, "cs": 2, "rs": 2, "role": "camera", "order": 14},
{"col": 6, "row": 6, "cs": 2, "rs": 2, "role": "camera", "order": 15}
]
}
]
}