Code Monkey home page Code Monkey logo

octoprint-ifttt's Introduction

OctoPrint-IFTTT

Connects OctoPrint events to IFTTT.

Setup

Install via the bundled Plugin Manager or manually using this URL:

https://github.com/tjjfvi/OctoPrint-IFTTT/archive/master.zip

Then follow the steps listed here.

Configuration

Makerkeys

A unique API key for IFTTT. Go here and click Documentation. Look at the URL it sends you to; the last part (after the /use/) is the makerkey. You can put multiple makerkeys, seperated by newlines, here.

Default prefixes

Default prefixes for the triggers. If you have an event MyEvent and prefixes prefix1- and prefix2-, it will, by default make the triggers prefix1-MyEvent and prefix2-MyEvent. Seperate the prefixes with newlines.

Events

Define events to send to IFTTT.

Triggers

A list of triggers to trigger on IFTTT.

Values

IFTTT Webhooks allows for a payload with three values. It will interpret this string like so:

  1. If the value begins with a dot (.), it will use that prop of the event payload (e.g. .name for PrintDone)
  2. If it begins with an at symbol (@):
    1. path will be the result of interpreting the string with the first two characters removed as a value
    2. If the second character in the value is an f it will prepend to path the base uploads folder
    3. Otherwise, the second character should be a dash (-)
    4. It will then upload the file at path to file.io and return a link to that file.
  3. If it begins with a colon (:), it will use the string after the colon
  4. If it begins with a dollar sign ($), it will:
    1. If the second character is a t:
      1. Let time be the result of interpreting the string with the first three characters removed as a value.
      2. If the third character is :, it will format time in H:MM format (e.g. 1:02).
      3. If the third character is $, it will format time in H:MM:SS format (e.g. 1:02:34)
      4. If the third character is h, it will format time in Hhformat (e.g.1h`)
      5. If the third character is m, it will format time in Hh Mm format (e.g. 1h 2m)
      6. If the third character is s, it will format time in Hh Mm Ss format (e.g. 1h 2m 34s)
  5. Otherwise, it will just send the plain text

octoprint-ifttt's People

Contributors

tjjfvi avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.