-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Guide] Setup an HP Printer that requires a plugin #724
Comments
I've been able to set up a HP Envy Inspire 7200 and a HP Envy Pro 6442 with the standard Docker image. Example docker compose :
I use some device overrides for display names and specific resolution but I don't need to force my scanner into the configuration. In the past driver specific tags were available, but they were probably removed because maintaining them is kind of a nightmare. Thinking on a broader scale there should be a plugin system that installs the driver you need when you specify it through a parameter. This of course would require quite some work to make it generic enough (I might be up for that challenge) but the problem again is maintenance. The time and resources of the maintainers are finite and to be honest the project has been resting for quite a while. So while someone might be able to make a POC the issue is maintenance. |
I agree and this is what I was initially working on code for but the HPLIP Plug-in site notes:
And the license states:
which isn't explicitly a statement of "you may not redistribute this software" but it's close enough that I think writing code to automate downloading the binary and circumvent user interaction (including reading the agreement) AND including that in a redistributable (prebuilt) docker image is a pretty gray area. This is why i opted to include the bash script separately in this guide instead of just pushing my own docker image with it while checking for a plugin in a specified folder.
Also agreed and actually it may work with only needing to use |
As long as your code doesn't embed HP's code I don't think they can claim you're copying or redistributing it. It's a shame that SANED_NET_HOSTS/AIRSCAN doesn't work out for you. Hopefully with the plugin installation it works through SANED_NET_HOSTS . |
@davidclaeysquinones I got the automated install script figured out and its available in the PR mentioned above. Tested with my network and I do not need the manual device addition or any ENVs at all anymore. scanservjs detects my scanner using |
I'm glad to hear you were able to add an installation script. In addition note someone not using a HP print probably won't want to install the plugin. I'm personally wanting to write a script to enable the hplip installation so that at some point I can remove it from my host. |
That is what it is doing, as described in the PR.
If those ENVs are not included on container start then the container is exactly the same as the existing scanservjs image. The scripts using those ENVs also check for install status before running so they only run once.
The plugin install script is distro agnostic. If you have the hp driver installed it should be able to determine the matching plugin for you based on output from |
You're right I didn't look at it with enough thought. Now it's up to Sam to determine if he wants to include your script in the main repo or if he only wants to include the modification to have the plugin directory in the Dockerfile and link in the documentation in the repo. |
Part of the reason the scripts are in a new |
If you use an HP All-In-One printer or a LaserJet or MFP-variant HP printer you may need a plugin, along with the actual hpaio driver, in order to get your scanner to work.
Check this list to see if the plugin is Required for your printer
This guide will presume you are using the docker installation for scanservjs but should be applicable to other installations with some modification.
How Do I Know?
If your printer doesn't work out the box the first thing you should do is verify connectivity within the container using
scanimage -L
or consult the other troubleshooting steps.If your printer does show up with
scanimage -L
but is not displaying when being added with the normal methods (ENVs or on startup using SCANIMAGE) then the next step is manually add your device to force scanservjs to try to connect. Using the steps from #701 (comment) :Modify config
Make a copy of
config.default.js
. In theafterConfig(config) {}
block add a statement to push your device to the config like so:Save the modified file as
config.local.js
somewhereMount a folder to config dir in container
Use the documented Volume Mappings and mount the host directory with your
config.local.js
to/etc/scanservjs
in the container. Then (re)start the container and visit the UI.Driver Needed?
If you see an error that contains
invalid argument
then you need a docker image with thelibsane-hpaio
driver installed! The Dockerfile contains a stage specific for installing this driver if you want to build your own. Otherwise, check dockerhub for images that are built for this stage/driver. I am personally using jyavorksy/scanservjs-hplip.Recreate your container with the hpaio-variant docker image (with all the same settings).
Plugin Needed?
If you see an error when visiting the UI (or in logs) that contains
error duing device i/o
then you need the HPLIP Binary Plug-In. The plug-in version you need will match the version of thelibsane-hpaio
driver you have installed. As of this post scanservjs is using debian bookworm with the 3.22.10 driver.Driver Download and Install
Find the matching plugin version from the plugin download page (
hplip-3.22.10-plugin.run
for debian bookworm) and download it somewhere.In your container map a new volume where you access the plugin. Example
-v /opt/blobs:/home/yourUser/hpPrinter
will mount thehpPrinter
folder to/opt/blobs
in the container.Copy the downloaded plugin into the host folder
hpPrinter
. Now you candocker exec
into container to install the plugin. In the container run:This will initiate the interactive installer to install the plugin. You'll need to answer
Y
to a few questions. If the installer finishes withdone.
you are done! Restart the container and refresh devices in the UI to see your printer.If you recreate the container (or update the image) you will need to repeat the installation process.
Convenience Script
This script can be created alongside the plugin to make installation less annoying:
Save the script as
pluginInstall.sh
and runchmod +x pluginInstall.sh
to make it executable. Put it in the same folder as the plugin and now you can exec into the shell (or usedocker run
) and do/opt/blobs/pluginInstall.sh
to make the plug installation unattended.The text was updated successfully, but these errors were encountered: