# 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.

![](https://1587494504-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ltn3vQOSB-YGC6qLZu_%2F-LtuptYEbEoh4uKfO5jA%2F-Ltuq_IrSEPblLlkVhZt%2FSkjermbilde%202019-11-17%20kl.%2020.32.37.png?alt=media\&token=3fb1d68d-225c-4765-ac8c-9cbc58529d79)

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](https://1587494504-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ltn3vQOSB-YGC6qLZu_%2F-LtuptYEbEoh4uKfO5jA%2F-LturOe3iksmT4ykqg2F%2FPNG-bilde.png?alt=media\&token=4d0c75a8-aa6c-4450-b238-f85a9ab977e9)

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.

![](https://1587494504-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ltn3vQOSB-YGC6qLZu_%2F-LtuptYEbEoh4uKfO5jA%2F-Lturl-fAi2CIRlJLYbF%2FSkjermbilde%202019%E2%80%9311%E2%80%9317%20kl.%C2%A020.27.00.png?alt=media\&token=83a5e9bf-fe63-4057-bb15-40458e6610aa)

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

![](https://1587494504-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ltn3vQOSB-YGC6qLZu_%2F-LtuptYEbEoh4uKfO5jA%2F-LtursHEvY-UjDpZWDF3%2FSkjermbilde%202019%E2%80%9311%E2%80%9317%20kl.%C2%A020.28.05.png?alt=media\&token=7b0cf3d9-f49c-49bc-aefe-f8251309266c)

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