wcPresence "currentPlace" is only ever "Home" or "Local"


#1

I’ve got multiple Places set up in Webcore Settings. When a presence device goes there, the “closestPlace” will reflect it, but the “currentPlace” never changes to anything other than “Home” or “Local” regardless of whether the device has entered the area or not.

I’ve tried deleting and recreating the Place and it behaves the same way.

Any suggestions?


#2

Not that you wouldn’t have already thought of, I suspect.

I’m a bit uncertain over whether you are talking about a specific place giving issues, or all your places. I guess it is worth stating how things are worked out:

  • For each of your saved places in turn:
    • The distance is calculated from the centre point of the place to your current reported location.
    • If the distance is shorter than that calculated for any previous places, that place becomes your closest place (so far)
    • If the distance is less than the radius of the inner circle of the place, then that place becomes your current place (so far, but it should be the only one found as circles shouldn’t overlap).
  • Whatever the closest place is at the end, is set as your closestPlace attribute.
  • Whatever the current place is at the end, is set as your currentPlace attribute.

So it is perfectly possible for the closestPlace and the currentPlace to be different. How likely it is depends on how you have defined your places.


#3

If you like a visual…

pic

In this example, X is:
closestPlace = B
currentPlace = A


#4

The trouble is that when the device enters the inner circle (e.g. distance to the Place is less than the radius of the arriving circle) then the “currentPlace” attribute doesn’t change to the name of the actual place, it just shows a blank.

If you look at the screenshot, all of the blank “currentPlace” entries are when the device was at one of the specified places. In the past 3 days, for example, they have been in 3 different “places” as set up in webcore, but the actual name of the “currentPlace” never registers, so it can’t be used as a reference in any of my pistons.

WAIT! I just realized that I’m an idiot. “Local” was the name of a super large area I created for my entire city. The other places were within it, so since it never left Local it never entered the other places. Deleting “Local” and will report back.