Skip to content

Upgrading to 1.7.0

Labelyard 1.7.0 is a feature release. Your data, keys and settings carry over; update the tag as described in Tags and updating. Check the points below if a script or integration reads printer data or error answers from the API, creates API keys, or reads the container log.

The SNMP community works like a password for the printer’s status. From 1.7.0 no printer response shows it.

  • GET /api/v1/printers, GET /api/v1/printers/{id} and the admin printer routes report connection.snmp.community_set instead of the community: true when a community is stored.
  • To change the community, send it as before in connection.snmp.community. Leave it out, or send null, to keep the stored one. A new printer without a community gets public.
  • If you change the printer’s host or port, send the community again. Without it the hub answers 422 with snmp_community_required and saves nothing, so a stored community never goes to a new address.
  • The print check before each job now uses the stored community, the same one as status discovery. A printer with its own community no longer shows up as offline when you print.

If a script reads connection.snmp.community, it now finds no value. Read community_set instead.

A key with the admin scope always acts on every printer. A printer list on such a key never had a use for admin routes, and it kept an admin key from printing on other printers. From 1.7.0 the hub ignores the list on an admin key.

  • A key you created with the admin scope and a printer list loses that restriction. It works on every printer, and the key list shows the stored list as ignored. To remove the stored list, send {"allowed_printer_ids": []} to PATCH /api/v1/admin/api-keys/{id}.
  • Creating an admin key with a printer list, or adding a printer list to an admin key, answers 422 with admin_key_not_restrictable. Nothing is saved. Leave the list out, or create a print key if the key must stay on some printers.
  • read and print keys keep their printer list.

If you want an admin key that is limited to some printers, replace it with a print key for those printers and keep a separate admin key for yourself.

A tape label longer than its tape allows no longer prints. That is 1000 mm on TZe tape and 500 mm on heat-shrink tube; DK rolls allow 30 m. A label that printed before 1.7.0, for example a 1.2 m label on TZe tape, is now refused with the new code tape_label_too_long (length_mm, max_mm in the detail): the printing routes answer 422 and a batch with such a label is refused as a whole; the Grocy label webhook answers 202 and its job fails (details below). Shorten the text, or print the content on two labels.

The printing routes answer printer and render errors in one way. Status and code stay the same for every answer that was already a 4xx or 503; the points below change. If an API client such as Hangar reads these answers, check it against this list.

The routes use two body shapes:

  • Envelope: {"detail": {"error_code": "…", "error_message": "…", "error_detail": {…}}}, used by /print, the batch route, the render check and the webhooks.
  • Wrapped problem: {"detail": {"type": "…", "title": "…", "status": …}}, used by the test print.

POST /api/v1/print, POST /api/v1/webhook/spoolman and POST /api/v1/webhook/grocy

  • An SNMP query that fails answers 503 with the new code snmp_query_failed in the envelope, not 500.
  • unsupported_tape, the spool-only tape widths and content_type_data_mismatch answer a fixed text and an error_detail (tape_mm, content_types, missing_fields).
  • printer_offline answers “The printer could not be reached.” and no longer names the printer’s address.

POST /api/v1/render/check and POST /api/v1/render/preview

  • content_type_data_mismatch, qr_payload_too_long, lookup errors and the printer errors answer in the envelope with their status and code, not 500 or a top-level problem.
  • In the render check, unsupported_tape reads “The currently loaded tape width …”.

POST /api/v1/print/{printer_key}/batch

  • An empty tape answers 409 with {"detail": {"error_code": "tape_empty", …}}. It was a top-level problem with "type": "tape-empty". A client that reads type at the top level must read detail.error_code instead.
  • A disabled printer answers 409 with printer_disabled in the envelope, not 500.
  • A tape that does not take the layout’s orientation answers the orientation sentence.
  • printer_offline and snmp_query_failed answer fixed sentences.

POST /api/v1/printers/{printer_id}/test-print

  • An open cover, a tape mismatch and an empty tape answer a wrapped problem under detail, not a top-level problem. The title is a full sentence, and there is no detail text inside.
  • no-tape-loaded has the title “No tape loaded — insert a Brother TZe or DK cartridge.” and no detail text.
  • An unsupported tape answers 409 unsupported-tape (extensions.tape_mm), a label that does not fit its content type 422 content-type-data-mismatch (extensions.missing_fields), an unknown integration 422 integration-unknown-app and a failed lookup 502 integration-lookup-failed. All four were 500.

