Owntracks - How to configure with HTTP on iOS

Hi,

Im new to owntracks. After install 0.83.1 version and read a lot of articles about owntracks and home assistant im unable to use it with home assistant.

I have configured my device and with Home Assistant app it is working. Now i want track my position with owntracks.

Can anyone help me about confgure it using HTTP method on iOS? I don’t understand what URL and configuration i need put on the app.

Thanks.

I was looking for this URL also…

Go to https://yoursitename.domain/config/integrations/dashboard
Click CONFIGURE next to OwnTracks
The url is displayed to you

The webhook_id can also be found in /path-to/homeassistant-configs/.storage/core.config_entries

Once you know your webhook_id, your URL is https://yoursitename.domain/api/webhook/super-long-random-webhook_id

If you don’t see your webhook_id in the .storage/core.config_entries, but you do have an entry for owntracks, you could do as I did:

  1. Backup this file in case you make an error
  2. Remove the json entry for owntracks
  3. Restart HomeAssistant
  4. Go to the configuration link https://yoursitename.domain/config/integrations/dashboard
  5. Configure OwnTraxks
1 Like

Thank you very much. I have to restart ha few times to make it work for IOS

Mode: HTTP
Authentication: ON
UserID: Yourname (I use my ha username)
Password: Blank (don’t put anything)
Secret encryption key: secret (leave it as what it is, I didn’t put anything)
url: https://yoursitename.domain/api/webhook/super-long-random-webhook_id (as @GervaisdeM mentioned on above post)

Once connected the STATUS show ‘idle’

One more thing I want to ask. Will this show in entity_id as device tracker? or where to find this entity_id create by ha.

Hi. My results:

1 - http://ec_xyz.amazonaws.com:8123/config/integrations/dashboard

Open 404 error page

2 - OwnTracks make home assistant create it own device id inside “know_devices.yaml”:

username_abc123617770449f963598830c012345

3 - My config:

Mode: HTTP
Authentication: OK
User ID: the same user ID that i login
Password: empty
Secret: empty
URL: http://[my-domain]/api/webhook/[my-very-long-id]

The URL webhook ID is inside “.storage/core.config_entries”, inside json part like this:

{
    "connection_class": "unknown",
    "data": {
        "secret": "01260yyyyyy3f6d962ad8994cxxxxx",
        "webhook_id": "aaabbbcccca9ae76a702c68a7bba4eabcd311214c8be3a57d8e10123456789"
    },
    "domain": "owntracks",
    "entry_id": "01234ec50147579b7b93623dff85d9",
    "source": "import",
    "title": "OwnTracks",
    "version": 1
}

This is my experience. Thanks for all responses. It is working.

Anyone know how to make owntracks update or have a custom ID to update the same device “paulo_iphone_8” instead of custom device?

Thanks.

Wow. That is … not convenient. But thanks for the tip!

If you’ve never setup Owntracks before, I should be simple. You just go to the integration and enable it.

I just thought I should mention that if that is you actual secret that you posted here, it is likely a good idea to remove the owntracks entry in your storage/core.config_entries file and set up again.

Secrets should remain secret!

I do not know how to customize the device_tracker ID that is created by owntracks. It’s truly ugly.

The entity id should be displayed in your known_devices.yaml. You can see it in HA as device_tracker.username_longRandomString

Nops, its only an example, i don’t will post secrets here :stuck_out_tongue:

The url of integrations never works to me. I need check everything inside files.

Cool! Glad you are smart about your :key:’s
:slight_smile:

Regarding this new implementation, is there any way I can see other family members in Owntracks app as before? When I used MQTT I had all of them listed as friends, and now everyone seems to be “in a differente parallel universe”

Thank you. in known_devices.yaml does not create any new device at all.
In my owntracks app show idle.
Also same to @Eduardo I would like to be able to see my family member in the app, currently show only me.

I believe that when you are running in MQTT mode you can see others, but when you are in HTTP mode, you only see yourself. I’ve only used HTTP mode and I only ever see myself in the owntracks app. They are all reporting back to HA though, so it is simple to display a map there that shows everyone. Here is a lovelace card example:

title: Home
views:
  - title: People
    icon: mdi:account-multiple
    cards:
      - type: map
        entities:
          - device_tracker.gail_owntracksID
          - device_tracker.gervais_owntracksID

You can search for the id by using the Developer tools:

Click image and then under Filter entities search for the device_tracker.

image

It should show you the device id.

There are no new device found probably because I already use icloud?

my username for ha is sun / i also put in owntracks UserID as sun. From your latest post there should be new entity_id call device_tracker.sun show but nothing show.

However, I did the same as what you mention regarding the map in order to see my family on map. But the device_tracker name is from icloud.

My experience is that a new device was created that was called device_tracker.gervais_56f3792902ce4cc0ab26033d09334375

Something similar was create when I updated the OwnTracks setting on my wife’s phone.

I’m not sure how your iCloud name has any bearing on your OwnTracks setup, but it sounds like you have things working for you. :+1:

One last question. Finally something show in the entity_id like what you said. Also in known_devices.yaml

Can I rename this from known_devices.yaml as now when I try to rename this all devices that already has renamed earlier doesn’t know by HA at all. Every devices in my known_devices.yaml show offline

The device name itself actually comes with mac address which hard to remember and use.

sun_1b2a4605f9af47d699b2a00415298764:  <== can I rename it to something else like sun_owntracks
  hide_if_away: false
  icon:
  mac: !secret suniphone_mac
  name: Sun Owntracks
  picture: /local/Me.jpg
  track: true:

desktop_pc:  <=== I renamed it long ago.
  hide_if_away: false
  icon: mdi:desktop-classic
  mac: !secret desktop_pc_mac
  name: Desktop PC
  picture:
  track: true
  vendor:

You can rename the other ones like desktop_pc because the mac is the unique identifier.

I don’t think it can be renamed. My guess is that we are stuck with that ugly name as it is what is being reported by owntracks and there is no other way to identify the device. I think if you rename it, you will get a new entry the next time that OwnTracks reports the location of the device with the old ugly name.

Renaming it shouldn’t make all your other devices go offline. Perhaps you made an editing error which broke the yaml?

Thank you very much. With 0.83.2 and 0.83.3 version I got mass new devices found. OMG all the new devices are old devices that have been renamed long long ago. o.O’

sorry to bump this, but hope you can help me… all of a sudden my owntracks isn’t connecting anymore, while it did so very nicely, using mqtt mode.

the thing is, I have 2 Pi’s with 2 HA instances, one of which holds the Mqtt broker and is accessed from the outside world by port forwarding 8883 to my local ip address 8883.

trying http, I can’t add that port in the web hook which simple says mydomain.duckdns.org.

how would I proceed, please have a look? Thought it might be a Owntracsk update issue, so also posted on their Github, but ni succes yet:

----edit----

solved! please see:

just for reference to point to the solution in my settings:

Mqtt mode with 2 HA instances: correct port forwarding in the router solves this.