But default It shouldn’t delete a connection, or at least It never has before. I pulled power and restarted Pi a few times, the laptop too but nothing. I’ll try my phone tomorrow
Cutting power to a Pi without a graceful shutdown has a very high chance of corrupting the SD card, like higher than 50% in my experience. And the worst part is that the corruption is not always immediately obvious. I have had cases where the system would boot and appear partly functional but the octoprint config file was garbled. This sensitivity is my least favorite aspect of the Raspberry Pi.
I wouldn’t say it is that high, but it is a possibility. I consider it a low risk since there isn’t anything precious on the card yet.
Maybe I should be integrating some short to shutdown script on some of the pins to make that easier.
Well like I said before, noob. Since there isn’t a power or reset button the obvious answer is to unplug it. How do I do a graceful restart??
Don’t beat yourself up. We’ve all been there. Inside octoprint or cnc.js there are menu items for shutting down or restarting. Just a heads up though, it isn’t as crusty as windows, so there aren’t many reasons to restart it.
I think you must have something else going on. I’m not sure that I’ve ever gracefully shutdown a pi and I haven’t had an issue.
It is definitely an issue, but in my experience, not as frequent as 1/2. I have had several systems tank this way. I am pretty rude to them in general.
Mounting the file system as read only should fix it.
Well, I went to connect with my setup tonight and nothing from the wifi either. It’s not appearing on the network. I plugged an ethernet cable in and went to work.
Still, I am intrigued on the sudden power loss and SD. I haven’t noticed any issues so far tonight with cncjs.
I usually leave it on, but sometimes if I know I am not going to be in my workshop for a few days, I flip the power to the wall outlet that the rPi and control box are connected to. It’s a hard power off. Usually I send a shutdown command through putty, but I have been spoiled that it has always started up fine once power is restored.
I’m running the latest image from @jeffeb3. Interesting coincidence. Mine isn’t setup as a hotspot though.
I am assuming you know the ip address and tried to ping that? I have been finding avahi is a little more brittle than it should be at my house. If you’re connecting via ethernet, you can putty in and check ifconfig to see what’s going on with the wifi connection. There are some nmcli commands that would tell you more, but only if you know what you’re doing.
I used to have an issue where a pi wouldn’t reconnect after the router power cycled, but not in recent versions.
FWIW, I have both my printers on the latest v1pi (non hotspot) and they have been on pretty much nonstop and I can still connect to them. Anecdotal, but…
Yes. No answer on ping and no request to the wifi router for a lease. It’s odd. I haven’t done too much with WiFi and Linux until I got the new rPi with the built in.
All that I know is that I had the devil of a time getting WiFi sticks to work through the years. The rPi is usally very reliable.
I’ll just stick the old SD card in and see if that one registers.
OK, I’ve had a few minutes to mess with it today and no wi-fi. I brought it in to reflash it and got an error message about the card, so it seems a harsh restart will indeed corrupt a card.
I’m going to reflash and try again. My biggest question is how do you correctly shut it down with a monitor and keyboard connected to the Pi?
I’ve looked around a bit on Youtube and there’s mention of additional code and a momentary push button switch connected to 2 of the GPIO pins in a few videos. Is this a good idea or just a hack?
If you have a monitor and keyboard, then from the command line you can type sudo poweroff
. If you have installed a desktop, then there is a button for it.
If you meant without a monitor/keyboard, there are buttons in octoprint and cnc.js. If you do the script and gpio route, it will let you hook up a button you can use. I will make sure to make that easier in the next version.
Sorry, I meant without. TY, I’ll do a little more looking to shut it down with Octoprint since I’m more familiar with that.
Octoprint has a built in command to shut down/reboot/power off the system. You could switch to that part of the v1pi and take care of it.
Thank you for that. I found it after Jeff posted above. I’ve used octoprint for awhile now and never used it. I leave my Pi powered on my 3d printer connected to my home network and just shut down the printer. That’s not something I can do with the LR2. I probably won’t use it every day and it’s kinda in the middle of my garage so power cords left laying around aren’t the best idea.
Once a SD card is flashed for PI, it shows up as being unrecognizeable by Windows due to the filesystem type. Mine always throw an error when plugged into Windows, it doesn’t mean the card is corrupt. That could have been a red herring.
My Octoprint Pi has been hooked up to a wifi switch and abruptly shutdown after every print since I first set it up over 2 years ago… never had an issue with sudden power-offs. The only time it’d be an issue is if it is actively writing to the disk when you pull the plug. 90% of the disk writes in an octoprint system are to the logs (unless you’re actively uploading something). The odds of a corrupt log file causing the system to not boot are pretty rare.
I’m not a novice linux user. I am convinced I have corrupted sd cards with sudden power downs. You may be getting lucky, or just getting good sd cards.
I use a read-only root filesystem, with a writable overlay in RAM. I cannot find the exact instructions anymore, but if you google “raspberry pi read-only root with overlay” or something similar you’ll find similar instructions.
It works well. The only annoying thing is that Octoprint keeps popping up windows with updates etc every time you open Octoprint after a reboot. It forgets that you have marked them as read because anything written to the file system is lost at a reboot.
That is a good solution. You can change which of those boxes shows up in the config, but you’d have to get to the command line to remount rw before changing the config.
I’ll have to look into this again. I tried it before but I got lost in a mess of details before I got it solved. I found settings in octoprint to ignore all but the most critical alerts so I’ll make sure to disable all the popups before I freeze everything.