Announcement

Collapse
No announcement yet.

Event trigger is a bit delayed sometimes

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

  • Event trigger is a bit delayed sometimes

    Hi Spud, been trying out this plugin for a week or so now and it seems to be working great using the iOS Location triggers. This is the missing piece I've been waiting for to trigger events when arriving and departing home!

    One thing I have noticed is it seems there is sometimes a bit of a delay from when the Dropbox files are created by IFTTT and when the events trigger. Not a long delay, but sometimes it seems like it takes up to a couple minutes. Should the events trigger immediately when the Dropbox file is created? Or is the plugin just polling the configured Dropbox path every so often? If so, what is that polling interval? And is this configurable?

  • #2
    yes the plugin is polling the Dropbox. The default polling interval is 2 minutes, it's configurable from IFTTT.ini: in the GENERAL section add this line:

    Code:
    poll_interval=1
    The lowest value you can set here is 1 minute, if we go beyond that I fear Dropbox can flag and ban us for doing too many requests.

    Anyway I just saw in the Dropbox API that there is now a long polling mechanism that would allow to have quasi realtime notifications, so I will implement that in the next version.

    Comment


    • #3
      Originally posted by spud View Post
      it's configurable from IFTTT.ini: in the GENERAL section add this line:

      Code:
      poll_interval=1
      I don't have a GENERAL section, the only section is DROPBOX, is that normal?

      Originally posted by spud View Post
      The lowest value you can set here is 1 minute, if we go beyond that I fear Dropbox can flag and ban us for doing too many requests.
      Oh, so the plugin is actually polling the Dropbox servers? I wonder if we could just poll the local path, then it could be done more frequently?

      But I suppose that becomes moot if you can do what you mention here:

      Originally posted by spud View Post
      Anyway I just saw in the Dropbox API that there is now a long polling mechanism that would allow to have quasi realtime notifications, so I will implement that in the next version.
      Thanks so much for the plugin, will be purchasing a license soon...

      Comment


      • #4
        Originally posted by teladog01 View Post
        I don't have a GENERAL section, the only section is DROPBOX, is that normal?
        if you change the log level, it should create one, or simply manually create it:
        Code:
        [GENERAL]
        poll_interval=1

        Originally posted by teladog01 View Post
        Oh, so the plugin is actually polling the Dropbox servers? I wonder if we could just poll the local path, then it could be done more frequently?

        But I suppose that becomes moot if you can do what you mention here:
        yeah the plugin is using the Dropbox API, which send http request to the dropbox servers. You don't even need to have the Dropbox desktop application running on your HS3 machine, I have never used it personally.

        Comment


        • #5
          I have implemented long polling in version 3.0.0.2 available here, now the event should trigger almost instantly once the file is in the dropbox.
          Please test!

          poll_interval setting is now useless

          Comment


          • #6
            Originally posted by spud View Post
            I have implemented long polling in version 3.0.0.2 available here, now the event should trigger almost instantly once the file is in the dropbox.
            Please test!

            poll_interval setting is now useless
            Ok, thanks, Spud. I've installed and will report back after some testing...

            Comment


            • #7
              Originally posted by spud View Post
              I have implemented long polling in version 3.0.0.2 available here, now the event should trigger almost instantly once the file is in the dropbox.
              Please test!
              So far so good, Spud. Triggers happen immediately after the file is created in Dropbox. Great job, thanks for implementing this.

              Comment


              • #8
                IFTTT errors flooding log

                Well it looks like I spoke too soon.

                Code:
                IFTTT     ERROR Exception of type 'DropNet.Exceptions.DropboxException' was thrown.
                I noticed these errors flooding my log last night, literally hundreds per second. Also, the HSPI_IFTTT process was using an excessive amount of CPU.

                I don't know if it is related, but my internet was down at the time (that is what prompted me to login to the computer and notice the errors).

                I restarted HomeSeer and the errors stopped, even thought the internet was still down. Let me know if you need more info.
                Attached Files
                Last edited by teladog01; June 26th, 2014, 08:45 AM. Reason: add attachment

                Comment


                • #9
                  I couldn't replicate this issue but now when an error is detected, the plugin will sleep for 20secs before trying to poll again dropbox, this will avoid flooding of logs.

                  Please test version 3.0.0.3 available here

                  Comment


                  • #10
                    ifttt trigger not picking up dropbox files since version 3.0.0.3

                    Hi Spud,

                    I noticed since version 3.0.0.3 dropbox files are no longer being processed by homeseer
                    IFTTT triggers.
                    the dropbox files are still there and not being deleted.
                    before version 3.0.0.3 everything was working fine.
                    Do I need to set the poll_interval parameter?

                    Zig
                    Last edited by zigmund; July 9th, 2014, 03:36 PM. Reason: typo

                    Comment


                    • #11
                      Originally posted by zigmund View Post
                      Hi Spud,

                      I noticed since version 3.0.0.3 dropbox files are no longer being processed by homeseer
                      IFTTT triggers.
                      the dropbox files are still there and not being deleted.
                      before version 3.0.0.3 everything was working fine.
                      Do I need to set the poll_interval parameter?

                      Zig
                      no you don't have to set the poll_interval, this parameter is now useless

                      can you set the log level to debug, restart the plugin and post your logs

                      Comment


                      • #12
                        debug log

                        this is the debug log after I restarted the plugin, files are now being processed, but one file where already on dropbox for 1 day and another one 21 minutes.


                        Code:
                        Jul-09 10:54:48 PM	  	 Event	 Event Trigger "IFTTT triggers vk update trigger"
                        Jul-09 10:54:48 PM	  	 IFTTT	 DEBUG Global variable ifttt_entrypublished created
                        Jul-09 10:54:48 PM	  	 IFTTT	 DEBUG Global variable ifttt_entrycontent created
                        Jul-09 10:54:45 PM	  	 IFTTT	 DEBUG New file meer_namen_op_eu-sanctielijst_oekra_ne.txt found in /public/ifttt/triggers/rss/vk/meer_namen_op_eu-sanctielijst_oekra_ne.txt
                        Jul-09 10:54:45 PM	  	 Event	 Event Trigger "IFTTT triggers vk update trigger"
                        Jul-09 10:54:45 PM	  	 IFTTT	 DEBUG Global variable ifttt_entrypublished created
                        Jul-09 10:54:45 PM	  	 IFTTT	 DEBUG Global variable ifttt_entrycontent created
                        Jul-09 10:54:44 PM	  	 IFTTT	 DEBUG New file politie_amsterdam_zal_vluchtelingen_wegsturen_uit_park.txt found in /public/ifttt/triggers/rss/vk/politie_amsterdam_zal_vluchtelingen_wegsturen_uit_park.txt
                        Jul-09 10:54:44 PM	  	 Event	 Event Trigger "IFTTT triggers vk update trigger"
                        Jul-09 10:54:44 PM	  	 IFTTT	 DEBUG Global variable ifttt_entrypublished created
                        Jul-09 10:54:44 PM	  	 IFTTT	 DEBUG Global variable ifttt_entrycontent created
                        Jul-09 10:54:43 PM	  	 IFTTT	 DEBUG New file noord-korea_nog_zeker_30_ontvoerde_japanners_in_leven.txt found in /public/ifttt/triggers/rss/vk/noord-korea_nog_zeker_30_ontvoerde_japanners_in_leven.txt
                        Jul-09 10:54:41 PM	  	 IFTTT	 DEBUG File kerkdriel_mist_misschien_wedstrijd_oranje.txt found in /public/ifttt/triggers/rss/vk/kerkdriel_mist_misschien_wedstrijd_oranje.txt has a modified date older than 30 minutes
                        Jul-09 10:54:40 PM	  	 IFTTT	 DEBUG File rusland_houdt_oekra_ense_helikopterpiloot_vast.txt found in /public/ifttt/triggers/rss/vk/rusland_houdt_oekra_ense_helikopterpiloot_vast.txt has a modified date older than 30 minutes
                        Jul-09 10:54:39 PM	  	 IFTTT	 DEBUG Folder /Public/IFTTT/Triggers/RSS/knmi is now monitored
                        Jul-09 10:54:39 PM	  	 IFTTT	 DEBUG Folder /Public/IFTTT/TRIGGERS/Weather is now monitored
                        Jul-09 10:54:39 PM	  	 IFTTT	 DEBUG Folder /Public/IFTTT/TRIGGERS/CALENDAR/Glazenwasser is now monitored
                        Jul-09 10:54:39 PM	  	 IFTTT	 DEBUG Folder /Public/IFTTT/TRIGGERS/RSS/Vk is now monitored
                        Jul-09 10:54:39 PM	  	 IFTTT	 DEBUG Folder /Public/IFTTT/TRIGGERS/CALENDAR/Other is now monitored
                        Jul-09 10:54:34 PM	  	 Plug-In	 Finished initializing plug-in IFTTT
                        Jul-09 10:54:34 PM	  	 IFTTT	 INFO IFTTT version 3.0.0.3
                        Jul-09 10:54:34 PM	  	 Info	 Plugin IFTTT has connected. IP:127.0.0.1:39771
                        Jul-09 10:54:27 PM	  	 Info	 Plugin IFTTT with instance: has disconnected
                        Jul-09 10:54:27 PM	  	 Plug-In	 Shutting down Plug-In: IFTTT

                        Comment


                        • #13
                          so everything is working now?

                          Comment


                          • #14
                            not working

                            Nope,

                            since the restart of the ifttt plugin no new files were processed.all documents are still on dropbox. (see attachment)
                            when I restart the plugin again files are being processed again.

                            Zig
                            Attached Files
                            Last edited by zigmund; July 10th, 2014, 04:30 PM.

                            Comment


                            • #15
                              do you see something in the logs when the files appear in your dropbox?

                              could you filter the logs to see only the IFTTT entries and post all the lines since you restarted the plugin 2 days ago

                              Comment

                              Working...
                              X