Jump to content
C4 Forums | Control4

Question

Posted

What’s the consensus on the best way to geofence with Control4? I’ve got a mix of apple and android phones, so a pure apple solution won’t work. I basically want to open the garage door as I approach and close it if it’s left open. I’ve explored using Unifi to see devices fall off and reappear, but I get a lot of false alerts with it.

 

is there something better out there?

Recommended Posts

  • 1
Posted

There is a new Geofencing Agent coming out soon for geofencing on both Apple and Android, I believe it’s in the final testing phases, let’s wait as any other option like IFTTT would be hit/miss, I use HomeKit Geofencing and it’s perfect but it’s Apple only!


  • 0
Posted

Niffty idea, but bad in practice. Unifi geofencing works sometimes so I would not depend on it as too many variable in the chain of phone, cell carrier, ISP, etc. Personally I would never depend on geofence to close the garage as will never know if it worked when you leave the fence. Now to open, pushing the button on the homelink is not that hard and always works! Now gepfence the alarm when all members of the house has left is what I want to see!

  • 0
Posted

Yeah, the Unifi option doesn’t seem to be the most reliable. I’ve got an alert set up either way to tell me if the door is left open, but wanted to automate it.

 

Any other drivers/options out there?

  • 0
Posted
13 hours ago, Anks329 said:

Yeah, the Unifi option doesn’t seem to be the most reliable. I’ve got an alert set up either way to tell me if the door is left open, but wanted to automate it.

 

Any other drivers/options out there?

I use the presence of our phones on the network as a 'geofence,' per se (plus as an input to my occupancy logic, e.g., auto-locking the house).

