AllMyPrinters
Tous les sujets
BugFait dans la 0.21.0

Kobra X (LAN mode): Pause/Stop not executed via agent, library upload fails with file_gone

Burnie· modifié
Version de l’app
0.18.2
Version de l’agent
0.18.2
Imprimante
Anycubic Kobra X

Hi,

Two issues with the self-hosted agent and an Anycubic Kobra X in LAN mode, and one feature request.

Setup
- Agent: allmyprinters-agent 0.18.2 (Docker, ghcr.io/nolimitek/allmyprinters-agent@sha256:850d686d528e30c42a72b6e1fb51c047e7fc652316392f53323008b6c7b7d636), on the home LAN
- Android app: version 0.18.2, paired with the agent over the LAN tunnel ("Access from anywhere" off)
- Printer: Anycubic Kobra X, firmware 2.0.2.8, LAN mode, ACE unit attached
- Remote relay and push via allmyprinters.com are disabled. The plan is fetched normally (beta, valid).

## 1. Pause and Stop do nothing, Resume works

Tested on 2026-11-22 during a running print (task id 183774), standing at the printer:

| Action from the app | Result |
|---|---|
| Light on/off | works immediately |
| Pause | nothing happens, the print continues (we then paused on the printer's touchscreen) |
| Resume (after pausing on the screen) | works: the printer reheats, purges and continues |
| Stop (earlier print, task id 545420) | nothing happens, the print continues (we then stopped it on the screen) |

The printer state was followed in Home Assistant. No state change to pausing/stopping happened after the app commands, only after we pressed the buttons on the screen. The app showed no error.

From the agent code, printer_cmd for acl sends
{type: "print", action: "pause"|"stop"|"resume", data: {taskid: "-1"}} on
anycubic/anycubicCloud/v1/web/printer/<mainboard>/<serial>/print.
Resume is accepted with taskid "-1" but Pause and Stop are not. Perhaps the Kobra X needs the real task id (from info.project.taskid) for pause/stop, or a different action name or topic branch. We cannot see the printer's reply because the MQTT connection is TLS.

This matters for safety: Stop in the app (and in the Home Assistant integration) looks like it worked, but the printer keeps printing.

## 2. Uploading a file to the library from the app fails ("Upload failed.")

When adding haken.stl (approx. 0.1 MB) to a bookmarked model ("Does this file belong to a bookmarked model?"), the app shows "Upload failed.". "No, just print" with the same file works.

The agent's diagnostics (amp_diag) show the same entry for every attempt:

{"a":"lib","err":"IllegalStateException","d":"app"}   2026-11-21 16:06Z, 2026-11-22 08:07Z, 2026-11-22 14:18Z

So native('lib_put') → fileOf(token) throws file_gone on the agent. The stash token from the app does not exist on the agent: it looks like the app stashes the file on the phone (or on another instance) and then calls lib_upload / amp_lib_attach on the agent with that token. The agent's disk has plenty of free space, and the library directory is writable (earlier 3MF files are there).

Thanks for the app, it works well otherwise!

Moi aussi0

3 réponses

Chris Équipe

Hi Burnie,

thanks for the detailed report – you were right on both points. Both are fixed in version 0.19.6, which goes out later today.

1. Pause / Stop
The agent sent the print commands with taskid "-1". The Kobra X ignores pause and stop without the real task id – only resume accepts it. Agent 0.19.6 now sends the task id the printer itself reports (info.project, under either taskid or task_id depending on the firmware, otherwise from the print report). The fan control in the app uses it too. Pause and stop should now take effect right away.

2. Upload to the library fails
A file shared into the Android app ("Share" / "Open with") stayed on the phone, and in agent mode only the phone's token reached the agent – hence file_gone. From 0.19.6 the app first sends a shared file through the tunnel to the agent, then attaches or prints it. That part lives in the agent's interface, so updating the agent is enough here.

Also in 0.19.6 for the Kobra X: prints you start on the screen or send from Anycubic Slicer Next are now deducted from the spool. The printer reports how much filament it actually pushed, and the agent books it to the slot that was feeding.

You're still on 0.18.2 – once 0.19.6 is out, please update the container (docker pull ghcr.io/nolimitek/allmyprinters-agent:latest, then recreate it) and the app. I'll mark this topic as done here when it's online.

Let us know whether pause and stop work for you now.

Cheers
Chris

Burnie

Hi Chris,

thanks a lot for the quick fixes – that was fast!

Setup: I'm now on agent 0.19.6 (I had already moved from 0.18.2 to 0.19.5 earlier today, then to 0.19.6 when it came out). Android app updated to the latest version. Kobra X, firmware 2.0.2.8, LAN mode, ACE attached.

1. Pause / Resume / Stop – works
Tested today, standing at the printer. The printer reacts within about a second every time (followed in Home Assistant):

| Print started from | Pause | Resume | Stop | Agent diagnostics |
|---|---|---|---|---|
| Anycubic Slicer Next | ok | ok | ok | pause taskid=-1, stop taskid=-1 |
| Printer screen ("print again") | ok | ok | – | pause taskid=-1 |
| AllMyPrinters app | ok | ok | – (didn't want to lose the part) | pause taskid (real id) |

So for prints started outside the app the printer apparently has no task id and "-1" is accepted, while prints started from the app/agent get a random task id – that was exactly the case that failed before (task ids 183774 and 545420 in my report). With 0.19.6 the agent now sends the real id and it works.

2. Filament for prints started outside the app – works
The print started from the printer's screen (about 3 h 20 min) was booked with 59.6 g to the right slot, and the one I stopped early with 1.2 g.

3. 24-hour time – works
Updated the app; the times are now shown in 24-hour format.

4. Library upload – works
I shared a 3MF (KlickyProbe_v2.3mf, 1.6 MB) from the phone into the app and attached it to a bookmarked model: it went through and is in the agent's library, no "Upload failed" and no file_gone in the diagnostics.

New small bug: "Save as" on the phone also starts a download on the PC
When I used "Save as" for a library model in the app on the phone, Chrome on my PC (with the agent's web page open) also popped up a "Save As" dialog for the same file. It looks like lib_save_as sends the agent_download event to all connected clients (/events), not only to the one that asked. It would be better to send it only to the requesting client.

Feature request: several plates in "Edit plate"
When a model has many parts (for example the Elecrow CrowPanel case, 3 parts), they don't all fit on one plate ("Doesn't fit on the plate" on my 310 × 310 mm Tronxy X5S). It would be great to be able to add more plates in "Edit plate", move parts between them and then print the plates one after another (like plates in Orca/Bambu Studio). Today I have to remove parts and start the model again for each print.

Related: it would be nice to add more parts (files) from the library to the same plate/project in "Edit plate", and when everything doesn't fit, new plates are created automatically (auto-arrange over as many plates as needed).

Thanks again, great support!

Burnie

Chris Équipe

Hi Burnie,

thanks for testing everything so thoroughly – great to hear that pause/resume/stop, the filament booking, 24-hour time and the library upload all work now.

Save as: you're right – the agent sends the download to every open page instead of only to the one that asked. I'll fix it so only the device that tapped "Save as" gets the file. It comes with the next update; you'll see it in the "Coming in the next update" box at the top of the community.

Several plates in "Edit plate": good idea – together with adding more files from the library and auto-arranging over as many plates as needed. That's a bigger change to the editor, so it goes on the list (I've opened a topic for it) and I'll report back here.

Thanks again!
Chris

Connecte-toi pour répondre

Signaler un contenu