Home Assistant
Home Assistant is an open-source home automation platform.
Colota integrates with Home Assistant via the built-in OwnTracks integration, which accepts location updates over HTTP.
Setup
-
Add the OwnTracks integration in Home Assistant:
- Go to Settings > Devices & Services > Add Integration
- Search for OwnTracks and add it
- Note the webhook URL shown after setup (e.g.
https://your-ha-instance/api/webhook/abc123)
-
Configure Colota:
-
Go to Settings > API Settings
-
Select the OwnTracks template
-
Set the endpoint to your Home Assistant webhook URL:
https://your-ha-instance/api/webhook/abc123 -
No authentication is needed - the webhook ID acts as the secret
-
Add the following custom headers - these are required for Home Assistant to create the
device_trackerentity:Header Value Description X-Limit-Ue.g. johnYour username - used as part of the entity ID X-Limit-De.g. phoneYour device ID - used as part of the entity ID
Without these headers, Home Assistant will accept the webhook but will not create a device tracker entity. The entity will appear as
device_tracker.<username>_<device>. -
Your device will appear as a device_tracker entity in Home Assistant that you can use for automations, zones, and the map.
Payload Format
The OwnTracks template auto-configures the following payload:
{
"_type": "location",
"tid": "AA",
"lat": 51.495065,
"lon": -0.043945,
"acc": 12,
"alt": 519,
"vel": 0,
"batt": 85,
"bs": 2,
"tst": 1704067200,
"cog": 180.5
}
Notes
- You can customize the tracker ID (
tid) in the custom fields settings to distinguish multiple devices - If you use Nabu Casa, use the
cloudhook_urlorremote_ui_urlprovided during setup for external access - Home Assistant does not require a Bearer token or Basic Auth for webhook endpoints