NAME

efa-m - Unofficial interface to the efa.vrr.de departure and trip monitor

SYNOPSIS

efa-m [-jLr] [-d dd.mm.yyyy] [-t hh:mm] [-l lines] [-p platforms] [-s service] [city] [type:]name

efa-m [-s service] ?query|lat:lon

efa-m [-s service] tripid

VERSION

version 3.03

DESCRIPTION

efa-m is an interface to EFA public transport services.

It can serve as a departure monitor, request details about a specific trip/journey, and look up public transport stops by name or geolocation. The operating mode depends on the contents of its mandatory argument.

Departure Monitor (name)

Shows departures it name or city name. For each departure, efa-m shows

  • estimated departure time (including delay, if available),

  • delay in minutes,

  • platform,

  • line,

  • expected occupation (range . o * !, if available), and

  • destination.

If city is specified, name refers to a location within city. Otherwise, name must be self-contained. I.e., both efa Essen Hbf and efa "Essen Hbf" are valid. Note, however, than efa E Hbf works, but efa "E Hbf" does not.

By default, name refers to a stop, this can be changed by specifying type. Supported types are address and poi (point of interest).

Location Search (?query|lat:lon)

List stops that match query or that are located in the vicinity of lat:lon geocoordinates.

Trip Details (JourneyID)

List trip information as well as arrival and departure time, name, and platform of each stop on the trip's route.

OPTIONS

Values in brackets indicate options that only apply to the corresponding operating mode(s).

-A, --auto-url, --discover-and-print (monitor)

Probe all known EFA entry points for the specified stop. Print the first result which was not an error.

Note that this may take a while and will not necessarily return the best result. Also, using thi option by default is not recommended, as it puts EFA services under considerable additional load.

-d, --date dd.mm.yyyy (monitor)

Show departures for date instead of today. May also be specified as dd.mm.

-D, --discover (monitor)

Probe all known EFA entry points for the specified stop. Print the URLs and names of all entry points which did not return an error.

-j, --with-jid (monitor)

Show journey ID for each departure. The ID can be used to query details with a subsequent efa-m invocation (trip details mode).

--json

Print result(s) as JSON and exit. This is a dump of internal data structures and not guaranteed to remain stable between minor versions. Please use the Travel::Status::DE::EFA(3pm) module if you need a proper API.

-L, --linelist (monitor)

Do not show departures. Instead, list all lines serving the specified place. Note that this information may be incomplete -- only lines which are in service either at the time of the efa-m call or at the time specifed using --date and --time are guaranteed to be included.

-l, --line lines (monitor)

Only show departures of lines (comma-separatad list, option may be repeated)

--list

List supported EFA services with their URLs (see -u) and abbreviations (see -s).

-m, --mot motlist (monitor)

Only show departures whose type appears in motlist (comma-separated list, this option may be repeated).

The following departure types ("modes of transport") are supported: zug, s-bahn, u-bahn, stadtbahn, tram, stadtbus, regionalbus, schnellbus, seilbahn, schiff, ast, sonstige

-o, --offset minutes (monitor)

Ignore departures which are less than minutes from now.

-O, --output outputtypes (monitor)

For each result, show additional information as specified by outputtypes. outputtypes is a comma-separated list, the -O/--output option may also be repeated. Each output type has both a short and long form, for instance both "-Or" and "--output=route" are valid.

The following output types are supported:

a / route_after

Show each departure's full route (timestamps and stop names) after the requested station.

b / route_before

Show each departure's full route (timestamps and stop names) before the requested station.

f / fullroute

Show each departure's full route (timestamps and stop names) before and after the requested station.

i / info

Show station-specific information messages. These typically relate to construction work, broken elevators or escalators, or special announcements for large-scale events.

r / route

Show up to three stops between the requested station and the departure's destination. efa-m tries to display the three most important stops, however these are heuristically determined and may not be optimal.

m / messages

Show free-text messages associated with individual departures. These can include generic information such is bicycle transportation options or Wi-Fi availability, delay reasons, and more.

-p, --platform platforms (monitor)

Only show departures at platforms (comma-separated list, option may be repeated). Note that the Bstg. / Gleis prefix must be omitted.

-r, --relative (monitor)

Show relative departure times in minutes (i.e. the time difference between the departure and the time of the request). In this case, realtime data is already included.

-s, --service name

Short name of the EFA entry point. See Travel::Status::DE::EFA(3pm) and the --list option for a list of services.

-t, --time hh:mm (monitor)

Show departures starting at time instead of now.

--timeout seconds

Set timeout for HTTP requests. Default: 10 seconds. Set to 0 or a negative value to disable it.

-v, --via station (monitor)

Only show trains serving station after the requseted stop, and show the arrival time at station after the departure time at the current stop. station is matched against the "city stop" fields in each line's route. Regular expressions are also supported.

--version

Show version information.

EXIT STATUS

Normally zero. 1 means efa-m was called with invalid options, 2 indicates a request error from Travel::Status::DE::EFA(3pm).

CONFIGURATION

None.

DEPENDENCIES

  • Class::Accessor(3pm)

  • LWP::UserAgent(3pm)

  • Travel::Status::DE::EFA(3pm)

BUGS AND LIMITATIONS

efa-m uses the VRR EFA service by default, which seems to contain the greatest available set of information. However, some cities (e.g. Berlin or parts of Hamburg) are not supported there, and efa-m is not yet able to choose the appropriate EFA URL for these by itself. In these cases, you should find an appropriate EFA service using the -D/--discover option and then use -s service when making requests.

  • EFA does not provide real-time data for the routes of requested departures. Hence, --via estimates the arrival time from scheduled departure and departure delay

AUTHOR

Copyright (C) 2011-2023 by Birte Kristina Friesel <derf@finalrewind.org>

LICENSE

This program is licensed under the same terms as Perl itself.