zajac-grzegorz / homeassistant-addon-cups-airprint Goto Github PK
View Code? Open in Web Editor NEWCUPS addon with working Avahi in reflector mode
CUPS addon with working Avahi in reflector mode
Hi,
I installed CUPS on my Home Assistant via Add-ons. I try to print via Airprint with my iphone and I only have this papersize A3, A4, A5 but My printer in CUPS is set for Letter paper size. Do you have solution ? I don't find the config files in data/cups.
Thanks
Not sure how to debug this.
Everything works well the first time around, I can see that the directories to store the config in are created. Once I setup my printer everything works well until I restart the addon/docker image. After that my printer list is empty and I’ll have to add it again.
Anyone have any ideas on how to proceed debugging? It looks like the correct folders are linked.
Running latest HA on a home assistant yellow.
Hi,
I try to modify my cupsd.conf to all access from any network but after restart the addon I lost all my config make into the cupsd.conf files. Some peoples have a solution for this issue.
Thanks
I have a Cistizen-310II printer.
And I can't get it to work.
CUPS Linux drivers are available on the Citizen website.
But I won't show you how to install them.
I'm not an expert in Linux.
Can you help me?
Hello,
First, thanks for making this.
However, most people (myself included) use "Addons" -> "Repositories" -> "Add" to install new repo/addons.
Yours doesn't have the right format to allow that (files like repository.json).
Could you please change the file structure to allow that?
Thank you
Hello,
I could not install this add on on my Celeron J4125 based mini PC running HASSOS.
I have the following sueprvisor log as result when trying to install this:
Logger: homeassistant.components.hassio
Source: components/hassio/websocket_api.py:138
Integration: Home Assistant Supervisor (documentation, issues)
First occurred: 08:31:54 (4 occurrences)
Last logged: 08:53:06
Failed to to call /addons/2c6aefcc_cupsik/install - The command '/bin/bash -o pipefail -c apt-get update && apt-get install -y --no-install-recommends sudo locales cups avahi-daemon libnss-mdns dbus colord printer-driver-all printer-driver-gutenprint openprinting-ppds hpijs-ppds hp-ppd hplip printer-driver-foo2zjs cups-pdf gnupg2 lsb-release nano samba bash-completion procps && apt-get clean -y && rm -rf /var/lib/apt/lists/*' returned a non-zero code: 100
Thanks for your work here, especially useful since IOS17.
Any chance to get support for armv7 ?
Hi
Could I please ask you to add the brother printer drivers for some legacy printers to the dockerfile:
Tha package is printer-driver-brlaser
. It's github page is here:
https://github.com/pdewacht/brlaser
I can add it inside the container easily and everything works, but it's not permanent and I do not know how to modify it in HAOS.
Thanks!
Connected old HP LaserJet 1018 with usb, installed in cups and prints are sent to shared printer, all print jobs get status "complete" but nothing printing.
Each print job gets message:
"Use "pdftops-renderer" option (see cups-filters README file) to use Ghostscript or MuPDF for the PDF -> PostScript conversion."
What can I do to make it work?
My printer (and many other Samsung printers unfortunately) are dependent on package provided by Samsung with unversal driver.
It's SCX-4200 which is missing from CUPS, after I add PPD for it from https://support.hp.com/us-en/drivers/selfservice/samsung-scx-4200-laser-multifunction-printer-series/19135263 I see that it's missing file:
Idle - "File "/usr/lib/cups/filter/rastertospl" not available: No such file or directory"
I hope it's possible to easily add it to repo, so I could finally configure cups.. :)
If there's more info needed, please let me know
docker build -t foo .
...
docker run --rm -ti --entrypoint /bin/bash foo
root@8ba099d1a4b8:/# mkpasswd
bash: mkpasswd: command not found
root@8ba099d1a4b8:/# cat /etc/passwd | grep print
print:x:1000:1000::/home/print:/bin/bash
root@8ba099d1a4b8:/# apt update
...
root@8ba099d1a4b8:/# apt install whois
...
root@8ba099d1a4b8:/# mkpasswd
Password:
$y$j9T$qkGeygtaoLpHoNN6vN0CU0$eEab58FX7R8QimvHKzoQeOBvYJkOUpE6/voQqAk9w66
root@8ba099d1a4b8:/# which mkpasswd
/usr/bin/mkpasswd
Sadly command not found
is not raised through the subshell / argument and docker does not abort.
Proposal to fix: #5
The printer appeared to my iOS device but when I attemp to print iOS reports "The printer is offline".
I was able to print the test page from CUPS via the CUPS website.
I installed the addon on my new HA installation:
CUPS Version 3.0.3
HA System:
Version core-2024.2.5
Installation Type Home Assistant OS
Development false
Supervisor true
Docker true
User root
Virtual Environment false
Python Version 3.12.1
Operating System Family Linux
Operating System Version 6.6.16-haos
CPU Architecture x86_64
Timezone Europe/Berlin
Configuration Directory /config
It seems to run but if I try to get to the webinterface :631, I get a forbidden screen.
Log is:
Network interface enumeration completed.
Registering new address record for fe80::c0ec:bcff:feae:3b25 on vethc6027c3.*.
Registering new address record for fe80::f401:7cff:fec2:5c12 on veth88319ce.*.
Registering new address record for fe80::6089:9aff:fee1:c74 on veth1f14353.*.
Registering new address record for fe80::b0c7:9fff:feea:f2e8 on veth6f78aa4.*.
Registering new address record for fe80::4802:e3ff:fe4e:5171 on veth74716d5.*.
Registering new address record for fe80::e0d8:83ff:fea6:18ff on veth180de5f.*.
Registering new address record for fe80::3051:ffff:fe8c:9137 on veth351c658.*.
Registering new address record for fe80::42:29ff:fe23:4a40 on docker0.*.
Registering new address record for 172.30.232.1 on docker0.IPv4.
Registering new address record for fe80::42:dff:fe10:8169 on hassio.*.
Registering new address record for 172.30.32.1 on hassio.IPv4.
Registering new address record for fe80::3225:5797:b859:b3fc on enp0s18.*.
Registering new address record for 192.168.0.10 on enp0s18.IPv4.
Registering new address record for ::1 on lo.*.
Registering new address record for 127.0.0.1 on lo.IPv4.
[09:01:25] INFO: Preparing directories
'/etc/cups' -> '/data/cups'
'/etc/cups/cupsd.conf' -> '/data/cups/cupsd.conf'
'/etc/cups/cups-files.conf' -> '/data/cups/cups-files.conf'
'/etc/cups/cups-pdf.conf' -> '/data/cups/cups-pdf.conf'
'/etc/cups/interfaces' -> '/data/cups/interfaces'
'/etc/cups/ppd' -> '/data/cups/ppd'
'/etc/cups/raw.convs' -> '/data/cups/raw.convs'
'/etc/cups/raw.types' -> '/data/cups/raw.types'
'/etc/cups/snmp.conf' -> '/data/cups/snmp.conf'
'/etc/cups/ssl' -> '/data/cups/ssl'
removed directory '/etc/cups/ppd'
removed directory '/etc/cups/ssl'
removed '/etc/cups/raw.types'
removed '/etc/cups/cupsd.conf'
removed '/etc/cups/cups-pdf.conf'
removed '/etc/cups/raw.convs'
removed '/etc/cups/snmp.conf'
removed '/etc/cups/cups-files.conf'
removed directory '/etc/cups/interfaces'
removed directory '/etc/cups'
'/etc/cups' -> '/data/cups'
[09:01:25] INFO: Starting CUPS server as CMD from S6
Withdrawing address record for fe80::c0ec:bcff:feae:3b25 on vethc6027c3.
Withdrawing address record for fe80::f401:7cff:fec2:5c12 on veth88319ce.
Withdrawing address record for fe80::6089:9aff:fee1:c74 on veth1f14353.
Withdrawing address record for fe80::b0c7:9fff:feea:f2e8 on veth6f78aa4.
Withdrawing address record for fe80::4802:e3ff:fe4e:5171 on veth74716d5.
Withdrawing address record for fe80::e0d8:83ff:fea6:18ff on veth180de5f.
Withdrawing address record for fe80::3051:ffff:fe8c:9137 on veth351c658.
Withdrawing address record for fe80::42:29ff:fe23:4a40 on docker0.
Withdrawing address record for 172.30.232.1 on docker0.
Withdrawing address record for fe80::42:dff:fe10:8169 on hassio.
Withdrawing address record for 172.30.32.1 on hassio.
Withdrawing address record for 192.168.0.10 on enp0s18.
Withdrawing address record for ::1 on lo.
Withdrawing address record for 127.0.0.1 on lo.
Host name conflict, retrying with 1e14b3fb-cups-2
Registering new address record for fe80::c0ec:bcff:feae:3b25 on vethc6027c3.*.
Registering new address record for fe80::f401:7cff:fec2:5c12 on veth88319ce.*.
Registering new address record for fe80::6089:9aff:fee1:c74 on veth1f14353.*.
Registering new address record for fe80::b0c7:9fff:feea:f2e8 on veth6f78aa4.*.
Registering new address record for fe80::4802:e3ff:fe4e:5171 on veth74716d5.*.
Registering new address record for fe80::e0d8:83ff:fea6:18ff on veth180de5f.*.
Registering new address record for fe80::3051:ffff:fe8c:9137 on veth351c658.*.
Registering new address record for fe80::42:29ff:fe23:4a40 on docker0.*.
Registering new address record for 172.30.232.1 on docker0.IPv4.
Registering new address record for fe80::42:dff:fe10:8169 on hassio.*.
Registering new address record for 172.30.32.1 on hassio.IPv4.
Registering new address record for fe80::3225:5797:b859:b3fc on enp0s18.*.
Registering new address record for 192.168.0.10 on enp0s18.IPv4.
Registering new address record for ::1 on lo.*.
Registering new address record for 127.0.0.1 on lo.IPv4.
Withdrawing address record for fe80::c0ec:bcff:feae:3b25 on vethc6027c3.
Withdrawing address record for fe80::f401:7cff:fec2:5c12 on veth88319ce.
Withdrawing address record for fe80::6089:9aff:fee1:c74 on veth1f14353.
Withdrawing address record for fe80::b0c7:9fff:feea:f2e8 on veth6f78aa4.
Withdrawing address record for fe80::4802:e3ff:fe4e:5171 on veth74716d5.
Withdrawing address record for fe80::e0d8:83ff:fea6:18ff on veth180de5f.
Withdrawing address record for fe80::3051:ffff:fe8c:9137 on veth351c658.
Withdrawing address record for fe80::42:29ff:fe23:4a40 on docker0.
Withdrawing address record for 172.30.232.1 on docker0.
Withdrawing address record for fe80::42:dff:fe10:8169 on hassio.
Withdrawing address record for 172.30.32.1 on hassio.
Withdrawing address record for 192.168.0.10 on enp0s18.
Withdrawing address record for ::1 on lo.
Withdrawing address record for 127.0.0.1 on lo.
Host name conflict, retrying with 1e14b3fb-cups-3
Registering new address record for fe80::c0ec:bcff:feae:3b25 on vethc6027c3.*.
Registering new address record for fe80::f401:7cff:fec2:5c12 on veth88319ce.*.
Registering new address record for fe80::6089:9aff:fee1:c74 on veth1f14353.*.
Registering new address record for fe80::b0c7:9fff:feea:f2e8 on veth6f78aa4.*.
Registering new address record for fe80::4802:e3ff:fe4e:5171 on veth74716d5.*.
Registering new address record for fe80::e0d8:83ff:fea6:18ff on veth180de5f.*.
Registering new address record for fe80::3051:ffff:fe8c:9137 on veth351c658.*.
Registering new address record for fe80::42:29ff:fe23:4a40 on docker0.*.
Registering new address record for 172.30.232.1 on docker0.IPv4.
Registering new address record for fe80::42:dff:fe10:8169 on hassio.*.
Registering new address record for 172.30.32.1 on hassio.IPv4.
Registering new address record for fe80::3225:5797:b859:b3fc on enp0s18.*.
Registering new address record for 192.168.0.10 on enp0s18.IPv4.
Registering new address record for ::1 on lo.*.
Registering new address record for 127.0.0.1 on lo.IPv4.
Server startup complete. Host name is 1e14b3fb-cups-3.local. Local service cookie is 29212888.```
I am using HA OS, than I added repository and installed addon.
I added printer (of course I had to reset password for user "print" and allow "all" to be able connect to :631 port as @Local is not sufficient) but after the reboot of HA all confings are gone. Is this common behaviour or bug as it should store all changes in /config/... ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.