Updated external content (Jenkins build 950)
parent
eaf4427062
commit
371b9397a1
|
@ -29,14 +29,18 @@ The information are requested from the timetable api of Deutsche Bahn developer
|
|||
|
||||
To configure a timetable you first need to register at Deutsche Bahn developer portal and register for timetable API to get an access key.
|
||||
|
||||
1. Go to [Deutsche Bahn Developer](https://developer.deutschebahn.com)
|
||||
1. Go to [DB API Marketplace](https://developers.deutschebahn.com/)
|
||||
2. Register new account or login with an existing one
|
||||
3. If no application is configured yet (check Tab "Meine Anwendungen") create a new application. Only the name is required, any other fields can be left blank.
|
||||
4. Go to APIs - Timetables v1 (may be displayed on second page)
|
||||
5. Choose your previously created application and hit "Abonnieren"
|
||||
6. In confirmation-dialog choose "Wechsel zu meine Abonnements"
|
||||
7. Create an access key for the production environment by hitting "Schlüssel Erstellen"
|
||||
8. Copy the "Zugangstoken". This is required to access the api from openHAB.
|
||||
3. If no application is configured yet (check Tab "Anwendungen" at top) create a new application. Only the name is required, for example openHAB, any other fields can be left blank.
|
||||
4. Remember the shown **Client ID** and **Client Secret**.
|
||||
5. Go to **Katalog** and search for **Timetables** api.
|
||||
6. Within **Zugehörige APIs** select the Timetables api.
|
||||
7. Select **Abonnieren** at top left of the page.
|
||||
8. Select the Nutzungsplan **Free** by clicking **Abonnieren**.
|
||||
9. Select the previously created application.
|
||||
10. Click **Next**.
|
||||
11. Click **Fertig**.
|
||||
12. Now you have successfully registered the api within an application. The **Client ID** and **Client Secret** can now be used during bridge configuration.
|
||||
|
||||
### Determine the EVA-No of your station
|
||||
|
||||
|
@ -46,13 +50,14 @@ You can look up the number within the csv file available at [Haltestellendaten](
|
|||
### Configure timetable bridge
|
||||
|
||||
With access key for developer portal and eva no. of your station you're ready to configure a timetable (bridge) for this station.
|
||||
In addition you can configure if only arrivals, only departures or all trains should be contained within the timetable.
|
||||
In addition, you can configure if only arrivals, only departures or all trains should be contained within the timetable.
|
||||
|
||||
**timetable** parameters:
|
||||
|
||||
| Property | Default | Required | Description |
|
||||
|-|-|-|-|
|
||||
| `accessToken` | | Yes | The access token for the timetable api within the developer portal of Deutsche Bahn. |
|
||||
| `clientId` | | Yes | The Client ID for the application with registered timetable api within the DB API Marketplace. |
|
||||
| `clientSecret` | | Yes | The Client Secret (API Key) for the application with registered timetable api within the DB API Marketplace. |
|
||||
| `evaNo` | | Yes | The eva nr. of the train station for which the timetable will be requested.|
|
||||
| `trainFilter` | | Yes | Selects the trains that will be displayed in the timetable. Either only arrivals, only departures or all trains can be displayed. |
|
||||
| `additionalFilter` | | No | Specifies additional filters for trains, that should be displayed within the timetable. |
|
||||
|
@ -63,7 +68,7 @@ and only trains that matches the given filter will be contained within the timet
|
|||
|
||||
To specify an advanced filter you can
|
||||
|
||||
- specify a filter for the value of a given channel. Therefore you must specify the channel name (with channel group) and specify a compare value like this:
|
||||
- specify a filter for the value of a given channel. Therefore, you must specify the channel name (with channel group) and specify a compare value like this:
|
||||
`departure#line="RE60"` this will select all trains with line RE60
|
||||
- use regular expressions for expected channel values, for example: `departure#line="RE.*"`, this will match all lines starting with "RE".
|
||||
- combine multiple statements as "and" conjunction by using `&`. If used, both parts must match, for example: `departure#line="RE60" & trip#category="WFB"`
|
||||
|
@ -97,10 +102,10 @@ train things, the channels of these trains will be undefined.
|
|||
## Channels
|
||||
|
||||
Each train has a set of channels, that provides access to any information served by the timetable API. A detailed description of the values and their meaning can be found within
|
||||
the [Timetables V1 API Description](https://developer.deutschebahn.com/store/apis/info?name=Timetables&version=v1&provider=DBOpenData&).
|
||||
the [Timetables V1 API Description](https://developers.deutschebahn.com/db-api-marketplace/apis/product/timetables).
|
||||
The information are grouped into three channel-groups:
|
||||
The first channel group (trip) contains all information for the trip of the train, for example the category (like ICE, RE, S).
|
||||
The second and third channel group contains information about the the arrival and the departure of the train at the given station.
|
||||
The second and third channel group contains information about the arrival and the departure of the train at the given station.
|
||||
Both of the groups may provide an 'UNDEF' channel value, when the train does not arrive / depart at this station
|
||||
(due it starts or ends at the given station). If you have configured your timetable to contain only departures (with property trainFilter) the departure channel values will always be defined
|
||||
and if you have selected only arrivals the arrival channel values will always be defined.
|
||||
|
|
|
@ -11,9 +11,14 @@
|
|||
train things.</description>
|
||||
|
||||
<config-description>
|
||||
<parameter name="accessToken" type="text" required="true">
|
||||
<label>Access Token</label>
|
||||
<description>Access Token from Deutsche Bahn developer portal for accessing the webservice api.</description>
|
||||
<parameter name="clientId" type="text" required="true">
|
||||
<label>Client Id</label>
|
||||
<description>Client ID from Application within DB API Marketplace for accessing the timetables webservice api.</description>
|
||||
</parameter>
|
||||
<parameter name="clientSecret" type="text" required="true">
|
||||
<label>Client Secret (API Key)</label>
|
||||
<description>Client Secret (API Key) from Application within DB API Marketplace for accessing the timetables
|
||||
webservice api.</description>
|
||||
</parameter>
|
||||
<parameter name="evaNo" type="text" required="true" pattern="80\d{5,5}">
|
||||
<label>EvaNo of Station</label>
|
||||
|
@ -24,7 +29,7 @@
|
|||
<advanced>true</advanced>
|
||||
<default>departures</default>
|
||||
<label>Train Filter</label>
|
||||
<description>Selects the trains that will be be displayed in this timetable. If not set only departures will be
|
||||
<description>Selects the trains that will be displayed in this timetable. If not set only departures will be
|
||||
provided.</description>
|
||||
<options>
|
||||
<option value="all">All</option>
|
||||
|
@ -45,23 +50,23 @@
|
|||
<bridge-type-ref id="timetable"/>
|
||||
</supported-bridge-type-refs>
|
||||
<label>Train</label>
|
||||
<description>Displays informations about an train within the given timetable at one station.</description>
|
||||
<description>Displays information about a train within the given timetable at one station.</description>
|
||||
<channel-groups>
|
||||
<channel-group typeId="tripAttributes" id="trip">
|
||||
<label>Trip</label>
|
||||
<description>Contains all informations about the trip of the train.
|
||||
<description>Contains all information about the trip of the train.
|
||||
</description>
|
||||
</channel-group>
|
||||
<channel-group typeId="eventAttributes" id="arrival">
|
||||
<label>Arrival</label>
|
||||
<description>Contains all informations about the arrival of the train at the station.
|
||||
<description>Contains all information about the arrival of the train at the station.
|
||||
Channels may be empty, if the
|
||||
trains starts at this station.
|
||||
</description>
|
||||
</channel-group>
|
||||
<channel-group typeId="eventAttributes" id="departure">
|
||||
<label>Departure</label>
|
||||
<description>Contains all informations about the departure of the train at the station.
|
||||
<description>Contains all information about the departure of the train at the station.
|
||||
Channels may be empty, if the
|
||||
trains ends at this station.
|
||||
</description>
|
||||
|
@ -77,7 +82,7 @@
|
|||
|
||||
<channel-group-type id="tripAttributes">
|
||||
<label>Trip Attributes</label>
|
||||
<description>Contains all informations about the trip of the train.</description>
|
||||
<description>Contains all information about the trip of the train.</description>
|
||||
<channels>
|
||||
<channel typeId="category" id="category"/>
|
||||
<channel typeId="number" id="number"/>
|
||||
|
@ -89,7 +94,7 @@
|
|||
|
||||
<channel-group-type id="eventAttributes">
|
||||
<label>Event Attributes</label>
|
||||
<description>Contains all attributes for an event (arrival / departure) of an train at the station.</description>
|
||||
<description>Contains all attributes for an event (arrival / departure) of a train at the station.</description>
|
||||
<channels>
|
||||
<channel typeId="planned-path" id="planned-path"/>
|
||||
<channel typeId="changed-path" id="changed-path"/>
|
||||
|
@ -227,7 +232,7 @@
|
|||
<item-type>String</item-type>
|
||||
<label>Messages</label>
|
||||
<description>Messages for this train. Contains all translated codes from the messages of the selected train stop.
|
||||
Multiple messages will be separated with an single dash.</description>
|
||||
Multiple messages will be separated with a single dash.</description>
|
||||
<state readOnly="true"/>
|
||||
</channel-type>
|
||||
|
||||
|
@ -246,7 +251,7 @@
|
|||
For arrival, the path indicates the stations that come before the
|
||||
current station. The first element then is the trip’s
|
||||
start station. For departure, the path indicates the stations
|
||||
that come after the current station. The last ele-ment
|
||||
that come after the current station. The last element
|
||||
in the path then is the trip’s destination station. Note that
|
||||
the current station is never included in the path
|
||||
(neither for arrival nor for departure).</description>
|
||||
|
@ -260,7 +265,7 @@
|
|||
For arrival, the path indicates the stations that come before the
|
||||
current station. The first element then is the trip’s
|
||||
start station. For departure, the path indicates the stations
|
||||
that come after the current station. The last ele-ment
|
||||
that come after the current station. The last element
|
||||
in the path then is the trip’s destination station. Note that
|
||||
the current station is never included in the path
|
||||
(neither for arrival nor for departure).</description>
|
||||
|
|
|
@ -202,7 +202,7 @@
|
|||
<bridge-type-ref id="connector"/>
|
||||
</supported-bridge-type-refs>
|
||||
<label>Temperature Sensor</label>
|
||||
<description>ELRO Connects motion sensor</description>
|
||||
<description>ELRO Connects temperature sensor</description>
|
||||
<category>Sensor</category>
|
||||
<channels>
|
||||
<channel id="temperature" typeId="temperature"/>
|
||||
|
|
Loading…
Reference in New Issue