Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Traccar integration: device_trackers stopped updating AGAIN #76400

Closed
ildar170975 opened this issue Aug 7, 2022 · 6 comments · Fixed by #78624
Closed

Traccar integration: device_trackers stopped updating AGAIN #76400

ildar170975 opened this issue Aug 7, 2022 · 6 comments · Fixed by #78624
Assignees

Comments

@ildar170975
Copy link

The problem

Recently it broke, then was fixed: #74134
Symptoms are same.

Now the same story:

2022-08-07 19:21:22.490 ERROR (MainThread) [homeassistant.components.device_tracker] Error setting up platform legacy traccar
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/pytraccar/client.py", line 63, in _call_api
async with self._client_session.get(
File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 1138, in __aenter__
self._resp = await self._coro
File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 466, in _request
with timer:
File "/usr/local/lib/python3.10/site-packages/aiohttp/helpers.py", line 721, in __exit__
raise asyncio.TimeoutError from None
asyncio.exceptions.TimeoutError
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/device_tracker/legacy.py", line 254, in async_setup_legacy
setup = await self.platform.async_setup_scanner(
File "/usr/src/homeassistant/homeassistant/components/traccar/device_tracker.py", line 201, in async_setup_scanner
return await scanner.async_init()
File "/usr/src/homeassistant/homeassistant/components/traccar/device_tracker.py", line 237, in async_init
await self._api.get_server()
File "/usr/local/lib/python3.10/site-packages/pytraccar/client.py", line 105, in get_server
await self._call_api("server"),
File "/usr/local/lib/python3.10/site-packages/pytraccar/client.py", line 85, in _call_api
raise TraccarConnectionException("Timeouterror connecting to Traccar") from exception
pytraccar.exceptions.TraccarConnectionException: Timeouterror connecting to Traccar

What version of Home Assistant Core has the issue?

2022.8.1

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

Traccar

Link to integration documentation on our website

https://github.com/home-assistant/core/tree/dev/homeassistant/components/traccar

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

@ildar170975
Copy link
Author

Restarted HA, it works again...
Hope that was a temporary glitch.
Closing now.

@ildar170975
Copy link
Author

Sorry for repeating - last days I keep getting errors in the log on HA startup:

2022-08-14 17:49:59.261 ERROR (MainThread) [homeassistant.components.device_tracker] Error setting up platform legacy traccar
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/pytraccar/client.py", line 63, in _call_api
async with self._client_session.get(
File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 1138, in __aenter__
self._resp = await self._coro
File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 466, in _request
with timer:
File "/usr/local/lib/python3.10/site-packages/aiohttp/helpers.py", line 721, in __exit__
raise asyncio.TimeoutError from None
asyncio.exceptions.TimeoutError
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/device_tracker/legacy.py", line 254, in async_setup_legacy
setup = await self.platform.async_setup_scanner(
File "/usr/src/homeassistant/homeassistant/components/traccar/device_tracker.py", line 201, in async_setup_scanner
return await scanner.async_init()
File "/usr/src/homeassistant/homeassistant/components/traccar/device_tracker.py", line 237, in async_init
await self._api.get_server()
File "/usr/local/lib/python3.10/site-packages/pytraccar/client.py", line 105, in get_server
await self._call_api("server"),
File "/usr/local/lib/python3.10/site-packages/pytraccar/client.py", line 85, in _call_api
raise TraccarConnectionException("Timeouterror connecting to Traccar") from exception
pytraccar.exceptions.TraccarConnectionException: Timeouterror connecting to Traccar

and device_tracker entities do not contain any data.
It happens not always.

@probot-home-assistant
Copy link

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


traccar documentation
traccar source
(message by IssueLinks)

@ludeeus
Copy link
Member

ludeeus commented Sep 16, 2022

This is far from the same.
Your system can not get a response from traccar server fast enough.
Most likely its due to bad hardware, or something like custom components are blocking.

@ildar170975
Copy link
Author

ildar170975 commented Sep 16, 2022

Hardware is rather powerful, Intel 2500K.
Speedtest - DL 802.04 Mbit, UL 915.11 Mbit.

Custom components:
trackers: asuswrt, iphone detect, Life360, mobile app
weather: gismeteo, openweathermap, met
kodi
uptime
version
filesize
yandex maps
xiaomi miio
hacs
icons: simple icons, font awesome
sun
season

Mainly there are no errors described above.
But sometimes I see them in the log - and I still mainly have device_trackers updated.
And sometimes I see these errors right after HA reboot and then these device_trackers are empty.
Let's say - erratic errors.

@ildar170975
Copy link
Author

@ludeeus
Thanks a lot! Hope it will be more stable now

@github-actions github-actions bot locked and limited conversation to collaborators Oct 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants