webCoRE mobile app - iOS Source Code


#5

But isn’t that what you said you want to do?

I’m confused. Isn’t that just the minimum @Robin ? You could make it larger, correct?


#6

No, there is a limitation where there has to be a 200M difference. That is just not feasible for me where I live and drive home.

What happens is I cross the edge of the geofence and it causes my pistons to cancel because I get arrivingAt immediately followed by a departingFrom in less than a second. I have altered the DH to only accept updates when the horizontalAccuracy is very high, say 10M, but it won’t filter out the crossing of the geo fences. The only thing I have left is to actually get the geofence smaller.


#7

The restriction is that the departure radius needs to be a minimum of 200m larger than the arrival radius.

He wants to reduce that minimum so the two radiuses can be closer together.


#8

Exactly.


#9

Wait… you want to get them closer together? Wouldn’t that cause more false departures than it being larger? I mean, logically, if they departure geofence is smaller, you would “leave” more often, right? The whole purpose of having the departure geofence larger than the arrival is to prevent false triggers.


#10

When I say, “smaller,” I just want to reduce the 200M difference to say 100M or 50M. I don’t want to make them the same size.

This is why.


#11

I still don’t understand how making the departure zone smalerl will reduce the number of false triggers. The reason you’re getting false arrivals is because it’s first detecting that you left. Right?


#12

He’s driving past home… scraping the edge of his outer geo-Fence… which triggers arriving followed immediately by departure.

So he wants a smalller outer geofence.


#13

@kxavier_23

Going back to your original post requesting the app source code.

My understanding is that the mobile app is not much more than a web wrapper with the ability to report location to webCoRE.

I believe the geofence size is set by the dashboard code… not the mobile app.

The dashboard code is in @ady624’s GitHub repo but you’d need to figure out how to run it on your own servers / web address.


#14

I’m sorry, I’m still not understanding. The outer ring is the departure radius. So, if you’re clipping that but you’re already “not present” that shouldn’t be a problem. I was able to go in and make my arrival zone as small as 50m. You need to get smaller than that?


#15

@kxavier_23

I think this is the relevant part of the dashboard JS:

if ($scope.designer.inner + 200 >= $scope.designer.outer) {
	        $scope.designer.outer = $scope.designer.inner + 200;
	    }

Arrival/departure if/then or case statement?
#16

When entering the outer ring it triggers ‘arriving at place’.

When entering the inner ring it triggers ‘current place’

So if he wants an action for arriving at place, not current place, the outer ring needs to be smaller to avoid drive by false alarms.


#17

Then it seems you would want to have the trigger be current place not arriving at place. If you make the outer ring smaller, you are going to get false departures. When my phone automatically turns off GPS, since it can’t run it 24/7, I frequently jump into my neighbors house…so I have to set up geofences accordingly.

And if you’re in such an area that it needs to be that accurate (I’m thinking large city) maybe you want to use a virtual presence center tied to your wifi or something rather than GPS.


#19

Some people like to use arriving at place so their garage door is open by the time they actually pull onto the drive.

I don’t know the OP’s use case so using current place may work for him… but the fact he has been tweaking the presence DTH tells me he knows those options already.


#20

Possibly…but I don’t know if I would assume that right off the bat. Plus, how long does a garage door take to open? 10 seconds? make your home location a tiny bit bigger and voila, it will open earlier. I dunno, just seems like there are easier ways to fix the problem he has than tweeking code.


#21

I was using the Garage Door as an example… might be to open a driveway gate or turn on a driveway light.

Also, for many users, particularly those in a built up area, the inner 50m is too large as well.


#22

My inner radius for example means I can’t drive past the house without triggering current place… and the outer radius covers several surrounding roads.


#23

Yes, this is the same issue I have.

I can get horizontalAccuracy down to 10M. If I can shrink the circles and make them tighter, I believe the false triggers will go away. I truly like the location capabilities, It’s just not manageable with the current restrictions.


#24

And you think that tweeking the diameter of the outer ring is going to solve any of that? If it does, I’ll be the first to admit I was wrong but I think even if it solves those problems it’s going to cause others.


#25

Where is this? I am looking through the code in the smartapps, but can’t find it.

You did find the correct place though :smile: