I'm looking to load a file into my printer (the SD card in a Pi 3 b+) then when i next turn the printer on, I'd like it to print that file.
Or just print the last file loaded onto the SD.
The reason for this is that I have a wifi plug for my mk3s and Pi 3 b+, I can then set it to come on at a set time and thus start printing.
It would be Scheduled printing via a wemo socket.
I've been looking for an autoprint plugin or a print on autostart but searching doesn't seem to find anything.
I feel like i must just be missing the right phrase for the thing that I'm after.
I lived in a condo complex and in the evening on a Friday the power went out. You could see everyone milling about outside in confusion. This was one of those rare times when the power stayed out for about 18 hours straight.
Eventually mid-Saturday the power came back on. But then about an hour later everyone started seeing smoke coming out of one of the windows. Fortunately, you could see inside and there on the stove was a flaming pot and it was unattended. Someone called the fire department while everyone stood outside wondering if the entire complex would go up in flames. Someone had been cooking when the power outage started and had then forgotten to then turn off the buner(s) on the oven when they realized the power wasn't coming back on soon.
The problem I see is that you could have a power outage followed by your printer starting to do a print job. What if you're away? What if the power goes out, comes back on and then goes out and then comes back on? You could end up having a mess of melted filament when you return (assuming that it's not caused worse problems for you).
You might instead look for some solution in which you could initiate the print job easily (as controlled by you).
There wouldn't be a file loaded to print in my printer unless I'd put it there ready. it wouldn't fail deadly like you're saying.
I have a smoke alarm right above my 3d printer. I want to set prints going but don't want to wake my gf by having them run through the night, being able to start a print just as shes left for work means that I can wake up to a print that's already running.
Lets talk about this worse case scenario that a fire could start, It would also start if I was there to turn the printer on myself. I start a print and walk away from it. the only difference is I'd be sat at my pc vs in my bed. both times it would be down to a firealarm getting my attention as I'm not watching my printer 100% of the time.
How many times have you started a print and had a problem then vs later into the print?
You're saying don't delay start because it could fail, printings do fail from time to time but I keep printing.
What I'm trying to do is delay a print that Ive setup.
I could just keep my printer on with a gcode saying delay, BUT I'd like to be safe and not waste electricity by having my phone trigger the plug which then starts the print.
also say I wake up early I can just press the switch on my button and my printer starts.
If I were in your shoes, I would want to setup two things: 1) the ability to turn everything on at a particular time or on command and 2) the ability to schedule the start of a job. I personally wouldn't gang these two together (on + start job).
In my case I'd focus on using a TP-Link SmartPlug for power and then something that could remotely toggle that on. There's a good API for that and I'd probably write something that runs on a Raspberry Pi Zero W here in my apartment. The Zero would stay on all the time since it's the scheduler.
Next, something else on the Zero then would use the REST API of OctoPrint to select/start the print job.
Edit: Just as I was typing this I heard the relay in my UPS go out for a full five seconds before returning to normal. So even in California we have brownouts more frequently than we'd like to admit.
A timed start wouldn't be turning it on and printing but it would achieve the same result.
I'd lean more towards turn on and print as I can just walk over to my printer, turn it on and it would go regardless of a set time BUT i can see that as a great and useful feature.
I guess its upto someone who knows coding as this is all above me.
Right now I have an app on my phone to turn my wemo on and off but i do also have a kesa plug.
I have a light next to my printer that also has a plug so in the night i can turn the light on remotely and check the pi cam.
I still need to look into discord bot triggering the light before taking a photo, most shots right now are black
Hi OllisGit, This is amazing, I'm currently testing it out.
If i could make a suggestion, I'd say the wording in the settings was confusing.
"Last uploaded file from SD-Card"
I thought that was the card in the pi but its not, maybe put
"Newest file on Printers SD card"
and
"newest file from Octoprints SD card"
or something like that.
Also I like that you set the default timer quite high, It gives you time to get to octoprint and stop it rather than it being instant.
That was good thinking!
Hello OllisGit, would you be able to add a tick box to the main screen in the same way autoshutdown has a tickbox to turn the plugin on and off, this would save going into the settings each time.
My plugin does not work at all. After turning on and loading the octoprint, the plugin does not start printing. The plugin is activated, auto-connect is working.
Hi @Alexey_Klimchuk,
I didn't saw your post in the forum. As @PrintedWeezl mentioned, always create an issue at the developers repository, because not all developers read every post here.
Btw. Today I fixed a bug in the Plugin. The plugin couldn't handle sub-folders in the upload-folder. So each time the plugin tries to select the file it crashed.
Please try the new version 1.1.2.
If it is still not working, please create an issue in the plugins github and attach the current octoprint.log.