Back home...shadows up

Posted on
Thu Feb 05, 2015 2:24 pm
MarcoGT offline
Posts: 1091
Joined: Sep 11, 2014
Location: Germany

Back home...shadows up

Hi all,

I would like to find a smart way to move shadows up when I get home.
I use dings can to detect home presence and it works like a charm :)
Then I have a door sensor on the entrance door and a motion sensor pointing the door.

The easiest way would be "iPhone home --> shadows up" but of course would be nice to integrate the motion sensor and the door sensor too.

But iPhone connects to wifi even before I open the door so I cannot use as condition door and motion sensors as they are still off.

As can I get it?

Thanks
Marco

Posted on
Fri Feb 06, 2015 1:56 pm
Vangelis offline
Posts: 167
Joined: Mar 18, 2014
Location: Southampton (UK)

Re: Back home...shadows up

If I understand the logic correctly wouldn't this work?

iPhone detected -> Set variable
Door Open / Motion sensor triggered -> is iPhone variable true? (As a condition) -> Shadows Up

However if might have misunderstood

Vangelis

Posted on
Sat Feb 07, 2015 2:04 am
MarcoGT offline
Posts: 1091
Joined: Sep 11, 2014
Location: Germany

Re: Back home...shadows up

Yes, but that could not be enough.
Let's suppose that iPhone goes down (low battery, wifi not working and so on), then it reconnects and Indigo sets variable to "true", then motion is detected, it brings then shadows up, and of course this is wrong.

Idea was to set a variable "justEntered=true" when the main door is open, check if iPhone is connected and get the last connection time, then make a difference between currentTime and lastConnectionTime. If this is less the 45s (for example), then move shadows up.

Problem is that Indigo does not provide "time difference" function, I have to do it manually :)

Thanks
Marco

Posted on
Wed Mar 04, 2015 3:01 pm
kw123 offline
User avatar
Posts: 8366
Joined: May 12, 2013
Location: Dallas, TX

Re: Back home...shadows up

How about "just entered = time stamp ". Then in a script check if time now < just entered +45 secs ...


Sent from my iPhone using Tapatalk

Posted on
Thu Mar 05, 2015 12:51 am
MarcoGT offline
Posts: 1091
Joined: Sep 11, 2014
Location: Germany

Re: Back home...shadows up

Now I changed the logic, I have a small tablet on the wall so I can set (via Indigo Touch/Control Page) the variable "atHome"
With smartphone detection is not so easy as the WiFi network can do down blablabla :)

Posted on
Sat Mar 07, 2015 2:16 am
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: Back home...shadows up

In reference to your "justEntered" reply, you could have Indigo do the time difference you refer to.

Have a trigger on iPhone connection that sets iPhoneJustConnected variable to True. Then have a delayed action with say 30 second delay that sets it back to False.

In your door trigger, you can now test iPhoneJustConnected.

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 7 guests