pycentauri 0.4.1__tar.gz → 0.4.2__tar.gz

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.
Files changed (30) hide show
  1. {pycentauri-0.4.1 → pycentauri-0.4.2}/CHANGELOG.md +16 -0
  2. {pycentauri-0.4.1 → pycentauri-0.4.2}/PKG-INFO +1 -1
  3. {pycentauri-0.4.1 → pycentauri-0.4.2}/pyproject.toml +1 -1
  4. {pycentauri-0.4.1 → pycentauri-0.4.2}/src/pycentauri/__init__.py +1 -1
  5. {pycentauri-0.4.1 → pycentauri-0.4.2}/src/pycentauri/models.py +21 -4
  6. {pycentauri-0.4.1 → pycentauri-0.4.2}/src/pycentauri/web/app.js +35 -16
  7. {pycentauri-0.4.1 → pycentauri-0.4.2}/src/pycentauri/web/styles.css +9 -5
  8. {pycentauri-0.4.1 → pycentauri-0.4.2}/.gitignore +0 -0
  9. {pycentauri-0.4.1 → pycentauri-0.4.2}/LICENSE +0 -0
  10. {pycentauri-0.4.1 → pycentauri-0.4.2}/README.md +0 -0
  11. {pycentauri-0.4.1 → pycentauri-0.4.2}/src/pycentauri/camera.py +0 -0
  12. {pycentauri-0.4.1 → pycentauri-0.4.2}/src/pycentauri/cli.py +0 -0
  13. {pycentauri-0.4.1 → pycentauri-0.4.2}/src/pycentauri/client.py +0 -0
  14. {pycentauri-0.4.1 → pycentauri-0.4.2}/src/pycentauri/discovery.py +0 -0
  15. {pycentauri-0.4.1 → pycentauri-0.4.2}/src/pycentauri/mcp/__init__.py +0 -0
  16. {pycentauri-0.4.1 → pycentauri-0.4.2}/src/pycentauri/mcp/__main__.py +0 -0
  17. {pycentauri-0.4.1 → pycentauri-0.4.2}/src/pycentauri/mcp/server.py +0 -0
  18. {pycentauri-0.4.1 → pycentauri-0.4.2}/src/pycentauri/py.typed +0 -0
  19. {pycentauri-0.4.1 → pycentauri-0.4.2}/src/pycentauri/rtsp.py +0 -0
  20. {pycentauri-0.4.1 → pycentauri-0.4.2}/src/pycentauri/sdcp.py +0 -0
  21. {pycentauri-0.4.1 → pycentauri-0.4.2}/src/pycentauri/server.py +0 -0
  22. {pycentauri-0.4.1 → pycentauri-0.4.2}/src/pycentauri/web/__init__.py +0 -0
  23. {pycentauri-0.4.1 → pycentauri-0.4.2}/src/pycentauri/web/index.html +0 -0
  24. {pycentauri-0.4.1 → pycentauri-0.4.2}/tests/__init__.py +0 -0
  25. {pycentauri-0.4.1 → pycentauri-0.4.2}/tests/integration/__init__.py +0 -0
  26. {pycentauri-0.4.1 → pycentauri-0.4.2}/tests/test_client.py +0 -0
  27. {pycentauri-0.4.1 → pycentauri-0.4.2}/tests/test_discovery.py +0 -0
  28. {pycentauri-0.4.1 → pycentauri-0.4.2}/tests/test_rtsp.py +0 -0
  29. {pycentauri-0.4.1 → pycentauri-0.4.2}/tests/test_sdcp.py +0 -0
  30. {pycentauri-0.4.1 → pycentauri-0.4.2}/tests/test_server.py +0 -0
@@ -6,6 +6,22 @@ Changelog](https://keepachangelog.com/en/1.1.0/).
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.4.2] - 2026-04-22
10
+
11
+ ### Changed
12
+ - Complete `PrintInfo.Status` code table, lifted verbatim from the
13
+ authoritative enum in Elegoo's `elegoo-link` SDK. Previously the web
14
+ UI (and the `pycentauri.models.PrintStatus` constants) only covered
15
+ about half the codes — which meant users hit `CODE·20` literally
16
+ during the routine PREHEAT-DONE transition between prints, and
17
+ similarly for 11, 14, 15, 16, 17, 19, 21, 22, 23–26.
18
+ - Added a distinct visual class for the ERROR state (code 14) in the
19
+ web UI so it renders in red with a soft glow instead of falling into
20
+ the generic "unknown" bucket.
21
+ - Renamed a couple of previously-incorrect labels: code 12 was shown as
22
+ "PREPARING", it's actually "RESUMING"; code 18 was shown as
23
+ "RESUMED", it's actually "PRINT START" — both per the SDK.
24
+
9
25
  ## [0.4.1] - 2026-04-22
10
26
 
11
27
  ### Changed
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pycentauri
3
- Version: 0.4.1
3
+ Version: 0.4.2
4
4
  Summary: Local-network toolkit for Elegoo Centauri Carbon 3D printers: async Python client, CLI, MCP server, REST/SSE HTTP server, web UI, and RTSP bridge
5
5
  Project-URL: Homepage, https://github.com/bjan/pycentauri
6
6
  Project-URL: Repository, https://github.com/bjan/pycentauri
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "pycentauri"
7
- version = "0.4.1"
7
+ version = "0.4.2"
8
8
  description = "Local-network toolkit for Elegoo Centauri Carbon 3D printers: async Python client, CLI, MCP server, REST/SSE HTTP server, web UI, and RTSP bridge"
9
9
  readme = "README.md"
10
10
  license = "Apache-2.0"
@@ -25,4 +25,4 @@ __all__ = [
25
25
  "discover",
26
26
  ]
27
27
 
28
- __version__ = "0.4.1"
28
+ __version__ = "0.4.2"
@@ -178,10 +178,13 @@ class Status(BaseModel):
178
178
 
179
179
 
180
180
  class PrintStatus:
181
- """Known ``PrintInfo.Status`` codes.
181
+ """``PrintInfo.Status`` codes from the official Elegoo SDK.
182
182
 
