GPS Tracker Geofencing — Entry, Exit, Presence
Detect per-device GPS geofence crossings — each tracker uses its own perimeter and emits Entered and Left events plus Inside/Outside presence status. For pet collars, elderly-care wearables, and asset trackers.
Who it’s for
Operators of pet collars, elderly-care wearables, rental equipment, and personal safety devices asking “did this tracker leave its assigned zone?”, “is this device still inside its home area?”, “did the boundary crossing just happen?” — when every tracker carries its own perimeter rather than sharing a single fleet-wide zone.
What it does
Reads each device’s latitude and longitude telemetry against its
own perimeter server-scope attribute (a polygon or circle), and emits
presence status and boundary-crossing events.
How to set up
Before the CF can produce useful output, set the perimeter server-scope
attribute on each tracker device with a polygon or circle. The easiest
way is to draw it on a Map widget, which writes the value to the entity
attribute automatically. The supported formats are documented in the Map widget
Overlays
section. Until each device has its own perimeter, the CF has no zone
to evaluate.
How to customize
- To use different coordinate keys — change the Entity
coordinates entries from
latitudeandlongitudeto whatever your device publishes (e.g.lat,lon). - To rename the zone for your domain — rename the
geoZonezone group to something domain-specific (safeZone,warehouseArea,restrictedArea). The output keys follow the new prefix (safeZoneStatus,safeZoneEvent, etc.) so dashboards bind to meaningful names. - To change which events fire — switch the zone group’s Report strategy between Presence status and transition events (default), Transition events only, or Presence status only.
- To add a second zone on the same device — add another zone
group with its own Perimeter attribute key (e.g. a
homeZone+ a separateworkZone). - To turn off the database write, WebSocket push, or downstream CF re-evaluation — under Process right away, toggle Save to time series, Save to latest values, Send to WebSockets, or Send to Calculated fields.
- To filter, transform, or forward the events to external systems — switch Strategy to Process via Rule Chains. Rule nodes then receive the events and can drop them, change them, save them conditionally, push them to an external system, or anything else the chain defines.
Share Your Calculated Field with the Community
Built a useful data transformation? Export it as a JSON from ThingsBoard and publish it to the IoT Hub. Share it with thousands of ThingsBoard developers worldwide.