Geofencing

I’ve had mixed results with Vera geofencing. The best app I’ve found works about 60% of the time for me, but it eats battery, even at the lowest setting. Vera’s own app triggers once in a blue moon and is more or less useless as a result. I’ve tried several other apps and they all lie somewhere in between these two. Wherever I am I can log remotely to monitor and control, so it’s not a comms issue.

I’d come to the conclusion that geofencing just isn’t reliable enough for daily use, but recently I borrowed a Heatmiser Neo thermostat and hub to develop a plug-in for Vera. Heatmiser have an app which includes geofencing, and you can alter the thermostat settings when leaving and entering the geofence. Pretty standard stuff. But the interesting thing is that, for me, it works EVERY time. Not a single missed trigger in two months of use - and the app doesn’t even appear in the battery usage stats!

So, the problem obviously isn’t the phone or the comms. What else could it be? Server side issues? What is Heatmiser doing that Vera isn’t? And why can one app provide 100% reliable geofencing functionality with virtually no battery drain while others can’t?

Meanwhile, I’m using the Heatmiser hub to tell Vera when I’m out - and it just works.

Interesting. Would love to hear input from developers on this.

This is my biggest frustration with vera and I haven’t found a great solution yet either, for either geofencing or for room occupancy (motion sensors trigger with our dogs unfortunately). Does Heatmiser work for more than one person? I’d almost be willing to buy it just for reliable geofencing! Unfortunately, in looking at it, looks like it’s not available in the US. Really wish there were better options.

I remember reading an article a few years ago about Bill Gates giving people RFID tags when they came in the door–wonder if with the added radio capabilities of the new vera, there might be a solution there. Wish the ibeacons were better. Also looked into the facial recognition cameras on netatmo, but looks like they haven’t opened up that part if the api yet.

Yes, Heatmiser copes with multiple users, although I haven’t tested that yet.

I should perhaps make clear for those reading my initial post that it was written as a criticism of geofencing with Vera and not as a sales pitch for Heatmiser. I mentioned them simply as evidence that geofencing CAN be done well.

GeoFencing with a large radius (about 1 minute drive from your house, radius depends on how fast you drive) is quite easy.

Smaller radius have different issues:

  1. Many people have POOR GPS quality inside.
    This causes Geofencing to switch to Cell Tower triangulation and other techniques that have less resolution and can cause you to move in or out of a small radius geofence
    (i.e. cause false indications)

  2. If you have POOR GPS quality when you leave the house and you cross the GeoFence before the quality of the GPS improves it might miss the transition.

I use Vera Proximity with TWO concentric fences and PLEG to increase my reliability to 99%.
I am arriving when I transition (Outer then Inner zone) I am leaving when I transition (Inner then Outer).

For me sometimes the Remote Request from the GeoFence was lost because the request caused my Vera 3 to restart (i guess it pushed it over the limit). That’s why I am not 100%
I am now on a Vera Plus and have not missed any transitions.

Another strategy is to use a Small GeoFence radius AND a Ping sensor. Then you are home when BOTH indicate home and gone when both indicate gone.
There is a small probability that two different strategies will have false indicators at the same time.

Since Thermostats and house temperatures have a long time constant (slow to change) they can have a large radius and be effective.

In fact if you lived far from home you might want to put a Fence on your office, so when you leave the office it adjusts the temperature so it is comfortable when you arrive.

Richard is entirely correct, as usual. GPS / GLONASS etc have many anomalies. Google GPS accuracy confidence intervals, there are many techniques to combat it. As you fall into those accuracy segments, some folks are really looking for proximity, not positioning, or a combination of the two

Have a think about what you’re trying to accomplish. Arrive AND Depart geofences are one way either from origin or destination. Proximity (from ping or whatever) is something else.

If primarily vehicle based have you thought about an external GPS receiver?

My geofences are at 1km and 2km from my house - and I’ve tried bigger radii with the same result.

As I said in my initial post, the thermostat app works 100% of the time (not a GPS, phone or comms issue then), and the Vera apps work between 60% of the time and hardly ever.

What is the TIME not distance it takes you to get 1 KM from the time you EXIT the garage (i.e. have clear gps goverage).

About 3-4 minutes. But as I’ve said, the Heatmiser geofencing works perfectly.

Create a 10 KM fence around your house and most Geofencing solutions will work.

As I stated … Geofencing (something that tracks more than a single transition) requires GOOD resolution (Hight guality GPS signal) as it transitions a GeoFence boundary.

If you only have one TRANSITION and that transition is LARGE you do not need the typical GeoFencing solution.
You only need an inside/outside distance measurement … and as LONG as that distance is large enough to for GPS to accurately locate you 1 time … you are set.

