Hey,
It happens on both USB 2.0 and 3.0 ports, I’ve now tried two of the same camera and it happens with both and they work fine on a normal computer.
I’ve just put a 12hr print on so will put another small print on after it and then grab the logs.
It’s like the USB loses power and can get it back.
The power supply is a genuine rPi one, I think they are 2.5a but I can double check
ive just finished an ~8hr print and the camera worked the whole time, but the light in the room turned off haha so the lapse wasn’t great. I forgot about the automation’s for that room.
I pulled the logs about 15min after it finished, and then i tried another print that failed due to the camera. I tried the ‘start camera’ and then print and it failed, then i tried the ‘stop camera’ and then ‘start camera’ then print and that worked.
i’m not sure if its my camera settings or actual camera but when it does work its pretty crappy quality. heres an example of what i mean…I’m aware that the camera angle is less than ideal
I’ve used similar arguments for the camera as a similar model with same specs. Not to sure what’s going on and why it keeps dropping out. I can deal with it for now anyway.
The USB power cycling plug in could be an issue though because it says it resets all the USB ports which would include the connection from the pi to my printer.
Just for anyone else that comes across the same issues as me; i’ve given up on the logitech c925e. Great camera for video conferecing etc but doesn’t seem too suited to this application. I might give it another go some other time when ive got more time.
I swapped to the raspicam 5mp and had a different set of dramas. i had to take the SD card out of the pi and put it in another pc to edit the config.txt file as outlined in - Getting the Raspberry Pi Camera to Work on HASSOS · GitHub
from there i couldnt get it working through the inbuilt mjpg-streamer with the octoprint add-on; however; if i use the seperate mjpg-streamer it work.i’ve updated the stream addresses in octoprint and octolapse and the quality looks good. i’m just about to try a print with octolapse and the live stream to see how it goes.
Oh the added bonus of using the seperate mjpg-streamer is that you don’t need to use ‘start camera’ from the power options menu
Interesting that the Pi camera works with the separate ‘mjpg-streamer’ but not with ‘mjpg-streamer’ in the OctoPrint Next addon, as both should be based on the same source code. I’ll have to make a clean install and verify the behavior later, may take a few weeks though.
Did you try the c925e with the separate addon? It should have the same behavior, but I’m curious as there was a difference for the Pi camera.
Nope, I didn’t think about using the seperate Mjpg-streamer until the pi cam wasn’t working, I did want to change to the pi cam anyway mainly due to size/weight difference.
I did have a bit of an issue where a print got hung up due to losing comms with the rPi and I had to do a hard reset now I’m getting a few errors in octoprint. I’ve got a core update due so I’ll back up, update, restart and see if it’s still there after a sort restart. Here is an octolapse using the pi cam which you can compare to the Logitech one I posted earlier
On my ancient (2010) Mac book pro I’m getting a settings load error when using the browser.
Only started since the disconnect issue I had yesterday. Here’s a screenshot
Might give the old girl a courtesy restart for good measure haha
Ok next issue,
I don’t quite understand what’s happening. But it’s happened 3 times now. The pi with HA and Octo on it seems to disconnect from the network (I don’t think this usually happens but unsure) and then the print stalls at that point.
That’s what I don’t understand; if I’ve uploaded the gcode to octoprint why would network connectivity cause it to stall if the printer is connected to the pi via cable?
Ah actually maybe the pi itself is crashing
Have you figured out something new regarding this? Is it the Pi itself crashing? If so, that would also explain the issues with the camera.
I’ve noticed an issue with loss of connectivity when trying to add a bed level visualizer plugin, where the system attempted to build numpy from source. There will be an update to the addon (OctoPrint Next) with numpy included within an hour or so. Update: “Bed Level Visualizer” plugin uses a different version of numpy, so I’ll skip the update for now.
I think the camera issue was a power issue. I don’t think the pi can supply enough for a stable stream.
But due to the crashing of the pi I decided to uninstall and just use a separate pi with the octopi image.
No discredit to you, you’ve done great work. I was just lazy and didn’t want to figure out why it was crashing.
The important part is that it works well for you.
If you, or anyone else, figure out why it did not behave properly - and if it is something I can try to fix - please let me know.
After some new issues on the GitHub repository, I’ve started to work on an updated version. If you’ve noticed some bugs or have feature requests, please make sure they are added to the GitHub repository issues so that I can take them into consideration.
I’m looking at changing base image - this means upgrading from the current addon version will not be possible, so it will probably be another version.
New version is live, it’s simply called “3DPrinter”.
Still based on Alpine (I noticed a 50% increase of image size with the change of base image which I considered too much).
If mjpg-streamer is enabled in addon options it starts automatically.
Klipper included in the addon. Moonraker has been added but not tested. Both are disabled by default.
My plan is to deprecate all existing variations of OctoPrint addons and eventually remove them. I need to test it some more to see that I haven’t broken anything that worked before, printing was just tested.
Hopefully I can change the stage from “experimental” to “stable” by the end of this month.
Thanks for your work, i’ve been using your plugin since my begining with HA.
Just migrate from Octoprint to the new plugin 3D printer, backup seem to be working without major issues.
Only my printer profile was missing but this is a matter of seconds to make it again. And of course my database of spool manager but that’s on me, i’ve completely forget to export it.
Need mor time to see if there is any problem with the backup but so far it look complete !
I can’t start this plugin. I tried everything what I can with this and still…
[22:27:13] INFO: OctoPrint cont-init.d
Traceback (most recent call last):
File "/data/python/octoprint/bin/octoprint", line 8, in <module>
sys.exit(main())
File "/data/python/octoprint/lib/python3.9/site-packages/octoprint/__init__.py", line 959, in main
from octoprint.util.fixes import patch_sarge_async_on_py2
File "/data/python/octoprint/lib/python3.9/site-packages/octoprint/util/__init__.py", line 52, in <module>
from octoprint.util.connectivity import ConnectivityChecker # noqa: F401
File "/data/python/octoprint/lib/python3.9/site-packages/octoprint/util/connectivity.py", line 12, in <module>
from octoprint.util.net import resolve_host, server_reachable
File "/data/python/octoprint/lib/python3.9/site-packages/octoprint/util/net.py", line 14, in <module>
import netifaces
ModuleNotFoundError: No module named 'netifaces'
[cont-init.d] octoprint.sh: exited 1.
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
s6-nuke: fatal: unable to kill: No such process
I assume this is with the 3DPrinter addon, on what hardware and architecture? Was this from a clean install of the addon or did you attempt to restore a backup?