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
72.18k stars 30.2k forks source link

Setup of platform gtfs is taking longer than 60 seconds #118628

Open belidzs opened 4 months ago

belidzs commented 4 months ago

The problem

Trying to set up the gtfs integration for the first time, but it doesn't seems to be able to pass the initialization phase due to timeout and throws the following error:

2024-06-02 11:43:49.183 ERROR (MainThread) [homeassistant.components.sensor] Setup of platform gtfs is taking longer than 60 seconds. Startup will proceed without waiting any longer.

What version of Home Assistant Core has the issue?

core-2024.5.5

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

gtfs

Link to integration documentation on our website

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

Diagnostics information

No response

Example YAML snippet

sensor:
  - platform: gtfs
    origin: <obscured>
    destination: <obscured>
    data: budapest_gtfs.zip

Anything in the logs that might be useful for us?

No response

Additional information

I'm using the following GTFS data file: https://go.bkk.hu/api/static/v1/public-gtfs/budapest_gtfs.zip

home-assistant[bot] commented 4 months ago

gtfs documentation gtfs source

gjdass commented 2 months ago

Hello,

The integration just takes some time to initiate its DB (SQLite3). Once done, it works 😉

Nearly 2GB once done for Montreal STM for example.

image image image

belidzs commented 2 months ago

Unfortunately with the provided file the initialization process never finishes as it times out before it could

GalaxyCatProdSrvr commented 1 month ago

does this support urls for realtime data? https://gtfs.edmonton.ca/TMGTFSRealTimeWebService/GTFS/gtfs.zip for example

or can we set up flags in the config that specify what data to extract, for example I only care about a few specific bus stops, so i can manually enter the ID for each. The same for bus route numbers. this would help build the sqlite file faster.

ErikTellas commented 1 month ago

Did you ever get it working? I'm running into the same issue.

belidzs commented 1 month ago

No, I've started using a different integration (it only works with that specific public transportation company though)

ErikTellas commented 1 month ago

For future reference, if anyone is reading this, don't try to get it working, as this integrations seems to be largely abandoned.

Instead use gfts2 by @vingerha, who tried to rework this integration in 2023, but did not get aproval on his PR.

image