If you worked 2 - 4 KM from your house and you drove your car from an attached garage (house or condo) to a an office building garage … I doubt that ANY GPS base solution would be reliable.

Cell tower triangulation can easily cause your phone to move about 2 KM as you have something that temporarily blocks/attenuates the signal from a nearby tower.

In any solution you need to understand the limitations of the sensors.

If you lived in a HIGH crime are you would not even want to be 20 steps away from your house before the doors were locked. That is to two small of a radius for any Geofencing solution.

Sorry Richard, but you’re missing the point. The Heatmiser app uses the same radii and works flawlessly every time. The Vera apps do not.

tb001 - For in-house presence detection I’m experimenting with this:

   http://www.instructables.com/id/Raspberry-Pi-Bluetooth-InOut-Board-or-Whos-Hom/

Obviously the Python script can be modified to run scenes on Vera when each phone owner arrives/departs.

[quote=“racarter, post:11, topic:191281”]tb001 - For in-house presence detection I’m experimenting with this:

   http://www.instructables.com/id/Raspberry-Pi-Bluetooth-InOut-Board-or-Whos-Hom/

Obviously the Python script can be modified to run scenes on Vera when each phone owner arrives/departs.[/quote]I don’t like the idea of using Bluetooth due to it’s short range. It would be just as easy to detect the phone when in connects to the local WiFi plus it has a wider range.

All you have to do is record the MAC address for each phone you want to track. Once the Pi knows the MAC address for each phone it can easily check to see if the phone is present. Using the MAC address is better than the IP address since IP addresses can change but every device has it’s own unique MAC address which can never change.

Recording the MAC address is easy. You just have to connect to a WEB page on the Pi and register the phone. The Pi knows the MAC address of the connecting phone so it can record it.

Timon - I tried that approach a long time ago but iPhones don’t respond to wi-fi polls when in standby. They do respond to Bluetooth.

My iPad has been sleeping for several hours and I just pinged it from my Mac and it replied. It’s possible that the Mac sent out a magic packet to wake up the iPad but I’ve not known that to be a built in function of Free BSD unix which is that the Mac uses under the hood.

Another advantage using MAC addresses, assuming no issues like waking up, is that it could be done directly in Vera. Very little services are needed that don’t already exist. I assume that Vera has a “arp” and “ping” command which is about all you need. On most systems if you send a ping to the broadcast address ALL devices on the network will respond thus filling the arp table with all devices. If the device isn’t present on the network it won’t respond and thus won’t get an arp entry. Even if you had to send one ping out every few seconds the overhead would be extremely low.

Neither my iPad Air nor my iPhone 6 respond to pings from my MacBook once they’ve been asleep for more than a few minutes.

[quote=“Timon, post:12, topic:191281”][quote=“racarter, post:11, topic:191281”]tb001 - For in-house presence detection I’m experimenting with this:

   http://www.instructables.com/id/Raspberry-Pi-Bluetooth-InOut-Board-or-Whos-Hom/

Obviously the Python script can be modified to run scenes on Vera when each phone owner arrives/departs.[/quote]I don’t like the idea of using Bluetooth due to it’s short range. It would be just as easy to detect the phone when in connects to the local WiFi plus it has a wider range.

All you have to do is record the MAC address for each phone you want to track. Once the Pi knows the MAC address for each phone it can easily check to see if the phone is present. Using the MAC address is better than the IP address since IP addresses can change but every device has it’s own unique MAC address which can never change.

Recording the MAC address is easy. You just have to connect to a WEB page on the Pi and register the phone. The Pi knows the MAC address of the connecting phone so it can record it.[/quote]

If you live in an apartment I think Bluetooth might be Ok but even a single wifi don’t cover my property and Bluetooth don’t cover more then 2 rooms. I have a smart watch what switches from bluetooth to wifi when I’m halfway across the house let alone if I go outside to the garage or anywhere else.
And I have alot of things tied to my home away. If it were to loose signal It wouldn’t be fun walking in the dark with the alarm set and notifications going off. because of that I can’t only rely on Ping either. If My phone battery went dead, rebooted, wifi wasn’t on or even if the router needed to be rebooted any of those would cause a big short term problem.

Pinging, wifi or Bluetooth just isn’t reliable enough alone and can mean so much more other things then only “your away” when it doesn’t respond.

[quote=“racarter, post:16, topic:191281”]Neither my iPad Air nor my iPhone 6 respond to pings from my MacBook once they’ve been asleep for more than a few minutes.[/quote]Now that’s interesting. I’m running an iPad 4S and a iPad 2. Both of them work just fine, knock on wood. I’ll have to look into this some more.