Chicago Transit Departures Smart-Home-Integration, kostenlos und Open Source

Unofficial. Next trains, buses and alerts at your Chicago stops (data provided by CTA).
Die Dokumentation dieser Integration wird von ihrem Autor geschrieben und ist bisher nur auf Englisch verfügbar.
The next 'L' trains at up to four stations, the next buses at up to four bus stops, and the service alerts in effect there, in Gladys. Data provided by CTA.
This integration is unofficial: it is not affiliated with, endorsed nor sponsored by the Chicago Transit Authority, and it is not an official source. Check transitchicago.com or the station signs before you travel. It was never tested with a real key nor on a real Gladys installation by its author: Train Tracker and Bus Tracker were simulated from their official documentation; the Customer Alerts API (no key) was read live.
Get started
-
Ask for the free keys you need on the CTA Developer Center:
- trains: the Train Tracker API key form (answer by e-mail);
- buses: create an account on ctabustracker.com and request the Bus Tracker API key from it (answer by e-mail).
The alerts need no key. You need only the key of what you watch.
-
Find the ids. A train station is a number from 40000 to 49999 (e.g. 40380 for Clark/Lake: every platform); a platform stop, from 30000 to 39999, keeps one direction only. They are in the "CTA – System Information – List of 'L' Stops" of the City of Chicago data portal. A bus stop id is shown on the sign of the stop and on ctabustracker.com (e.g. 456).
-
Install the integration, type the keys and the ids in its configuration, and save. Open the Discover tab and press Add on each station or stop. Its name becomes the CTA name ("Clark/Lake ('L' trains)") after the first read, unless you typed one.
One device per station or stop. A device belongs to a slot and its id: if you type another id in a slot, the integration offers a new device; the old one is no longer updated and keeps its last values (the configuration page lists it under "Not updated any more": delete it in Gladys). Changing the lines filter keeps the device.
What each device shows
| Feature | Type | Content |
|---|---|---|
| Next departure | text | "Green Line → Harlem/Lake in 4 min (05:18)", "due" when it is approaching, "delayed" and "scheduled time" (no live tracking) when the CTA says so |
| Following departure | text | the same for the next one |
| Predicted departures (30 min) | counter | for scenes, e.g. "more than 0" |
| Departures | text | "05:14 · Green Line → Harlem/Lake 4, 9 min · Brown Line → Kimball 11 min" |
| Alerts in effect | counter | alerts of the station (or of the bus routes seen at the stop) |
| Alert | text | the first alert (major first, then the most severe) and how many more |
The times are Chicago times. Every read publishes every value: a departure that is gone becomes "No following departure (read 05:15)", never a number left behind. A failed, stale or unreadable read publishes nothing (no 0): the configuration page says why and since when. Canceled, invalidated and drop-off only bus trips are not departures (Bus Tracker dynamic types 1, 4, 12, 16, 17 and 18; for 12 the CTA does not want the cancellation shown: the bus is simply left out).
The bus alerts are those of the routes seen at the stop by Bus Tracker (the Customer Alerts API does not know bus stops). The train alerts are those of the station and of its lines. The CTA also sends, for a station, the elevator and accessibility alerts of every other station of its lines: those are left out (impact "Elevator Status" or severity 1-19, naming another station, not major). A closure of another station or a major alert on a watched line is kept. Without a key, the alerts of a station (40000-49999) are read all the same; those of a platform stop (30000-39999) and of a bus stop wait for a first read of their departures.
The scene trigger New CTA alert at a station or stop fires once for an alert seen for the first time at a watched station or stop, when it started within the last 24 hours (the first read only learns the alerts already there). You can keep major alerts only, or the others.
Requests and quotas
- One Train Tracker request per station and per read, one Bus Tracker request for all the bus stops per read; the alerts every 5 minutes (at each read when the read interval is longer), one request per station or stop. One request at a time, 1 s apart at least.
- The CTA grants each key 100,000 requests a day by default (docs read on
2026-11-27). The integration keeps its own daily budget per key (10,000
by default, setting "Daily budget per key"): it counts the requests of the
Chicago day, writes the count to
/databefore each request (a restart keeps it), and stretches the read interval when the planned reads would not fit 90 % of the budget (the status says "Reads every N s"). When the budget is spent, that key waits for the next Chicago day. - If the CTA says the daily limit is reached, that key pauses until 00:05 in Chicago (one hour at least). A 429, a server error or an unexpected answer pauses that service from 1 or 2 minutes, doubled up to 6 hours; the other services go on.
- If the CTA refuses a key, nothing is sent with it any more, even after a restart, until you type another key or press Show the last read / retry the key, which sends one request with it (30 s at least after the previous one). A success lifts the refusal. An HTTP 401 or 403 is not taken as a refusal: only the CTA's own "invalid key" answer is.
- A restart, a reconnection, a saved configuration that did not change and Discovery never read sooner than the interval. The button reads only to retry a refused key, as said above.
Your keys
The keys are kept by Gladys in its database, never shown again, and sent only
to the CTA (in the address of each request, as the CTA requires). The
integration never writes them to its logs, its status nor /data: it keeps a
salted 8-bit print of a refused key there (256 possible values, shared by
countless keys), enough to know "another key" after a restart.
Troubleshooting
The message at the top of the configuration page tells where each station and stop stands, and how many requests each key used today. Common messages:
- "The CTA does not know this id": check the id; asked again after 30 minutes.
- "No bus has confirmed this stop id yet": the stop has no prediction now and no bus was ever seen there; nothing is published until one is.
- "Differs from the clock of this machine": set the clock of the machine that runs Gladys.
Terms of use
The data is used under the CTA Developer License Agreement and Terms of Use and the CTA Trademark Guidelines for Developers: revocable, without warranty, no CTA logo. Data provided by CTA. Each user reads the APIs with their own keys from their own Gladys.
Konfigurationseinstellungen
Diese Einstellungen fragt Chicago Transit Departures in seinem Konfigurationsbildschirm in Gladys ab.
| Einstellung | Typ | Pflichtfeld | Beschreibung |
|---|---|---|---|
| Chicago trains and buses | section | Nein | Unofficial, not affiliated with the Chicago Transit Authority. Data provided by CTA. The next 'L' trains (Train Tracker API) and buses (Bus Tracker API) at up to four stations and four bus stops, and the service alerts in effect there (Customer Alerts API). Each of the two first APIs needs its own free key, asked on the CTA Developer Center; the alerts need none. Each key has a daily quota: the integration counts its requests and stays within the daily budget below. |
| Train Tracker API key | secret | Nein | The free key of the Train Tracker API, kept by Gladys in its database, never shown again, sent only to the CTA. Leave empty when you watch no station. |
| Bus Tracker API key | secret | Nein | The free key of the Bus Tracker API, kept by Gladys in its database, never shown again, sent only to the CTA. Leave empty when you watch no bus stop. |
| Language of the texts | select | Nein | The language of the device names and the departure texts (the CTA texts stay in English). |
| Read interval (s) | number | Nein | How often the departures are read, in seconds (30 to 600). Stretched when the daily budget of a key would not hold it. The alerts are read every 5 minutes. |
| Daily budget per key (requests) | number | Nein | Requests per key and per Chicago day at most (500 to 100000; the CTA grants 100000 a day by default). One station costs one request per read, all the bus stops together one request per read. |
| Train station 1 | section | Nein | The id of a station (40000-49999, e.g. 40380 for Clark/Lake: every platform) or of a platform stop (30000-39999: one direction), from the CTA 'L' stops list (City of Chicago data portal). |
| Name (optional) | string | Nein | |
| Station or platform stop id | string | Nein | |
| Lines (optional) | string | Nein | Only these lines, comma separated (Red, Blue, Brown, Green, Orange, Purple, Pink, Yellow). Empty: every line. |
| Train station 2 | section | Nein | |
| Name (optional) | string | Nein | |
| Station or platform stop id | string | Nein | |
| Lines (optional) | string | Nein | Only these lines, comma separated (Red, Blue, Brown, Green, Orange, Purple, Pink, Yellow). Empty: every line. |
| Train station 3 | section | Nein | |
| Name (optional) | string | Nein | |
| Station or platform stop id | string | Nein | |
| Lines (optional) | string | Nein | Only these lines, comma separated (Red, Blue, Brown, Green, Orange, Purple, Pink, Yellow). Empty: every line. |
| Train station 4 | section | Nein | |
| Name (optional) | string | Nein | |
| Station or platform stop id | string | Nein | |
| Lines (optional) | string | Nein | Only these lines, comma separated (Red, Blue, Brown, Green, Orange, Purple, Pink, Yellow). Empty: every line. |
| Bus stop 1 | section | Nein | The id of a bus stop (digits, e.g. 456): shown on the sign of the stop and on ctabustracker.com. A stop serves one direction. |
| Name (optional) | string | Nein | |
| Bus stop id | string | Nein | |
| Routes (optional) | string | Nein | Only these routes, comma separated (e.g. 20, X9). Empty: every route. |
| Bus stop 2 | section | Nein | |
| Name (optional) | string | Nein | |
| Bus stop id | string | Nein | |
| Routes (optional) | string | Nein | Only these routes, comma separated (e.g. 20, X9). Empty: every route. |
| Bus stop 3 | section | Nein | |
| Name (optional) | string | Nein | |
| Bus stop id | string | Nein | |
| Routes (optional) | string | Nein | Only these routes, comma separated (e.g. 20, X9). Empty: every route. |
| Bus stop 4 | section | Nein | |
| Name (optional) | string | Nein | |
| Bus stop id | string | Nein | |
| Routes (optional) | string | Nein | Only these routes, comma separated (e.g. 20, X9). Empty: every route. |
So installierst du Chicago Transit Departures in Gladys
- Öffne in Gladys Integrationen: Chicago Transit Departures erscheint im Katalog neben den nativen Integrationen, mit einem Community-Badge.
- Klicke auf Installieren. Gladys lädt das Docker-Image (
ghcr.io/lm1lc3n7/gladys-chicago-transit:0.1.1) herunter, startet es in einer vom Kern isolierten Sandbox und erzeugt die Oberfläche der Integration (Geräte, Erkennung und Konfiguration). - Öffne den Bildschirm Konfiguration der Integration, fülle die Einstellungen aus und speichere.
- Du kannst sie auch direkt über die URL ihres Repositorys installieren: https://github.com/LM1LC3N7/gladys-chicago-transit.
Chicago Transit Departures benötigt Gladys >=5.3.0. Der Katalog in Gladys wird stündlich aktualisiert, eine neue Version ist also spätestens eine Stunde nach ihrer Veröffentlichung verfügbar.
Du nutzt Gladys noch nicht? Es ist kostenlos und Open Source: folge der Installationsanleitung, um loszulegen.
Über externe Integrationen
Chicago Transit Departures ist eine externe Integration: eine Community-Integration, die als Docker-Container verpackt und auf GitHub veröffentlicht wird. Gladys installiert sie mit einem Klick und führt sie in einer vom Kern isolierten Sandbox aus. Sie wird von LM1LC3N7 veröffentlicht und gepflegt, nicht vom Gladys-Kernteam.
- Alle Integrationen durchsuchen, native und aus der Community
- Deine eigene externe Integration bauen und veröffentlichen
- Quellcode auf GitHub — Quelle dieser Dokumentation