kiosko-plugin-3d-printer 0.0.0-stage → 0.1.0
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/LICENSE +21 -0
- package/NOTICE +17 -0
- package/README.md +142 -2
- package/dist/index.js +1925 -0
- package/docs/camera.png +0 -0
- package/docs/job-bar.png +0 -0
- package/docs/job-finished.png +0 -0
- package/docs/job-small.png +0 -0
- package/docs/job-square.png +0 -0
- package/docs/job-strip.png +0 -0
- package/docs/job.png +0 -0
- package/kiosko-manifest.json +572 -0
- package/package.json +82 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Loksly
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/NOTICE
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
kiosko-plugin-3d-printer
|
|
2
|
+
Copyright (c) Loksly. MIT licence (see LICENSE).
|
|
3
|
+
|
|
4
|
+
It talks to Moonraker (https://github.com/Arksine/moonraker), OctoPrint
|
|
5
|
+
(https://octoprint.org) and Bambu Lab printers' local MQTT broker over the
|
|
6
|
+
network; it contains no code of theirs. The MQTT client is its own, of
|
|
7
|
+
MQTT 3.1.1 as the OASIS standard describes it.
|
|
8
|
+
|
|
9
|
+
The test fixtures in src/fixtures are answers of real servers, recorded
|
|
10
|
+
with scripts/capture-octoprint.ts and scripts/capture-moonraker.ts from the
|
|
11
|
+
containers scripts/e2e.sh starts (OctoPrint 2.0.2 with its virtual printer;
|
|
12
|
+
Klipper v0.14 and Moonraker from prind's images, with Klipper's
|
|
13
|
+
Linux-process MCU): a test print of a model drawn by this plugin, nothing
|
|
14
|
+
of anyone's. Two are written by hand, in the documented shape: Moonraker's
|
|
15
|
+
job history (moonraker/history.json; the test setup's stayed empty) and a
|
|
16
|
+
Bambu Lab printer's full report (bambu/pushall.json, as the community has
|
|
17
|
+
documented them from P1 and X1 printers).
|
package/README.md
CHANGED
|
@@ -1,3 +1,143 @@
|
|
|
1
|
-
#
|
|
1
|
+
# kiosko-plugin-3d-printer
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Your 3D printer on the panel: the print going on with its model, progress, time left and when it will be done, the layer and the temperatures, and the webcam. A full-screen alert when a print fails, and a reminder to take the part off when it is done. Klipper (Moonraker: Mainsail, Fluidd), OctoPrint and Bambu Lab in LAN mode, on your network, no cloud.
|
|
4
|
+
|
|
5
|
+
A plugin for [Kiosko](https://github.com/kiosko-lcd/kiosko), the widget mosaic for small USB LCD panels.
|
|
6
|
+
|
|
7
|
+

|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
In Kiosko, **Plugins → Install from npm** → `kiosko-plugin-3d-printer`, then restart Kiosko. Or from a terminal:
|
|
12
|
+
|
|
13
|
+
```sh
|
|
14
|
+
npm install --prefix ~/.config/kiosko/plugins kiosko-plugin-3d-printer
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
(macOS: `~/Library/Application Support/Kiosko/plugins`, Windows: `%APPDATA%\Kiosko\plugins`.)
|
|
18
|
+
|
|
19
|
+
## Requirements
|
|
20
|
+
|
|
21
|
+
A 3D printer reachable from this machine on your network, running one of:
|
|
22
|
+
|
|
23
|
+
- **Klipper** with **Moonraker** (what Mainsail and Fluidd talk to: MainsailOS, FluiddPi, KIAUH installs, Sonic Pad and K1 with root, Voron, RatRig…). Nothing to set up if this machine is in Moonraker's `trusted_clients` (the usual LAN range is); otherwise an API key.
|
|
24
|
+
- **OctoPrint** (OctoPi): an API key, made in *Settings → Application Keys*.
|
|
25
|
+
- **Bambu Lab** (X1, P1, A1, H2): the printer in **LAN only** mode, and on recent firmware **Developer mode** too (Bambu's *Authorization Control* turned third-party access off by default in 2025); its IP address, serial number and LAN access code, all on its screen.
|
|
26
|
+
|
|
27
|
+
## What it does on your machine
|
|
28
|
+
|
|
29
|
+
- **Internet**: none. It contacts the printers (and cameras) whose addresses you set in its options, on your network.
|
|
30
|
+
|
|
31
|
+
## Widgets
|
|
32
|
+
|
|
33
|
+
### Print — `3d-printer/job`
|
|
34
|
+
|
|
35
|
+
The print going on: the model, how far it is, how long is left and when it will be done, the layer and the temperatures. Finished, failed or paused, it takes its tile over until you see to it; free, it gives its turn to the tile's other widgets.
|
|
36
|
+
|
|
37
|
+
The model's picture is the slicer's thumbnail (PrusaSlicer, OrcaSlicer, SuperSlicer and Cura write them into the G-code; OctoPrint 2.0 reads them itself, 1.x with a thumbnail plugin), or the webcam when the file has none. Beside the words on a wide tile, above them on a square or tall one, and as a strip on a low bar:
|
|
38
|
+
|
|
39
|
+
 
|
|
40
|
+
|
|
41
|
+

|
|
42
|
+
|
|
43
|
+
 
|
|
44
|
+
|
|
45
|
+
| Option | | Default |
|
|
46
|
+
|---|---|---|
|
|
47
|
+
| `picture` | `model` (the slicer's thumbnail, else the camera), `camera` or `none` | `model` |
|
|
48
|
+
| `showTemps` | Nozzle and bed temperatures under the bar | `true` |
|
|
49
|
+
|
|
50
|
+
What it shows, by what the printer is doing:
|
|
51
|
+
|
|
52
|
+
| | |
|
|
53
|
+
|---|---|
|
|
54
|
+
| Preparing | Heating (with the temperatures climbing), homing, levelling: the print has started, no plastic laid yet |
|
|
55
|
+
| Printing | The layer, the percentage, the time left and when it will be done, in the accent colour |
|
|
56
|
+
| Paused | In amber, with the printer's reason when it gives one (a filament runout, a Bambu HMS code); it keeps its tile |
|
|
57
|
+
| Finished | In green, how long it took and since when, and *Take the part off the bed*; it keeps its tile for *Show a finished print for* (30 min). A light sweeps along the bar when it has just finished |
|
|
58
|
+
| Cancelled | Dimmed, where it stopped, for the same time |
|
|
59
|
+
| Failed, Error | In red, with the printer's words (Klipper's error, a shutdown, OctoPrint's) |
|
|
60
|
+
| Free, Off | Nothing to show: the tile's other widgets take their turn (alone, it says *The printer is free* / *… is off*) |
|
|
61
|
+
|
|
62
|
+
### Printer camera — `3d-printer/camera`
|
|
63
|
+
|
|
64
|
+
The printer's webcam, a picture every 10 seconds while it prints (every minute otherwise), filling the tile, with a strip of how far the print is and how long is left. The camera Moonraker or OctoPrint have set up, or any address that answers with a JPEG.
|
|
65
|
+
|
|
66
|
+

|
|
67
|
+
|
|
68
|
+
| Option | | Default |
|
|
69
|
+
|---|---|---|
|
|
70
|
+
| `onlyWhilePrinting` | Only while a print goes on, or a finished one waits to be taken off; off: always | `true` |
|
|
71
|
+
| `showProgress` | The strip with the progress over the picture | `true` |
|
|
72
|
+
|
|
73
|
+
## Data source
|
|
74
|
+
|
|
75
|
+
### 3D printer — `3d-printer/status`
|
|
76
|
+
|
|
77
|
+
One **profile per printer** (Settings → Data sources → 3D printer → *Add profile*); each widget picks its printer. Read every 5 seconds while a widget shows it.
|
|
78
|
+
|
|
79
|
+
| Option | | |
|
|
80
|
+
|---|---|---|
|
|
81
|
+
| `kind` | `moonraker` (Klipper), `octoprint` or `bambu` | |
|
|
82
|
+
| `url` | The printer's address: its web page (`http://voron.local`), Moonraker's port (`http://voron.local:7125`), OctoPrint behind a path (`http://octopi.local/octoprint`); for Bambu Lab, its IP address | network |
|
|
83
|
+
| `apiKey` | OctoPrint's key; Moonraker's, only if it asks for one | secret |
|
|
84
|
+
| `serial` | Bambu Lab: the printer's serial number | |
|
|
85
|
+
| `accessCode` | Bambu Lab: the LAN access code | secret |
|
|
86
|
+
| `name` | What to call it on the panel; empty: its own name (Klipper's hostname, OctoPrint's title) or its address | |
|
|
87
|
+
| `camera` | *Advanced*: a snapshot address of your own (a JPEG); empty: the printer's webcam | network |
|
|
88
|
+
| `finishedMs` | How long a finished, cancelled or failed print stays on the panel (30 min) | |
|
|
89
|
+
|
|
90
|
+
The webcam: Moonraker's first enabled one (`/server/webcams`), OctoPrint's snapshot address. An address on `localhost` or `127.0.0.1` (OctoPrint's default, `http://127.0.0.1:8080/?action=snapshot`) is the printer's view of itself, which OctoPi and MainsailOS publish under `/webcam/` on their web server: that is where it is asked for. A user and password written in the camera's address are sent as basic auth, and never travel in the widgets' data.
|
|
91
|
+
|
|
92
|
+
## Alerts
|
|
93
|
+
|
|
94
|
+
Full screen, from the source (also with no widget, if you turn on **Watch for alerts without a widget** for the source in Settings → Data sources):
|
|
95
|
+
|
|
96
|
+
| | |
|
|
97
|
+
|---|---|
|
|
98
|
+
| **Print failed** (amber) | The print stopped on an error, with the printer's words |
|
|
99
|
+
| **Printer error** (amber) | Klipper shut down, OctoPrint lost its board: whatever the print |
|
|
100
|
+
| **Print finished** (blue) | For 15 minutes |
|
|
101
|
+
|
|
102
|
+
A print found already over when Kiosko starts is shown (while recent) but not announced.
|
|
103
|
+
|
|
104
|
+
## Tested against
|
|
105
|
+
|
|
106
|
+
- **OctoPrint 2.0.2** with its virtual printer, in Docker: a print heating, printing, paused and resumed, finished; another cancelled; the printer disconnected. Its own thumbnails (2.0) included.
|
|
107
|
+
- **Klipper v0.14 + Moonraker** (prind's images), in Docker: a printer with no motors and no heaters (Klipper's Linux-process MCU, `kinematics: none`) printing a PrusaSlicer-style file with a thumbnail and layer information, paused, finished, cancelled, failed on an error, and an emergency stop. Not tried: temperatures from real heaters (their fields are Klipper's documented ones), and Moonraker's job history, which stayed empty in that setup (its answer in the tests follows Moonraker's documentation).
|
|
108
|
+
- **Bambu Lab: not tried on a real printer.** The MQTT client was tried against a real MQTT broker (Aedes), with a stand-in for the printer's firmware sending reports in the shape the community has documented from P1 and X1 printers (a full report after `pushall`, then only what changes). Status only: the camera (RTSP on the X1, Bambu's own JPEG stream on the P1 and A1) and the model's thumbnail (inside the 3MF, over FTPS) are not read.
|
|
109
|
+
- PrusaLink (Prusa MK4, XL, Mini) is not supported yet.
|
|
110
|
+
|
|
111
|
+
The answers recorded from those servers are in `src/fixtures`; the unit tests replay them.
|
|
112
|
+
|
|
113
|
+
```sh
|
|
114
|
+
scripts/e2e.sh up # 127.0.0.1 only
|
|
115
|
+
node --conditions=source scripts/capture-octoprint.ts http://127.0.0.1:18080 KIOSKOE2ETESTKEY0123456789ABCDEF
|
|
116
|
+
node --conditions=source scripts/capture-moonraker.ts http://127.0.0.1:17125
|
|
117
|
+
node --conditions=source scripts/check-bambu-mqtt.ts 127.0.0.1 18883
|
|
118
|
+
scripts/e2e.sh down
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## Keys and access codes
|
|
122
|
+
|
|
123
|
+
They are kept in the source's options (secret fields) and sent only to the printer they belong to: never in the widgets' data, the logs or the messages on the panel. The plugin talks only to the addresses you type (`network: user`); it runs no programs and reads no files but its own cache. A Bambu Lab printer's certificate is its own, signed by Bambu: the connection is encrypted but the certificate is not checked against the system's (it never would pass); the access code is the secret.
|
|
124
|
+
|
|
125
|
+
## Development
|
|
126
|
+
|
|
127
|
+
```sh
|
|
128
|
+
npm install
|
|
129
|
+
npm test # node:test
|
|
130
|
+
npm run check # TypeScript
|
|
131
|
+
npm run build # dist/index.js, what Kiosko loads
|
|
132
|
+
node --conditions=source scripts/screenshots.ts # docs/*.png
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
To try it in a running Kiosko without publishing: `kiosko plugins link .` and restart Kiosko.
|
|
136
|
+
|
|
137
|
+
Working on Kiosko and its plugins together: clone them side by side
|
|
138
|
+
(`kiosko/` and `kiosko-plugins/kiosko-plugin-3d-printer/`) and run `npm install` in
|
|
139
|
+
`kiosko/`; its workspaces link every plugin found in `../kiosko-plugins`.
|
|
140
|
+
|
|
141
|
+
## License
|
|
142
|
+
|
|
143
|
+
MIT. Klipper, Moonraker, Mainsail, Fluidd, OctoPrint, PrusaSlicer, OrcaSlicer and Bambu Lab are names of their owners; this plugin talks to their APIs and contains none of their code.
|