Set alarm based on geofencing

I want to arm my security system based on the location of mine and my wife's phones. When we are both gone I want the system to arm. Obviously when only one of us leaves I don't want the system to arm. When only one of us returns and the system is armed I want it to disarm. Is there an explanation somewhere? Anyone done this?

To figure out how to do this with rule 4 I took a couple of contact switches and tried to create a rule where when both were open a light would turn off. No matter how I enter the two contact sensors (As one trigger or separate triggers) they act like an OR situation. How do I create an AND situation so both contact sensors have to be open in order to turn the light off?

Does Hubitat expect you to write you own code in order to use geofencing?


Prencese change

If you or wife all not precense then
Delay 15 (cancel)
Arm hsm
Cancel actions
End if

Actually, I think that will arm the system if either person is not present. I think you want to do the following :

Trigger:  Either Device Presence Changes

If Both Phones are not Present
      Arm Away
Else if HSM is Armed Away
      Disarm HSM

The only reason I put the else-if in instead of an else is to avoid multiple disarms. If you have a keypad and disarm a system that is already disarmed it still beeps, which would annoy me. But if you don't have one, you can just substitute in an else. I also would not use any delays because your presence is not going to update in 15 seconds most likely.

However, I would like to comment on using presence to arm. There's a risk that it not arm. Disarming by presence is a no-brainer, i do that too. However, when I leave I want to make sure the system is armed so i arm it manually through my "leaving" routine.

Seems to me the real risk would be losing your phone, which would essentially give whoever had it carte blanche to break into your house.

It's the same reason I refuse to put an alarm system dongle on my keychain - if I lose them, that disarm code is my only defense.

You could do both as a fail safe. But then you would always be having both your phone and keychain with you to arm/disarm.

Yes. If someone wanted to go through the trouble of stealing my phone to break into my house, they could do that. That's a risk I'm personally willing to take. My security system is not designed to keep out cat burglars. If somebody is willing to go through that trouble, they can have my TV.

1 Like

I have my phone setup like @majgas1964 is asking and in most cases I would notice my phone missing and be able to remove my phone from the list of authorized presence devices before someone could get to my house. Also having my phone doesn't tell them where I live and just disables the alarm it doesn't unlock any doors or open the garage. So they would still need to find the right house and break in since they wouldn't be able to get into my phone to control anything.

I used RM to setup my rules for this but I did so before RM4 which I'm still not comfortable with, someday I really need to take the time to sit down and figure out the new logic although it seems like it would be causing the rule to trigger and do more processing than the same RM3 rule which is triggering usually with more restrictions with the and option anyway. There is also Mode Manager which could be used to do what @majgas1964 is looking to do.

Thanks for the responses. RM itself does not appear to have the ability to build code like Ryan780's. How do you build such a statement and then use it? In another life I wrote programs from time to time and I'm familiar with IF statements. Where do you find the syntax for creating such statements? I'm assuming his code works as written.

UPDATE: For clarification I set a Mode change to Away to take place when both phones were outside the zone. I then created a rule to Arm Away HSM when the Mode changed to Away. I then set up a rule to Disarm All when either of the phones returned. I looked at System Events and the Disarm All part worked but the Arm Away event didn't trigger even though we were both gone.

Under the Select Actions to Run choose Conditional Actions

Um, I don't quite get it.

Sure, there's a risk if I drop my [keys|smartphone with geofencing enabled|alarm fob] on my doorstep, but otherwise, my physical devices (phone, keys, alarm fob) don't have my physical address on them -- my phone has an email address on the back (which cannot easily be associated with my physical address via a 'net search) and keys, etc. may have a phone number on them (with an area code about 3000 miles from my residence).

The only people who know my physical address and would recognize my phone/keys, etc. are close friends or relatives. Well, I wouldn't really want most of my relatives letting themselves into my house if the found my magical unlocking device, but friends are OK.

Your keys (find and) open your car; at least in my state, my registration is in the glove box, with my address on it.

If I dropped my keys near my car (or left the key in the lock), then someone could probably figure out the association between keys=>car.

That doesn't mean they'd also have the correspondence between vehicle => owner's residence.

Many people keep their registration & insurance outside the car, for example, in their wallet, tucked behind their driver's license. If someone unauthorized is using the car, the miscreant will be unable to produce the corresponding paperwork and also will not have easy access to the association between the vehicle and the residential address.

It's kinda fun, but this mental exercise does tickle my paranoia just a little.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.