Removing "automated timers/trig" via a post to indigo web...

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

Removing "automated timers/trig" via a post to indigo web...

Hi all.. I posted this in the wrong place earlier (basic help->triggers) so forgive me if I double-posted.
This is a bit confusing so I'm gonna be verbose. ALSO, keep in mind I want to remove the scheduled item named something like "_delayed_action_1" etc.. but since I don't know the scheduled item name, that is where my issue lies. Also I don't know if a "web hit" to the system can remove a scheduled item:

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:04 am
jay (support) offline
Site Admin
User avatar
Posts: 18200
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Removing "automated timers/trig" via a post to indigo we

I answered it over there so I'm going to lock this topic.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 2 guests