NottingHack / NottingHack/hms2
IPP Printer Management and Cost Recovery
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 14
- Forks
- 18
- PR merge metrics
- No merged PRs in 30d
Description
Bender seems pretty broken, there's been a lot of talk about buying a new printer, which is a large expensive even excluding the toner (which can be £600 for a full set on its own). While I would really like to see printing in the space be "free", the "give more than you take" is frequently taken advantage of. Some observations:
- Large print jobs are not uncommon
- Donation are very rarely made to cover the costs of printing
- Many of the large print jobs have been done by those paying the minimum
To try and solve these problems and to make the purchase of a new printer an easier sell, I'd like to add printer management and printing cost recovery to HMS. I see this working by treating HMS as an IPP endpoint, intercepting requests and charging snackspace credit.
From discussions in members meetings etc, the suggestion of RFID card readers on printers has come up quite a bit. There are a number of commercial solutions for this, but they're all expensive, and the main advantage of such a system is enabling pick up of prints from any printer. This isn't likely to be an issue for us because we only have a couple of printers.
IPP (Internet Printing Protocol) has been an active protocol for printer sharing for over 30 years and is supported by Linux, macOS and Windows. All networked printers natively support this protocol, as does CUPS. IPP sits on top of HTTP(S) and allows the usual authentication mechanisms expected with HTTP, such as Basic/Digest, an Authorization header, GSSAPI (and so Kerberos) and PKI.
From within HMS, I'd like to add a Printing tab (along side Tools, Teams, Projects, etc), with the following components:
- PDF file upload for printing directly from HMS
- A table of each printer
- Printer name
- Link to job history (I do not want to store documents but file name and charge information)
- The printer status
- A unique IPP address for the user to submit print jobs from native applications
The changes would need the addition of a printer and printer_job entities / tables. Snackspace can be charged with a new transaction_type of PRINT. HMS can likely make us of laravel-printing.
The unique IPP address for a user/printer would be something like https://hms/ipp/printer/{jwt}, where {jwt} is a JSON Web Token containing the printer and user IDs. The secret can be a meta parameter or config option.
{
"pid": 1,
"uid": 1234
}
The use of JWT avoids the need for an additional table to track user/printer relationship (I don't think there's a max length of IPP address to worry about). The IPP address can then be installed on any system supporting IPP as a Generic PDF Printer. The purpose of PDF upload directly from HMS is to avoid users installing their own IPP address on that machine and then getting charged by other users. To avoid mischief while not in the space, the IPP endpoints can be restricted to local subnets like /register-interest
Anyway, I'm going to give this a go. It might be a disaster but we'll see.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the proposed Printing tab, printer and printer_job entities, and the PRINT transaction_type alongside laravel-printing and the IPP endpoint design. Done means HMS can accept PDF uploads, expose authenticated per-user printer addresses, record job history and charges without storing documents, and show printer status.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- laravel, php
- Domain
- authentication, backend, database, full-stack, payments
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100