It would be nice if the admin could have a control to turn the webcam on/off. This would allow control / privacy without having to plug or unplug the webcam from the Pi while still supporting low cost webcams.
Just a simple and intuitive On/Off pair like the Fan buttons in the General section should be easy to implement.
I was thinking it would be nice to have a "Stop Web Streaming" and a "Start MJPG Streamer" in the System Menu. Is that doable @foosel? Or is that something that has to be set up in OctoPi jointly?
OctoPrint doesn't control the webcam. People might be using an external IP camera, or some other webcam server or whatnot. So adding that stock OctoPrint wouldn't make sense. Shipping a custom config with OctoPi that includes that however would be possible.
I understand that. Shutting down the MJPG Streamer is certainly not as severe as rebooting the whole RasPi. The Script could certainly check to see if others are logged in and using the webcam and give an appropriate warning.
I agree that this could/should be a custom config with OctoPi.
Does OctoPrint installed on a Mac or Windows machine have the "Reboot System" or "Shut Down" menu items or is that specific to the RasPi?
Is this something that could be done thru the "System Command Editor". That plug-in doesn't work on a Mac for some reason. I tried 3 different browsers.
The reboot/shutdown menu items are available (on macOS at least), they're just not preconfigured like on OctoPi. You can set the shell commands for these options manually in the OctoPrint settings under the 'Server' heading.
System Command Editor works for me, Safari 11.1 on 10.12.6 Sierra, albeit with the double scroll bar rendering glitch. Are you using any content blockers or similar?
Is there any way to trigger system commands on events, like the GCODE Scripts section does? I'd like to make the camera automatically turn on when a print is queued and turn off when it's done.
I realize this is rather old, but anyways I am using the actual Octopi image 1.5.2.
There is no webcamd script in that installation and it seems octopi is doing the webcam stuff by itself.
How would I shutdown the wbcam there and possibly restart it?
Wouldn't it be much better, if Octopy would handle that by itself? Maybe just starting the webcam if someone connects to the webinterface?
What am I missing?
Cheers
I think you might be confused between what OctoPi is and what OctoPrint is - your post contradicts itself.
You can control webcamd using sudo service webcamd {start|stop|restart}. Starting the camera when someone connects could be done with a plugin that ran this command for you, but it is not built in because webcam streaming is not provided by OctoPrint, it is only getting an MJPG stream from the URL and so cannot control it.
I realize the difference between Pi and Print. Nevertheless atleast the Octoprint settings menue has options to controll some things about the webcam. I know it's basically what to do with the stream but what would be the harm in setting those start and stop service commands in that section and running them when necessary?
Anyways thanks to you help, I used the system command plugin to make the corresponding system menue entries and it works - not automatically. At least I now have control over the webcam using Octoprint's system menue.
I did this by using GCODE System Commands plugin with two command definitions:
OCTO910 sudo service webcamd start
OCTO911 sudo service webcamd stop
Then inserted these codes to GCODE Scripts:
"After connection to printer is established"
OCTO910
and
"Before connection to printer is closed"
OCTO911
Now the camera goes on when printer powers on and connection to Octoprint is established.
When printer power is lost and Octoprint connection is cut the camera goes off.
I'm using Tasmota plugin to control the printer power but Octopi is always powered on.
I am just starting in 3D printing and have probably spent more money than I needed to for how often I will use it
Anyway, I found this looking for the ability to turn webcam off on Octoprint and wanted to say thank you for all the information. It only takes a few seconds for the service to stop / start now rather than 30 seconds plus, but apart from that all information is still relevant now.
Now to work out how to turn the printer power off at the end of a print
activer : sudo service webcamd start
désactiver : sudo service webcamd stop
Bonjour,
je suis intéressé par la commande on/off
mais ou doit on écrire cela dans Putty, comment accéder à l'éditeur de commande, je ne voudrais pas mettre le bazar dans mon Raspi, je sais ouvrir et rentrer ID et MP mais qu'écrire pour arriver dans éditeur de commande
si quelqu'un ou quelqu'une peut m'aider, d'avance merci