Help me understand how geofencing works

Eight

n3wb
Apr 10, 2018
10
2
I'm having no success with geofencing, and I think I know why. Here's my setup:

Latest BI version installed on PC
Netgear router running OpenVPN
iOS device running current iOS and BI app and OpenVPN app

My phone will detect when I enter and leave the geofenced area, no problem. This makes sense, since the phone has the GPS in it. The issue is that profiles don't change on my BI server when I enter or leave the area. My thought is that the phone app has to be able to send a command back to the BI server to tell it to swap profiles. For that to work, I have to have an open VPN tunnel so my phone can communicate with my BI server. On iOS devices, there is no way to persist a VPN tunnel with OpenVPN (there is a way with a different VPN software, but my phone happens to be a managed device by my employer, so I'm not going to look into options that require it to be managed differently).

Am I correct in assuming that I would have to have an open VPN tunnel back to my server for this to work correctly? The only other option I can think of is the BI server constantly checking on my phone's location based on some location-based API to another service. Since this doesn't seem to be happening, that's why I assume my theory is correct. I couldn't find any documentation that says exactly how this works. I'm not going to open up ports to use the WAN functionality of the app instead of a VPN, although I can see how that would allow the profile swaps based on geofencing to work correctly.

Any insight into how this actually works is welcome. I'm also looking into other presence-based solutions to be able to trigger a profile swap (RFID, garage door opener, etc). Any pointers to make this work would be welcome. Thanks.
 
You're correct, the app on the phone sends a command to the BI server via either your LAN/WAN address if they are accessible when the phone crosses the Geo Fence threshold. This means the phone needs to be able to communicate to your BI server when crossing the threshold which usually happens while your phone is out of WiFi range. The only other options to leaving your VPN tunnel open on your iOS device all the time is to either use the Blue Iris SmartThings integration if you have SmartThings to switch your profiles based on your presence state, or to open an SSL port on your router and allow BI traffic through that port via STunnel which is frowned upon by most of the community.
 
Thanks for the information. I did try to determine how I could extend my wifi signal to work around the issue, but it seems like too much of a hassle. I did look at SmartThings earlier today. I'll dig a little more into that, thanks.