Announcement

Collapse
No announcement yet.

Initiate IFTTT Action from Script

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Initiate IFTTT Action from Script

    I've just started playing around with IFTTT and quickly figured out that this plug-in is much more flexible than the MyHS IFTTT route since it supports more than device on/off triggers. However, In some cases what I need to be able to do is run a script to work through some complex logic and then trigger an IFTTT Action based on the results. Is it possible to initiate an IFTTT Action from a script? I know I could always just create a bunch of manual events with IFTTT Actions and run the event from the script but I was hoping for something a little cleaner.

    Thanks,
    Ken
    "if I have seen further [than others], it is by standing on the shoulders of giants." --Sir Isaac Newton (1675)

    #2
    it's not possible with the current version of the plug-in, but I could easily add a scripting to function to wrrte a text file to your dropbox, i. e. what the plugin does to trigger an IFTTT action

    Comment


      #3
      Originally posted by spud View Post
      it's not possible with the current version of the plug-in, but I could easily add a scripting to function to wrrte a text file to your dropbox, i. e. what the plugin does to trigger an IFTTT action
      That would be great!

      Thanks,
      Ken
      "if I have seen further [than others], it is by standing on the shoulders of giants." --Sir Isaac Newton (1675)

      Comment


        #4
        in version 3.0.1.0 available here I have added the following scripting function:

        Code:
        bool RunIFTTTAction(string dropboxFolder, string dropboxFile)
        here is an example of a C# script to call this function:

        Code:
        public object Main(object[] Parms)
        {
            hs.PluginFunction("IFTTT", "", "RunIFTTTAction", new object[] { "/IFTTT/Actions/Test", "test.txt" });
            
            return 0;
        }
        Note that this version of the plugin uses a new version of the Dropbox API so you will have to reauthorize your account to use it.

        Comment

        Working...
        X