[cups] Power cycle printer through cups

Rainer Dorsch ml at bokomoko.de
Sat Nov 14 12:37:14 PST 2015


Hi,

I realized that tea4cups addresses this problem. That is what I did:

Adding prehooks and posthooks to cups:
--------------------------------------
See tea4cups: https://wiki.debian.org/Tea4CUPS

# apt-get install cups-tea4cups

blackbox:/etc/cups# diff -u printers.conf.bak printers.conf
--- printers.conf.bak   2015-11-14 19:03:31.809604129 +0100
+++ printers.conf       2015-11-14 19:03:48.281573504 +0100
@@ -4,7 +4,7 @@
 <DefaultPrinter HP_LaserJet_CP1525nw>
 UUID urn:uuid:4e66ec2c-a7c7-3446-538f-fc4b803723dc
 Info HP LaserJet CP1525nw
-DeviceURI socket://192.168.178.189
+DeviceURI tea4cups:/socket://192.168.178.189
 State Idle
 StateTime 1447492364
 Type 8425500
blackbox:/etc/cups# systemctl restart cups
blackbox:/etc/cups#

blackbox:/etc/cups# diff tea4cups.conf.orig-2014-04-17 tea4cups.conf
177c177,178
< 
---
> prehook_sispmctl : sispmctl -o 3
blackbox:/etc/cups# 

I power down through a cron job.

Thanks
Rainer


On Saturday 14 November 2015 14:37:22 Rainer Dorsch wrote:
> Hi,
> 
> I would like to poweron my printer automatically when a print job is started
> and power it off again, after it is completed.
> 
> To implement this I need to issue a command "sispmctl -o 1" when the job
> is started and "sispmctl -f 1" when the job is complete. This can be
> optimized somewhat for back-to-back jobs... Can anybody tell what are
> the right hooks inside cups?
> 
> Man thanks
> Rainer

-- 
Rainer Dorsch
Lärchenstr. 6
72135 Dettenhausen
07157/734133
jabber: rdorsch at jabber.org
GPG Fingerprint: 5E6C 4AF9 363C 97A6 F820  C2E6 8CE0 5F33 07F3 EDC0
Full GPG key: http://pgp.mit.edu/



More information about the cups mailing list