Unable to Run webcamd2 for a Second usb Camera in Octopi 0.17.0

Thanks Outsourced Guru.
I'll add this rules file and let you know what the results are.

and what happended if you unplug the cam for webcamd and cold.boot the pi with the second cam?
service webcamd2 status
can you post the result?
Is webcamd2 now running, but on the false port 8080? - Carsten

The webcamd2 service is Dead:
pi@octopi:~ $ systemctl status webcamd2.service
● webcamd2.service - the OctoPi webcam daemon with the user specified config
Loaded: loaded (/etc/systemd/system/webcamd2.service; disabled; vendor preset
Active: inactive (dead)
The webcamd service is running and the second camera feed is working in the browser.

and if you
service webcamd2 start

pi@octopi:~ $ ls -l /dev
total 0
crw-r--r-- 1 root root     10, 235 Jan 17 12:02 autofs
drwxr-xr-x 2 root root         580 Jan 17 12:02 block
crw------- 1 root root     10, 234 Jan 17 12:02 btrfs-control
drwxr-xr-x 3 root root          60 Dec 31  1969 bus
crw------- 1 root root     10,  63 Jan 17 12:02 cachefiles
drwxr-xr-x 2 root root        2920 Jan 17 12:02 char
crw------- 1 root root      5,   1 Jan 17 12:08 console
crw------- 1 root root     10,  62 Jan 17 12:02 cpu_dma_latency
crw------- 1 root root     10, 203 Jan 17 12:02 cuse
drwxr-xr-x 7 root root         140 Jan 17 12:02 disk
crw-rw---- 1 root video    29,   0 Jan 17 12:02 fb0
lrwxrwxrwx 1 root root          13 Feb 14  2019 fd -> /proc/self/fd
crw-rw-rw- 1 root root      1,   7 Jan 17 12:02 full
crw-rw-rw- 1 root root     10, 229 Jan 17 12:02 fuse
crw-rw---- 1 root gpio    254,   0 Jan 17 12:02 gpiochip0
crw-rw---- 1 root gpio    254,   1 Jan 17 12:02 gpiochip1
crw-rw---- 1 root gpio    254,   2 Jan 17 12:02 gpiochip2
crw-rw---- 1 root gpio    247,   0 Jan 17 12:02 gpiomem
crw------- 1 root root     10, 183 Jan 17 12:02 hwrng
lrwxrwxrwx 1 root root          12 Feb 14  2019 initctl -> /run/initctl
drwxr-xr-x 4 root root         140 Jan 17 12:02 input
crw-r--r-- 1 root root      1,  11 Jan 17 12:02 kmsg
lrwxrwxrwx 1 root root          28 Feb 14  2019 log -> /run/systemd/journal/dev-log
brw-rw---- 1 root disk      7,   0 Jan 17 12:02 loop0
brw-rw---- 1 root disk      7,   1 Jan 17 12:02 loop1
brw-rw---- 1 root disk      7,   2 Jan 17 12:02 loop2
brw-rw---- 1 root disk      7,   3 Jan 17 12:02 loop3
brw-rw---- 1 root disk      7,   4 Jan 17 12:02 loop4
brw-rw---- 1 root disk      7,   5 Jan 17 12:02 loop5
brw-rw---- 1 root disk      7,   6 Jan 17 12:02 loop6
brw-rw---- 1 root disk      7,   7 Jan 17 12:02 loop7
crw-rw---- 1 root disk     10, 237 Jan 17 12:02 loop-control
drwxr-xr-x 2 root root          60 Jan 17 12:02 mapper
crw-rw---- 1 root video   241,   0 Jan 17 12:02 media0
crw-rw---- 1 root video   241,   1 Jan 17 12:02 media1
crw-rw---- 1 root video   241,   2 Jan 17 12:02 media2
crw-r----- 1 root kmem      1,   1 Jan 17 12:02 mem
crw------- 1 root root     10,  59 Jan 17 12:02 memory_bandwidth
brw-rw---- 1 root disk    179,   0 Jan 17 12:02 mmcblk0
brw-rw---- 1 root disk    179,   1 Jan 17 12:02 mmcblk0p1
brw-rw---- 1 root disk    179,   2 Jan 17 12:02 mmcblk0p2
drwxrwxrwt 2 root root          40 Dec 31  1969 mqueue
drwxr-xr-x 2 root root          60 Jan 17 12:02 net
crw------- 1 root root     10,  61 Jan 17 12:02 network_latency
crw------- 1 root root     10,  60 Jan 17 12:02 network_throughput
crw-rw-rw- 1 root root      1,   3 Jan 17 12:02 null
crw------- 1 root root    108,   0 Jan 17 12:02 ppp
crw-rw-rw- 1 root tty       5,   2 Jan 17 12:10 ptmx
drwxr-xr-x 2 root root           0 Feb 14  2019 pts
brw-rw---- 1 root disk      1,   0 Jan 17 12:02 ram0
brw-rw---- 1 root disk      1,   1 Jan 17 12:02 ram1
brw-rw---- 1 root disk      1,  10 Jan 17 12:02 ram10
brw-rw---- 1 root disk      1,  11 Jan 17 12:02 ram11
brw-rw---- 1 root disk      1,  12 Jan 17 12:02 ram12
brw-rw---- 1 root disk      1,  13 Jan 17 12:02 ram13
brw-rw---- 1 root disk      1,  14 Jan 17 12:02 ram14
brw-rw---- 1 root disk      1,  15 Jan 17 12:02 ram15
brw-rw---- 1 root disk      1,   2 Jan 17 12:02 ram2
brw-rw---- 1 root disk      1,   3 Jan 17 12:02 ram3
brw-rw---- 1 root disk      1,   4 Jan 17 12:02 ram4
brw-rw---- 1 root disk      1,   5 Jan 17 12:02 ram5
brw-rw---- 1 root disk      1,   6 Jan 17 12:02 ram6
brw-rw---- 1 root disk      1,   7 Jan 17 12:02 ram7
brw-rw---- 1 root disk      1,   8 Jan 17 12:02 ram8
brw-rw---- 1 root disk      1,   9 Jan 17 12:02 ram9
crw-rw-rw- 1 root root      1,   8 Jan 17 12:02 random
drwxr-xr-x 2 root root          60 Dec 31  1969 raw
crw-rw-r-- 1 root netdev   10,  57 Jan 17 12:02 rfkill
lrwxrwxrwx 1 root root           7 Jan 17 12:02 serial1 -> ttyAMA0
drwxrwxrwt 2 root root          40 Feb 14  2019 shm
drwxr-xr-x 4 root root         240 Jan 17 12:02 snd
lrwxrwxrwx 1 root root          15 Feb 14  2019 stderr -> /proc/self/fd/2
lrwxrwxrwx 1 root root          15 Feb 14  2019 stdin -> /proc/self/fd/0
lrwxrwxrwx 1 root root          15 Feb 14  2019 stdout -> /proc/self/fd/1
crw-rw-rw- 1 root tty       5,   0 Jan 17 12:02 tty
crw--w---- 1 root tty       4,   0 Jan 17 12:02 tty0
crw--w---- 1 root tty       4,   1 Jan 17 12:02 tty1
crw--w---- 1 root tty       4,  10 Jan 17 12:02 tty10
crw--w---- 1 root tty       4,  11 Jan 17 12:02 tty11
crw--w---- 1 root tty       4,  12 Jan 17 12:02 tty12
crw--w---- 1 root tty       4,  13 Jan 17 12:02 tty13
crw--w---- 1 root tty       4,  14 Jan 17 12:02 tty14
crw--w---- 1 root tty       4,  15 Jan 17 12:02 tty15
crw--w---- 1 root tty       4,  16 Jan 17 12:02 tty16
crw--w---- 1 root tty       4,  17 Jan 17 12:02 tty17
crw--w---- 1 root tty       4,  18 Jan 17 12:02 tty18
crw--w---- 1 root tty       4,  19 Jan 17 12:02 tty19
crw--w---- 1 root tty       4,   2 Jan 17 12:02 tty2
crw--w---- 1 root tty       4,  20 Jan 17 12:02 tty20
crw--w---- 1 root tty       4,  21 Jan 17 12:02 tty21
crw--w---- 1 root tty       4,  22 Jan 17 12:02 tty22
crw--w---- 1 root tty       4,  23 Jan 17 12:02 tty23
crw--w---- 1 root tty       4,  24 Jan 17 12:02 tty24
crw--w---- 1 root tty       4,  25 Jan 17 12:02 tty25
crw--w---- 1 root tty       4,  26 Jan 17 12:02 tty26
crw--w---- 1 root tty       4,  27 Jan 17 12:02 tty27
crw--w---- 1 root tty       4,  28 Jan 17 12:02 tty28
crw--w---- 1 root tty       4,  29 Jan 17 12:02 tty29
crw--w---- 1 root tty       4,   3 Jan 17 12:02 tty3
crw--w---- 1 root tty       4,  30 Jan 17 12:02 tty30
crw--w---- 1 root tty       4,  31 Jan 17 12:02 tty31
crw--w---- 1 root tty       4,  32 Jan 17 12:02 tty32
crw--w---- 1 root tty       4,  33 Jan 17 12:02 tty33
crw--w---- 1 root tty       4,  34 Jan 17 12:02 tty34
crw--w---- 1 root tty       4,  35 Jan 17 12:02 tty35
crw--w---- 1 root tty       4,  36 Jan 17 12:02 tty36
crw--w---- 1 root tty       4,  37 Jan 17 12:02 tty37
crw--w---- 1 root tty       4,  38 Jan 17 12:02 tty38
crw--w---- 1 root tty       4,  39 Jan 17 12:02 tty39
crw--w---- 1 root tty       4,   4 Jan 17 12:02 tty4
crw--w---- 1 root tty       4,  40 Jan 17 12:02 tty40
crw--w---- 1 root tty       4,  41 Jan 17 12:02 tty41
crw--w---- 1 root tty       4,  42 Jan 17 12:02 tty42
crw--w---- 1 root tty       4,  43 Jan 17 12:02 tty43
crw--w---- 1 root tty       4,  44 Jan 17 12:02 tty44
crw--w---- 1 root tty       4,  45 Jan 17 12:02 tty45
crw--w---- 1 root tty       4,  46 Jan 17 12:02 tty46
crw--w---- 1 root tty       4,  47 Jan 17 12:02 tty47
crw--w---- 1 root tty       4,  48 Jan 17 12:02 tty48
crw--w---- 1 root tty       4,  49 Jan 17 12:02 tty49
crw--w---- 1 root tty       4,   5 Jan 17 12:02 tty5
crw--w---- 1 root tty       4,  50 Jan 17 12:02 tty50
crw--w---- 1 root tty       4,  51 Jan 17 12:02 tty51
crw--w---- 1 root tty       4,  52 Jan 17 12:02 tty52
crw--w---- 1 root tty       4,  53 Jan 17 12:02 tty53
crw--w---- 1 root tty       4,  54 Jan 17 12:02 tty54
crw--w---- 1 root tty       4,  55 Jan 17 12:02 tty55
crw--w---- 1 root tty       4,  56 Jan 17 12:02 tty56
crw--w---- 1 root tty       4,  57 Jan 17 12:02 tty57
crw--w---- 1 root tty       4,  58 Jan 17 12:02 tty58
crw--w---- 1 root tty       4,  59 Jan 17 12:02 tty59
crw--w---- 1 root tty       4,   6 Jan 17 12:02 tty6
crw--w---- 1 root tty       4,  60 Jan 17 12:02 tty60
crw--w---- 1 root tty       4,  61 Jan 17 12:02 tty61
crw--w---- 1 root tty       4,  62 Jan 17 12:02 tty62
crw--w---- 1 root tty       4,  63 Jan 17 12:02 tty63
crw--w---- 1 root tty       4,   7 Jan 17 12:02 tty7
crw--w---- 1 root tty       4,   8 Jan 17 12:02 tty8
crw--w---- 1 root tty       4,   9 Jan 17 12:02 tty9
crw-rw---- 1 root dialout 204,  64 Jan 17 12:02 ttyAMA0
crw------- 1 root root      5,   3 Jan 17 12:02 ttyprintk
crw------- 1 root root     10, 239 Jan 17 12:02 uhid
crw------- 1 root root     10, 223 Jan 17 12:02 uinput
crw-rw-rw- 1 root root      1,   9 Jan 17 12:02 urandom
drwxr-xr-x 4 root root          80 Jan 17 12:02 v4l
crw-rw---- 1 root video   243,   0 Jan 17 12:02 vchiq
crw-rw---- 1 root video   248,   0 Jan 17 12:02 vcio
crw------- 1 root root    249,   0 Jan 17 12:02 vc-mem
crw-rw---- 1 root tty       7,   0 Jan 17 12:02 vcs
crw-rw---- 1 root tty       7,   1 Jan 17 12:02 vcs1
crw-rw---- 1 root tty       7,   2 Jan 17 12:02 vcs2
crw-rw---- 1 root tty       7,   3 Jan 17 12:02 vcs3
crw-rw---- 1 root tty       7,   4 Jan 17 12:02 vcs4
crw-rw---- 1 root tty       7,   5 Jan 17 12:02 vcs5
crw-rw---- 1 root tty       7,   6 Jan 17 12:02 vcs6
crw-rw---- 1 root tty       7, 128 Jan 17 12:02 vcsa
crw-rw---- 1 root tty       7, 129 Jan 17 12:02 vcsa1
crw-rw---- 1 root tty       7, 130 Jan 17 12:02 vcsa2
crw-rw---- 1 root tty       7, 131 Jan 17 12:02 vcsa3
crw-rw---- 1 root tty       7, 132 Jan 17 12:02 vcsa4
crw-rw---- 1 root tty       7, 133 Jan 17 12:02 vcsa5
crw-rw---- 1 root tty       7, 134 Jan 17 12:02 vcsa6
crw-rw---- 1 root video   244,   0 Jan 17 12:02 vcsm
crw-rw-rw- 1 root root     10,  58 Jan 17 12:02 vcsm-cma
crw-rw---- 1 root tty       7,  64 Jan 17 12:02 vcsu
crw-rw---- 1 root tty       7,  65 Jan 17 12:02 vcsu1
crw-rw---- 1 root tty       7,  66 Jan 17 12:02 vcsu2
crw-rw---- 1 root tty       7,  67 Jan 17 12:02 vcsu3
crw-rw---- 1 root tty       7,  68 Jan 17 12:02 vcsu4
crw-rw---- 1 root tty       7,  69 Jan 17 12:02 vcsu5
crw-rw---- 1 root tty       7,  70 Jan 17 12:02 vcsu6
crw------- 1 root root     10, 137 Jan 17 12:02 vhci
crw-rw---- 1 root video    81,   0 Jan 17 12:02 video0
crw-rw---- 1 root video    81,   1 Jan 17 12:02 video1
crw-rw---- 1 root video    81,   4 Jan 17 12:02 video10
crw-rw---- 1 root video    81,   5 Jan 17 12:02 video11
crw-rw---- 1 root video    81,   6 Jan 17 12:02 video12
crw-rw---- 1 root video    81,   2 Jan 17 12:02 video2
crw-rw---- 1 root video    81,   3 Jan 17 12:02 video3
crw------- 1 root root     10, 130 Jan 17 12:02 watchdog
crw------- 1 root root    251,   0 Jan 17 12:02 watchdog0
crw-rw-rw- 1 root root      1,   5 Jan 17 12:02 zero

Do I need to edit one of the other daemon/script files to recognize the devices from my rules file, below?

SUBSYSTEM=="video", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="0826", ATTRS{se$
SUBSYSTEM=="video", ATTRS{idVendor}=="1bcf", ATTRS{idProduct}=="0b09", SYMLINK+$

SUBSYSTEM=="video", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="0826", ATTRS{serial}=="5755BBA0", SYMLINK+="logitech"
SUBSYSTEM=="video", ATTRS{idVendor}=="1bcf", ATTRS{idProduct}=="0b09", SYMLINK+="borescope"

HERE (Chris on Youtube) you can see how to create the symlinks, and how to find the correct data for it.

Thanks Carsten. Chris' videos are very detailed.

I am still unable to view the second camera. I can see the first camera, video0, but not the second camera, video2.

I have created the 99-usb.rules file and completed it per Chris Riley's latest Jan 3, 2020 video Here.
I also edited the webcamd2 and webcamd2.service files per his video but I used port 8082 for the second camera.
When I reboot the RPi, webcamd2 service will not start:

pi@octopi:~ $ sudo service webcamd2 status
● webcamd2.service - the OctoPi webcam daemon with the user specified config
   Loaded: loaded (/etc/systemd/system/webcamd2.service; enabled; vendor preset:
   Active: failed (Result: start-limit-hit) since Fri 2020-01-17 14:26:40 PST; 5
  Process: 633 ExecStart=/root/bin/webcamd2 (code=exited, status=0/SUCCESS)

Jan 17 14:26:40 octopi systemd[1]: webcamd2.service: Service RestartSec=100ms ex
Jan 17 14:26:40 octopi systemd[1]: webcamd2.service: Scheduled restart job, rest
Jan 17 14:26:40 octopi systemd[1]: Stopped the OctoPi webcam daemon with the use
Jan 17 14:26:40 octopi systemd[1]: webcamd2.service: Start request repeated too 
Jan 17 14:26:40 octopi systemd[1]: webcamd2.service: Failed with result 'start-l
Jan 17 14:26:40 octopi systemd[1]: Failed to start the OctoPi webcam daemon with

If I manually stop and restart it I don't see any errors but I don't see any video on port 8082. Also the daemon starts with the wrong device, video0 not video2.

Please let me know if you have any more suggestions.

Thanks.
Salty Doug

have you created the symlinks?
use the symlink in /root/bin/webcamd and webcamd2
here my:

camera_usb_options="-d /dev/VideoLogitech -r 1280x720 -f 10"

What if you use only the webcamd2-webcam?(Other unplugged)

Hi. Is it possible that both camera are connected to the same USB hub? I had the same issue while both cameras were connected through a USB hub which makes it under the same virtual port. made sure each camera is on a different area in the laptop ( I have USB on both sides of the board) and since than everything is working

The Raspberry Pi has 4 connectors that are on one port. Using another port is not possible.
Thanks.

If I connect only one camera it always initializes as webcamd (1) and I see the video in the Control page or web page http://octopi.local:8080.

it always initializes as webcamd (1)

that's because you have not used symlinks as shown in the video.
I think using sysmlinks make it easier to locate the problem. - Carsten

Hi... I struggled a bit with this also. Although I am not running MultiCam but separate instances of OctoPrint on a single Pi, the single most important thing is to do a fresh install of OctoPi on the SD Card. It seems that trying to add-on cams doesn't work well. Chris Riley's new tutorial for 0.17.0 works like a charm.

I was referring to the webcamd daemon not the webcamd2 daemon.

This is what my 99-usb.rules file looks like:

SUBSYSTEM=="video", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="0826", ATTRS{serial}=="5755BBA0", SYMLINK+="logitech"
SUBSYSTEM=="video", ATTRS{idVendor}=="1bcf", ATTRS{idProduct}=="0b09", SYMLINK+="borescope"

I do not, however, see those names in the /dev/ folder and I don't know why.

W

Do you have a link to the instructions you used for adding the second instance of Octoprint?

Thanks in advance.

the idVendor and the idProduct or the serial (number) is not correct. They had to match to YOUR webcams. How to find them shows Chris in his Video, I posted before. I think the correct SUBSYSTEM is not video. The correct SUBSYSTEM will be "video4linux"

I am done troubleshooting this issue. 5 days is too much.

Thanks for the support on this.

I am having the same issues.. if I SSH into my octopi I can enable the service by going to the /root/bin/ and entering ./webcam2d (webcam2d is the name I used). it seems to work from then on till I reboot the Pi again.

I also noticed if I enter service webcam2d start I get a authentication request for the root user... it makes me think that the permissions to the webcam2d.service need to be changed or fixed... I'm just not sure how...

this is what I get...

pi@octopi : /root/bin $ service webcam2d start
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to start 'webcam2d.service'.
Authenticating as: root
Password:
polkit-agent-helper-1: pam_authenticate failed: Authentication failure
==== AUTHENTICATION FAILED ===
Failed to start webcam2d.service: Access denied
See system logs and 'systemctl status webcam2d.service' for details.

Help if you can.

thanks