Camera Stream frozen and not loading

Correct, but you can run vcgencmd get_camera instead. You should get 1 for both supported and detected. If supported = 0 for some reason, run sudo raspi-config and enabled it under interface options.
If detected = 0, then the system isn't seeing the camera at all, and that needs to be fixed before anything else.

edit: it sounds like this was working at one point though, so this isn't likely a physical connection issue or anything, but it probably wouldn't hurt to make sure the ribbon cables are plugged in snug.

1 Like

To answer this one, the config in octopi.txt.

1 Like

Thank you that helped! I appreciate your time! I didn't see this function in my research! Very helpful! Now the problem was that the raspberrypi camera actually has two connections. First the cable that connects to the raspberrypi and then to the circuit board for the camera, however, there is a second and it's the camera actually plugs into the circuit board. That was were the problem was. I now am streaming video and can move forward connecting to my printer and testing that as well. The journey was much longer that it needed to be but I learned so much more!
Thanks again! EET_Geek.

1 Like

Charles_Powell, I wanted to thank you too since you took your time time help and share! I appreciate that. It was not specific to my connection issue (see my response to TTalkington) in the long run but it was still helpful to clarify the big picture for me! Making mistakes and asking questions makes you better in the long run!
Thanks EET_Geek

1 Like

I've even installed a 4A PSU now and the symptoms are the same.
If I physically unplug the relay, the cam won't freeze when I toggle the plugin.
If some time has passed and I open the interface, the stream freezes too.

I'm getting pretty frustrated ...

Is there a way to reactivate the cam somehow or something like that?

Type=forking to Type=simple in /etc/systemd/system/webcamd.service and then running sudo systemctl daemon-reload; sudo systemctl stop webcamd; sudo systemctl start webcamd

1 Like

Is it not possible to open and edit this file via PuTTY?

It is but you didn't enter what you want to do :slight_smile:
If you want to open the file with a text editor (nano in this case) you have to put nano in front of the file path - and because you need higher permissions to edit the file you have to put sudo in front of nano.
So you have to enter the following

sudo nano /etc/systemd/system/webcamd.service

Exit the editor with ctrl + x , confirm the save question with y and the filename with enter.

You also want to run

sudo systemctl daemon-reload

after you edited the file.

1 Like

With this command, i can record my first real success with my problem.
If i execute this command after the psu toggle, the stream works. It still freezes reguarly, but not completly. Its enough to reload the page in this case.
But still, if i turn the PSU on tho, the command is still nessecary. Obyouvsly, i dont want to alwas open PuTTY and execute the commands this way. Is there any way to do this automaticly by toggeling the plugin or migrating it in a button on the page or something?

Thank you all for your great help up to this point!

OK, it's getting stranger...
Now the commands are no longer even necessary, it is always enough to refresh the page!?
Still very uncomfortable to use ...

Seems like octolapse is also not very happy about the camera...

Now its all completely broken.
Im done.

Sounds bad.
BTW: What Raspberry Pi are you using?

Im using a Raspberry Pi 3 Model B.
I think i reinstall octoprint and try to not completely overload it with plugins...

1 Like

Okay, im back to the very start...

Symptoms are the same, i toggle the PSU-control plugin and the stream freezes.
The problem is fixed with the commands:

until next toggeling.
Any ideas to integrate the commands in some way? Maybe not power the relay via the rasPi?

Thanks for support!

webcamd.log (20.6 KB)

Btw, why does my log not show my changes in octopi.txt?

As for the webcam options not taken into account, the webcamd.log shows that you use camera=auto. This way, the Raspicam will be considered as an USB webcam and the options you provided are then ignored. You should change the setting to camera=raspi if you want to use these settings.

As for running the commands on the toggling of the relay, you could leverage the system command switching option, and invoke a script that would trigger the GPIO pin and restart the webcamd service.


Youre right, the log shows the camera is on auto, but thats incorrect???

Here is my octopi.txt file... (not changed of course)
octopi.log (2.9 KB)
I changed the file-extension to .log due its not allowed to upload .txt-files, whyever.

I feel like the log is lying, because i can see differences in the stream image.

Sorry, I was looking at the first entry in the logs, and not at the last ones as I should have. The last entries show that the camera option is raspi and the correct options are taken into account.

And how do i actually write such a script? :woozy_face::exploding_head:

Unfortunately I'm not really knowledgeable about how you could trigger a GPIO pin from the command line, but the scripts contents could be something like that:



#If the STATUS_ON_FILE exists, turn the PSU off, otherwise turn the PSU on
if [ -e ${STATUS_ON_FILE} ]; then
    #Command to trigger the GPIO pin to turn off the relay
    rm ${STATUS_ON_FILE}
    sudo systemctl restart webcamd.service
    #Command to trigger the GPIO pin to turn on the relay
    touch ${STATUS_ON_FILE}
    sudo systemctl restart webcamd.service

That's a very basic script, but someone might be able to improve upon this.

1 Like