core icon indicating copy to clipboard operation
core copied to clipboard

device_tracker from traccar server not updates after a while

Open PhoenixIra opened this issue 1 year ago • 1 comments

The problem

I have two traccar device_tracker on my home-assistant instance. It seems that after a while, one of them stops receiving updates.

That is, the device Pixel Phoenix has not receives updates for 3 days, even though the device left home in the meantime.

A restart of home-assistant solves the problem for a couple of days until it reappears.

The last time an update for the device tracker in question, Pixel Phoenix, came, the logs looked like the following. Personal Information are redacted by X. Today is 2024-10-04.

2024-10-01 09:03:12.439 DEBUG (MainThread) [homeassistant.components.traccar_server] Received subscription data: {'devices': [{'id': 8, 'attributes': {}, 'groupId': 0, 'calendarId': 0, 'name': 'Nin', 'uniqueId': '600522', 'status': 'unknown', 'lastUpdate': '2024-10-01T07:53:12.000+00:00', 'positionId': 8360, 'phone': None, 'model': None, 'contact': None, 'category': None, 'disabled': False, 'expirationTime': None}], 'events': None, 'positions': None}
2024-10-01 09:10:38.438 DEBUG (MainThread) [homeassistant.components.traccar_server] Received subscription data: {'devices': [{'id': 1, 'attributes': {}, 'groupId': 0, 'calendarId': 0, 'name': 'Pixel Phoenix', 'uniqueId': '598512', 'status': 'unknown', 'lastUpdate': '2024-10-01T08:00:38.000+00:00', 'positionId': 8361, 'phone': None, 'model': None, 'contact': None, 'category': None, 'disabled': False, 'expirationTime': None}], 'events': None, 'positions': None}
2024-10-01 10:51:24.514 DEBUG (MainThread) [homeassistant.components.traccar_server] Received subscription data: {'devices': [{'id': 8, 'attributes': {}, 'groupId': 0, 'calendarId': 0, 'name': 'Nin', 'uniqueId': '600522', 'status': 'online', 'lastUpdate': '2024-10-01T09:51:24.499+00:00', 'positionId': 8360, 'phone': None, 'model': None, 'contact': None, 'category': None, 'disabled': False, 'expirationTime': None}], 'events': None, 'positions': None}
2024-10-01 10:51:24.516 DEBUG (MainThread) [homeassistant.components.traccar_server] Received subscription data: {'devices': None, 'events': None, 'positions': [{'id': 8362, 'attributes': {'batteryLevel': XX.X, 'distance': X.XXXXXXXXXXXXXXXX, 'totalDistance': XXXXXX.XXXXXXXXXX, 'motion': False}, 'deviceId': 8, 'protocol': 'osmand', 'serverTime': '2024-10-01T09:51:24.490+00:00', 'deviceTime': '2024-10-01T09:51:23.000+00:00', 'fixTime': '2024-10-01T09:51:23.000+00:00', 'outdated': False, 'valid': True, 'latitude': XX.XXXXXXX, 'longitude': X.XXXXXXX, 'altitude': XXX.XXXXXXXXXXXXX, 'speed': 0.0, 'course': 0.0, 'address': None, 'accuracy': XX.XXXXXXXXXXXXXXX, 'network': None, 'geofenceIds': None}]}

What version of Home Assistant Core has the issue?

core-2024.9.1

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Core

Integration causing the issue

traccar-server

Link to integration documentation on our website

https://www.home-assistant.io/integrations/traccar_server

Diagnostics information

config_entry-traccar_server-01J79QASQHDYFP8Y4BQ4DD514G.json

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

PhoenixIra avatar Oct 04 '24 20:10 PhoenixIra

Hey there @ludeeus, mind taking a look at this issue as it has been labeled with an integration (traccar_server) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of traccar_server can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign traccar_server Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


traccar_server documentation traccar_server source (message by IssueLinks)

home-assistant[bot] avatar Oct 04 '24 20:10 home-assistant[bot]

Same issue. Reloading the integration also helps to get data.

m2rt avatar Oct 19 '24 11:10 m2rt