183
- Decoded from CentauriLink and the official SDK; not all codes are observed
184
- on every firmware. Treat unknown codes as opaque.
183
+ Sourced verbatim from
184
+ ``src/lan/adapters/elegoo_fdm_cc/elegoo_fdm_cc_message_adapter.cpp``
185
+ in the ``ELEGOO-3D/elegoo-link`` repository. Codes in the 2-4 and 23-26
186
+ ranges are resin-printer / LCD-specific and typically aren't surfaced
187
+ by the Centauri Carbon, but are kept for forward-compatibility.
185
188
  """
186
189
 
187
190
  IDLE = 0
@@ -195,8 +198,22 @@ class PrintStatus:
195
198
  STOPPED = 8
196
199
  COMPLETED = 9
197
200
  FILE_CHECKING = 10
198
- PREPARING = 12
201
+ PRINTER_CHECKING = 11
202
+ RESUMING = 12
199
203
  PRINTING = 13
204
+ ERROR = 14
205
+ AUTO_LEVELING = 15
206
+ PREHEATING = 16
207
+ RESONANCE_TESTING = 17
208
+ PRINT_START = 18
209
+ AUTO_LEVELING_COMPLETED = 19
210
+ PREHEATING_COMPLETED = 20
211
+ HOMING_COMPLETED = 21
212
+ RESONANCE_TESTING_COMPLETED = 22
213
+ AUTO_FEEDING = 23
214
+ UNLOADING = 24
215
+ UNLOADING_ABNORMAL = 25
216
+ UNLOADING_PAUSED = 26
200
217
 
201
218
 
202
219
  class Attributes(BaseModel):
@@ -5,22 +5,38 @@
5
5
  const $ = (id) => document.getElementById(id);
6
6
 
7
7
  // PrintInfo.Status → display label + semantic class.
8
- // Codes decoded from CentauriLink + official elegoo-link + live observation.
8
+ // Table is authoritative, lifted from Elegoo's own elegoo-link SDK
9
+ // (src/lan/adapters/elegoo_fdm_cc/elegoo_fdm_cc_message_adapter.cpp:33–62).
10
+ // Codes 2/3/4 and 23–26 are resin-printer / LCD-specific — kept here for
11
+ // completeness in case a future firmware surfaces them on the Carbon.
9
12
  const PRINT_STATUS = {
10
- 0: { label: "IDLE", cls: "state-idle" },
11
- 1: { label: "HOMING", cls: "state-printing" },
12
- 2: { label: "DROPPING", cls: "state-printing" },
13
- 3: { label: "EXPOSING", cls: "state-printing" },
14
- 4: { label: "LIFTING", cls: "state-printing" },
15
- 5: { label: "PAUSING", cls: "state-paused" },
16
- 6: { label: "PAUSED", cls: "state-paused" },
17
- 7: { label: "STOPPING", cls: "state-stopped" },
18
- 8: { label: "STOPPED", cls: "state-stopped" },
19
- 9: { label: "COMPLETED", cls: "state-completed" },
20
- 10: { label: "CHECKING", cls: "state-printing" },
21
- 12: { label: "PREPARING", cls: "state-printing" },
22
- 13: { label: "PRINTING", cls: "state-printing" },
23
- 18: { label: "RESUMED", cls: "state-printing" },
13
+ 0: { label: "IDLE", cls: "state-idle" },
14
+ 1: { label: "HOMING", cls: "state-printing" },
15
+ 2: { label: "DROPPING", cls: "state-printing" },
16
+ 3: { label: "EXPOSING", cls: "state-printing" },
17
+ 4: { label: "LIFTING", cls: "state-printing" },
18
+ 5: { label: "PAUSING", cls: "state-paused" },
19
+ 6: { label: "PAUSED", cls: "state-paused" },
20
+ 7: { label: "STOPPING", cls: "state-stopped" },
21
+ 8: { label: "STOPPED", cls: "state-stopped" },
22
+ 9: { label: "COMPLETED", cls: "state-completed" },
23
+ 10: { label: "FILE CHECK", cls: "state-printing" },
24
+ 11: { label: "SELF CHECK", cls: "state-printing" },
25
+ 12: { label: "RESUMING", cls: "state-printing" },
26
+ 13: { label: "PRINTING", cls: "state-printing" },
27
+ 14: { label: "ERROR", cls: "state-err" },
28
+ 15: { label: "LEVELING", cls: "state-printing" },
29
+ 16: { label: "PREHEATING", cls: "state-printing" },
30
+ 17: { label: "RESONANCE", cls: "state-printing" },
31
+ 18: { label: "PRINT START", cls: "state-printing" },
32
+ 19: { label: "LEVEL DONE", cls: "state-printing" },
33
+ 20: { label: "PREHEAT DONE", cls: "state-printing" },
34
+ 21: { label: "HOMING DONE", cls: "state-printing" },
35
+ 22: { label: "RESONANCE OK", cls: "state-printing" },
36
+ 23: { label: "AUTO FEED", cls: "state-printing" },
37
+ 24: { label: "UNLOADING", cls: "state-printing" },
38
+ 25: { label: "UNLOAD ERR", cls: "state-err" },
39
+ 26: { label: "UNLOAD PAUSE", cls: "state-paused" },
24
40
  };
25
41
 
26
42
  function fmtSeconds(s) {
@@ -107,7 +123,10 @@ function renderStatus(raw) {
107
123
  const info = PRINT_STATUS[pstatus];
108
124
  const sw = $("print-status");
109
125
  const sc = $("print-status-code");
110
- sw.classList.remove("state-idle", "state-printing", "state-paused", "state-stopped", "state-completed");
126
+ sw.classList.remove(
127
+ "state-idle", "state-printing", "state-paused",
128
+ "state-stopped", "state-completed", "state-err",
129
+ );
111
130
  if (info) {
112
131
  sw.textContent = info.label;
113
132
  sw.classList.add(info.cls);
@@ -480,11 +480,15 @@ body {
480
480
  text-transform: uppercase;
481
481
  line-height: 1;
482
482
  }
483
- .state-word.state-idle { color: var(--fg-dim); }
484
- .state-word.state-printing { color: var(--ok); }
485
- .state-word.state-paused { color: var(--warn); }
486
- .state-word.state-stopped { color: var(--danger); }
487
- .state-word.state-completed{ color: var(--cyan); }
483
+ .state-word.state-idle { color: var(--fg-dim); }
484
+ .state-word.state-printing { color: var(--ok); }
485
+ .state-word.state-paused { color: var(--warn); }
486
+ .state-word.state-stopped { color: var(--danger); }
487
+ .state-word.state-completed { color: var(--cyan); }
488
+ .state-word.state-err {
489
+ color: var(--danger);
490
+ text-shadow: 0 0 10px rgba(235, 92, 78, 0.45);
491
+ }
488
492
 
489
493
  /* ---- Thermal gauges --------------------------------------- */
490
494
 
File without changes
File without changes
File without changes
File without changes