Traccar- Error while updating device data: Unauthorized

I set up the traccar server add-on w/ MariaDB n HA, which seems to be working correctly, and I have one device (my phone) as a client that appears now in the web UI.

On the same HA, I added an entry in configuration.yaml:

device_tracker:
  - platform: traccar
    host: <mydomain.my_host_name>
    port: 8082
    username: <my user name (email)>
    password: <my pw>
    ssl: false
    verify_ssl: false

After HA restarts, I see a constant series of these messages:

2024-01-04 14:11:00.501 ERROR (MainThread) [homeassistant.components.traccar.device_tracker] Error while updating device data: Unauthorized
2024-01-04 14:11:30.521 ERROR (MainThread) [homeassistant.components.traccar.device_tracker] Error while updating device data: Unauthorized
2024-01-04 14:12:00.521 ERROR (MainThread) [homeassistant.components.traccar.device_tracker] Error while updating device data: Unauthorized
2024-01-04 14:12:30.496 ERROR (MainThread) [homeassistant.components.traccar.device_tracker] Error while updating device data: Unauthorized
2024-01-04 14:13:00.501 ERROR (MainThread) [homeassistant.components.traccar.device_tracker] Error while updating device data: Unauthorized
2024-01-04 14:13:30.529 ERROR (MainThread) [homeassistant.components.traccar.device_tracker] Error while updating device data: Unauthorized
2024-01-04 14:14:00.503 ERROR (MainThread) [homeassistant.components.traccar.device_tracker] Error while updating device data: Unauthorized

No traccar devices are being created.

On another HA server I have in a different location, I add the same entry in configuration.yaml. In that log, after

[homeassistant.components.device_tracker] Setting up device_tracker.traccar

On that HA instance there are no further traccar related messages or updates, and no devices created.

I’ve tried different combinations of the ssl settings, no different results.

What is the ‘Unauthorized’ message indicating?

1 Like

It looks like something has changed in the home assistant itself. I have a similar situation.

Same here. Any resolution?

I did finally get it to work, but in an unsatisfying way- I had to manually create entries in known-devices.yaml for each of the devices I wanted to track, named to match updates from traccar client. After that the errors went away and location updates have worked as expected. Not quite as accurately as life360 but pretty close, which is good enough for my needs.

Hoping this gets fixed long term.

My issue was resolved by using port 80 instead of 8082. I’m using a reverse proxy for my SSL certificates, so when HA hits the traccar server, it needed to go to port 80, and then the proxy coordinator (Caddy, in this case) forwards the requests to the correct port.