Turn on printer with a print job (printer power saving)

In order to prevent constantly burning 15-20Watts by having my printer in stand-by mode, I decided to setup a CUPS printserver which turns on a smart plug when a new print job is present.

This is achieved by using a dedicated docker container running CUPS with tea4cups hosted on the same raspberry Pi as my HA instance.
Once a print job has been received, it sends a POST request to a HA-webhook URL which then turns on the smart plug.

Code/technical details can be found here: GitHub - raphis/docker-cups-ha-webhook

Hope this might be useful for someone else as well.

FYI: turning off the printer is done by the smart plug built-in standby killer function (in my case mystrom). However one could solve that with a HA integrated automation as well (e.g. turn off if smart plug power consumption is less than X watts for more than X minutes).

1 Like

Nice workaround!

Isn’t it not advisable to turn off the printer directly? My Canon printer recommends I turn off via the printer power button before cutting off the power. This is so that it can reset the print head and perform any cleanup tasks. My printer also has an auto power-off after a certain time limit - you may want to look if your model also has something similar.

I use a switchbot in combination with a smart plug on my Brother printer. I believe it is recommended to use power button on mine

Thanks for your inputs.

Seems that the power-off causes more discussions than the power-on :wink: So far I haven’t found any information that this isn’t recommended or causes any problems.
The standby-killer setting is set in a way, that it only triggers when the printer is in sleep/standby mode anyway (less than 20W).

The other problem with shutting down the printer is that when power comes back, it remembers its previous state that it was shut down. So it doesn’t boot automatically anymore.
I guess that’s what @devWaves uses his switchbot for, no?

yes I use the switchbot to turn it on/off. the smartplug just kills power

Your project is pretty cool though and I will look into doing something similar

Reviving an ancient thread here, sorry, but @raphi do you still have this repository anywhere? I’m interested in implementing a similar solution.

In case @raphi does not have the repository available, there is another solutions (not mine) that can work.

I currently use this: Home Assistant Printer Power Management | unixorn.github.io

It works well for me. Specially because I don’t have a printer, I have a copier (which uses much more power).

Hey @thiagobruch

Sorry I was on holiday these days. I made the repo public again: GitHub - raphis/docker-cups-ha-webhook

I consider it as kind of a PoC state and it’s not yet generic enough to cater for different needs. But adjust it as you wish.

Best,
Raphael

Hi @raphi,

Thank you for the reply, but I think it was intended to @rafspeik (marking here so he gets a notification).

I currently use the solution from the link that I posted. It works for me.
But I will check you repo, maybe yours is easier to implement and I’ll switch.

Anyway. Thank you :slight_smile:

Thank you both, much appreciated. I think combining elements of these two solutions will provide me with the setup I’m looking for.