Printing with CUPS

you mean like this CUPS - Home Assistant

This is a free world (still mostly) so you can go the route that suits you best :slight_smile:
I was just providing information about a possible route that you could take, if you, or anyone else feels up to the challenge it provides…

I for one appreciate the tips on making a hassio addon. Thsnk you.

ehh… yes? …but no? …but mostly because I didn’t phrase it correctly?

Yes… that appears to do for paper printers what the OctoPrint sensor does for plastic… but I didn’t stop to consider that the HASS OctoPrint sensor really doesn’t do a whole lot for me right now…

For the most part the only thing HASS does is give me a switch to power my printer up via a ZWave outlet, past that I mostly use the OctoPi web interface in a separate browser tab (upload gcode, start prints… etc.

What I really want… is an OctoPi/rint web interface /within/ HASS… not that I’m sure it would be all that useful given… HASS is in a browser tab… Octo is in a browser tab… Putting Octo into HASS just seems like an invitation for Xzibit to show up and be all ‘Yo Dawg. Heard you like browser tabs… so we put a browser tab in your browser tab.’

Absolutely… it may not have appeared to be so, but my comment was mostly about how awesome it is that there is potential in for there to be so many possibilities in the world. That with some free software and a $10 SBC you can convert a non-network printer to a network printer and gain some conveniences that provides.

I’m going to delete the wall of text that followed. You’re welcome.

Mostly… we’re all here for the same reason- HA OUR way.

You want OctoPrint in a browser-tab within HA?
Can be done, see here: Buienalarm visuals in a Panel Iframe

The principle should work for all kinds of URLs. You would need to change the URL in the .html-file.
Is this what you are after?

Do you have this add on anywhere for the CUPS piece? I just want a CUPS server on the network and just want to use the Pi I’m using for HA instead of the second one I’m currently using. I’m happy to work on an add on, but if you have something almost there it would be helpful to pickup where you left off.

i assume yiu are on hassio. If you add the portainer addon you can add any other docker container.

Interesting… hadn’t seen this before. Will look into it. Thanks!

Sorry, I missed you message.

My trial-code can be found here: https://github.com/bouwew/hassio-addons
You can see I commented out most of the code inside the dockerfile.
This remaining code installs cups in a docker, at least, it worked for me at the time.
But you still need to add the configuration. Have a look at https://addons.community
There are many dockerfiles and configuration setup where you can get inspiration from.
Good luck!

People pushing back because CUPS isn’t considered a home automation-related component on another thread is a tiny bit ridiculous. Here’s my personal setup where HA is actually automating my printer using CUPS.

Since I’ve never attempted building any sort of docker container I installed CUPS and SANE on my second RPi. With CUPs all set up I was able to print remotely from my laptop. I had some issues through my phone though as sometimes it wouldn’t show up or it would quickly appear and disappear not being able to select it in time. But was happy for the time being as I mostly printer through the laptop anyway.

Then it got me thinking that there must be a CUPS equivalent for scanners so I found out about SANE, since I was having the same issue with the scanner that I had to get it out, power it up, connect it to the laptop and then finally scan. I was able to get SANE to work through the command line but couldn’t set up the scanner’s own buttons to work and using SANE through windows was also not looking promising.

Idea #1: I have HA so let’s try implementing something through it. I can’t get the physical buttons to work on the scanner so I’ll make button on HA that will trigger the scanner. So I ended up setting up simple switches that turning them on would execute commands which involved connecting to second Rpi through SSH and firing some Bash files.

I ended up with three buttons

  • scanning and saving to a network drive
  • scanning and sending it to my email
  • scanning and printing it (since I had CUPs already set up)

image

Wasn’t the greatest implementation but it seemed to work so I was happy with it.

Idea#2: The first idea worked good enough for me but I wanted something that others in the house could easily use. Having to go to HA find the buttons and click on the right one for someone like my parents isn’t the easiest of things to teach.

Here comes one of the best platforms ever made - ESPHOME! I anyway wanted a nodemcu running ESPHOME in the office to implement a motion sensor to automate the lights so I simply attached some buttons as well and added the automations on the esphome yaml itself and they just fire immediately.

So now you can completely bypass the HA interface, you just press a button next to the printer/scanner and works like a charm. There’s a button for each one of us in the house, which scans a document and sends it to the person’s email. And then a common button that scans and sends it to the printer if someone wants to copy a document.

I don’t see anyone in this thread doing that.

Yeah not on this thread. But here

You could argue the same for Pi-Hole. And yet it is an add-on.
That is the nice thing of using a Docker: you can integrate anything you want into HA that way (as long as you are capable of creating a working Docker :slight_smile: )

1 Like

One day I might just give it a go. First I need to get my hands on a server :slight_smile:

Even without “unrelated” add-ons, that argument is wrong anyway. If someone wants to automatically print a document when a new one becomes available or one is updated or just on a regular interval then that’s automation.

I’d be interested in a CUPS/SANE addon, mostly just to be able to trigger the scanner from a cheap Chromebook that otherwise can’t access the printer/scanner.

Ok for me!

I could get cups up and running in docker, but I struggled to get avahi and air print going to support airprint. I have it working fine installing directly through terminal, but would love an option for a cups-avahi-airprint addon. I found a few containers that seemed to cover it all, but I didn’t want to hand over full host access to get them going.

i configured cup using Portainer on my pi 4 with Hassos… The problem now is that using Hassos 4.20 it works fine, but upgrading to Hassos 5.9 the server still works, but no printer is shown on the net. Which is the problem? What I have to do to share the printer added in cups docker? please help me, thanks.

Still no one created CUPS add-on for HA? :slight_smile: