~derf / projects / Travel::Status::DE::IRIS v1.43

Travel::Status::DE::IRIS is an inofficial interface to IRIS-based web departure monitors such as https://iris.noncd.db.de/wbt/js/index.html?typ=ab&style=qrab&bhf=EE&SecLang=&Zeilen=20&footer=0&disrupt=0.

Unlike regular web departure monitors, it can provide a history of delay / qos messages and has detailed knowledge about delays, path deviations and similar. However, it can not access free-text messages such as "route blocked due to construction until DD.MM.YYYY".

Output of the example script db-iris shipped with this module:

illusion ~ > db-iris -od,q 'Dortmund Hbf' 
12:27 +18  ERB 89931    Dortmund Hbf         21
12:36 +6   ICE 1025     Frankfurt(Main)Hbf   11  Verspätung eines vorausfahrenden Zuges
12:44      IC 1959      Dresden Hbf          18
12:45      RE 10124     Aachen Hbf           16
12:46 +4   RB 29723     Dortmund Hbf         23  Technische Störung an einem anderen Zug
12:46      S 1          Dortmund Hbf         7 
12:47      S 2          Recklinghausen Hbf   6 
12:48 +7   ICE 849      Berlin Ostbahnhof    10  Verspätung aus vorheriger Fahrt
12:49 +1   S 5          Dortmund Hbf         5 
12:51      RE 10417     Dortmund Hbf         20
12:51      ERB 90330    Dortmund Hbf         4 
12:52      RB 20248     Enschede             23
12:53 +2   S 2          Dortmund Hbf         6 
12:53      S 1          Solingen Hbf         7 
12:53      RB 29211     Iserlohn             3 
12:54 +2   RE 10617     Minden(Westf)        8   Abweichende Wagenreihung
13:01      ERB 89879    Hamm(Westf)          16
13:03      ERB 89882    Düsseldorf Hbf       21
13:06      S 1          Dortmund Hbf         7 
13:06      RE 10618     Düsseldorf Hbf       18
13:07      S 2          Essen Hbf            6 
13:07      RB 20241     Dortmund Hbf         23
13:07      ERB 90333    Soest                4 
13:09      RB 29210     Dortmund Hbf         3 
13:09      RE 10420     Aachen Hbf           20
13:10 +3   IC 1926      Berlin Südkreuz      10
13:11      S 5          Witten Hbf           5 
13:12 +5   ICE 942      Düsseldorf Hbf       16  Verspätung eines vorausfahrenden Zuges
13:13 +1   S 2          Dortmund Hbf         6 
13:13      RB 29716     Lünen Hbf            23
13:13      S 1          Solingen Hbf         7 
13:17 +1   RE 10121     Paderborn Hbf        8   Verspätung aus vorheriger Fahrt
13:17 +2   RE 10966     Dortmund Hbf         2 
13:19      S 5          Dortmund Hbf         5 
13:21      RE 10016     Mönchengladbach Hbf  11
13:21      ERB 90378    Dortmund Hbf         4 
13:21      ICE 612      Dortmund Hbf         8   Abweichende Wagenreihung
13:22      NWB 75187    Dortmund Hbf         23
13:23      RB 29213     Schwerte(Ruhr)       3 
13:24      ICE 721      München Hbf          18
13:25 +59  IC 2226      Kiel Hbf             10  Technische Störung am Zug  Mehrere Wagen fehlen

Travel-Status-DE-IRIS-1.43.tar.gz (signature)

  • db-iris: Correctly set cache expiry. In 1.42, backend replies were cached indefinitely due to a typo

Travel-Status-DE-IRIS-1.42.tar.gz (signature)

  • Result: Fix TO_JSON method
  • db-iris: Cache backend results by default
  • db-iris: New options: --json and --no-cache

Travel-Status-DE-IRIS-1.41.tar.gz (signature)

  • Result: Add wing_of accessor
  • Follow name and DS100 change of Freiburg West (RFW) to Freiburg-Landwasser (RFLW)
  • Add more stations

Travel-Status-DE-IRIS-1.40.tar.gz (signature)

  • Incorporate the last few years' worth of station name changes

Travel-Status-DE-IRIS-1.39.tar.gz (signature)

  • Add missing geocoordinates to nearly all remaining stations (thanks to @marudor)
  • Add stations opened this year (thanks to @marudor)

Travel-Status-DE-IRIS-1.38.tar.gz (signature)

  • Add geocoordinates for belgian stations (patch by @Knuspel)
  • New IRIS option: keep_transfers

