# Geofency and webhooks

If the built-in app is not sufficient reliable, you may add more sources to aggregate the presence of a person.

I can reccomend [Geofency](https://www.geofency.com) for iOS users. Geofency uses geo-fences or iBeacons (bluetooth LTE) to track when you enter and leave a zone. When you enter or leace a zone, you can configure geofency to trigger a webhook. And that is what you should do.

First setup a flow for each person to track.

![](/files/-Ltuq_IrSEPblLlkVhZt)

Notice the documentation to the right. To find your Homey cloud ID, open the Homey app and go to **More.. - Settings - General**.

You will need to setup a GET webhook request for when you enter your home, and one for when you leave. The URL will be something like this:

```
https://<cloudid>.connect.athom.com/api/manager/logic/webhook/presence-andreas?tag=Yes
```

And, the same with a different tag value for when you leave the zone:

```
https://<cloudid>.connect.athom.com/api/manager/logic/webhook/presence-andreas?tag=No
```

Now, install and setup geofency.

![The overview in the app shows you all the zones](/files/-LturOe3iksmT4ykqg2F)

Create a home zone. You may off course add other zones as well, if needed. You may add a zone to detect when you leave work, or you make create a big circle to track when you leace the city.

![](/files/-Lturl-fAi2CIRlJLYbF)

Check the settings for your zone, and choose to add a webhook.

![](/files/-LtursHEvY-UjDpZWDF3)

And add the enter and leave URLs. Remember to configure GET and not POST.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://homey.solweb.no/aggregated-state/person-presence/geofency-and-webhooks.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
