Today’s win. Getting S3D automatically transfer a file to SD card on a Smoothie Printer.
Quick outline. This printer’s USB is a bit wonky, the other printers print direct from Octoprint. There’s CURL script I use to automatically upload a file to Octoprint.:
curl -H "X-Api-Key: " -F “select=false” -F “print=false” -F “file=@[output_filepath]” “http://Octoprint-IP/api/files/local”
I’ve combined this with using SSH Keys, sending commands via ssh and a bash script (it’s basically the one on the Octoprint Wiki, with a few modifications) to do the following:
CURL uploads to Octoprint > run the script over ssh (no login due to SSH Keys) which mounts the SD, copies the file, clears the octoprint upload folder then syncs and unmounts the card.
I can the use Octoprint to fire off the print with knowledge it’s not gonna die. As a note, I’m a Linux user, and whilst it may be possible to do the same thing with Windows, it’d be a lot more convoluted due to having to use Cygwin or PuTTy. That being said the CURL script above will work on Windows, you just need to download and install CURL.