Skip to content

Design: Prusa SDK Extension

Timo Sariwating edited this page Nov 28, 2026 · 1 revision

Design: Prusa SDK Extension

The full proposal, with every source line and what was searched: docs/design/prusa-sdk-extension.md. This page is its summary; where they differ, the document counts.

What it is

The printer side of the Prusa Connect SDK, extended for devices that are not Prusa printers. Maker Connect runs a tape label printer, label printers on DYMO's CUPS driver, a GRBL laser cutter, USB cameras, a door controller, a USB scale and a plain Marlin printer over the Prusa Connect printer protocol, unchanged. The document lists every addition that protocol needs: a string device type, a few telemetry keys, INFO kwargs, commands, one event field and a camera stream address. Each addition is new, ignored by a peer that does not know it, and checked against the SDK, PrusaLink, Buddy and Connect so that it does not duplicate anything they have. It is an addition on top of the SDK's protocol, which follows the SDK at c0d7d233 to the letter. Status: proposal. Nothing in it is in Prusa-Connect-SDK-Printer, PrusaLink or Prusa Connect.

Rules for every addition

  • Searched first, and listed. Before an addition is written, the SDK, PrusaLink, Buddy's Connect client and Connect's printer side are searched for the same meaning. Every addition is a row of the document's "Every addition" table, with what was searched; scripts/sdk-extension-check.py fails on a name a reference has and on an addition missing from that table.
  • Additive only. No existing field, header, frame or command changes its meaning. An addition is a new value where the protocol has an open value, a new telemetry key, a new kwarg, a new command or a new endpoint.
  • The protocol's own words first. Where the SDK or Connect already has a key or a command with the same meaning, it is used as it is (for example axis_x, START_PRINT, /c/snapshot). An addition is made only where nothing existing means the same.
  • The SDK's naming. Commands are upper-case with underscores, like LOAD_FILAMENT. Telemetry keys and kwargs are lower-case snake_case, like temp_bed.
  • Ignored by a peer that does not know it. The SDK reads only the kwargs it names; Connect maps only the telemetry keys it knows and drops the rest. A command the SDK does not know is answered REJECTED "Unknown command" by the SDK itself; a known one with no handler, REJECTED "Not Implemented". A Prusa printer never sends an addition, so it is unaffected.

The parts

Part Device Type string Status
1 what a device is (a string printer_type, vendor-or-firmware.model) — (the form of every type below) written
2 the DYMO LabelManager PnP dymo.labelmanager-pnp written
3 label printers on DYMO's CUPS driver (the 450 and the 320) dymo.labelwriter-450, dymo.labelwriter-320, dymo.labelwriter-400 written
4 a laser cutter on GRBL grbl.laser written
5 a USB camera with live view maker-connect.cameras written
6 who the agent is, and what each side knows (6a); updating the agent (6b, no addition) — written
7 a door controller: its type, locks and OPEN_LOCK maker-connect.door-controller written
8 a DYMO M-series scale: its type and three telemetry keys dymo.m-scale written
9 a Marlin printer: its type only; the rest is PrusaLink's use of the SDK marlin.fdm written

"written" is the document's own word for a part's state; the page as a whole is a proposal.

What each part adds

  • Part 1: device types. A string printer_type in the registration body and in the User-Agent-Printer header of every request and of the upgrade; get_info sends type, version and subversion as null for a string type.
  • Part 2: a tape label printer. The telemetry keys media_loaded, battery_percent and raw_status, and the kwarg tape_size_mm (19, 12, 9 or 6) on START_CONNECT_DOWNLOAD.
  • Part 3: label printers on DYMO's CUPS driver. The kwarg page_size on START_CONNECT_DOWNLOAD (one of the PPD's own PageSize choices); the states and the event's reason are the SDK's own, and STOP_PRINT stops a running label.
  • Part 4: a GRBL laser cutter. The telemetry key machine_state, the INFO kwargs max_power, laser_mode, travel_x, travel_y, travel_z and firmware_info, the kwarg from_line on START_PRINT, and the commands HOME, UNLOCK, JOG, SET_ORIGIN, GO_TO_ORIGIN and FRAME.
  • Part 5: a USB camera. stream_url in the config of POST /p/camera, so the server can read the agent's MJPEG stream for live view; the cameras of an agent register under the device type maker-connect.cameras.
  • Part 6: the agent and the server. 6a adds the INFO kwargs agent_id and extensions and the server-to-device command SET_SERVER_INFO (release, extensions, wants); 6b adds nothing, the update is the SDK's own UPGRADE.
  • Part 7: a door controller. The type maker-connect.door-controller, the INFO kwargs lock_count and extensions, the telemetry key locks (with lock, door, resting_s), and the command OPEN_LOCK (lock, expires_at) with the machine reasons NO_SUCH_LOCK, LOCK_RESTING, EXPIRED and NO_TIME.
  • Part 8: a USB scale. The telemetry keys weight, weight_unit and scale_status; the scale is read only, and every printer command is answered REJECTED "Not Implemented".
  • Part 9: a Marlin printer. The type marlin.fdm, the INFO kwargs firmware_info, firmware_capabilities and firmware_area (beside the SDK's own firmware), and the event field gcode_output in the data of the FINISHED of a GCODE command.

Planned: part 10, an input device (a Stream Deck on the agent).

Clone this wiki locally