Closed Sheepish2 closed 2 months ago
If it helps, There is also a curl link to each of these
curl -X GET "https://gtfs.adelaidemetro.com.au/v1/realtime/vehicle_positions" -H "accept: application/x-google-protobuf"
Update - Just adding trip updates is giving real time info, I'm specifically aiming for vehicle locations. *** Further Update - Testing with only trip updates works but also adding vehicle location updates will "unavailable" the entity. Cheers!
Describe the bug Finally got it working with an SQLite issue. My issue here now is that any RT info that I would like to enter into the system will update the sensor for it to become available. It may be the links I am using but these are provided by the developers.
URL Trip Data: https://gtfs.adelaidemetro.com.au/v1/realtime/trip_updates URL Veh Pos: https://gtfs.adelaidemetro.com.au/v1/realtime/vehicle_positions URL Alerts: https://gtfs.adelaidemetro.com.au/v1/realtime/service_alerts
Steps/data to reproduce the behavior, e.g.
Release used Main and latest Home Assistant
Additional Logger: custom_components.gtfs2.coordinator Source: helpers/update_coordinator.py:315 integration: GTFS 2 (General Transit Feed Specification) (documentation, issues) First occurred: 11:50:00 AM (1 occurrences) Last logged: 11:50:00 AM
Unexpected error fetching 9d58c5a1802150e1ee33b170a5673874 data: name 'err' is not defined Traceback (most recent call last): File "/config/custom_components/gtfs2/coordinator.py", line 159, in _async_update_data self._get_rt_alerts = await self.hass.async_add_executor_job(get_rt_alerts, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/gtfs2/gtfs_rt_helper.py", line 309, in get_rt_alerts if entity.HasField("alert"): ^^^^^^^^^^^^^^^ AttributeError: 'dict' object has no attribute 'HasField'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 315, in _async_refresh self.data = await self._async_update_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/gtfs2/coordinator.py", line 166, in _async_update_data raise UpdateFailed(f"Error in getting start/end stop data: {err}") ^^^ NameError: name 'err' is not defined
other log below
Logger: custom_components.gtfs2.coordinator Source: custom_components/gtfs2/coordinator.py:165 integration: GTFS 2 (General Transit Feed Specification) (documentation, issues) First occurred: 11:50:00 AM (1 occurrences) Last logged: 11:50:00 AM
Error getting gtfs realtime data, for origin: redacted for privacy with error: 'dict' object has no attribute 'HasField'