Geofence resolution

I don't see a resolution number stated for the built-in geofence node but it seems to be too large. I'm trying to use a polygon around my home that includes all the area from which I can see what's happening there but it always reports "inarea: false". If I instead use a circle it has to be about 1/4 mile in diameter to report "inarea: true" and that is useless to me. Is there a way to control/adjust the resolution?

Which "built-in geofence node" ? Where do you see this ?

node-red-node-geofence

Sorry, since it doesn't have "contrib" in the name I thought it meant it's part of the standard set of nodes.

Well it uses the geolib - npm (npmjs.com) library. So apart from understanding how many decimal places you've used on your inputs, you should note the estimations that it uses for calculations.

If you are feeding data from a mobile device, it is likely that the device is not giving the level of accuracy that you were expecting. For example, mobile phones will have greatly varying accuracy and will usually have lowered accuracy in rain, forests, indoors and urban areas (because the GPS signals are really low and easily blocked). In urban areas, accuracy can often be greatly increased by allowing access to WiFi.

Thank you for providing a link to geolib. The documentation says by default the accuracy is 1 meter so I don't understand why I'm having this issue. I'll dig through the node source and see if overrides the default.

7

Yes, I have the OwnTracks app on my phone which has "Regions" and it is accurate to a few meters with that. I have a region for Home that has a radius of 50m and it works well. The region in OwnTracks has to be a circle and I want it to be a polygon and that is the reason I want to do the presence determination in NR.

It does not so I'm at a loss to explain what I'm seeing.

I've always found that anything less than 100m for geofences around my house to be very unreliable. But it very much depends on where you are and the devices you are using. I just checked on Apple "Find My" and it took a couple of minutes for it to get more accurate than 10m and at least a minute to get better than 50 and I've not left the house in the last 7 hours. A check of my Android device shows that my Google timeline registered the 1.5mi trip I did earlier but it only captured 5 points on that route, it got the start and end fairly accurate (within 10-20m) and the intermediate points were on the right roads but that is still a fair distance between points. The point I'm making is that there is a lot of variance between devices and applications, especially when on battery power.

I have a suspicion that isn't helping either. Since position coordinates are never 100% accurate, they always describe a region of uncertainty, having a relatively small polygon defining the outline almost certainly results in larger errors.

I appreciate that but I encourage you to checkout OT's options which provide a range of granularity.
https://owntracks.org/booklet/features/location/

The more I look at it the more I agree with you. For the time being I've abandoned the NR solution and I've gone back to letting OT decide when I'm in a region.

Thanks for the discussion! :slightly_smiling_face:

Thank you for providing a link to geolib.

It doesn't have contrib in the name because it was written before that convention was decided on, it was effectively the first 3rd (well more like 2.5th) party node.

1 Like

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