Calling Web function to delete trigger ( delayed trigger )..

Posted on
Sat May 13, 2017 3:45 pm
Jann offline
Posts: 120
Joined: Mar 12, 2006
Location: Auburndale, FL

Calling Web function to delete trigger ( delayed trigger )..

Hi all..
This is a bit confusing so I'm gonna be verbose.

I am using ControlPlane to detect when my, my husband's or my tenant's iPhones are in on the network. I've found the best way to do this is to detect their "bonjour" signature on the network...but I have it looking for their mac address as well on WiFi and Bluetooth just in case. This is working great. When Control Plane senses the bonjur address or either mac address for BT or WiFi, Control Plane issues a call to:

http://mini.local:xxxx/variables/iPhoneJann
or
http://mini.local:xxxx/variables/iPhoneMike
or
http://mini.local:xxxx/variables/iPhoneMaura

and sends "home" as the variable value.

Control Plane has the OPTION to say "detect when they drop off the network" but cos of the way iOS handles going on/off the network when phone is locked, this does not work. The phone is still in the house and iOS simply powered down the radios which triggers Control Plane - not what I want...

SO I decided to go the timer route and I created the following in Indigo:

Code: Select all
IF *variable* iPhoneJann becomes equal to "home"
condition: always
THEN *modify variable iPhoneJann set to "away"
DELAY BY 5 minutes.


The reason? Cos I figure if phone is not triggered ON network again by Control Plane w/in 5 min, we should assume user left the house.

BUT if Control Plane detects phone go back on w/in 5 min I get overlapping "delay timers" ... for instance:

11:00: Phone detected by Control Plane, issues call to INDIGO to variable iPhoneJann to HOME
INDIGO SETS TIMER AT 11:05 to change that variable back to AWAY
11:02: Well, what do you know, Control Plane detected phone again ... calls indigo, sets iPhoneJann (which is STILL at "HOME" status) to "HOME"
INDIGO SETS TIMER AT 11:07 to change that variable back to AWAY
11:05, EVEN THOUGH iPhoneJann is at home, and it's w/in 5 min of Control Plane LAST detecting it, INDIGO timer fires and sets variable iPhoneJann back to AWAY
11:07 INDIGO timer fires and sets variable iPhoneJann to AWAY even though it was AWAY (which is fine)

What I need is a call to indigo which does the following:
Set iPhoneJann to "HOME"
DELETE ANY "delay timers" at ALL that are automated and set iPhoneJann to AWAY

That would solve my issue.

Ideas?

Posted on
Sun May 14, 2017 11:02 am
jay (support) offline
Site Admin
User avatar
Posts: 18212
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Calling Web function to delete trigger ( delayed trigger

Rather than setting the variable directly, call an action group that sets the variable to home and sets the variable to away with a delay of 5 minute and make sure that you have the "Override previous delay" checkbox checked. That will keep the delay resetting as long as you continue to get messages that the phone is home. Otherwise, the delay will run out and the variable becomes "away".

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Sun May 14, 2017 12:22 pm
Jann offline
Posts: 120
Joined: Mar 12, 2006
Location: Auburndale, FL

Re: Calling Web function to delete trigger ( delayed trigger

Jay,

Thanks! I did this.

I'm getting a list of the attached _delayed_action's in my schedules window still.

Aren't they supposed to be deleted?

Here's my rule: (I did it at 7:30 time to better show all the delayed actions that stay in the list in schedules)

TIA
Jann
Attachments
Screen Shot 2017-05-14 at 11.19.35 AM.png
Screen Shot 2017-05-14 at 11.19.35 AM.png (276.88 KiB) Viewed 1906 times
Screen Shot 2017-05-14 at 11.19.30 AM.png
Screen Shot 2017-05-14 at 11.19.30 AM.png (276.44 KiB) Viewed 1906 times
Screen Shot 2017-05-14 at 11.19.26 AM.png
Screen Shot 2017-05-14 at 11.19.26 AM.png (225.9 KiB) Viewed 1906 times
Screen Shot 2017-05-14 at 11.18.30 AM.png
Screen Shot 2017-05-14 at 11.18.30 AM.png (126.43 KiB) Viewed 1906 times

Posted on
Sun May 14, 2017 2:08 pm
Jann offline
Posts: 120
Joined: Mar 12, 2006
Location: Auburndale, FL

Re: Calling Web function to delete trigger ( delayed trigger

The symptoms I have SEEM to be related tho this (13 year old) issue.../that was fixed in a release...but do not seem to be working correctly wrt overriding previous delay...

viewtopic.php?p=2783#p2783

Cos this is exactly what I am seeing...Ideas?

Code: Select all
May 14, 2017, 12:53:43 PM
   WebServer                       request to execute action group "IPhone Mike Home" from 10.0.1.100
   WebServer                       request to execute action group "IPhone Maura Home" from 10.0.1.100
   Action Group                    IPhone Mike Home
   Trigger                         Expire Phone Timer Mike
   Action Group                    IPhone Maura Home
   Trigger                         Expire Phone Timer Maura

May 14, 2017, 12:55:04 PM
   Schedule                        _delayed_action_7

May 14, 2017, 12:57:21 PM
   WebServer                       request to execute action group "IPhone Jann Home" from 10.0.1.100
   Action Group                    IPhone Jann Home
   Trigger                         Expire Phone Timer Jann

May 14, 2017, 12:58:28 PM
   WebServer                       request to execute action group "IPhone Mike Home" from 10.0.1.100
   Action Group                    IPhone Mike Home
   WebServer                       request to execute action group "IPhone Maura Home" from 10.0.1.100
   Action Group                    IPhone Maura Home

May 14, 2017, 12:58:43 PM
   Schedule                        Expire Phone Timer Mike (delayed action)
   Schedule                        Expire Phone Timer Maura (delayed action)

May 14, 2017, 12:59:41 PM
   WebServer                       request to execute action group "IPhone Jann Home" from 10.0.1.100
   Action Group                    IPhone Jann Home
   WebServer                       request to execute action group "IPhone Mike Home" from 10.0.1.100
   Action Group                    IPhone Mike Home
   Trigger                         Expire Phone Timer Mike
   WebServer                       request to execute action group "IPhone Jann Home" from 10.0.1.100
   Action Group                    IPhone Jann Home
   Indigo Cocoa client authenticated (10.0.1.8)
   Z-Wave                          received "029 - Notification Sensor (Front Porch)" status update battery level 100%

May 14, 2017, 1:02:21 PM
   Schedule                        Expire Phone Timer Jann (delayed action)

May 14, 2017, 1:04:41 PM
   Schedule                        Expire Phone Timer Mike (delayed action)

May 14, 2017, 1:05:58 PM
   Schedule                        _delayed_action_6

May 14, 2017, 1:07:11 PM
   Schedule                        _delayed_action_5
   Schedule                        _delayed_action_7

Posted on
Wed May 17, 2017 9:45 am
jay (support) offline
Site Admin
User avatar
Posts: 18212
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Calling Web function to delete trigger ( delayed trigger

What are Expire Phone Timer Mike and Expire Phone Timer Jann? Are you sure that those aren't scheduling some future events also that are conflicting with your variable change action group? You can double-click those automatically generated schedules to see what the actions are - that should help identify what they're trying to do.

I'm 99.99% positive that the 13 year old bug was fixed back then...

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 4 guests