[cups.general] ink and toner level with cups

Tim Waugh twaugh at redhat.com
Fri Jan 7 02:57:54 PST 2011


On Fri, 2011-01-07 at 02:47 -0800, Aesis informatica wrote:
> is there a way to see inside the cup of the printers toner level and
> send an email when the toner is about to end?

Although CUPS has a method for sending emails about certain situations
(e.g. job aborted), this isn't one of those situations.

However, you could write a small application to periodically check for
the 'marker-supply' state reasons, marker-supply-low-warning and
marker-supply-empty-error.

In Python it can be checked like:

import cups
c=cups.Connection ()
for printer in c.getPrinters ():
    for reason in printer.get ('printer-state-reasons', []):
        if reason.startswith ('marker-supply'):
            # This printer is low on ink/toner
            break

Tim.
*/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part
URL: <https://lists.cups.org/pipermail/cups/attachments/20110107/43e1c5e2/attachment.bin>


More information about the cups mailing list