Motion lighting rule using phone as geofence?

I am new at habitat, so be gentle. I have a motion sensor in my garage that I would like to have turn on a light in the house when I come in from an early morning run, but not turn on when I leave the house for the run or when I leave the house to go to work.

Is there a way to use my iPhone location to limit the rule to coming in rather than going out for using the motion detector to turn on the light?

Yes, use the Hubitat app on your phone.

I have the habitat app on my phone. What do you mean use it?

I think this is going to be very tricky to do using the geofence in the app, if at all possible. The issue is timing. Will it report your arrival in a timely manner. The irony is if it doesn't it may work. Alot of people, including myself were/are having issues with this. I picked up a Smartthings arrival sensor for far more accurate and reliable presence but modded it as it just sits in the car. That's not going to work for this scenario. The other issue is that you will be present for both, if it reports accurately. Do you go for a run at the same time? And work time?

I go on the run at a consistent time, so I can limit that timing, i.e. exclude 4:15 - 4:35AM, but I come back at different times depending on the run length and at times those times co-inside with the same time that I go to work on off days and easy run days.

An easier way would to just use presence as a trigger for the light but again, it's dependent on how well the geofencing works for you. I'm also a little confused by the back half of the statement.

Sorry that was quit vague. Using the GPS on your phone and enabling the geofence on HE (Hubitat) you can use the presence capabilities within RM (Rule Machine). I will admit there are some GPS issues with the HE app but you could also look at caring a presence sensor and there is also Life360 app which seems to work well also, although I found I had similar GPS issues with Life360. Unfortunately nothing is perfect. I have utilize the presence monitoring to arm HSM and set various modes to control varies portions of my home automation.

I hope this helps.

I train for marathons. On some days I run 12 miles and on easy days I might run 5 to 8. On the easy days I can go to work in the same time frame that I would be coming home on the longer runs. For instance if I run 12 miles I might be starting at 4:30 and returning at 6:15. On an easy run day I could come home, take a shower and leave by 6:15. My schedule varies.

I will try the geofence on the app to see how well that works for me.

Good luck and would enjoy hearing your successful outcome.

1 Like

I'm new to programming Hubitat but have thought about similar things. You could have two motion sensors located near each other that also indicate the direction you are moving by having a virt 'arriving' switch activate if motion1 is active and motion2 is inactive. If you are 'leaving', the logic would not activate since motion2 would still be active when motion1 is triggered.

I have tried a lot of motion sensors over the years and my favorite thus far for responsiveness, battery life, and reliability is the NYCE Zigbee dome sensor.

With virtual switches you can make flip-flop logic or binary counters etc.

@he_bp I don't like the two (2) motion sensor idea, but your post gave me an idea to use the door contact sensor from the house to make the garage sensor inactive vs if the motion is seen first then it is active. Thanks. I am pretty sure that will work.

1 Like