Printing with CUPS

Hi all!

How would one go ahead to install CUPS on HASS.IO?

The only solution to this is to create an add-on for this I guessā€¦

2 Likes

I went ahead an created the add-on and I have the server running, but I canā€™t pass the printer through just yet. I will keep working on it, if I figure it out I will let you know.

Thanks!

I was able to work around it by running CUPS on another Pi (my MQTT server) and sending status and inklevels through MQTT!

hi

can you make the add on available?

thanks
peter

+1
Would be great to be able to hook up my old laser printer to my Pi running hass.io.

Just subscribing to that topic to get some news.
I started this:

But it looks like my idea is stupid on that part of the forum.

Edit:
I found that :
ā‡ CUPS / Print server Ā· Issue #33 Ā· hassio-addons/repository Ā· GitHub

As an example and use case for if someone wanted to make an add-on or integrationā€¦

I also have CUPS running, but on a different Pi (in my case- a Pi running OSMC).

Mostly Iā€™m just curious about what added value other people see coming from having CUPS integrated into HASS.

Ink Levelsā€¦ what else?

Thereā€™s apparently no way to install CUPS or SANE (scanner server) on HASSIO except building an add-on.
I understand a printer or scanner server isnā€™t home automation but HASSIO addons are so easy to install & useā€¦ & I donā€™t see the need of buying another RPi3 or another device just for that.

I will try to find another solution.

1 Like

Pick up a Pi Zero?

I know itā€™s still adding a device, but brings a couple benefits as well,

Iā€™ve been thinking about trying to find a spot to take a power tap inside my printer to power a Zeroā€¦ make the printer wireless, self-contained and better able to locate the printer where I want without needing to be within usb cable range of a full-size Pi (2,3, 3+ or 4).

No need to pick up a Pi. Just create an add-on using docker, that is what most add-onā€™s are.

I played around with integrating CUPS and HPLIP in a docker, but was not successful, HPLIP would not work, but CUPS would install.
I started from here: https://github.com/james-fry/hassio-addons/tree/master/ink2mqtt
You will need to modify the docker-file and the config.json-file. Look inside the docker-file, itā€™s basic Linux.
Next, you will have to add your own addon repository to Home Assistant, so youā€™ll need to work from Github.
When you have installed your repository into HA, you can install the addon from you repository. Next press INSTALL. Any errors will be shown at the bottom in the ā€˜logsā€™ area (press refresh if needed).
And, donā€™t worry, you wonā€™t break HA when there is a mistake in the docker-code :slight_smile:

For more inspiration, look here: https://github.com/hassio-addons
Look at the code in the repositories that start with ā€˜addon-ā€™. Next, look in the subdirectory XYZ of the addon-XYZ repository, there youā€™ll find the code youā€™ll be interested in.

1 Like

ehā€¦ separate Pi is great, simply in part by allowing my HA controller and printer occupy different physical spaces.

ā€¦in hindsightā€¦ I think Iā€™d be more interested in an interface for an external CUPS instance similar to the OctoPi interface.

1 Like

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.