Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 2 of 2
  1. #1
    Administrator bolsoncerrado's Avatar
    Join Date
    Nov 2014
    Post Thanks / Like

    How To Autoupload Timelapses to YouTube, Get an Email and Pic when Print Finishes & +

    Automatically upload timelapses to YouTube

    Using youtube-upload and the MovieDone event hook it is possible to automatically upload finished timelapses to YouTube.

    You'll need to install youtube-upload first. Assuming you are on a Pi, this can accomplished via
    sudo apt-get install python-gdata
    tar xfz youtube-upload-0.7.3.tgz
    cd youtube-upload-0.7.3
    sudo python install

    After that, you'll need to add the following event subscription to events > subscriptions in your config.yaml
    - command: 'youtube-upload
    --title="Timelapse: {gcode}"
    --description="Timelapse of {gcode}, printed and recorded via OctoPrint"
    --keywords=OctoPrint "{movie}"'
    event: MovieDone
    type: system

    Substitute <yourUser> and <yourPassword> with your YouTube username and password respectively. If you are using Google's two factor authentication, you'll need to create an application password to use here. If you want to make your movie unlisted, add --unlisted after the keywords, if you want to make it private, add --private.

    Send an email incl. a snapshot of the printed object upon print completion

    Note: This receipt explains things for a Raspbian/OctoPi-based setup. It also assumes that you've got mjpg-streamer setup as explained here and listening on port 8080.

    First you'll need to install a couple of new packages on your system in order to be able to send emails. Open an SSH session into your Pi (or alternatively open a terminal on it if it happens to be connected to monitor, mouse and keyboard). Then:
    sudo apt-get install ssmtp mailutils mpack
    Modify /etc/ssmtp/ssmtp.conf according to the settings needed to send mail via your mail provider. For Gmail it must look something like this:

    AuthUser=<your gmail address>
    AuthPass=<your gmail password>

    Add the following line to your event subscriptions in config.yaml, substituting <your mail address> with your email address where you'd like to get the mail sent to.

    - event: PrintDone
    command: curl -o /tmp/printDone.jpg "http://localhost:8080/?action=snapshot" && mpack -s "Print of {file} finished" /tmp/printDone.jpg <your mail address>
    type: system

    This will send you an email with a subject of "Print of <printed gcode file> finished" and a webcam snapshot of the webcam attached each time a print finishes.

    If you want to have a certain email address as sender (a.e. to send mails to ifttt) you have to specify an alias in /etc/ssmtp/revaliases (for user pi):

    In /etc/ssmtp/ssmtp.confyou have to add:

    (not sure about hostname, maybe it's ok just to have rewriteDomain)

    Push notifications for Android / iOS via Pushover

    Pushover is an application that lets you push notifications to your Android or iOS device via a simple REST endpoint.

    You'll need to register for an account and install the app. Then register a new 'application' at (name it 'Octoprint' or something you remember).

    The event hook will just do a simple CURL request:

    - event: PrintDone
    command: curl -s
    -F "token=API_TOKEN"
    -F "user=USER_TOKEN"
    -F "message=Completed {file}"
    -F "title=OctoPrint"
    type: system

    The printer will send a notification to all phones logged in to your account. If you've got a Pebble smartwatch, you can enable the app to relay the notification there too.

    Push notifications to iOS via Mail

    Pushover is nice, but not free.

    Set up a iCloud email address and use the following code to get instant email alerts to your iDevice, make sure your account is set to push.

    - command: mail -s "3DPrint of {file} DONE!" < /dev/null
    event: PrintDone
    type: system

    If you prefer a slightly quicker alert then change 'PrintDone' to 'Alert' and put a M300 command at the start of your end code.
    (Make sure there are no tabs in the code)

    Make sure you install sstmp and edit the config with your email account information. I use my gmail account. See "Send an email incl. a snapshot of the printed object upon print completion" above for instructions.

    Automatically start/stop mjpg_streamer via eventhooks

    In config.yaml add the following commands to your subscriptions for PrintStarted and PrintDone to automatically start and stop mjpg-streamer during prints in versions newer than 1.1.0. This way the mjpg-streamer isn't running all the time as in the OctoPi implementation.

    Note: This recipe explains things for a scratch Raspbian based setup and does not work directly with OctoPi. It also assumes that you've got mjpg-streamer setup as explained here and listening on port 8080.

    enabled: True
    - subscriptions:
    - event: PrintStarted
    command: mjpg_streamer -b -i "/usr/local/lib/ -n" -o "/usr/local/lib/ -w /usr/local/www"
    type: system
    - event: PrintDone
    command: killall mjpg_streamer
    type: system

  2. #2
    Regular 3D Printer
    Join Date
    Dec 2014
    Post Thanks / Like
    An autoupload of the timelapse would be great
    I have taken the time to setup a: Send an email incl. a snapshot of the printed object upon print completion

    It works really good and suits really well with my workflow since i leave the printer alone for most of the time.



Similar Threads

  1. Simplify3D Youtube official channel
    By Joao in forum 3D Software
    Replies: 0
    Last Post: 07-06-2015, 06:02 PM
  2. Replies: 0
    Last Post: 01-19-2015, 03:38 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts