DBPlan: Unterschied zwischen den Versionen
 (Infobox)  | 
				 (Dokumentation aus dem Forums Beitrag weitesgehend übernommen und noch die Abhängigkeite zu dem HTML Table Extract Modul)  | 
				||
| Zeile 4: | Zeile 4: | ||
|ModFTopic=36057  | |ModFTopic=36057  | ||
|ModForumArea=Unterstützende Dienste  | |ModForumArea=Unterstützende Dienste  | ||
|ModTechName=  | |ModTechName=98_DBPlan.pm  | ||
|ModOwner=JoWiemann ({{Link2FU|7023|Forum}})  | |ModOwner=JoWiemann ({{Link2FU|7023|Forum}})  | ||
}}  | }}  | ||
Das Modul holt von der Infoseite der DB aktuelle Informationen zu einer angegeben Verbindung.  | |||
== Einbinden in FHEM ==  | |||
Fhem benötigt zunächst die perl Module aus dem {{Link2FU|7023|98_DBPlan.pm: Fahrplaninformation der DB}}.  | |||
Des Weiteren wird das perl Modul HTML:Table Extract benötigt, diese bitte wie folgt installieren.  | |||
:<code>sudo apt-get install  libhtml-tableextract-perl</code>  | |||
Anschließend ggf. FHEM neu starten.  | |||
Nun sollte sich mit folgendem Befehl das Modul nutzen.  | |||
:<code>define <Name> DBPlan <Interval for refresh in seconds></code>  | |||
== Attribute ==  | |||
*attr DB_Test dbplan_departure -> place of departure   | |||
*attr DB_Test dbplan_destination -> place of destination  | |||
*dbplan_journey_prod -> DB travel products like: ICE  | |||
*dbplan_journey_opt -> DB travel options like: direct connection  | |||
Bitte die Attribute nur über die Fhem Oberfläche setzen. Es können für dbplan_journey_prod und dbplan_journey_opt mehrere Einträge aus den jeweiligen Listen kombiniert werden. Für Abfahrs- und Ankunftsort bitte vorher prüfen, ob diese Orte von www.bahn.de erkannt werden und ggf. anpassen.  | |||
== Readings ==  | |||
*departure_(1..3) -> time of departure  | |||
*arrival_(1..3) -> time of arrival  | |||
*connection_(1..3) -> type of connection  | |||
*departure_delay_(1..3) -> delay time for departure  | |||
*arrival_delay_(1..3) -> delay time for arrival  | |||
*travel_duration_(1..3) -> travel duration time  | |||
*travel_note_(1..3) -> travel note for travel plan  | |||
*travel_note_link_(1..3) -> travel note link for further informations  | |||
*travel_note_text_(1..3) -> travel note text  | |||
*travel_destination_(1..3) -> informations about the destination and the Plattform, if available  | |||
*travel_change_(1..3) -> travel plattform changings  | |||
*travel_price_(1..3) -> travel price in EUR  | |||
Version vom 18. Januar 2016, 23:38 Uhr
| DBPlan | |
|---|---|
| Zweck / Funktion | |
| Abfahrtszeiten Deutsche Bahn | |
| Allgemein | |
| Typ | Inoffiziell | 
| Details | |
| Dokumentation | Thema | 
| Support (Forum) | Unterstützende Dienste | 
| Modulname | 98_DBPlan.pm | 
| Ersteller | JoWiemann (Forum ) | 
| Wichtig: sofern vorhanden, gilt im Zweifel immer die (englische) Beschreibung in der commandref! | |
Das Modul holt von der Infoseite der DB aktuelle Informationen zu einer angegeben Verbindung.
Einbinden in FHEM
Fhem benötigt zunächst die perl Module aus dem 98_DBPlan.pm: Fahrplaninformation der DB . Des Weiteren wird das perl Modul HTML:Table Extract benötigt, diese bitte wie folgt installieren.
sudo apt-get install libhtml-tableextract-perl
Anschließend ggf. FHEM neu starten.
Nun sollte sich mit folgendem Befehl das Modul nutzen.
define <Name> DBPlan <Interval for refresh in seconds>
Attribute
- attr DB_Test dbplan_departure -> place of departure
 - attr DB_Test dbplan_destination -> place of destination
 - dbplan_journey_prod -> DB travel products like: ICE
 - dbplan_journey_opt -> DB travel options like: direct connection
 
Bitte die Attribute nur über die Fhem Oberfläche setzen. Es können für dbplan_journey_prod und dbplan_journey_opt mehrere Einträge aus den jeweiligen Listen kombiniert werden. Für Abfahrs- und Ankunftsort bitte vorher prüfen, ob diese Orte von www.bahn.de erkannt werden und ggf. anpassen.
Readings
- departure_(1..3) -> time of departure
 - arrival_(1..3) -> time of arrival
 - connection_(1..3) -> type of connection
 - departure_delay_(1..3) -> delay time for departure
 - arrival_delay_(1..3) -> delay time for arrival
 - travel_duration_(1..3) -> travel duration time
 - travel_note_(1..3) -> travel note for travel plan
 - travel_note_link_(1..3) -> travel note link for further informations
 - travel_note_text_(1..3) -> travel note text
 - travel_destination_(1..3) -> informations about the destination and the Plattform, if available
 - travel_change_(1..3) -> travel plattform changings
 - travel_price_(1..3) -> travel price in EUR