openhab-addons/bundles/org.openhab.binding.publictransportswitzerland
Holger Friedrich ab58f4ffb4
Java 17 features (N-S) (#15565)
- add missing @override
- Java style array syntax
- remove redundant modifiers
- always move String constants to left side in comparisons
- simplify lambda expressions and return statements
- use replace instead of replaceAll w/o regex
- instanceof matching and multiline strings

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2023-09-13 08:03:31 +02:00
..
doc
src/main Java 17 features (N-S) (#15565) 2023-09-13 08:03:31 +02:00
NOTICE
pom.xml Apply spotless 2023-07-24 01:20:31 +02:00
README.md [Documentation] Markdown improvements n to s (#13948) 2022-12-14 16:52:43 +01:00

Public Transport Switzerland Binding

Connects to the "Swiss public transport API" to provide real-time public transport information. Link to the API

For example, here is a station board in HABPanel. (Download here)

Departure board in HABPanel

Supported Things

Stationboard

Upcoming departures for a single station. This is what you would usually see displayed at the train station.

Channels

channel type description
departures#n String A dynamic channel for each upcoming departure
tsv (advanced) String A tsv which contains the fields:
identifier, departureTime, destination, track, delay

UI based Configuration

station is the station name for which to display departures.
The name has to be one that is used by the swiss federal railways.
Please consult their website.

Textual configuration

Thing
Thing publictransportswitzerland:stationboard:zurich [ station="Zürich HB" ]
Items
String Next_Departure             "Next Departure"             { channel="publictransportswitzerland:stationboard:zurich:departures#1" }
String Upcoming_Departures_TSV    "Upcoming_Departures_TSV"    { channel="publictransportswitzerland:stationboard:zurich:tsv" }

Discovery

This binding does not support auto-discovery.