Travel-Status-DE-IRIS-1.37.tar.gz (signature)

  • Add geocoordinates for french stations served by Thalys/TGV (patch by Florian Wurzel)

Travel-Status-DE-IRIS-1.36.tar.gz (signature)

  • Update stations list, prune duplicates and outdated entries (251 additions, 155 deletions). Incorporates patches by Moritz Schlarb and @Knuspel -- Thanks!
  • Update documentation to reflect that EVA IDs used by DB IRIS are not the same as UIC station IDs (they just happen to be identical in 99% of cases)
  • Stations are now stored in share/stations.json. See README.md for station management hints.

Travel-Status-DE-IRIS-1.35.tar.gz (signature)

  • Add additional dutch and austrian stations (thanks to @Knuspel)
  • Add geocoordinates for several of those (thanks to @Knuspel)

Travel-Status-DE-IRIS-1.34.tar.gz (signature)

  • Improve request speed when using with_related by ignoring subway stations which do not have results anyways (e.g. in Hannover Hbf)
  • Do not forward unexpected IRIS message codes (ID ≥ 100) to the user
  • IRIS: Add ->related_stations accessor

Travel-Status-DE-IRIS-1.33.tar.gz (signature)

  • Fix $result->route_pre / route_post accessors providing bogus data when all previous/following stops are cancelled. They used to return sched_route_pre / sched_route_post instead of an empty list in this case.

Travel-Status-DE-IRIS-1.32.tar.gz (signature)

  • Travel::Status::DE::IRIS::Stations: Add geocoordinates fo some swiss and austrian stations

Travel-Status-DE-IRIS-1.31.tar.gz (signature)

  • Travel::Status::DE::IRIS::Stations: Add EVA/UIC station numbers and use full names for non-german stations.

Travel-Status-DE-IRIS-1.30.tar.gz (signature)

  • Result: Add ->station and ->station_uic accessors. These are useful to determine which station an individual train belongs to when requesting departures of multiple stations at once using the with_related option.

Travel-Status-DE-IRIS-1.29.tar.gz (signature)

  • Add QoS code 72 (no info/entertainment system available)
  • Fix erroneous QoS codes 83, 91, 92

Travel-Status-DE-IRIS-1.28.tar.gz (signature)

  • Add 234 stations missing from regular DB Open Data station list
  • Add delay code 14 (Technische Störung am Bahnhof)

Travel-Status-DE-IRIS-1.27.tar.gz (signature)

  • Add station Berlin Zoologischer Garten (S)

Travel-Status-DE-IRIS-1.26.tar.gz (signature)

  • Fix DS100 code for Berlin Westkreuz
  • Add station Bonn UN Campus

Travel-Status-DE-IRIS-1.25.tar.gz (signature)

  • Do not ignore trains with arrival < lookahead, even if departure >= lookahead.
  • Add delay code 66 (flooded area)

Travel-Status-DE-IRIS-1.24.tar.gz (signature)

  • Remove erroneous double entry for Düsseldorf-Bilk
  • Fix a warning when encountering unusual train types

Travel-Status-DE-IRIS-1.23.tar.gz (signature)

  • Ignore apparently useless "ZOB" (central omnibus station) links at most main stations. This decreases the average runtime and also fixes some S-Bahn trains being reported twice in München Hbf.
  • Result->qos_messages: Skip superseded messages. They're still present in ->messages.
  • Result->route_interesting: Filter Hbf suffixes (not just "Hbf"); include .hl.n (czech main station).

Travel-Status-DE-IRIS-1.22.tar.gz (signature)

  • Add delay code 4 (unforeseen staff shortage, thanks to Fabian Schwarz)
  • Add delay code 37 (technical failure in carriage, thanks to @marudor)

Travel-Status-DE-IRIS-1.21.tar.gz (signature)

  • Fix crash when receiving invalid XML due to network issues

Travel-Status-DE-IRIS-1.20.tar.gz (signature)

  • Use schedule instead of realtime data when determining whether a train falls within the lookahead time frame. This fixes severely delayed trains being ignored even if their scheduled arrival/departure is very soon or has already passed.

Travel-Status-DE-IRIS-1.19.tar.gz (signature)

  • db-iris: Fix -ot ignoring arrival delay if departure is on time
  • Add delay code 12 (waiting for passengers in a ship)
  • Result->route_interesting: Include dutch and swiss central station names
  • Result: New accessors arrival_delay and departure_delay

Travel-Status-DE-IRIS-1.18.tar.gz (signature)

  • Update station dataset to Open Data Haltestellenliste 2017-09

