App submission: scanservjs
Request: #1085
This app will require the scanner to be connected by usb to the Umbrel. Less that ideal, but that's what usb ports on the Umbrel home are for... right?
Also, btw, can you give me the power to close issues in the umbrel repo? There're a lot of resolved issues where the authors are not responding.
App Submission
App name
scanservjs
256x256 SVG icon
(Submit an icon with no rounded corners as it will be dynamically rounded with CSS. GitHub doesn't allow uploading SVGs directly, so please upload your icon to an alternate service, like https://svgur.com, and paste the link below.) We will help finalize this icon before the app goes live in the Umbrel App Store.
This project doesn't have an icon. There're no google image results for scanservjs. You'll have to make an icon of your own.
Gallery images
(Upload 3 to 5 high-quality gallery images (1440x900px) of your app in PNG format, or just upload 3 to 5 screenshots of your app and we'll help you design the gallery images.) We will help finalize these images before the app goes live in the Umbrel App Store.
There's not much about scanservjs on the internet
I have tested my app on:
I haven't tested this app. Both because I don't currently have access to my server and because I don't have a scanner. But it should hopefully work.
Probably it will not work, at least for hp scanners. There are different targets in Dockerfile, you can view build instructions here Ideally, it is better to make a choice in umbrel store to install basic image or hp/airscan image, but as I understand, it is impossible.
And I think you also need to map usb device /dev/bus/usb/
And I think you also need to map usb device
/dev/bus/usb/
They said in the docker guide that --priveleged is used for this
It can work without privileged mode. I installed libsane-hpaio in the container and mapped usb device, it works at least for hp scanner.
It can work without privileged mode. I installed libsane-hpaio in the container and mapped usb device, it works at least for hp scanner.
But we don't want every usb device to be mapped to scanservjs (And we don't which specific device to mount)
It can work without privileged mode. I installed libsane-hpaio in the container and mapped usb device, it works at least for hp scanner.
But we don't want every usb device to be mapped to scanservjs (And we don't which specific device to mount)
Hard question. I think grant container privileged rights is worse than mapping the whole usb bus. At least for ubmrel store application.
Hard question. I think grant container privileged rights is worse than mapping the whole usb bus. At least for ubmrel store application.
Other apps (and umbrel itself) might want to use usb
Thanks for submitting scanservejs @highghlow! And thanks for your input @sund3RRR, much appreciated.
We'll need some help from the community to properly test this app because both @highghlow and I don't have a scanner. This may require some back and forth here. @sund3RRR do you have a SANE compatible scanner?
As I understand it, the idea here is that for this packaging of scanservjs we will assume that a user will plug their scanner directly into their umbrelOS device.
They said in the docker guide that --priveleged is used for this
The increased container privileges may indeed be enough in this case because we have also mapped /var/run/dbus; however, we need to test that this is actually the case.
I have committed some changes to get scanservjs to install correctly and have added what I assume would be the maximum permissions we might need to give this container:
-
privileged: true - mapping
/var/run/dbus - mapping
/dev. (see my comment here for why we may need to do this https://github.com/getumbrel/umbrel-apps/pull/1044#discussion_r1606376243)
This should allow it to work, but our goal now should be to reduce permissions as much as possible without reducing the functionality of scanservjs. We should test the following:
-
Does this PR work as of https://github.com/getumbrel/umbrel-apps/pull/1095/commits/1bc54379cfe648f4ee0d6aef35a5a3bb7063ec5a with with
privileged: true,/var/run/dbus. and/dev? -
Remove the
/devbind mount. Can you boot the scanservjs container without a scanner plugged in, then plug in a scanner and have it be discovered? -
Keep the
/devbind mount but removeprivileged: true. Does it still work? -
remove both
/devmapping andprivileged: true. Does it still work? -
If it turns out that the
/devbind mount is required in the testing above, does reducing the mounts scope to/dev/bus/usbstill work?
@sund3RRR bumping this in case you are able to help test.
@sharknoon do you have a scanner to test by chance?
I don't have an umbrel anymore because I moved my server on orange pi 5 machine.
Ah no worries, thanks for the response @sund3RRR
@nmfretz Unfortunately I don't have a scanner at the moment, mine broke just a couple of weeks ago... But I will buy a new one soon, mainly because of german bureaucracy 😅
But I will buy a new one soon, mainly because of german bureaucracy 😅
Ha! Sounds good @sharknoon.
@al-lac do you by chance happen to have access to a scanner to test this app?
I have a HP All-In-One, could try if that one works. Is not on the officially supported list, but I can give it a try.
Hey @nmfretz, I was able to test this app yesterday with my HP Envy 4500.
It worked flawlessly via airscan or the network. The USB was also mapped into the container, but it never showed up as an option. For me scanning via the network is anyways way more practical 👍
Some stuff from the terminal:
# in the container
root@ddea0e312dc3:/usr/lib/scanservjs# ls /dev/usb/
lp0
root@ddea0e312dc3:/usr/lib/scanservjs# scanimage -L
device `escl:http://192.168.0.15:8080' is a HP ENVY 4500 platen scanner
device `airscan:e0:HP ENVY 4500' is a eSCL HP ENVY 4500 ip=192.168.0.15
# on the umbrel home
root@umbrel-home:~# lsusb
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 003: ID 8087:0aaa Intel Corp. Bluetooth 9460/9560 Jefferson Peak (JfP)
Bus 003 Device 005: ID 03f0:c511 HP, Inc ENVY 4500 series
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Excellent, thanks @al-lac we can get gallery assets prepared!
It worked flawlessly via airscan or the network. The USB was also mapped into the container, but it never showed up as an option.
Let's launch as-is then with these:
volumes:
- ${APP_DATA_DIR}/data/scans:/var/lib/scanservjs/output
- ${APP_DATA_DIR}/data/config:/etc/scanservjs
- /var/run/dbus:/var/run/dbus
# map the host's /dev to allow discovery of usb devices without needing to know apriori which devices are connected
- /dev:/dev
privileged: true
and revisit if we get feedback from users
Gallery assets are ready. Going live!
Thanks again for your efforts on this @unhighghlow.