Bluetooth (failsafe) Trigger (or Condition) question...

Posted on
Fri Jul 24, 2015 7:18 am
Vangelis offline
Posts: 167
Joined: Mar 18, 2014
Location: Southampton (UK)

Bluetooth (failsafe) Trigger (or Condition) question...

Here goes.....

I have a BT script that populates an Indigo variable (via AppleScript) when my phone goes in and out of range..

The variable 'VangelisStatus' is set to either 'Home' or 'Away' based on the BT signal going out of range...

I then have an Action that detects the front door opening, with a condition to check if VangelisStatus was Away, but is now Home - this in turn gives me a status announcement over Sonos, when I arrive home from work.

The problem is that sometimes when I am at home, the BT signal will be temporarily lost, and therefore the logic gets reversed and the announcement is played when I open the door to go out to work :(

Is there some way, through use of logic or timers that I can inhibit the change in variable VangelisStatus on the temporary loss of BT? For example if BT signal is lost for excess of 2 hrs, then I have REALLY left the house :) if not then I am STILL at home

I have played around but I always end up with a flawed solution.

I don;t want to go down the route of IP based confirmation as need the solution to be autonomous (as opposed to hitting the Home button on iPhone to wake up WiFi)

Vangelis

Posted on
Fri Jul 24, 2015 9:59 am
jay (support) offline
Site Admin
User avatar
Posts: 18243
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Bluetooth (failsafe) Trigger (or Condition) question...

I think it depends on how you're getting your bluetooth status change notifications (that run the script).

Well, maybe not. I guess you could have your scripts change a variable (different than VangelisStatus). Then a trigger such that when that variable changes to "bluetooth away" or something, start a timer running for 2 hours. Another trigger will stop the timer when "bluetooth home", and a final trigger when the timer runs out it sets VangelisStatus to "Away".

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 6 guests