Had the same problem, adding the Event "device_moving" to the Homeassistant integration import list fixed it for me.

Neon-44 avatar Nov 01 '24 15:11 Neon-44

same? https://github.com/home-assistant/core/issues/116628

ildar170975 avatar Nov 26 '24 15:11 ildar170975

evice_moving» How did you do it?

m0nstrya avatar Jan 27 '25 18:01 m0nstrya

I'm having the same issue on my HAOS. Using latest greatest version of all modules.

janekbet avatar Apr 07 '25 09:04 janekbet

Does someone is taking care of traccar integration? This issue still exist...

janekbet avatar May 26 '25 12:05 janekbet

The issue exists since 2024.5. For one year the developer responsible for this integration does not give a reply. Then what does this “responsibility” mean?

ildar170975 avatar May 31 '25 23:05 ildar170975

@ludeeus could you look here?

janekbet avatar May 31 '25 23:05 janekbet

I've been with this error for 14 months, I've reinstalled HASS several times and nothing, the problem is the extension, it works for a few hours and then the locations are no longer updated, I have to restart tracking manually to work again for a few hours

MrHawk93 avatar Jun 22 '25 09:06 MrHawk93

Try clicking "configure" on the extension, then go to "events" and add "deviceMoving". That fixed it for me.

Neon-44 avatar Jun 22 '25 09:06 Neon-44

Try clicking "configure" on the extension, then go to "events" and add "deviceMoving". That fixed it for me.

seems to work 10/10

MrHawk93 avatar Jun 22 '25 20:06 MrHawk93

Had the same problem, adding the Event "device_moving" to the Homeassistant integration import list fixed it for me.

Try clicking "configure" on the extension, then go to "events" and add "deviceMoving". That fixed it for me.

"device_moving" or "deviceMoving" ? I have tried both and I do not see any improvement, only addon reloading or HA restart is fixing the issue. Or maybe I need to remove and add from scratch traccar?

How looks your config yaml?

  - platform: traccar
    host: demo4.traccar.org
    username: [email protected]
    password: "password"
    event: all_events
    new_device_defaults:
      track_new_devices: true

Jordan87 avatar Aug 06 '25 07:08 Jordan87

Can't help you, I'm using the UI to configure it. But it is deviceMoving on the UI.

I use a dedicated server and not the addon, but I honestly don't think it makes a difference. Is your device still being tracked in the addon when it loses connection to homass?

Neon-44 avatar Aug 06 '25 11:08 Neon-44

Adding events surely does not help, the integration does not establish a connection if it is lost, happened after 2024.5 improvement. Users may keep guessing, the author @ludeeus may keep ignoring.

ildar170975 avatar Aug 06 '25 12:08 ildar170975

Only new home assistant but getting this issue every few days. Would love to see it get fixed. I have Traccar installation with a lot of trackers on another server. Works fine for a few days then just stops updating. Quite frustrating as i am trying to use the integration to control my lights and alarm. No issues on the Traccar server side that i can see. Just stop updating in Home Assistant.

lukestone99 avatar Aug 13 '25 04:08 lukestone99

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

I'm still observing this issue on the latest 2025.11 HAOS installed on RPI 5.

janekbet avatar Nov 18 '25 15:11 janekbet

For me older HA was stopping to work after few hours from startup, with current 2025.11 which is using Token after few days I'm not observing any issues.

Jordan87 avatar Nov 18 '25 15:11 Jordan87

I have been using 2025.11.0 for 2 weeks now. So far the Traccar integration has not stopped for me. It was stopping within a few days. So hoping it has been resolved now but only time will tell.

lukestone99 avatar Nov 24 '25 20:11 lukestone99

For me older HA was stopping to work after few hours from startup, with current 2025.11 which is using Token after few days I'm not observing any issues.

For me it's just the opposite. Everything has worked great until the 2025.11 upgrade when you have to use tokens. Now the integration stops reporting after 1 hour. I have made an automation that reloads the integration every hour so that it continues to report.

bergfalk avatar Nov 28 '25 20:11 bergfalk