Colour the page nav keys on every page to follow the ALL button.
nav_templates.json holds Companion's own UP / page number / DOWN keys after 'convert to regular button'; make_page.py colours them from the ALL tile and nav_keys.py copies them onto all 96 other pages (288 keys, recorded in nav_locations.json; --revert restores the built-in keys). Also rewrites the README's top half, which an earlier edit had duplicated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,46 +1,58 @@
|
|||||||
# Status Indicators — Companion STATUS page for NA Ingest
|
# Status Indicators — Companion STATUS page for NA Ingest
|
||||||
|
|
||||||
One Companion page (page 19, **"19 STATUS"**) that is solid green when everything is fine and **blinks red with the actual problem** ("HD2 NO DISK", "LIGHT PC MIDI LOST") when something needs attention.
|
One Companion page (page 19, **"19 Status"**) that is solid green when everything is fine and **blinks red with the actual problem** ("HD3 NO DISK", "LIGHT PC MIDI LOST") when something needs attention. The UP / page number / DOWN keys on every other page follow the same colour, so you see a problem from any page.
|
||||||
|
|
||||||
There are two parts:
|
There are two parts:
|
||||||
|
|
||||||
- **`status_panel.py`** — a watchdog that runs on NA Ingest as the LaunchAgent `org.waterschurch.status-panel`. Every second it reads Companion's connection statuses and module variables. It also checks what Companion can't see: network MIDI peers, Bonjour MIDI sessions, pings, launchd services, disk space, and whether the Resi cloud is reachable. It writes the result into one Companion custom variable.
|
- **`status_panel.py`** — a watchdog that runs on NA Ingest as the LaunchAgent `org.waterschurch.status-panel`. Every second it reads Companion's connection statuses and module variables. It also checks what Companion can't see: network MIDI peers, Bonjour MIDI sessions, pings, launchd services, disk space, the Bible TV app, and whether the Resi cloud is reachable. It writes the result into one Companion custom variable.
|
||||||
- **`status-page.companionconfig`** — the page. Every button just draws what the watchdog wrote and blinks on your existing `flash_tick` trigger.
|
- **`status-page.companionconfig`** — the page. Every button just draws what the watchdog wrote and blinks on your existing `flash_tick` trigger.
|
||||||
|
|
||||||
## Layout (Stream Deck XL; MK.2 and Mini show the top-left corner)
|
## Layout (Stream Deck XL; MK.2 and Mini show the top-left corner)
|
||||||
|
|
||||||
| | col 1 | col 2 | col 3 | col 4 | col 5 | col 6 | col 7 |
|
| | col 0 | col 1 | col 2 | col 3 | col 4 | col 5 | col 6 | col 7 |
|
||||||
|--------|-------|-------|-------|-------|-------|-------|-------|
|
|--------|-------|-------|-------|-------|-------|-------|-------|-------|
|
||||||
| row 0 | **ALL** | REC | AUDIO | RF | SHOW | VIDEO | STREAM |
|
| row 0 | UP | **ALL** | REC | AUDIO | RF | SHOW | VIDEO | STREAM |
|
||||||
| row 1 | HD1 | HD2 | HD3 | HD4 | HD5 | HD6 | TASCAM |
|
| row 1 | page | HD1 | HD2 | HD3 | HD4 | HD5 | HD6 | TASCAM |
|
||||||
| row 2 | X32 | DANTE | MIDI | APPS | | | |
|
| row 2 | DOWN | X32 | DANTE | MIDI | APPS | | | |
|
||||||
| row 3 | ATEM | OBS | RESI | NET | INGEST | LED | ARENA |
|
| row 3 | ALARMS | ATEM | OBS | RESI | NET | INGEST | LED | ARENA |
|
||||||
|
|
||||||
Column 0 holds page up / page number / page down, plus **SERVICE** at row 3.
|
Row 0 holds the group buttons. Each one shows the first problem in its group, plus "+N" if there are more:
|
||||||
|
|
||||||
Row 0 holds the group tiles. Each one shows the first problem in its group, plus "+N" if there are more. RF covers all six Shure units: AD4Q ×2, ULXD4, and PSM1000 ×3.
|
- REC: HD1–6 and the Tascam.
|
||||||
|
- AUDIO: X32 and Dante.
|
||||||
|
- RF: all six Shure units (AD4Q ×2, ULXD4, PSM1000 ×3).
|
||||||
|
- SHOW: MIDI and APPS.
|
||||||
|
- VIDEO: ATEM, LED and Arena.
|
||||||
|
- STREAM: OBS and Resi.
|
||||||
|
|
||||||
## Colours
|
## Colours
|
||||||
|
|
||||||
| Tile | Meaning |
|
| Colour | Meaning |
|
||||||
|---|---|
|
|---|---|
|
||||||
| Green | OK. The second line shows something useful, like `28h` of record time or `10/10` Dante devices. |
|
| Green | OK. The second line shows something useful, like `28h` of record time or `19/19` Dante devices. |
|
||||||
| **Blinking red** | Show-stopping, during service mode. |
|
| **Blinking red** | Something is wrong. |
|
||||||
| Solid dark red | Acknowledged. It stays red until the problem clears, then goes green. A new failure blinks again. |
|
| Solid dark red | Acknowledged. It stays red until the problem clears, then goes green. A new failure blinks again. |
|
||||||
| Amber | Warning: low disk, battery at 2 bars, RF interference, a device that keeps dropping out ("WING GONE x3"), a network blip in the last 3 minutes ("BLIP 10:21"). |
|
| Amber | Warning: low disk, battery at 2 bars, RF interference, a device that keeps dropping out ("WING GONE x3"), a network blip in the last 3 minutes ("BLIP 10:21"). |
|
||||||
| Dim red, not blinking | A fault outside service mode. |
|
| Dim red, not blinking | A fault while alarms are muted. |
|
||||||
| Grey | Expected off outside service: OBS, a HyperDeck with no disk, Bible TV. |
|
| Grey | Not in use: an optional HyperDeck with no disk, or a disabled connection. |
|
||||||
| **Purple** | The watchdog has stopped. The master shows `WATCHDOG DOWN` and Companion's own error count. |
|
| **Purple** | The watchdog has stopped. The master shows `WATCHDOG DOWN` and Companion's own error count. |
|
||||||
|
|
||||||
## Buttons
|
## Buttons
|
||||||
|
|
||||||
- **Press any tile:** acknowledge its alarms (stops the blinking). Press **ALL** to acknowledge everything.
|
- **Press any button:** acknowledge its alarms (stops the blinking). Press **ALL** to acknowledge everything.
|
||||||
- **Hold a device tile for 2 seconds:** restart that tile's *Companion connection*. This is the fix for a connection stuck after a network blip. It only restarts Companion's side and never reboots the device.
|
- **Hold a device button for 2 seconds:** restart that button's *Companion connection*. This is the fix for a connection stuck after a network blip. It only restarts Companion's side and never reboots the device.
|
||||||
- **SERVICE:** service mode turns on automatically **Sunday 07:00–12:30** (`service_windows` in `config.json`). Press SERVICE to switch it on or off by hand, for example for a Wednesday event. The manual setting lasts until the next scheduled start or end.
|
- **ALARMS:** alarms are armed all the time (`service_windows` in `config.json`: every day, 00:00–23:59). Press ALARMS to mute the blinking, for example during maintenance. It re-arms itself at midnight.
|
||||||
|
|
||||||
## What each tile checks
|
## Page keys on every page
|
||||||
|
|
||||||
| Tile | Checks |
|
The UP / page number / DOWN keys on **every page** follow the ALL button. They're green when everything is fine, flash red when something is wrong, and turn purple if the watchdog stops. They are Companion's own nav keys converted to regular buttons (`nav_templates.json`), so presses work exactly as before.
|
||||||
|
|
||||||
|
- `python3 nav_keys.py` applies them to every page. Run it again after adding pages.
|
||||||
|
- `python3 nav_keys.py --revert` puts Companion's built-in nav keys back.
|
||||||
|
|
||||||
|
## What each button checks
|
||||||
|
|
||||||
|
| Button | Checks |
|
||||||
|---|---|
|
|---|---|
|
||||||
| HD1–HD6 | Companion connection; **NO DISK**; record time **LOW** (<30 min, amber) / **FULL** (<5 min); **NOT REC** when another deck is recording and this one isn't |
|
| HD1–HD6 | Companion connection; **NO DISK**; record time **LOW** (<30 min, amber) / **FULL** (<5 min); **NOT REC** when another deck is recording and this one isn't |
|
||||||
| | HD2 and HD4 are `"optional": true` in `config.json`: with no disk they sit grey with no alarm, and once a disk is in they are watched like the others. Add or remove `"optional": true` on any deck to change that. |
|
| | HD2 and HD4 are `"optional": true` in `config.json`: with no disk they sit grey with no alarm, and once a disk is in they are watched like the others. Add or remove `"optional": true` on any deck to change that. |
|
||||||
@@ -49,44 +61,6 @@ Row 0 holds the group tiles. Each one shows the first problem in its group, plus
|
|||||||
| DANTE | All 19 Dante devices ("19/19"), named when one drops: "WING GONE", "TRACKS GONE", "PROP MAC GONE". |
|
| DANTE | All 19 Dante devices ("19/19"), named when one drops: "WING GONE", "TRACKS GONE", "PROP MAC GONE". |
|
||||||
| MIDI | Lighting PC and SuperRack still joined to NA Ingest's network MIDI session; the Lighting PC and NA Tracks MIDI sessions still on the network. A clean disconnect shows within seconds; a crash or pulled cable takes about a minute (macOS's own timeout, measured). |
|
| MIDI | Lighting PC and SuperRack still joined to NA Ingest's network MIDI session; the Lighting PC and NA Tracks MIDI sessions still on the network. A clean disconnect shows within seconds; a crash or pulled cable takes about a minute (macOS's own timeout, measured). |
|
||||||
| APPS | ProPresenter API; Ableton OSC; tracks Mac pings; Bible TV app answering on :8080 (every 5 s); Bible TV OSC. Messages name the app ("PROPRES OFFLINE", "BIBLE APP DOWN"). Hold 2 s restarts the ProPresenter, Ableton and Bible TV Companion connections. |
|
| APPS | ProPresenter API; Ableton OSC; tracks Mac pings; Bible TV app answering on :8080 (every 5 s); Bible TV OSC. Messages name the app ("PROPRES OFFLINE", "BIBLE APP DOWN"). Hold 2 s restarts the ProPresenter, Ableton and Bible TV Companion connections. |
|
||||||
| RESI | NET | INGEST | LED | ARENA |
|
|
||||||
|
|
||||||
Column 0 holds page up / page number / page down, plus **SERVICE** at row 3.
|
|
||||||
|
|
||||||
Row 0 holds the group tiles. Each one shows the first problem in its group, plus "+N" if there are more. RF covers all six Shure units: AD4Q ×2, ULXD4, and PSM1000 ×3.
|
|
||||||
|
|
||||||
## Colours
|
|
||||||
|
|
||||||
| Tile | Meaning |
|
|
||||||
|---|---|
|
|
||||||
| Green | OK. The second line shows something useful, like `28h` of record time or `10/10` Dante devices. |
|
|
||||||
| **Blinking red** | Show-stopping, during service mode. |
|
|
||||||
| Solid dark red | Acknowledged. It stays red until the problem clears, then goes green. A new failure blinks again. |
|
|
||||||
| Amber | Warning: low disk, battery at 2 bars, RF interference, a device that keeps dropping out ("WING GONE x3"), a network blip in the last 3 minutes ("BLIP 10:21"). |
|
|
||||||
| Dim red, not blinking | A fault outside service mode. |
|
|
||||||
| Grey | Expected off outside service: OBS, a HyperDeck with no disk, Bible TV. |
|
|
||||||
| **Purple** | The watchdog has stopped. The master shows `WATCHDOG DOWN` and Companion's own error count. |
|
|
||||||
|
|
||||||
## Buttons
|
|
||||||
|
|
||||||
- **Press any tile:** acknowledge its alarms (stops the blinking). Press **ALL** to acknowledge everything.
|
|
||||||
- **Hold a device tile for 2 seconds:** restart that tile's *Companion connection*. This is the fix for a connection stuck after a network blip. It only restarts Companion's side and never reboots the device.
|
|
||||||
- **SERVICE:** service mode turns on automatically **Sunday 07:00–12:30** (`service_windows` in `config.json`). Press SERVICE to switch it on or off by hand, for example for a Wednesday event. The manual setting lasts until the next scheduled start or end.
|
|
||||||
|
|
||||||
## What each tile checks
|
|
||||||
|
|
||||||
| Tile | Checks |
|
|
||||||
|---|---|
|
|
||||||
| HD1–HD6 | Companion connection; **NO DISK**; record time **LOW** (<30 min, amber) / **FULL** (<5 min); **NOT REC** when another deck is recording and this one isn't |
|
|
||||||
| | HD2 and HD4 are `"optional": true` in `config.json`: with no disk they sit grey with no alarm, and once a disk is in they are watched like the others. Add or remove `"optional": true` on any deck to change that. |
|
|
||||||
| TASCAM | connection; the recorder's own Error / Caution |
|
|
||||||
| X32, ATEM, ARENA, LED, OBS | Companion connection |
|
|
||||||
| DANTE | All 19 Dante devices ("19/19"), named when one drops: "WING GONE", "TRACKS GONE", "PROP MAC GONE". |
|
|
||||||
| TRACKS | NA-Tracks Dante device; tracks Mac pings; "NA Tracks" MIDI session still on the network; Ableton OSC connection |
|
|
||||||
| LIGHT PC | Lighting PC still joined to NA Ingest's network MIDI session; its MIDI session still on the network |
|
|
||||||
| RACK | SuperRack-LiveBox still joined to the MIDI session; its Dante device |
|
|
||||||
| BIBLE TV | TV pings; OSC connection |
|
|
||||||
| PROP | ProPresenter API; NA-ProPresenter-Mac Dante device |
|
|
||||||
| RESI | decoder (RossTalk); resi-studio-cues; Resi cloud reachable |
|
| RESI | decoder (RossTalk); resi-studio-cues; Resi cloud reachable |
|
||||||
| NET | NA Ingest's link; gateway 10.1.0.1 pings; **4+ connections from 3+ groups dropping within 10 s** (what happened Sunday 10/5 at 10:21) |
|
| NET | NA Ingest's link; gateway 10.1.0.1 pings; **4+ connections from 3+ groups dropping within 10 s** (what happened Sunday 10/5 at 10:21) |
|
||||||
| INGEST | Resi bridge and lobby captions services running; ProdDash running; free disk |
|
| INGEST | Resi bridge and lobby captions services running; ProdDash running; free disk |
|
||||||
@@ -162,4 +136,7 @@ The **LIGHT PC** tile can do the same in the other direction. If the lighting so
|
|||||||
| `config.json` | tiles, positions, checks, service windows |
|
| `config.json` | tiles, positions, checks, service windows |
|
||||||
| `make_page.py` | builds `status-page.companionconfig` from `config.json` |
|
| `make_page.py` | builds `status-page.companionconfig` from `config.json` |
|
||||||
| `install.sh` | installs or updates the LaunchAgent on NA Ingest |
|
| `install.sh` | installs or updates the LaunchAgent on NA Ingest |
|
||||||
|
| `push_page.py` | imports the status page into page 19 over Companion's API |
|
||||||
|
| `nav_keys.py` | colours (or restores) the page nav keys on every page |
|
||||||
|
| `nav_templates.json` | Companion's own nav key designs, coloured by `make_page.py` |
|
||||||
| `tests/` | offline tests, including a fake Companion and a MIDI loopback |
|
| `tests/` | offline tests, including a fake Companion and a MIDI loopback |
|
||||||
|
|||||||
+31
-1
@@ -132,8 +132,38 @@ def button(tid, tile, cfg):
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
NAV_LOCATIONS = {"pageup": ("0", "0"), "pagenum": ("1", "0"), "pagedown": ("2", "0")}
|
||||||
|
NAV_MARKER = "STATUS nav key"
|
||||||
|
|
||||||
|
|
||||||
|
def nav_key(kind, names):
|
||||||
|
"""Companion's own UP / page number / DOWN key, coloured like the ALL button."""
|
||||||
|
templates = json.load(open(os.path.join(HERE, "nav_templates.json")))
|
||||||
|
key = json.loads(json.dumps(templates[kind]))
|
||||||
|
stale = "$(internal:time_unix) - $(custom:%s) > %d" % (names["heartbeat"], STALE_SECONDS)
|
||||||
|
pick = lambda field: "jsonpath($(custom:%s), '$.all.%s')" % (names["state"], field)
|
||||||
|
bg = "%s ? %d : ($(custom:flash_tick) == 1 ? %s : %s)" % (stale, PURPLE, pick("b"), pick("b2"))
|
||||||
|
fg = "%s ? %d : ($(custom:flash_tick) == 1 ? %s : %s)" % (stale, 0xFFFFFF, pick("f"), pick("f2"))
|
||||||
|
|
||||||
|
def paint(layers):
|
||||||
|
for layer in layers:
|
||||||
|
if layer["type"] == "box":
|
||||||
|
layer["color"] = prop(bg, True)
|
||||||
|
elif layer["type"] == "text":
|
||||||
|
layer["color"] = prop(fg, True)
|
||||||
|
elif layer["type"] == "line":
|
||||||
|
layer["borderColor"] = prop(fg, True)
|
||||||
|
paint(layer.get("children", []))
|
||||||
|
paint(key["style"]["layers"])
|
||||||
|
key["options"]["notes"] = ("%s (%s): colour follows the ALL button on the status page. "
|
||||||
|
"Undo on every page with: python3 nav_keys.py --revert" % (NAV_MARKER, kind))
|
||||||
|
return key
|
||||||
|
|
||||||
|
|
||||||
def build(cfg):
|
def build(cfg):
|
||||||
controls = {"0": {"0": {"type": "pageup"}}, "1": {"0": {"type": "pagenum"}}, "2": {"0": {"type": "pagedown"}}}
|
controls = {}
|
||||||
|
for kind, (r, c) in NAV_LOCATIONS.items():
|
||||||
|
controls.setdefault(r, {})[c] = nav_key(kind, cfg["variables"])
|
||||||
for tile in cfg["tiles"]:
|
for tile in cfg["tiles"]:
|
||||||
if "pos" not in tile:
|
if "pos" not in tile:
|
||||||
continue
|
continue
|
||||||
|
|||||||
+116
@@ -0,0 +1,116 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""Make the UP / page number / DOWN keys on every page follow the status page's ALL button.
|
||||||
|
|
||||||
|
The status page (page 19) carries coloured copies of Companion's own nav keys
|
||||||
|
(see make_page.py and nav_templates.json). This copies them over the built-in
|
||||||
|
nav keys on every other page, wherever those sit, using the same "copy button"
|
||||||
|
call as the Companion UI. Each key keeps its normal press action.
|
||||||
|
|
||||||
|
python3 nav_keys.py --dry-run list what would change
|
||||||
|
python3 nav_keys.py apply (also refreshes keys already converted)
|
||||||
|
python3 nav_keys.py --revert put Companion's built-in nav keys back everywhere
|
||||||
|
|
||||||
|
Only nav keys are touched. Every location changed is recorded in nav_locations.json.
|
||||||
|
"""
|
||||||
|
import argparse
|
||||||
|
import gzip
|
||||||
|
import json
|
||||||
|
import os
|
||||||
|
import urllib.error
|
||||||
|
import urllib.request
|
||||||
|
|
||||||
|
from make_page import NAV_LOCATIONS, NAV_MARKER
|
||||||
|
from push_page import Trpc, WebSocket
|
||||||
|
|
||||||
|
HERE = os.path.dirname(os.path.abspath(__file__))
|
||||||
|
RECORD = os.path.join(HERE, "nav_locations.json")
|
||||||
|
NAV_TYPES = ("pageup", "pagenum", "pagedown")
|
||||||
|
|
||||||
|
|
||||||
|
def page_export(host, port, page):
|
||||||
|
url = "http://%s:%d/int/export/page/%d?includeSecrets=false" % (host, port, page)
|
||||||
|
try:
|
||||||
|
with urllib.request.urlopen(url, timeout=10) as r:
|
||||||
|
raw = r.read()
|
||||||
|
except urllib.error.HTTPError:
|
||||||
|
return None
|
||||||
|
try:
|
||||||
|
raw = gzip.decompress(raw)
|
||||||
|
except OSError:
|
||||||
|
pass
|
||||||
|
return json.loads(raw)
|
||||||
|
|
||||||
|
|
||||||
|
def nav_kind(control):
|
||||||
|
if control.get("type") in NAV_TYPES:
|
||||||
|
return control["type"]
|
||||||
|
notes = control.get("options", {}).get("notes", "") or ""
|
||||||
|
if control.get("type") == "button-layered" and notes.startswith(NAV_MARKER):
|
||||||
|
for kind in NAV_TYPES:
|
||||||
|
if "(%s)" % kind in notes:
|
||||||
|
return kind
|
||||||
|
return None
|
||||||
|
|
||||||
|
|
||||||
|
def find_nav_keys(host, port, status_page):
|
||||||
|
"""[(page, row, column, kind)] for every nav key outside the status page."""
|
||||||
|
found, page = [], 1
|
||||||
|
while True:
|
||||||
|
export = page_export(host, port, page)
|
||||||
|
if export is None:
|
||||||
|
break
|
||||||
|
if page != status_page:
|
||||||
|
for r, cols in export["page"]["controls"].items():
|
||||||
|
for c, control in cols.items():
|
||||||
|
kind = nav_kind(control or {})
|
||||||
|
if kind:
|
||||||
|
found.append((page, int(r), int(c), kind))
|
||||||
|
page += 1
|
||||||
|
return found
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
cfg = json.load(open(os.path.join(HERE, "config.json")))
|
||||||
|
ap = argparse.ArgumentParser(description=__doc__.splitlines()[0])
|
||||||
|
ap.add_argument("--host", default="na-ingest.local")
|
||||||
|
ap.add_argument("--port", type=int, default=8000)
|
||||||
|
ap.add_argument("--dry-run", action="store_true")
|
||||||
|
ap.add_argument("--revert", action="store_true")
|
||||||
|
args = ap.parse_args()
|
||||||
|
status_page = cfg["page"]
|
||||||
|
|
||||||
|
record = json.load(open(RECORD)) if os.path.exists(RECORD) else {}
|
||||||
|
if args.revert:
|
||||||
|
targets = [(int(k.split("/")[0]), int(k.split("/")[1]), int(k.split("/")[2]), v) for k, v in record.items()]
|
||||||
|
else:
|
||||||
|
targets = find_nav_keys(args.host, args.port, status_page)
|
||||||
|
print("%d nav keys on %d pages" % (len(targets), len({t[0] for t in targets})))
|
||||||
|
if args.dry_run:
|
||||||
|
for t in targets:
|
||||||
|
print(" page %d row %d col %d: %s" % t)
|
||||||
|
return
|
||||||
|
|
||||||
|
ws = WebSocket(args.host, args.port, "/trpc")
|
||||||
|
done = 0
|
||||||
|
try:
|
||||||
|
api = Trpc(ws)
|
||||||
|
for page, row, col, kind in targets:
|
||||||
|
location = {"pageNumber": page, "row": row, "column": col}
|
||||||
|
if args.revert:
|
||||||
|
api.mutation("controls.resetControl", {"location": location, "newType": kind})
|
||||||
|
record.pop("%d/%d/%d" % (page, row, col), None)
|
||||||
|
else:
|
||||||
|
r, c = NAV_LOCATIONS[kind]
|
||||||
|
source = {"pageNumber": status_page, "row": int(r), "column": int(c)}
|
||||||
|
if not api.mutation("controls.copyControl", {"fromLocation": source, "toLocation": location}):
|
||||||
|
raise RuntimeError("copy to page %d row %d col %d failed" % (page, row, col))
|
||||||
|
record["%d/%d/%d" % (page, row, col)] = kind
|
||||||
|
done += 1
|
||||||
|
finally:
|
||||||
|
ws.close()
|
||||||
|
json.dump(record, open(RECORD, "w"), indent=1, sort_keys=True)
|
||||||
|
print("%s %d nav keys" % ("restored" if args.revert else "coloured", done))
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
@@ -0,0 +1,290 @@
|
|||||||
|
{
|
||||||
|
"1/0/0": "pageup",
|
||||||
|
"1/1/0": "pagenum",
|
||||||
|
"1/2/0": "pagedown",
|
||||||
|
"10/0/0": "pageup",
|
||||||
|
"10/1/0": "pagenum",
|
||||||
|
"10/2/0": "pagedown",
|
||||||
|
"11/0/0": "pageup",
|
||||||
|
"11/1/0": "pagenum",
|
||||||
|
"11/2/0": "pagedown",
|
||||||
|
"12/0/0": "pageup",
|
||||||
|
"12/1/0": "pagenum",
|
||||||
|
"12/2/0": "pagedown",
|
||||||
|
"13/0/0": "pageup",
|
||||||
|
"13/1/0": "pagenum",
|
||||||
|
"13/2/0": "pagedown",
|
||||||
|
"14/0/0": "pageup",
|
||||||
|
"14/1/0": "pagenum",
|
||||||
|
"14/2/0": "pagedown",
|
||||||
|
"15/0/0": "pageup",
|
||||||
|
"15/0/1": "pagenum",
|
||||||
|
"15/1/0": "pagenum",
|
||||||
|
"15/2/0": "pagedown",
|
||||||
|
"16/0/0": "pageup",
|
||||||
|
"16/1/0": "pagenum",
|
||||||
|
"16/2/0": "pagedown",
|
||||||
|
"17/0/0": "pageup",
|
||||||
|
"17/1/0": "pagenum",
|
||||||
|
"17/2/0": "pagedown",
|
||||||
|
"18/0/0": "pageup",
|
||||||
|
"18/1/0": "pagenum",
|
||||||
|
"18/2/0": "pagedown",
|
||||||
|
"2/0/0": "pageup",
|
||||||
|
"2/1/0": "pagenum",
|
||||||
|
"2/2/0": "pagedown",
|
||||||
|
"20/0/0": "pageup",
|
||||||
|
"20/1/0": "pagenum",
|
||||||
|
"20/2/0": "pagedown",
|
||||||
|
"21/0/0": "pageup",
|
||||||
|
"21/1/0": "pagenum",
|
||||||
|
"21/2/0": "pagedown",
|
||||||
|
"22/0/0": "pageup",
|
||||||
|
"22/1/0": "pagenum",
|
||||||
|
"22/2/0": "pagedown",
|
||||||
|
"23/0/0": "pageup",
|
||||||
|
"23/1/0": "pagenum",
|
||||||
|
"23/2/0": "pagedown",
|
||||||
|
"24/0/0": "pageup",
|
||||||
|
"24/1/0": "pagenum",
|
||||||
|
"24/2/0": "pagedown",
|
||||||
|
"25/0/0": "pageup",
|
||||||
|
"25/1/0": "pagenum",
|
||||||
|
"25/2/0": "pagedown",
|
||||||
|
"26/0/0": "pageup",
|
||||||
|
"26/1/0": "pagenum",
|
||||||
|
"26/2/0": "pagedown",
|
||||||
|
"27/0/0": "pageup",
|
||||||
|
"27/1/0": "pagenum",
|
||||||
|
"27/2/0": "pagedown",
|
||||||
|
"28/0/0": "pageup",
|
||||||
|
"28/1/0": "pagenum",
|
||||||
|
"28/2/0": "pagedown",
|
||||||
|
"29/0/0": "pageup",
|
||||||
|
"29/1/0": "pagenum",
|
||||||
|
"29/2/0": "pagedown",
|
||||||
|
"3/0/0": "pageup",
|
||||||
|
"3/1/0": "pagenum",
|
||||||
|
"3/2/0": "pagedown",
|
||||||
|
"30/0/0": "pageup",
|
||||||
|
"30/1/0": "pagenum",
|
||||||
|
"30/2/0": "pagedown",
|
||||||
|
"31/0/0": "pageup",
|
||||||
|
"31/1/0": "pagenum",
|
||||||
|
"31/2/0": "pagedown",
|
||||||
|
"32/0/0": "pageup",
|
||||||
|
"32/1/0": "pagenum",
|
||||||
|
"32/2/0": "pagedown",
|
||||||
|
"33/0/0": "pageup",
|
||||||
|
"33/1/0": "pagenum",
|
||||||
|
"33/2/0": "pagedown",
|
||||||
|
"34/0/0": "pageup",
|
||||||
|
"34/1/0": "pagenum",
|
||||||
|
"34/2/0": "pagedown",
|
||||||
|
"35/0/0": "pageup",
|
||||||
|
"35/1/0": "pagenum",
|
||||||
|
"35/2/0": "pagedown",
|
||||||
|
"36/0/0": "pageup",
|
||||||
|
"36/1/0": "pagenum",
|
||||||
|
"36/2/0": "pagedown",
|
||||||
|
"37/0/0": "pageup",
|
||||||
|
"37/1/0": "pagenum",
|
||||||
|
"37/2/0": "pagedown",
|
||||||
|
"38/0/0": "pageup",
|
||||||
|
"38/1/0": "pagenum",
|
||||||
|
"38/2/0": "pagedown",
|
||||||
|
"39/0/0": "pageup",
|
||||||
|
"39/1/0": "pagenum",
|
||||||
|
"39/2/0": "pagedown",
|
||||||
|
"4/0/0": "pageup",
|
||||||
|
"4/1/0": "pagenum",
|
||||||
|
"4/2/0": "pagedown",
|
||||||
|
"40/0/0": "pageup",
|
||||||
|
"40/1/0": "pagenum",
|
||||||
|
"40/2/0": "pagedown",
|
||||||
|
"41/0/0": "pageup",
|
||||||
|
"41/1/0": "pagenum",
|
||||||
|
"41/2/0": "pagedown",
|
||||||
|
"42/0/0": "pageup",
|
||||||
|
"42/1/0": "pagenum",
|
||||||
|
"42/2/0": "pagedown",
|
||||||
|
"43/0/0": "pageup",
|
||||||
|
"43/1/0": "pagenum",
|
||||||
|
"43/2/0": "pagedown",
|
||||||
|
"44/0/0": "pageup",
|
||||||
|
"44/1/0": "pagenum",
|
||||||
|
"44/2/0": "pagedown",
|
||||||
|
"45/0/0": "pageup",
|
||||||
|
"45/1/0": "pagenum",
|
||||||
|
"45/2/0": "pagedown",
|
||||||
|
"46/0/0": "pageup",
|
||||||
|
"46/1/0": "pagenum",
|
||||||
|
"46/2/0": "pagedown",
|
||||||
|
"47/0/0": "pageup",
|
||||||
|
"47/1/0": "pagenum",
|
||||||
|
"47/2/0": "pagedown",
|
||||||
|
"48/0/0": "pageup",
|
||||||
|
"48/1/0": "pagenum",
|
||||||
|
"48/2/0": "pagedown",
|
||||||
|
"49/0/0": "pageup",
|
||||||
|
"49/1/0": "pagenum",
|
||||||
|
"49/2/0": "pagedown",
|
||||||
|
"5/0/0": "pageup",
|
||||||
|
"5/1/0": "pagenum",
|
||||||
|
"5/2/0": "pagedown",
|
||||||
|
"50/0/0": "pageup",
|
||||||
|
"50/1/0": "pagenum",
|
||||||
|
"50/2/0": "pagedown",
|
||||||
|
"51/0/0": "pageup",
|
||||||
|
"51/1/0": "pagenum",
|
||||||
|
"51/2/0": "pagedown",
|
||||||
|
"52/0/0": "pageup",
|
||||||
|
"52/1/0": "pagenum",
|
||||||
|
"52/2/0": "pagedown",
|
||||||
|
"53/0/0": "pageup",
|
||||||
|
"53/1/0": "pagenum",
|
||||||
|
"53/2/0": "pagedown",
|
||||||
|
"54/0/0": "pageup",
|
||||||
|
"54/1/0": "pagenum",
|
||||||
|
"54/2/0": "pagedown",
|
||||||
|
"55/0/0": "pageup",
|
||||||
|
"55/1/0": "pagenum",
|
||||||
|
"55/2/0": "pagedown",
|
||||||
|
"56/0/0": "pageup",
|
||||||
|
"56/1/0": "pagenum",
|
||||||
|
"56/2/0": "pagedown",
|
||||||
|
"57/0/0": "pageup",
|
||||||
|
"57/1/0": "pagenum",
|
||||||
|
"57/2/0": "pagedown",
|
||||||
|
"58/0/0": "pageup",
|
||||||
|
"58/1/0": "pagenum",
|
||||||
|
"58/2/0": "pagedown",
|
||||||
|
"59/0/0": "pageup",
|
||||||
|
"59/1/0": "pagenum",
|
||||||
|
"59/2/0": "pagedown",
|
||||||
|
"6/0/0": "pageup",
|
||||||
|
"6/1/0": "pagenum",
|
||||||
|
"6/2/0": "pagedown",
|
||||||
|
"60/0/0": "pageup",
|
||||||
|
"60/1/0": "pagenum",
|
||||||
|
"60/2/0": "pagedown",
|
||||||
|
"61/0/0": "pageup",
|
||||||
|
"61/1/0": "pagenum",
|
||||||
|
"61/2/0": "pagedown",
|
||||||
|
"62/0/0": "pageup",
|
||||||
|
"62/1/0": "pagenum",
|
||||||
|
"62/2/0": "pagedown",
|
||||||
|
"63/0/0": "pageup",
|
||||||
|
"63/1/0": "pagenum",
|
||||||
|
"63/2/0": "pagedown",
|
||||||
|
"64/0/0": "pageup",
|
||||||
|
"64/1/0": "pagenum",
|
||||||
|
"64/2/0": "pagedown",
|
||||||
|
"65/0/0": "pageup",
|
||||||
|
"65/1/0": "pagenum",
|
||||||
|
"65/2/0": "pagedown",
|
||||||
|
"66/0/0": "pageup",
|
||||||
|
"66/1/0": "pagenum",
|
||||||
|
"66/2/0": "pagedown",
|
||||||
|
"67/0/0": "pageup",
|
||||||
|
"67/1/0": "pagenum",
|
||||||
|
"67/2/0": "pagedown",
|
||||||
|
"68/0/0": "pageup",
|
||||||
|
"68/1/0": "pagenum",
|
||||||
|
"68/2/0": "pagedown",
|
||||||
|
"69/0/0": "pageup",
|
||||||
|
"69/1/0": "pagenum",
|
||||||
|
"69/2/0": "pagedown",
|
||||||
|
"7/0/0": "pageup",
|
||||||
|
"7/1/0": "pagenum",
|
||||||
|
"7/2/0": "pagedown",
|
||||||
|
"70/0/0": "pageup",
|
||||||
|
"70/1/0": "pagenum",
|
||||||
|
"70/2/0": "pagedown",
|
||||||
|
"71/0/0": "pageup",
|
||||||
|
"71/1/0": "pagenum",
|
||||||
|
"71/2/0": "pagedown",
|
||||||
|
"72/0/0": "pageup",
|
||||||
|
"72/1/0": "pagenum",
|
||||||
|
"72/2/0": "pagedown",
|
||||||
|
"73/0/0": "pageup",
|
||||||
|
"73/1/0": "pagenum",
|
||||||
|
"73/2/0": "pagedown",
|
||||||
|
"74/0/0": "pageup",
|
||||||
|
"74/1/0": "pagenum",
|
||||||
|
"74/2/0": "pagedown",
|
||||||
|
"75/0/0": "pageup",
|
||||||
|
"75/1/0": "pagenum",
|
||||||
|
"75/2/0": "pagedown",
|
||||||
|
"76/0/0": "pageup",
|
||||||
|
"76/1/0": "pagenum",
|
||||||
|
"76/2/0": "pagedown",
|
||||||
|
"77/0/0": "pageup",
|
||||||
|
"77/1/0": "pagenum",
|
||||||
|
"77/2/0": "pagedown",
|
||||||
|
"78/0/0": "pageup",
|
||||||
|
"78/1/0": "pagenum",
|
||||||
|
"78/2/0": "pagedown",
|
||||||
|
"79/0/0": "pageup",
|
||||||
|
"79/1/0": "pagenum",
|
||||||
|
"79/2/0": "pagedown",
|
||||||
|
"8/0/0": "pageup",
|
||||||
|
"8/1/0": "pagenum",
|
||||||
|
"8/2/0": "pagedown",
|
||||||
|
"80/0/0": "pageup",
|
||||||
|
"80/1/0": "pagenum",
|
||||||
|
"80/2/0": "pagedown",
|
||||||
|
"81/0/0": "pageup",
|
||||||
|
"81/1/0": "pagenum",
|
||||||
|
"81/2/0": "pagedown",
|
||||||
|
"82/0/0": "pageup",
|
||||||
|
"82/1/0": "pagenum",
|
||||||
|
"82/2/0": "pagedown",
|
||||||
|
"83/0/0": "pageup",
|
||||||
|
"83/1/0": "pagenum",
|
||||||
|
"83/2/0": "pagedown",
|
||||||
|
"84/0/0": "pageup",
|
||||||
|
"84/1/0": "pagenum",
|
||||||
|
"84/2/0": "pagedown",
|
||||||
|
"85/0/0": "pageup",
|
||||||
|
"85/1/0": "pagenum",
|
||||||
|
"85/2/0": "pagedown",
|
||||||
|
"86/0/0": "pageup",
|
||||||
|
"86/1/0": "pagenum",
|
||||||
|
"86/2/0": "pagedown",
|
||||||
|
"87/0/0": "pageup",
|
||||||
|
"87/1/0": "pagenum",
|
||||||
|
"87/2/0": "pagedown",
|
||||||
|
"88/0/0": "pageup",
|
||||||
|
"88/1/0": "pagenum",
|
||||||
|
"88/2/0": "pagedown",
|
||||||
|
"89/0/0": "pageup",
|
||||||
|
"89/1/0": "pagenum",
|
||||||
|
"89/2/0": "pagedown",
|
||||||
|
"9/0/0": "pageup",
|
||||||
|
"9/1/0": "pagenum",
|
||||||
|
"9/2/0": "pagedown",
|
||||||
|
"90/0/0": "pageup",
|
||||||
|
"90/1/0": "pagenum",
|
||||||
|
"90/2/0": "pagedown",
|
||||||
|
"91/0/0": "pageup",
|
||||||
|
"91/1/0": "pagenum",
|
||||||
|
"91/2/0": "pagedown",
|
||||||
|
"92/0/0": "pageup",
|
||||||
|
"92/1/0": "pagenum",
|
||||||
|
"92/2/0": "pagedown",
|
||||||
|
"93/0/0": "pageup",
|
||||||
|
"93/1/0": "pagenum",
|
||||||
|
"93/2/0": "pagedown",
|
||||||
|
"94/0/0": "pageup",
|
||||||
|
"94/1/0": "pagenum",
|
||||||
|
"94/2/0": "pagedown",
|
||||||
|
"95/0/0": "pageup",
|
||||||
|
"95/1/0": "pagenum",
|
||||||
|
"95/2/0": "pagedown",
|
||||||
|
"96/0/0": "pageup",
|
||||||
|
"96/2/0": "pagedown",
|
||||||
|
"97/0/0": "pageup",
|
||||||
|
"97/1/0": "pagenum",
|
||||||
|
"97/2/0": "pagedown"
|
||||||
|
}
|
||||||
+1112
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -555,11 +555,17 @@ class TestPage(unittest.TestCase):
|
|||||||
def test_layout(self):
|
def test_layout(self):
|
||||||
self.assertEqual(self.export["type"], "page")
|
self.assertEqual(self.export["type"], "page")
|
||||||
self.assertEqual(self.export["oldPageNumber"], 19)
|
self.assertEqual(self.export["oldPageNumber"], 19)
|
||||||
self.assertEqual(self.controls["0"]["0"], {"type": "pageup"})
|
for (r, kind, action) in (("0", "pageup", "inc_page"), ("1", "pagenum", "set_page"), ("2", "pagedown", "dec_page")):
|
||||||
self.assertEqual(self.controls["2"]["0"], {"type": "pagedown"})
|
key = self.controls[r]["0"]
|
||||||
|
self.assertEqual(key["type"], "button-layered")
|
||||||
|
self.assertTrue(key["options"]["notes"].startswith("STATUS nav key (%s)" % kind))
|
||||||
|
self.assertEqual(key["steps"]["0"]["action_sets"]["down"][0]["definitionId"], action)
|
||||||
|
box = [l for l in key["style"]["layers"] if l["type"] == "box"][0]
|
||||||
|
self.assertTrue(box["color"]["isExpression"])
|
||||||
|
self.assertIn("'$.all.b'", box["color"]["value"]) # follows the ALL button
|
||||||
positioned = [t for t in CONFIG["tiles"] if "pos" in t]
|
positioned = [t for t in CONFIG["tiles"] if "pos" in t]
|
||||||
n = sum(1 for r in self.controls.values() for c in r.values() if c["type"] == "button-layered")
|
n = sum(1 for r in self.controls.values() for c in r.values() if c["type"] == "button-layered")
|
||||||
self.assertEqual(n, len(positioned))
|
self.assertEqual(n, len(positioned) + 3) # + the three nav keys
|
||||||
# The master is where the smallest Stream Deck can see it.
|
# The master is where the smallest Stream Deck can see it.
|
||||||
self.assertEqual(CONFIG["tiles"][0]["pos"], [0, 1])
|
self.assertEqual(CONFIG["tiles"][0]["pos"], [0, 1])
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user