Repository navigation
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.
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.
-
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.pyfails 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, liketemp_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.
| 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.
-
Part 1: device types. A string
printer_typein the registration body and in theUser-Agent-Printerheader of every request and of the upgrade;get_infosendstype,versionandsubversionasnullfor a string type. -
Part 2: a tape label printer. The telemetry keys
media_loaded,battery_percentandraw_status, and the kwargtape_size_mm(19,12,9or6) onSTART_CONNECT_DOWNLOAD. -
Part 3: label printers on DYMO's CUPS driver. The kwarg
page_sizeonSTART_CONNECT_DOWNLOAD(one of the PPD's ownPageSizechoices); the states and the event'sreasonare the SDK's own, andSTOP_PRINTstops a running label. -
Part 4: a GRBL laser cutter. The telemetry key
machine_state, theINFOkwargsmax_power,laser_mode,travel_x,travel_y,travel_zandfirmware_info, the kwargfrom_lineonSTART_PRINT, and the commandsHOME,UNLOCK,JOG,SET_ORIGIN,GO_TO_ORIGINandFRAME. -
Part 5: a USB camera.
stream_urlin theconfigofPOST /p/camera, so the server can read the agent's MJPEG stream for live view; the cameras of an agent register under the device typemaker-connect.cameras. -
Part 6: the agent and the server. 6a adds the
INFOkwargsagent_idandextensionsand the server-to-device commandSET_SERVER_INFO(release,extensions,wants); 6b adds nothing, the update is the SDK's ownUPGRADE. -
Part 7: a door controller. The type
maker-connect.door-controller, theINFOkwargslock_countandextensions, the telemetry keylocks(withlock,door,resting_s), and the commandOPEN_LOCK(lock,expires_at) with the machine reasonsNO_SUCH_LOCK,LOCK_RESTING,EXPIREDandNO_TIME. -
Part 8: a USB scale. The telemetry keys
weight,weight_unitandscale_status; the scale is read only, and every printer command is answeredREJECTED"Not Implemented". -
Part 9: a Marlin printer. The type
marlin.fdm, theINFOkwargsfirmware_info,firmware_capabilitiesandfirmware_area(beside the SDK's ownfirmware), and the event fieldgcode_outputin thedataof theFINISHEDof aGCODEcommand.
Planned: part 10, an input device (a Stream Deck on the agent).
Home · maker-connect.xyz · for makerspaces
Guides
- Getting Started
- Proxmox
- The Agent
- Updates
- Klipper
- Lasers
- Label Printers
- Cameras
- Materials
- Machine Profiles
- Supported Machines
- Hardware
- For Manufacturers
- Similar Projects
Design
- House Style
- Hub Core v2
- Prusa SDK Extension
- Devices in a Tree
- Multi-Tenant Hub
- Consumables and Stock
- Print Farm
- Devices and Rights
- Door Access
- Door Controller
- The Website
- Guides
- Stream Deck (idea, WIP)
- Roadmap
Code