home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.99k stars 31.04k forks source link

device_tracker from traccar server not updates after a while #127599

Open PhoenixIra opened 1 month ago

PhoenixIra commented 1 month ago

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

home-assistant[bot] commented 1 month ago

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)

m2rt commented 1 month ago

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

Neon-44 commented 3 weeks ago

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

ildar170975 commented 18 hours ago

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