SMS Notifier with Image

  • Hey, just sharing a script I put together to notify me on print completion.

    It runs on a Pi (though should run on any *nix connected to the Duet via USB), and uses Twilio to send SMS, and AWS S3 to store images. Also needs mjpeg_streamer to grab the images (or some service that can return a screenshot on a HTTP GET).

    The script is available here.

    There's some issues currently - Error handling needs a little work, as it's very verbose. Had the printer off overnight, with the Pi on, and the serial port not found errors spammed the logs and filled up the root partition. Added time.sleep(10) for now to take the edge off. Also, for now, added logrotate size 512k and set it to rotate every 5 minutes.

    Use this link to ensure AWS is configured.

    Once configured, add M118 P1 S"###END###" to your slicers end g-code.

    At some point, I'd like to look at M408 or similar to include some extra detail in the SMS.

Log in to reply