db-iris - Interface to the DeutscheBahn online departure monitor
db-iris [-rx] [-d date] [-o output-flags] [-t time] [-v|-V via] [other options ...] station
version 1.98
As of May 2024, the backend service that this utility relies on is deprecated and may cease operation in the near future. There is no immediate successor. Hence, db-iris and Travel::Status::DE::IRIS are no longer actively maintained. There is no promise that issues and merge requests will be reviewed or merged.
The hafas-m application that is part of Travel::Status::DE::HAFAS(3pm) provides similar features. However, its default "DB" backend is also deprecated. There is no migration path to a Deutsche Bahn departure monitor that is not deprecated at the moment.
db-iris is an interface to the DeutscheBahn departure monitor available at https://iris.noncd.db.de/wbt/js/index.html.
It requests all trains departing from (or arriving at) station in the next two hours and lists them on stdout. station can be a DS100 station code (such as "EE"), a normal station name (such as "Essen Hbf" or "Dortmund Universität"), or an IBNR / european station number (such as 8000098). If no exact match is found, db-iris will try to find station names similar to station.
By default, db-iris shows the following data for each train:
?
)
indicating that no real-time data is available.!
)
indicates that at least one stop has been cancelled (see -oc).!
) indicates that it is not
the scheduled one.Comma-separated list of train classes to filter by. Using this option causes all trains whose class is not in classlist to be discarded.
Valid classes are:
D Non-DB train. Usually local transport F "Fernverkehr", long-distance transport N "Nahverkehr", local and regional transport S S-Bahn, rather slow local/regional transport
Request results for date, which is either a date string in in dd.mm.
or dd.mm.YYYY format, or tomorrow
. Note that typically only
slight (a few hours max) deviations from the current time are supported by the
IRIS backend, larger ones will not return data.
List results as JSON, see Travel::Status::DE::IRIS::Result(3pm) for a partial documentation of arrival/departure keys. The --output option has no effect when using --json.
Note that JSON entries not mentioned in Travel::Status::DE::IRIS::Result(3pm) are NOT guaranteed to be compatible between releases. Their structure is not part of the db-iris / Travel::Status::DE::IRIS versioning scheme; it may change in backwards-incompatible ways anytime.
Do not return results which are more than int minutes in the future. Defaults to 120 (2 hours).
Note that this is only an upper limit, not a guarantee to get every train with a departure in less than int minutes. This guarantee holds only for int below 120. However, any non-negative number is accepted for this option.
If the Cache::File module is available, server replies are cached in
~/.cache/db-iris-schedule and ~/.cache/db-iris-realtime (or paths
relative to $XDG_CACHE_HOME
, if set). Use this option to disable caching
altogether. Note that this will significantly decrease db-iris responsiveness,
especially on mobile networks such as WifiOnICE.
For each result, output outputtypes in addition to the normal time, delay,
line and destination information. outputtypes is a comma-separated list,
this option may be repeated. Each output type has both a short and long form,
so both -ot,d
and --output=times,delay
are valid.
Valid output types are:
If a train's route deviates from its schedule: Print a list of additional (unscheduled) stops it will serve.
If a train's route deviates from its schedule: Print a list of canceled stops (scheduled stops which will not be served).
If a train is delayed, show the most recent reason for this delay.
List all delay reasons entered into the IRIS for each train, even if the particular train is on time by now.
Show the entire route (both before and after station).
List all messages (delay and qos) entered into the IRIS with timestamps.
List all quality of service messages entered into the IRIS. These contain information like "Missing carriage" or "Broken air conditioning".
Note that some qos messages may supersede older ones. superseded messages are omitted, use the m / messages type to see those as well.
Show up to three stops between station and the train's destination.
For cancelled trains: Print their replacement train(s), if present. For unplanned trains: Print the train(s) they replace, if present.
Show both scheduled and expected arrival and departure times.
Only show arrivals/departures at platforms (comma-separated list, option may be repeated). This applies to actual departures, not schedules.
Show estimated instead of scheduled time where available. Cannot be combined
with --output=times
.
Request results for time in HH:MM or HH:MM:SS format. Note that only slight deviations (a few hours max) from the current time are supported by the IRIS backend, larger ones will not return data.
Comma-separated list of train types to filter by. Using this option causes all arrivals/departures whose type is not in typelist to be discarded.
The following valid values are known:
local transport: IRE Inter-Regio Express (rare) RB Regionalbahn (slower than RE) RE Regional-Express S S-Bahn regional/interregional transport: D "Schnellzug" (generic fast train, rare) EC Eurocity IC Intercity IR Inter-Regio (rare in Germany, mostly used in Switzerland) ICE Intercity-Express THA Thalys
Depending on the city and country, other types may be used as well. Examples include "ABR" / "NWB" (private trains included in the local transport tariff system), "HKX" (private train not included in any DB tariffs) and "SBB" (unknown swiss train class)
Only show trains serving viastation after station. In this case, viastation must match the station as contained in the train's route (see -of), DS100 codes are not supported.
Only show trains serving viastation after station. Show result timestamps as "HH:MM -> HH:MM +x", where the first time is the scheduled departure (without delay) at station and the second the scheduled arrival (also without delay) at viastation. If a delay is known, it will be indicated by +x.
Note that here, viastation must be a regular station name or DS100 code.
Caveat: Some trains may change their identity along the route. track-via is not able to handle those and will miss trains changing their identifier between station and viastation
Sometimes, Deutsche Bahn splits up major stations in their IRIS interface. For instance, "Köln Messe/Deutz" actually consists of "Köln Messe/Deutz" (KKDZ), "Köln Messe/Deutz Gl. 9-10" (KKDZB) and "Köln Messe/Deutz (tief)" (KKDT).
By default, db-iris will show departures for all of these stations when queried for any of them. When this option is set, only the departures for the station part specified on the commandline are shown.
Show version information.
None.
There are no known bugs at the moment.
Copyright (C) 2013-2024 by Birte Kristina Friesel <derf@finalrewind.org>
The station data used by this script is provided by DB Station&Service AG, Europaplatz 1, 10557 Berlin, Germany and available under a CC-BY 4.0 license on https://data.deutschebahn.com/dataset/data-haltestellen.
This program is licensed under the same terms as Perl itself.