OctoPrint Corruption Prevention
A couple solutions are:
- Write to a RAM disk
- Use an overlay file system
RE: SSH - the manual way
Just SSH into the RPi and run the Linux halt command.
https://raspberrytips.com/shutdown-raspberry-pi-ssh/
Though it would be nice if we can get the auto-shutdown feature working again.
It should work
If you correctly enabled the Serial port, as well as the Pi Port on the MK3S (with the LCD menu), it should be working just fine.
auto-shutdown?
If you mean that you can't shutdown your Pi through the web interface, it most likely means you have an issue with either the "sudoers.conf" file, or with the Octoprint settings that is configuring the shutdown command.
Corruption Prevention with original Prusa-Image
How is the corruption prevention solved in the official Prusa Image for the PI W1?
Corruption prevention
Hi,
I'm pretty sure it wasn't done on the image for the Pi W ...
How is the corruption prevention solved in the official Prusa Image for the PI W1?
finally works for me! 🙂
... just do not forget Rpi port swaping and setup of serial port in octoprint web interface.
Thansk for all advices 🙂
RE: RPi Zero 2 W PrusaPrint Support
It does and then it doesn't, phew.
Somehow I started with a corrupted image that did some nefarious things until I rewrote the image onto the sd card. From there I have had some issues with the serial port /dev/ttyS0. From a reboot or startup everything appears to work properly; however, adding a plugin and restarting octoprint the board loses the connection to the serial port and errors out. I suspect that the first instance of the octopi server somehow maintains ownership of the serial port and by not releasing the port errors out the next instance.
I'm going to dig deeper and try to figure out what's up.
Stay safe and healthy, Phil
RE: RPi Zero 2 W PrusaPrint Support
I am quite confounded by this issue and have given up on trying to get this to work correctly. I'm not sure if the problem is with the Raspian OS or the Octoprint program, either way I cannot get the server to restart and release the serial port.
I've tried the packaged Octoprint, rolled my own, and tried several images. Always the same result, I cannot restart the server without losing access to the serial port. It's as if the port is locked out, although it appears when I list out the directory.
As a kludgey work-around I simply will reboot the server when I install any plug-in since I do get an active server the first instance that's run.
I've fished through the Octoprint FAQs and github issues and can't find any reference to what I can do.
Stay safe and healthy, Phil
RE: RPi Zero 2 W PrusaPrint Support
I followed these instructions and had no issues getting it going.
https://toms3d.org/2021/07/05/octoprint-guide-best-plugins/
But I did reference Prusa's instructions got get the machine and port details configured. Pay attention to the part where we disable BlueTooth and enable the serial port.
https://help.prusa3d.com/en/article/octoprint-configuration-and-install_2182
RE: RPi Zero 2 W PrusaPrint Support
I've installed a Pi Zero 2 using the Octopi image, swapped the serial ports and configured Octoprint to use the correct serial port. One improvement over a USB connected PI 3, which was always powered on, is that the PI Zero doesn't have to reboot the printer control board to connect. I can shutdown the PI from Octoprint or Octopod before turning off the printer. I plan to make a backup image of the PI's micro SD card in the event I forget.
I would like to mount a camera on the X axis servo, how long of a flex cable for the camera is required and where can it be purchased?
RE: RPi Zero 2 W PrusaPrint Support
It would be great if you could do this from Octoprint without the SSH. Hmm, maybe you can.
Just SSH into the RPi and run the Linux halt command.
https://raspberrytips.com/shutdown-raspberry-pi-ssh/
Though it would be nice if we can get the auto-shutdown feature working again.
--------------------
Chuck H
3D Printer Review Blog
RE: RPi Zero 2 W PrusaPrint Support
If you paste the shutdown scripts, you can shut it down from the GUI.
Stay safe and healthy, Phil
RE: RPi Zero 2 W PrusaPrint Support
I did a search and did not find one, but I might write a scripted plugin to do that as a button.
If you paste the shutdown scripts, you can shut it down from the GUI.
--------------------
Chuck H
3D Printer Review Blog
RE: RPi Zero 2 W PrusaPrint Support
Following this post, I did the install and there's the startup / shutdown sections.
Stay safe and healthy, Phil
RE: RPi Zero 2 W PrusaPrint Support
Thank you.
Following this post, I did the install and there's the startup / shutdown sections.
--------------------
Chuck H
3D Printer Review Blog
RE: RPi Zero 2 W PrusaPrint Support
https://www2.quartoknows.com/page/raspberry-pi-shutdown-button
RE:
To anyone looking at pcwebers reference and feeling out of depth, take note of foosel's recommendation for OctoPi, it's so much easier for nonLinuxy peeps to install. Don't worry that it's not the latest release of OctoPrint, once installed upgrade is dead easy.
Really like the power button, think I'll add one.
RE:
I simply go to the web interface (that I am in quite often anyways) and click the Shutdown system button.
RE: RPi Zero 2 W PrusaPrint Support
Just a little more out of depth please, I only wish to relay that I found the error and have fixed it.
Reading my earlier post where I recommended to CWBullet I found this little snippet there.
Note
If you disabled Raspbian's default behaviour of allowing the pi user passwordless sudo for every command, you'll need to explicitly allow the pi user passwordless sudo access to the /sbin/shutdown program for the above to work. You'll have to add two sudoers rules:
Create a file /etc/sudoers.d/octoprint-shutdown (as root) with the following contents: pi ALL=NOPASSWD: /sbin/shutdown Create another file /etc/sudoers.d/octoprint-service (as root) with the following contents: pi ALL=NOPASSWD: /usr/sbin/service
Makes sense to me and I have corrected the error of my ways in a positive fashion. I simply abhor having any user without a password, especially if they access the internet from the OS. Since I connect the cameras through a telegram app, there is a connection that could be vulnerable to an outside attack. Taking heed to the above snippet and following it to the letter, I am done troubleshooting my problem. Thanks for your patience.
Stay safe and healthy, Phil