What is the problem?
When I startup octoprint,
sometimes the USB webcam will connect and show the video
and other times (mostly) it will not show anything other than message "Webcam stream loading..."
What did you already try to solve it?
Restarting octoprint.
Restart system
Connect the webcam to a different usb port on octopi
Change power supply
Logs (octoprint.log, serial.log or output on terminal tab, browser error console ...) octoprint 190904.log (68.6 KB) webcamd.log (350.5 KB)
Additional information about your setup (OctoPrint version, OctoPi version, printer, firmware, browser, operating system, ...)
OctoPrint version = 1.3.11
OctoPi version = 0.16.0
printer - wanhao i3
firmware = Marlin bugfix-2.0.x
browser = chrome
Pi model - Raspberry Pi 3 Model B Plus Rev 1.3
Webcam = Logitech QuickCam Pro 9000
Raspberry Pi 3 Model B Plus Rev 1.3
Webcam = Logitech QuickCam Pro 9000
yeah I noticed sometimes there is a solid under voltage symbol appears but it is not flashing to indicate a current problem.
I have tried switching power supplies including using an apple charger but there is not much I can do about that issue.
I checked lsusb and it indicated my usb webcam is connected
pi@octopi:~ $ lsusb
Bus 001 Device 004: ID 046d:0809 Logitech, Inc. Webcam Pro 9000
Bus 001 Device 005: ID 1d50:6029 OpenMoko, Inc.
Bus 001 Device 006: ID 0424:7800 Standard Microsystems Corp.
Bus 001 Device 003: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
Bus 001 Device 002: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Right now my octoprint is showing the video stream and there is no under voltage symbol showing.
But the problem is it randomly works and doesn't work.
Here's my webcam log when it was not working webcamd.log (350.5 KB)
Are you saying put tape on the 5V pin of the usb cable that is attach from the 3D printer to the pi
to prevent 3D printer drawing power from the pi and this is the cause of the under voltage?
ie the 3D printer LCD screen drawing the power from the pi which then causes the pi to not get enough volts/power etc.
As far as I am aware the only thing that the pi can power is the LCD screen of the 3D printer
since no stepper motors run until I turn on the power switch of the 3D printer..
BTW just for extra info I got both my pi and 3D printer connected to a double adapter
so that I can just turn on one switch of my power board.
yep that is what I'm saying. Not every printer is drawing too much from usb when powered by usb but some do - my ender 3 pro for example does it.
If I turned it off while the pi was on some of my usb devices even stopped working.
So they turn on at the same time? Well I don't know maybe the printer turns on a bit earlier and causes this problems. Just try to power the printer on first and see if the problem remains
Btw if you scroll up the thread from my quote above you will see a person who had that exact problem
yeah but I also tested it by powering them on separately (ie no double adapter) and the problem still occurred..
So the pi should be powered on first before the printer?
so basically this problem is due to the initial undervoltage at the start
which causes the usb device/webcam to not get enough power
which then causes it to fail the detection/connection to octoprint?
I have the same Logitech Quickcam 9000 pro and the same issue. from what I can tell it sometimes works. My last thinking is, it is caused by undervoltage. I tried a powered usb hub between the pi and the webcam and it worked for 2 out of two boots. I do not even have the printer connected at all for testing.
Hope you found your solution. I had the same problem for a few days too. I realized that this is a very simple problem to solve. Just restart webcamd
sudo systemctl restart webcamd
You can use too command v4l2-ctl command before for choose your device:
v4l2-ctl --help ; for Help menu
v4l2-ctl -D ; for view info about driver
v4l2-ctl -d 0 ; For choose your device instead of /dev/video
ex. control:
v4l2-ctl -c focus=143 ; This command set focus (0-255)
etc.
It seems the camera is a bit slow to initialize on startup. After that, it is easy to redo this command via SSH or just in a script when starting octoprint.
Thank you do so much, your solution worked, been at this all day. Thank you soo much again.
I set:
v4l2-ctl -d 1
and restarted with the cmd.
use
v4l2-ctl --list-devices
to see all devices.
UPDATE: Camera randomly stopped working again and the above didn't work this time. This logitech camera is going in the bin,. ordered a £10 cam from amazon and it has better picture quality, resolution and worked instantly.