Travel-Status-DE-IRIS-1.17.tar.gz (signature)

  • Fix DS100 codes for Dülmen, Stuttgart Hbf (tief), and Wolfenbüttel
  • db-iris: Support -d/--date tomorrow

Travel-Status-DE-IRIS-1.16.tar.gz (signature)

  • Fix miscalculated delays of prematurely terminating trains
  • Lookahead and lookbehind are now interpreted with 1-minute granularity. Note that this also affects the default lookahead.
  • Fix floating point-related test failures on some architectures
  • New ./Build test dependency: Test::Number::Delta

Travel-Status-DE-IRIS-1.15.tar.gz (signature)

  • Performance improvements
  • Distinguish between cancelled/additional arrivals and departures
  • Travel::Status::DE::IRIS::Result: New accessors arrival_is_additional, arrival_is_cancelled, departure_is_additional, departure_is_cancelled and is_additional.
  • Travel::Status::DE::IRIS::Result: is_cancelled now only returns true if both arrival and departure have been cancelled.

Travel-Status-DE-IRIS-1.14.tar.gz (signature)

  • IRIS->new: Add optional argument lookbehind
  • db-iris: Remove a useless HTTP request, resulting in slightly faster responses
  • db-iris -V / --track-via: Improve support for faraway stations

Travel-Status-DE-IRIS-1.13.tar.gz (signature)

  • Fix support for line numbers, remove manual line map workaround

Travel-Status-DE-IRIS-1.12.tar.gz (signature)

  • Unfortunately, line numbers are not available at the moment due to IRIS backend changes. Some lines in NRW have been provided with a manual line number mapping to remedy this.
  • Fix DS100 code for "Bielefeld Hbf"
  • Travel::Status::DE::IRIS::Stations::get_station_by_location: Fix bug in num_matches (parameter was silently ignored)

Travel-Status-DE-IRIS-1.11.tar.gz (signature)

  • IRIS->new: Fix partially broken cache handling when using with_related => 1
  • Improve parser performance

Travel-Status-DE-IRIS-1.10.tar.gz (signature)

  • Add qos code 71 ("WLAN in einzelnen Wagen nicht verfügbar")
  • Fix DS100 codes for "Geilenkirchen" and "Montabaur"
  • Travel::Status::DE::IRIS::Stations::get_station: Add support for UIC / EVA numbers

Travel-Status-DE-IRIS-1.09.tar.gz (signature)

  • Travel::Status::DE::IRIS::Result: Fix ->classes accessor (returned a string instead of a list)
  • Fix DS100 codes for "Stuttgart Hbf (tief)" and "Stuttgart-Feuerbach"

Travel-Status-DE-IRIS-1.08.tar.gz (signature)

  • New dependency: Geo::Distance
  • Update DS100 code list. Station names are now unabbreviated, e.g. "Dortmund Univeristät" instead of "Do Universität". Also, stations without train service are no longer included. Note that this list might contain errors. If you get "Request error: Station ... has no associated timetable" for a station which worked with previous versions, please submit a bug report.
  • Travel::Status::DE::IRIS::Stations now also returns international station number, longitude and latitutde for most stations
  • New method Travel::Status::DE::IRIS::Stations::get_station_by_location allows station lookup by geolocation

Travel-Status-DE-IRIS-1.07.tar.gz (signature)

  • Fix inefficient requests for stations with with heavily cross-referenced related-station tags (most notable example: München Hbf)

Travel-Status-DE-IRIS-1.06.tar.gz (signature)

  • Partially fix slow response time and excessive network requests for stations with heavily cross-referenced related-station tags (most notable example: München Hbf). The implementation is still slightly inefficient in these cases, but far better than before -- A complete fix will follow in the next release. Note that db-iris calls using -x/--exact/--no-related are not affected by this issue.

Travel-Status-DE-IRIS-1.05.tar.gz (signature)

  • Update station list. It now uses data supplied by the Deutsche Bahn Open Data portal.
  • db-iris: New option -x / --exact / --no-related
  • IRIS->new: New options main_cache, realtime_cache and with_related
  • IRIS: Add ->station and ->related_stations accessors
  • db-iris: Include related stations in query output (for instance, "Köln Messe Deutz" will include "Köln Messe Deutz (tief)" and "Köln Messe Deutz Gl. 9-10"). Use --exact / --no-related to disable this.
  • IRIS: Same. Also, IRIS->new can now be passed Cache objects to cache HTTP requests for a user-defined time. This is most useful when building infoscreens and similar, since the scheduled and station data never changes and can therefore be cached to decrease network load and increase response time.

