kiosko 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +229 -1
- package/cli.js +3353 -1984
- package/package.json +3 -2
- package/sdk.js +177 -4
- package/web/assets/app.js +5 -5
- package/web/assets/styles.css +1 -1
package/README.md
CHANGED
|
@@ -7,6 +7,8 @@ and let a tiny daemon keep the panel up to date.
|
|
|
7
7
|
|
|
8
8
|
> 🇪🇸 Documento de diseño en castellano: [docs/es/plan.md](docs/es/plan.md)
|
|
9
9
|
|
|
10
|
+
[](https://kioskolcd.dev/)
|
|
11
|
+
|
|
10
12
|

|
|
11
13
|
|
|
12
14
|
- **Visual editor in your browser.** Drag widgets onto a to-scale picture of
|
|
@@ -35,12 +37,26 @@ and let a tiny daemon keep the panel up to date.
|
|
|
35
37
|
|
|
36
38
|
## Try it in your browser
|
|
37
39
|
|
|
40
|
+
**<https://kioskolcd.dev/>** tells it in a minute, over a panel in 3D: scroll
|
|
41
|
+
and the panel turns, shows the editor composing a page on it and becomes a
|
|
42
|
+
stack of three. Drop a `config.json` on that page (yours, or one an assistant
|
|
43
|
+
wrote for you) and the panel shows its pages, one panel for each screen; the
|
|
44
|
+
file is read in your browser and goes nowhere. Every plugin is listed there,
|
|
45
|
+
and every widget is in the [gallery](https://kioskolcd.dev/gallery/).
|
|
46
|
+
|
|
38
47
|
**<https://kioskolcd.dev/demo/>**: the real editor, running entirely in your
|
|
39
48
|
browser with sample data. Lay out the sample screens, add widgets, switch
|
|
40
49
|
themes and languages; nothing is installed and your changes stay in that
|
|
41
50
|
browser. What needs a machine (a real panel, plugins from npm, live data) is
|
|
42
51
|
switched off there.
|
|
43
52
|
|
|
53
|
+
**<https://kioskolcd.dev/demo/3d/>**: a panel in 3D with those sample screens
|
|
54
|
+
running on it, painted live by the same code, widget animations and
|
|
55
|
+
interludes included. Drag to look around; `?panels=3` stacks three,
|
|
56
|
+
`?widget=cats/room` shows one widget alone and the *Record* button saves a
|
|
57
|
+
video. `scripts/panel3d-film.mjs` takes pictures and films from the command
|
|
58
|
+
line, for a plugin's README.
|
|
59
|
+
|
|
44
60
|
## Try it in 30 seconds
|
|
45
61
|
|
|
46
62
|
```sh
|
|
@@ -102,6 +118,15 @@ The grid is fixed (a panel doesn't scroll): 24×6 cells on a 1920×462 panel,
|
|
|
102
118
|
panel is refused rather than losing a tile. **Auto-arrange** packs everything
|
|
103
119
|
masonry-style.
|
|
104
120
|
|
|
121
|
+
**Portrait panels.** Stand a strip on its side and pick *Screens → Orientation →
|
|
122
|
+
Portrait*: you design a 462×1920 picture (6×24 cells) and Kiosko turns it for
|
|
123
|
+
the panel. The pages turn with it: columns become bands, top to bottom, and a
|
|
124
|
+
summary strip across the top stays across the top; the page templates have
|
|
125
|
+
portrait versions of their own. If the picture comes out upside down, *Turn
|
|
126
|
+
180°*. In `config.json` that is `"width": 462, "height": 1920, "rotate": 90`
|
|
127
|
+
(or 270): `width` × `height` are the picture as you see it, `rotate` how the
|
|
128
|
+
panel is mounted.
|
|
129
|
+
|
|
105
130
|
## Let an AI write your config
|
|
106
131
|
|
|
107
132
|
Everything lives in one `config.json`, described by a JSON Schema at a stable
|
|
@@ -124,6 +149,208 @@ placeholders keep your current values, and never follow a changed host. With
|
|
|
124
149
|
`--apply`, a running Kiosko takes the new config at once. Details:
|
|
125
150
|
[docs/config-schema.md](docs/config-schema.md).
|
|
126
151
|
|
|
152
|
+
### Several panels on Windows, set up by an agent
|
|
153
|
+
|
|
154
|
+
An AI agent (Claude Code, Codex…) can take a Windows PC with several Thermalright
|
|
155
|
+
panels from nothing to "each panel shows its own screen". One step needs a person
|
|
156
|
+
at the keyboard (the USB driver, once per panel); the rest is commands an agent
|
|
157
|
+
can run in PowerShell.
|
|
158
|
+
|
|
159
|
+
1. **Install Kiosko** (agent). Download `Kiosko-Setup-<version>-x64.exe` from the
|
|
160
|
+
[latest release](https://github.com/kiosko-lcd/kiosko/releases/latest) and run it
|
|
161
|
+
silently, with the tasks "start when I sign in" and "add `kiosko` to PATH":
|
|
162
|
+
|
|
163
|
+
```powershell
|
|
164
|
+
.\Kiosko-Setup-0.2.2-x64.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /TASKS=service,path
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
Open a new terminal afterwards so `kiosko` is on the `PATH` (or use
|
|
168
|
+
`npm install -g kiosko`, Node.js 22.18 or newer). The service starts with a sample
|
|
169
|
+
screen that shows in the editor only, so it holds no panel yet.
|
|
170
|
+
2. **Install the WinUSB driver on each panel** (you, once, as administrator).
|
|
171
|
+
Windows' own driver stands between Kiosko and the panel. With
|
|
172
|
+
[Zadig](https://zadig.akeo.ie): *Options → List All Devices*, pick the panel
|
|
173
|
+
(USB ID `0416:5408` or `0416:5409`), choose **WinUSB**, *Replace Driver*. The
|
|
174
|
+
official Thermalright software stops seeing that panel (restore its driver from
|
|
175
|
+
Device Manager if you need it back). An agent can't click this for you.
|
|
176
|
+
3. **List the panels** (agent). The serial number is what tells identical panels
|
|
177
|
+
apart, and it follows the panel when you move it to another USB port:
|
|
178
|
+
|
|
179
|
+
```powershell
|
|
180
|
+
kiosko usb
|
|
181
|
+
# LY panel 5408 at 3-7, serial 202592047DAE
|
|
182
|
+
# LY panel 5408 at 3-15, serial 20258AAB7F4F
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
A panel listed as `(unreadable)` or with `LIBUSB_ERROR_NOT_SUPPORTED` still needs
|
|
186
|
+
step 2. If a panel is missing, check the cable and the hub.
|
|
187
|
+
4. **Try each panel** (agent), before giving it to a screen. It paints Kiosko's
|
|
188
|
+
sample screen on it for ten seconds and says `ok` once frames go out:
|
|
189
|
+
|
|
190
|
+
```powershell
|
|
191
|
+
kiosko usb test --serial 202592047DAE --rotate 180 --seconds 10
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
The Trofeo Vision wants `--rotate 180`; when a screen's picture would come out upside
|
|
195
|
+
down for what the panel's firmware expects, Kiosko says so in the editor's *Activity*
|
|
196
|
+
log. Standing it on its side (portrait) is a quarter turn from that: 90 or 270.
|
|
197
|
+
5. **Write the config** (agent): one `screens[]` entry per panel in
|
|
198
|
+
`%APPDATA%\Kiosko\config.json`, each with `"device": { "driver": "usb", "serial": "…" }`.
|
|
199
|
+
Start from the screen Kiosko wrote on its first run, or from this one (it is
|
|
200
|
+
checked with `kiosko config validate`):
|
|
201
|
+
|
|
202
|
+
```json
|
|
203
|
+
{
|
|
204
|
+
"$schema": "https://kioskolcd.dev/schema/v1/config.json",
|
|
205
|
+
"version": 1,
|
|
206
|
+
"screens": [
|
|
207
|
+
{
|
|
208
|
+
"id": "panel-1", "name": "Panel 1", "width": 1920, "height": 462, "rotate": 180,
|
|
209
|
+
"device": { "driver": "usb", "serial": "2025ECF47BED" },
|
|
210
|
+
"pages": [{ "id": "p1-home", "name": "Home", "tiles": [
|
|
211
|
+
{ "id": "p1-clock", "x": 0, "y": 0, "w": 24, "h": 6, "widgets": [{ "id": "p1-clock-w", "type": "core/clock", "options": {} }] }
|
|
212
|
+
] }]
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
"id": "panel-2", "name": "Panel 2", "width": 1920, "height": 462, "rotate": 180,
|
|
216
|
+
"device": { "driver": "usb", "serial": "20258AAB7F4F" },
|
|
217
|
+
"pages": [{ "id": "p2-home", "name": "Home", "tiles": [
|
|
218
|
+
{ "id": "p2-note", "x": 0, "y": 0, "w": 24, "h": 6, "widgets": [{ "id": "p2-note-w", "type": "core/text", "options": { "text": "Hello from panel 2" } }] }
|
|
219
|
+
] }]
|
|
220
|
+
}
|
|
221
|
+
]
|
|
222
|
+
}
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
Every `id` (screens, pages, tiles and widgets) must be unique in the **whole**
|
|
226
|
+
file, not per screen. `kiosko config schema` prints every widget the installed
|
|
227
|
+
plugins offer, and the [config schema](docs/config-schema.md) explains the rest.
|
|
228
|
+
6. **Check and apply** (agent). `validate` exits with an error and JSON paths to
|
|
229
|
+
paste back to the model; `import --apply` backs up the current config and a
|
|
230
|
+
running Kiosko takes the new one at once:
|
|
231
|
+
|
|
232
|
+
```powershell
|
|
233
|
+
kiosko config validate config.json
|
|
234
|
+
kiosko config import config.json --apply
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
7. **Make sure it stays up** (agent). `kiosko service install` starts Kiosko at
|
|
238
|
+
sign-in (skip it if the installer already did); `kiosko doctor` lists the panels
|
|
239
|
+
and the screens; the editor, at <http://127.0.0.1:7420/>, shows each screen's
|
|
240
|
+
connection in green once frames are going out. The log is `%APPDATA%\Kiosko\kiosko.log`.
|
|
241
|
+
|
|
242
|
+
A prompt that works: *"Install Kiosko on this Windows PC with the silent installer
|
|
243
|
+
from github.com/kiosko-lcd/kiosko/releases/latest. When I have put the WinUSB
|
|
244
|
+
driver on my panels, list them with `kiosko usb`, test each one, and write a
|
|
245
|
+
config.json with one screen per panel (serial in `device`, rotate 180), following
|
|
246
|
+
https://kioskolcd.dev/schema/v1/config.json. Validate it with
|
|
247
|
+
`kiosko config validate` before applying it."*
|
|
248
|
+
|
|
249
|
+
Good to know: a panel serves **one program at a time** (close the manufacturer's
|
|
250
|
+
software and any `trcc` or sender); a serial that isn't plugged in is waited for,
|
|
251
|
+
never swapped for another panel; and the firmware drops frames over about 500 KB,
|
|
252
|
+
so Kiosko re-encodes bigger ones at a lower JPEG quality (`maxBytes`, per screen).
|
|
253
|
+
The USB connection is **experimental**: panel output is verified on Linux, and on
|
|
254
|
+
Windows the installer, the service and the panel listing are, but a panel under
|
|
255
|
+
WinUSB has not been driven yet. More in [docs/usb.md](docs/usb.md).
|
|
256
|
+
|
|
257
|
+
### Monitoring GPUs and tokens per second on Windows, set up by an agent
|
|
258
|
+
|
|
259
|
+
The same agent can put the state of your AI box on a panel: GPU temperature, load
|
|
260
|
+
and VRAM (the `gpu` plugin) and tokens per second, loaded models and queues of your
|
|
261
|
+
local LLM servers (the `llm` plugin). Both ship with the installer (and come with
|
|
262
|
+
`npm install -g kiosko`), so there is nothing extra to install: `kiosko doctor` lists
|
|
263
|
+
`gpu` and `llm` on its `plugins` line.
|
|
264
|
+
|
|
265
|
+
1. **GPUs.** With the default `auto` back end Kiosko runs `nvidia-smi`, which the
|
|
266
|
+
NVIDIA driver installs on Windows. Check it first:
|
|
267
|
+
|
|
268
|
+
```powershell
|
|
269
|
+
nvidia-smi --query-gpu=name,temperature.gpu,utilization.gpu,memory.used,memory.total --format=csv
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
`rocm-smi`, `amd-smi` and the sysfs readings are Linux only, so **AMD and Intel
|
|
273
|
+
GPUs can't be read locally on Windows**. Read them from another machine instead:
|
|
274
|
+
set `ssh` to a Linux host with key login (`ssh -o BatchMode=yes` is used, so no
|
|
275
|
+
password prompts) or `url` to a Prometheus exporter ([DCGM
|
|
276
|
+
exporter](https://github.com/NVIDIA/dcgm-exporter) or
|
|
277
|
+
[nvidia_gpu_exporter](https://github.com/utkuozdemir/nvidia_gpu_exporter), both
|
|
278
|
+
NVIDIA). Per-process VRAM comes from `nvidia-smi` too and can come out empty on
|
|
279
|
+
Windows.
|
|
280
|
+
2. **Tokens per second.** What a server can tell Kiosko depends on the server:
|
|
281
|
+
|
|
282
|
+
| Server | `kind` | Usual address | Gives |
|
|
283
|
+
|---|---|---|---|
|
|
284
|
+
| llama.cpp `llama-server --metrics` | `llamacpp` | `http://127.0.0.1:8080` | tokens/s, queue, KV cache, loaded model (rates are computed between reads of its counters) |
|
|
285
|
+
| vLLM | `vllm` | `http://127.0.0.1:8000` | tokens/s, queue, KV cache (from its `/metrics`) |
|
|
286
|
+
| Hugging Face TGI | `tgi` | where you run it | what its metrics expose |
|
|
287
|
+
| Ollama | `ollama` | `http://127.0.0.1:11434` | loaded models, VRAM, keep-alive; **no tokens/s** (Ollama doesn't expose it) |
|
|
288
|
+
| LM Studio, any OpenAI-compatible | `openai` | `http://127.0.0.1:1234` | model list, up or down |
|
|
289
|
+
|
|
290
|
+
Check that the server answers (`curl.exe http://127.0.0.1:8080/metrics` for
|
|
291
|
+
llama.cpp). If the user wants tokens/s and only runs Ollama, say so: the widgets
|
|
292
|
+
will show it as loaded but without a rate.
|
|
293
|
+
3. **Configure it** (agent). The sources are set once under `sources`, the widgets go
|
|
294
|
+
in a screen's tiles (`gpu/cards`, `gpu/vram`, `gpu/history`; `llm/throughput`,
|
|
295
|
+
`llm/models`, `llm/queue`, `llm/status`). This one is checked with
|
|
296
|
+
`kiosko config validate`; use the serial `kiosko usb` printed (or
|
|
297
|
+
`{ "driver": "virtual" }` to look at it in the editor first):
|
|
298
|
+
|
|
299
|
+
```json
|
|
300
|
+
{
|
|
301
|
+
"$schema": "https://kioskolcd.dev/schema/v1/config.json",
|
|
302
|
+
"version": 1,
|
|
303
|
+
"sources": {
|
|
304
|
+
"gpu/devices": { "backend": "nvidia" },
|
|
305
|
+
"llm/servers": {
|
|
306
|
+
"endpoints": [
|
|
307
|
+
{ "name": "ollama", "kind": "ollama", "url": "http://127.0.0.1:11434" },
|
|
308
|
+
{ "name": "llama.cpp", "kind": "llamacpp", "url": "http://127.0.0.1:8080" }
|
|
309
|
+
]
|
|
310
|
+
}
|
|
311
|
+
},
|
|
312
|
+
"screens": [
|
|
313
|
+
{
|
|
314
|
+
"id": "ai-box", "name": "AI box", "width": 1920, "height": 462, "rotate": 180,
|
|
315
|
+
"device": { "driver": "usb", "serial": "2025ECF47BED" },
|
|
316
|
+
"pages": [{
|
|
317
|
+
"id": "ai-home", "name": "AI", "tiles": [
|
|
318
|
+
{ "id": "ai-gpu", "x": 0, "y": 0, "w": 12, "h": 6, "widgets": [{ "id": "ai-gpu-w", "type": "gpu/cards", "options": {} }] },
|
|
319
|
+
{ "id": "ai-tps", "x": 12, "y": 0, "w": 12, "h": 6, "widgets": [
|
|
320
|
+
{ "id": "ai-tps-w", "type": "llm/throughput", "options": {} },
|
|
321
|
+
{ "id": "ai-queue-w", "type": "llm/queue", "options": {} }
|
|
322
|
+
] }
|
|
323
|
+
]
|
|
324
|
+
}]
|
|
325
|
+
}
|
|
326
|
+
]
|
|
327
|
+
}
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
Apply it as in steps 6 and 7 above (`kiosko config validate`, then
|
|
331
|
+
`kiosko config import config.json --apply`). The sources' options also live in
|
|
332
|
+
the editor, under **Settings → Data sources**.
|
|
333
|
+
4. **See it without looking at the panel.** `kiosko render --page AI --live --out ai.png`
|
|
334
|
+
paints that page with the real data and writes a PNG: an agent can open it to
|
|
335
|
+
check that the GPUs and the rates show up. When something is missing the tile says
|
|
336
|
+
why, in the system's language: on a PC without an NVIDIA GPU the GPU tile reads
|
|
337
|
+
"no GPU: nvidia-smi not found", and each server that doesn't answer is marked
|
|
338
|
+
"down". The editor's *Activity* log has the details.
|
|
339
|
+
|
|
340
|
+
A prompt that works: *"On this Windows PC, install Kiosko with the silent installer
|
|
341
|
+
from github.com/kiosko-lcd/kiosko/releases/latest. I run llama.cpp on port 8080 with
|
|
342
|
+
`--metrics` and have an NVIDIA GPU. Write a config.json for my panel (serial from
|
|
343
|
+
`kiosko usb`) with the GPU cards and tokens per second, following
|
|
344
|
+
https://kioskolcd.dev/schema/v1/config.json, validate it with
|
|
345
|
+
`kiosko config validate` and apply it. Then render the page with `--live` and tell
|
|
346
|
+
me what it shows."*
|
|
347
|
+
|
|
348
|
+
What is verified: the `gpu` and `llm` plugins load on Windows (`kiosko doctor` lists
|
|
349
|
+
them) and the config above passes `kiosko config validate`. Reading a real NVIDIA GPU
|
|
350
|
+
on Windows has not been tried (the test machine had none), and the readers of both
|
|
351
|
+
plugins are covered by their own tests on sample output, not by a live run of
|
|
352
|
+
llama.cpp or vLLM on Windows.
|
|
353
|
+
|
|
127
354
|
## Plugins
|
|
128
355
|
|
|
129
356
|
Two plugins ship inside Kiosko: `core` (clock, calendar day, text note,
|
|
@@ -231,7 +458,8 @@ npm run check # TypeScript, strict
|
|
|
231
458
|
npm run web:watch # rebuild the editor on change
|
|
232
459
|
node --conditions=source scripts/render-widgets.ts --plugin core --out tmp/w
|
|
233
460
|
npm run web:demo # the static browser demo, into site/demo
|
|
234
|
-
|
|
461
|
+
npm run web:site # the whole site (front page, gallery, demo, schema), into site/
|
|
462
|
+
scripts/demo-check-docker.sh # build the site and drive it in Chromium, Firefox and WebKit (Docker)
|
|
235
463
|
```
|
|
236
464
|
|
|
237
465
|
The browser demo is the editor built with `KIOSKO_DEMO`: its API
|