Today's win. Getting S3D automatically transfer a file to SD card on a Smoothie

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.

Check your uploaded gcode, I found S3D likes to put your post processing script inside the gcode which meant my API key is in there, and since anyone can download your gcode, anyone with access to your web interface can get your API key.

You can add some extra lines to s3d’s post processing script to make it strip out that line before uploading:

{STRIP “; postProcessing”}

@Steve_M - For me, it’s not an issue. My Octoprint instances are not world accessible and there is never anyone on the internal network that I’m not aware of, so the issue is moot for me. The only thing that is world accessible with regards to the printers are the Webcams, and they’re fronted by a HAProxy/Apache2Web server stack that only has access to the camera streams from MJPEG Streamer.