Octoprint Camera continuously disconnecting

So, because I’m stuck at home I decided it was a perfect time to try to set up octoprint for my CR-10 Mini. Unfortunately, my 720p Logitech webcam (no model number is printed on it other than 720p and the Logitech logo)is having severe difficulties with the Pi 4 2Gb that is using. I can boot up to octoprint and see and control the printer from the online controls, but if I try to then go to the control tab and use the webcam it only refreshes once every 4-10 seconds, I have both the printer and the webcam hooked up to the usb 3.0 ports, and when I try to use octolapse it spits out an internal error every time I start a print. When the error doesn’t come up, the webcam will still disconnect after 1-2 snapshots. I have the classic time lapse turned off, but it isn’t just the octolapse that looses video feed. I also have AstroPrint set up and it also looses connection at the same time. My guess is it’s the camera and I should just buy a pi cam v2 or the Adafruit cam. I’ve also included the log for octolapse. (Octoprint’s is too big for me to upload). In the octolapse log I continuously saw this error AttributeError: 'NoneType' object has no attribute 'snapshot_command. Don’t know what this means, hope you guys can help. Thanks

plugin_octolapse.log (103.5 KB)

Edit: so I plugged the webcam into my computer and found out that it is a Logitech B525, with a maximum resolution of 1920x1080, 2.1 mp, and it runs pretty smoothly, so I wonder if it is just a compatibility issue.

Same issue here unfortunately, with a Pi 4B and Logitech C270. Seems to be since the latest Octoprint update.

You might try to put that serial connection for your printer on one of the USB v2 style of connectors as well as your webcam.

Ok, I tried that and it will work at first, with an average frame rate of about one frame every 1-2 seconds for the first 20-30 seconds, then it goes down to once every 10-20 seconds. I’ve also tried with one in the 3.0 and the other in the 2.0 port and got roughly the same results

Same problem here, the webcam frequently disconnected.

same here.
I've got a RaPi4b with 4MB and an (older) logitech web cam.
Works for a while on reboot, then someting happens, (possibly a plugin issue??) and i get no feed.
When it works, its great, but once it hangs, no video until reboot.
USB2/3 switching doesn't seem to make it better.

Which printer? And does it happen in safe mode?

I've got a Creality CR-10s Pro V2.
It still has that new printer smell.

But does it happen in safe mode? Also, try sending your log files.

1 Like

I can see this is an old thread, however I recently had the same issue - pi cam intermittently disconnecting, and I had to restart the Web cam service each time to get it working. Ultimately it would work for a while before failing again.

I did two things:

Firstly, I disabled the Bed Visualizer plugin (there is a problem with Ploty integration anyway, so I suspect the author no longer supports it), and

Secondly, I cleared some memory on the printer SD card. I had a load of old models taking up space. Over time it was reaching capacity.

So, if you have Bed Visualizer, disable it and then try deleting some unused files from your SD card, things like old models, octoprint backups and timelapses.

I hope this helps

Bed visualiser is very far separate from the camera streaming, so I'd think it's highly unlikely that was the direct cause of your issues - if anyone else finds this, it would confirm this is more than just a one off accident. The plugin is still very much supported and I have not heard of such Plotly issues, so I would suggest if you have found a problem with the plugin to go and post your issue there on GitHub, where you will find the plugin being maintained.