Travel-Status-DE-IRIS-1.04.tar.gz (signature)

  • Result: Add qos code 79 ("Ohne Mehrzweckabteil")
  • db-iris: Accept UIC station codes
  • Fix warnings with recent DateTime::Format::Strptime releases
  • Improve parser speed

Travel-Status-DE-IRIS-1.03.tar.gz (signature)

  • Result: Add info key 900
  • Station: Improve get_station matching quality by using the Levenshtein edit distance in addition to simple substring matching
  • new dependency: Text::LevenshteinXS (see README for notes about drop-in replacements)
  • new dependency: List::UtilsBy

Travel-Status-DE-IRIS-1.02.tar.gz (signature)

  • Added github repo to dist metadata and the doc
  • Result: distinguish between overcrowded trains (q97) and very overcrowded trains (q96)
  • Result: Verify delay key 60 ("delays because of storm")
  • Result: Add qos key 70 ("no wifi" -- not entirely sure yet)

Travel-Status-DE-IRIS-1.01.tar.gz (signature)

  • IRIS->new: Fix default lwp_options value (was documented, but not used)
  • Result->route_interesting: Also consider airports
  • Stations: Update DS100 code list. Fixes 9 stations in Köln, Düsseldorf and Wuppertal which had a wrong code/name combination assigned due to a parser error

Travel-Status-DE-IRIS-1.00.tar.gz (signature)

  • IRIS->new: Use lwp_options to explicitly pass arguments to the LWP::UserAgent constructor. Unknown arguments are now longer implicitly passed on
  • db-iris: Improve output format for wing trains

Travel-Status-DE-IRIS-0.10.tar.gz (signature)

  • Result: Fix deep recursion error in TO_JSON

Travel-Status-DE-IRIS-0.09.tar.gz (signature)

  • Result: Add arrival_wings, departure_wings and is_wing accessors (a wing train is coupled to the respective departure, but has its own ID)
  • db-iris: Indicate wings in output
  • Result: Remove train_no_transfer accessor (was based on erroneous assumptions)
  • Result: Add is_unscheduled, replaced_by and replacement_for accessors
  • db-iris: Add -oR to show replacement information

Travel-Status-DE-IRIS-0.08.tar.gz (signature)

  • Clarify Result->train_id documentation
  • Add IRIS delay/qos keys 13, 60, 75, 76

Travel-Status-DE-IRIS-0.07.tar.gz (signature)

  • Fix a crash related to unscheduled additional stops in a train's route
  • Improve Travel::Status::DE::IRIS::Stations matching
  • Add IRIS delay/qos keys 56, 59, 61, 65, 73, 74, 77

Travel-Status-DE-IRIS-0.06.tar.gz (signature)

  • New non-core module dependency: List::Compare
  • Add support for canceled and additional stops
  • db-iris: Add options -oa and -oc
  • Result: Add accessors additional_stops and canceled_stops
  • Improve support for delayed trains
  • Support additional IRIS delay messages

Travel-Status-DE-IRIS-0.05.tar.gz (signature)

  • Support additional IRIS delay messages

Travel-Status-DE-IRIS-0.04.tar.gz (signature)

  • Fix --track-viastop not matching trains changing their ID at stop
  • Add new (not entirely verified) IRIS delay and qos messages
  • IRIS: add serializable option. Use this if you intend to serialize the list returned by ->results
  • Do not errour out if only partial data is available, show partial data and a warning instead (closes #4)
  • Add several qos and delay messages

Travel-Status-DE-IRIS-0.03.tar.gz (signature)

  • IRIS / db-iris: Add lookahead option
  • db-iris: Fix --via not matching destination of trains with incomplete route data
  • Detect and merge duplicate results caused by train ID changes
  • Result: Provide realtime data in ->platform, add ->sched_platform accessor
  • db-iris: indicate platform changes with an exclamation mark

Travel-Status-DE-IRIS-0.02.tar.gz (signature)

  • Fix warnings when encountering unplanned (fchg-only) trains without arrival or departure platform
  • db-iris: add -V / --track-via option to display departure at start and expected arrival at a destination station
  • db-iris: Add -r / --realtime option to compute times using delay data
  • Result: Remove duplicates in qos_messages and delay_messages, return all messages in reverse order (newest first)

Travel-Status-DE-IRIS-0.01.tar.gz (signature)

  • Initial release. Experimental, API may change without notice