Printer state and loaded roll (every tape printing route)

  • A print to a tape printer that reports a blocking error bit answers 409 with the new code printer_error and the reported bits in the detail (error_detail.flags in the envelope, extensions.flags in a problem), for example jammed or serviceRequested. It used to be accepted and sent. noPaper still answers tape_empty and doorOpen printer_cover_open. Warning bits (lowPaper, lowToner, overduePreventMaint) do not refuse.
  • A QL roll the printer names as die-cut labels answers 409 with the new code media_type_mismatch (loaded_kind, media_raw). The hub prints on continuous tape only.
  • Right before a QL job is sent, the hub reads the loaded roll again. A different width fails the job with tape_mismatch, a printer without a roll with no_tape_loaded, and nothing is sent. The P-touch printers already did this.
  • After a tape job is sent, the hub reads the printer’s status once more. A blocking error bit the printer did not report before the job ends the job failed with printer_error (an empty tape or an open cover with their own codes), and the printer pauses. Such a job used to end done. A status that cannot be read after sending leaves the job done.
  • A tape job ends done only when the printer confirmed its labels: over IPP (ipp://<printer>:631/ipp/print, the job state) when the printer takes the raster data that way, else with its label counter (SNMP prtMarkerLifeCount). The wait is 15 s plus 8 s per label plus 1 s per 20 mm of tape; a printer that still reports printing (or an IPP job in state processing) gets up to twice that. A label longer than the tape allows (max_length_mm of the tape: 1000 mm on TZe tape, 500 mm on heat-shrink tube) is refused with the new code tape_label_too_long (length_mm, max_mm in the detail). POST /api/v1/print, the batch route, POST /api/v1/webhook/spoolman, POST /api/v1/webhook/grocy and the test print answer 422 and store nothing; a batch with one such label is refused as a whole. The Grocy label webhook (POST /api/v1/webhook/grocy/label) answers before the label is drawn, so it still answers 202, and its job fails with the code, never printed. A retried job, a reprint and a job recovered after a restart are checked when they are sent and fail the same way. The printer does not pause for it. A shortfall ends the job, or the labels of a run the printer did not confirm, failed with the new code labels_not_confirmed (printed, expected in the detail); the printer does not pause for it. An IPP job the printer neither completed in time nor let the hub cancel ends failed with outcome_unknown (the labels may still print), unless the label counter rose by exactly the labels sent; the printer pauses for it, a single job as well as a run. A printer that does not list Get-Job-Attributes and Cancel-Job in operations-supported is sent over TCP 9100. A printer that refuses the counter (noSuchName, noSuchObject, noSuchInstance) three times in a row (within an hour, with no other answer to the counter in between; a read that fails altogether counts neither way) is no longer asked for it; it is asked again after an hour with a fresh count, and with every test print, and print_confirmation then shows channel none with counter_read false. A printer that offers neither keeps the rule above.
  • A tape printer’s test print finds out which of the two works and stores it with the printer: print_confirmation on the printer and its capabilities (channel ipp, label_counter or none). The database gets the column printers.print_confirmation (migration 20261118a2). Until a printer’s first test print the hub asks the printer for IPP when it first sends; a new host or port clears the stored record. Every test print tries IPP again, unless the printer took an earlier test label over IPP and did not complete it without a new blocking bit to explain it (ipp_incomplete in the stored record and in print_confirmation; the printer page names it).

Other routes

  • Sheet print and preview, the calibration page, batch continue and reprint, job retry and the Grocy label webhook answer a known printer or render error with a top-level problem and its status and code, not 500.
  • Every route that answers 503 printer-offline through the global handler has detail “The printer could not be reached.” and no longer names the address.

The OpenAPI document lists every status and code of /print, the batch route and the webhooks, with the body shape.

The hub writes one line per HTTP request to its container output, in nginx’s combined format. It replaces uvicorn’s own access lines: a tool that parsed those sees the new format. A key in the request shows only its public prefix, never the key.

The access log is on by default. Set LABELYARD_ACCESS_LOG=false to turn it off. Successful /healthz and /readiness calls are left out; LABELYARD_ACCESS_LOG_PROBES=true logs them too. Details, and how CrowdSec reads it: access log.

Sessions without the admin scope no longer see Settings in the navigation; the settings routes were admin-only before and still are.

Sheet type files with a placement are format version 2

Section titled “Sheet type files with a placement are format version 2”

A sheet type can now say where the sheet code goes and which backing design its liner carries. When you export a type with such a setting, the file says format_version: 2 and carries id_placement, id_cell or backing_design. Labelyard 1.7.0 and later import it; an older hub refuses it with its version error. A type without these settings still exports as format_version: 1 and imports on older hubs as before. That includes the shipped Avery Zweckform 3490 and 6121 while they keep the backing design Labelyard links them to; once you change their placement or design, they export as version 2.

Importing a type that already exists in the hub adds a version and keeps the hub’s own placement and backing design: a choice made on this hub wins over the file.

The sheet API also knows a new placement: id_placement of a sheet can be back_side. A script that reads it should accept the new value.