[cups.general] ink and toner level with cups

Michael Sweet msweet at apple.com
Fri Jan 7 08:26:24 PST 2011


Also, you can write a small notifier program (maybe even a Python script if Tim has exposed the necessary bits to read an IPP message from stdin) to monitor printer state changes and send a notification when the printer-state-reasons contains one of the toner or marker-supply keywords.

On Jan 7, 2011, at 6:16 AM, Aesis informatica wrote:

> Thanks a lot Tim. I write this small application and i hope that work very well.
> Best regards. Samuele Aesis.
> 
> 
> 
>> 
>> --=-bKp1icTkdhfPmM+0fZq6
>> Content-Type: text/plain; charset="UTF-8"
>> Content-Transfer-Encoding: quoted-printable
>> 
>> 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=3Dcups.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.
>> */
>> 
>> 
>> --=-bKp1icTkdhfPmM+0fZq6
>> Content-Type: application/pgp-signature; name="signature.asc"
>> Content-Description: This is a digitally signed message part
>> 
>> -----BEGIN PGP SIGNATURE-----
>> Version: GnuPG v1.4.11 (GNU/Linux)
>> 
>> iD8DBQBNJvGkBLQafZpK2tcRAmAiAJ0dT93AIkRzPBZ9jv6+OuPqD1ARugCglB6q
>> V1uFO9NayeU7hEIi6EGF3a8=
>> =JSWD
>> -----END PGP SIGNATURE-----
>> 
>> --=-bKp1icTkdhfPmM+0fZq6--
>> 
> 
> _______________________________________________
> cups mailing list
> cups at easysw.com
> http://lists.easysw.com/mailman/listinfo/cups

________________________________________________________________________
Michael Sweet, Senior Printing System Engineer, PWG Chair





More information about the cups mailing list