Given how phones sleep under some circumstances, it just misses the speed for instant garage door open (with a moving car), at least under some circumstances, though mine is consistently fast enough for coming/going on foot (regardless if it's in a pocket or out). If you really want to do the garage door, you could follow the same (network presence approach) and add a more aggressive wifi transceiver to your car that's scanning at a faster interval as a budget approach. Otherwise, I'd think RFID would be the gold standard for this (and is $$$ based on my research).

  • 0
Posted

Not a Control4 solution, but my Android phone looks for my SSID, and then turns on Call forwarding. It's automatically turned off when I leave the house.

Tried to get Apple to do this, but couldn't.

  • 0
Posted
7 minutes ago, Amr said:

There is a new Geofencing Agent coming out soon for geofencing on both Apple and Android, I believe it’s in the final testing phases, let’s wait as any other option like IFTTT would be hit/miss, I use HomeKit Geofencing and it’s perfect but it’s Apple only!

Good to know! Thanks.

  • 0
Posted
On 6/30/2023 at 3:46 AM, Anks329 said:

Good to know! Thanks.

A new agent sounds cool.  I use IFTTT for this and it is a lot more hit than miss.  I have had 2 misses so far in 2023 and it is being used (on average) twice a day.

  • 0
Posted
Just now, South Africa C4 user said:

A new agent sounds cool.  I use IFTTT for this and it is a lot more hit than miss.  I have had 2 misses so far in 2023 and it is being used (on average) twice a day.

That said,  the misses do create a real issue for me as the miss is not so much a miss as an 8 hour delay (in my case)…

  • 0
Posted

After getting sick of geofencing apps failing to do their job, I decided to take the opposite approach.

Normally, the phone's app of choice will detect that the phone is home by comparing the coordinates from localisation services to those of the house and then triggering an action via some cloud hook.

The problem with this approach is that more often than not, the application will disconnect from the cloud  and will ask to enter again credentials to reactivate the geofencing. Other times, the app will just "sleep" and not detect the home position for some reason, until the phone is unlocked or interacted with. Same when you leave. Very annoying.

I decided to move the check to controller side: will look for presence of the phone at home myself, by checking if it has joined one of my APs.

So I have written a small driver that has a "check presence" action that gets executed via timer once every minute or two. The action passes all the family phone's mac addresses from the properties, to a small script on the controller  that looks for presence of these macs on all the APs in order to see if at least one family member is home.

This is with Ubiquiti APs and using ssh to enter the APs CLI and run the "stainfo" tool . Another advantage is that this doesn't depend on the Ubiquiti Network server, it will work even if it's down.

Of course, this method requires that your house  is throughly wifi covered or you will get false "away" events when you are in a wifi dead spot.

Works flawlessly.

Rick

  • 0
Posted
16 hours ago, ziocan said:

After getting sick of geofencing apps failing to do their job, I decided to take the opposite approach.

Normally, the phone's app of choice will detect that the phone is home by comparing the coordinates from localisation services to those of the house and then triggering an action via some cloud hook.

The problem with this approach is that more often than not, the application will disconnect from the cloud  and will ask to enter again credentials to reactivate the geofencing. Other times, the app will just "sleep" and not detect the home position for some reason, until the phone is unlocked or interacted with. Same when you leave. Very annoying.

I decided to move the check to controller side: will look for presence of the phone at home myself, by checking if it has joined one of my APs.

So I have written a small driver that has a "check presence" action that gets executed via timer once every minute or two. The action passes all the family phone's mac addresses from the properties, to a small script on the controller  that looks for presence of these macs on all the APs in order to see if at least one family member is home.

This is with Ubiquiti APs and using ssh to enter the APs CLI and run the "stainfo" tool . Another advantage is that this doesn't depend on the Ubiquiti Network server, it will work even if it's down.

Of course, this method requires that your house  is throughly wifi covered or you will get false "away" events when you are in a wifi dead spot.

Works flawlessly.

Rick

I suppose it requires each handset to have its anonymized MAC feature disabled but that is a fairly novel approach. I'd probably avoid going direct to the AP's if in case UI decide to change items there and scuttle it, by instead using the Unifi API on the controller.

  • 0
Posted

Not sure about any anonymizing MAC on the devices - actually it wouldn't matter as long as they don't change every day.... we use iPhones here and seems to work just fine with default config.

Using the API exposes the driver to failure if the network application is down... also, several comments here mention it is not really reliable (I haven't tried myself)

not to mention the only available driver, although very cool, is rather expensive and overkill for just the geofencing purpose.

  • 0
Posted

Yup, a feature that has been around for a little while and is one of those great Apple ideas that makes life for IT admins etc unnecessarily troublesome - randomises every time. Curious to read about the API not being reliable, had no problems myself but everyone's mileage varies i suppose.

  • 0
Posted

it does not happen here (iPhone 12 and iPhone 15), I guess it's only used in certain situations (eg. when scanning, or for networks that aren't previously known)

  • 0
Posted
On 8/13/2024 at 6:03 PM, ziocan said:

After getting sick of geofencing apps failing to do their job, I decided to take the opposite approach.

Normally, the phone's app of choice will detect that the phone is home by comparing the coordinates from localisation services to those of the house and then triggering an action via some cloud hook.

The problem with this approach is that more often than not, the application will disconnect from the cloud  and will ask to enter again credentials to reactivate the geofencing. Other times, the app will just "sleep" and not detect the home position for some reason, until the phone is unlocked or interacted with. Same when you leave. Very annoying.

I decided to move the check to controller side: will look for presence of the phone at home myself, by checking if it has joined one of my APs.

So I have written a small driver that has a "check presence" action that gets executed via timer once every minute or two. The action passes all the family phone's mac addresses from the properties, to a small script on the controller  that looks for presence of these macs on all the APs in order to see if at least one family member is home.

This is with Ubiquiti APs and using ssh to enter the APs CLI and run the "stainfo" tool . Another advantage is that this doesn't depend on the Ubiquiti Network server, it will work even if it's down.

Of course, this method requires that your house  is throughly wifi covered or you will get false "away" events when you are in a wifi dead spot.

Works flawlessly.

Rick

That’s a good approach.  I tried something similar (but failed spectacularly) a year or two back.  I fixed the IP address and was pinging the relevant phones via the reserved IP address.  Worked fine for arriving on the network but the phones seemed to go to sleep after some time and the pings were then ignored… giving me false “away” events.  I didn’t try very hard though as IFTTT is still working very well for me.  I don’t think I’ve had a false positive in the last year.  My only problem is that the IFTTT driver does not pick up 2 phones entering the same location at the same time.  Only one event is fired…

  • 0
Posted

I use the Cinegration Unifi network driver to determine when phones connect to our network or not, and I then use this state for presence detection.  It works very well.  It is not instant, but the lag is pretty limited.  Obviously, one has to have Unifi network gear, and as @Popolou noted, one also has to switch off the private MAC address feature in iOS. 

  • 0
Posted
13 hours ago, South Africa C4 user said:

That’s a good approach.  I tried something similar (but failed spectacularly) a year or two back.  I fixed the IP address and was pinging the relevant phones via the reserved IP address.  Worked fine for arriving on the network but the phones seemed to go to sleep after some time and the pings were then ignored… giving me false “away” events.  I didn’t try very hard though as IFTTT is still working very well for me.  I don’t think I’ve had a false positive in the last year.  My only problem is that the IFTTT driver does not pick up 2 phones entering the same location at the same time.  Only one event is fired…

correct, ping doesn't work as the phones (at least iPhones) stop responding when sleeping, tried that myself.

In my automation I try to avoid any cloud dependency (Internet or cloud down == automation failing). So, no IFTTT here. My solution is cloud independent and works even when Internet is down!

  • 0
Posted
5 hours ago, DLite said:

I use the Cinegration Unifi network driver to determine when phones connect to our network or not, and I then use this state for presence detection.  It works very well.  It is not instant, but the lag is pretty limited.  Obviously, one has to have Unifi network gear, and as @Popolou noted, one also has to switch off the private MAC address feature in iOS. 

That driver is amazing but too expensive to buy it just for geofencing purposes

I guess the lag is due to check being done through the cloud?  Again see my previous comment, dependency on Internet or any cloud is never a good thing and should be avoided whenever possible IMO.

My driver has instant feedback, as it doesn't use any cloud to check presence.

Also I think there is some confusion about this "anonymizing" of wifi MAC address.  Documentation clearly says it does that for every network you join, but then it remains the same unless you disassociate it or you don't use it for six weeks... see here: https://support.apple.com/en-us/102509. I can confirm my driver works without changing any iPhone setting.

 

 

  • 0
Posted

You may want to read into this more. It's indeed random and occurs on every network (even home/friendly) unless disabled, otherwise you will need to keep track of each re-allocated MAC for your handsets should you rely on that for identification, which defeats the purpose. Why you probably haven't noticed it is because you are seeing the random MAC allocated for that network and not the true one which i'd have thought you'd prefer. How it functions is trivially covered in my earlier link.

  • 0
Posted
3 minutes ago, Popolou said:

You may want to read into this more. It's indeed random and occurs on every network (even home/friendly) unless disabled, otherwise you will need to keep track of each re-allocated MAC for your handsets should you rely on that for identification, which defeats the purpose. Why you probably haven't noticed it is because you are seeing the random MAC allocated for that network and not the true one which i'd have thought you'd prefer. How it functions is trivially covered in my earlier link.

 

for geofencing purposes I don't need the "true" mac address. why would I? all I need is that it doesn't change - and it doesn't.  my iphone has got 3 different macs (one for each SSID) and they never changed since the beginning (I know because I have associated these macs to the client name months ago). Again, I did NOT have to change any setting on iPhone.

See the link I posted above, that confirms what I am seeing.

 

 

  • 0
Posted
On 8/14/2024 at 9:26 PM, South Africa C4 user said:

the IFTTT driver does not pick up 2 phones entering the same location at the same time.  Only one event is fired…

my driver exports two variable sets:

- one set will tell for each configured phone, its presence status (true or false) so when the presence event fires you can check who is present by looking at the variables

- the other set will tell for each configured AP, the number of phones connected to it (this allow for example to program bedtime event by checking that both my phone and my girlfriend's are in master bedroom)

 

image.png.e5657864564aca99f740697df60f0ce5.png

  • 0
Posted
58 minutes ago, ziocan said:

my driver exports two variable sets:

- one set will tell for each configured phone, its presence status (true or false) so when the presence event fires you can check who is present by looking at the variables

- the other set will tell for each configured AP, the number of phones connected to it (this allow for example to program bedtime event by checking that both my phone and my girlfriend's are in master bedroom)

 

image.png.e5657864564aca99f740697df60f0ce5.png

This is really cool.  Wish I had Unifi.

  • 0
Posted
On 8/15/2024 at 12:09 PM, Popolou said:

You may want to read into this more. It's indeed random and occurs on every network (even home/friendly) unless disabled, otherwise you will need to keep track of each re-allocated MAC for your handsets should you rely on that for identification, which defeats the purpose. Why you probably haven't noticed it is because you are seeing the random MAC allocated for that network and not the true one which i'd have thought you'd prefer. How it functions is trivially covered in my earlier link.

The random MAC is recreated only if you disassociate the network and rejoin it.  If you don't, it will remain the same. For the intended application this is just perfect, I understand your mileage may vary.

  • 0
Posted

Any update on the best way to do geofencing? I want to open my garage door when I get home - my Tesla Model S used to do this automatically but my new Model Y doesn't have this feature or Homelink.  So I am wondering if I can do this in the C4 universe.

  • 0
Posted
28 minutes ago, zaphod said:

Any update on the best way to do geofencing? I want to open my garage door when I get home - my Tesla Model S used to do this automatically but my new Model Y doesn't have this feature or Homelink.  So I am wondering if I can do this in the C4 universe.

You can now use our Home Assistant integration to do this.

Note that you need to create a switch template to track the presence

And have Control4 monitor the switch.  Note you will need a Home Assistant installation.  We recommend Home Assistant Green.  Driver here

 

Lastly for automated garage and gate control the best way is to get an ANPR based camera and have the licence plate detection cause the automation.

Certain cameras have ANPR built in.  For example Hikvision ANPR cameras will trigger white listed ANPR events in our Hikvision driver as well as send the actual number plate to a variable.

https://chowmain.software/drivers/control4-hikvision-ipcameras

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.