
In latest beta it is possible to show the timetable of the public transport company VVS (Germany) AND NS (Netherlands) with live data.
VVS:
To call the function properly, you will need the correct station id from: https://efa-api.asw.io/api/v1/station/
So for Stuttgart Central Station the station id is 5006118
Then add this to config.js:
Code: Select all
var publictransport = {}
publictransport.hbf= { show_via: true, station: '5006118', title:'Trains', show_lastupdate:true, provider: 'VVS', icon: 'train', interval: 15, results: 5 };
First get the station id from http://api.9292.nl/0.1/locations?lang=nl-NL&q=eindhoven
(Change eindhoven to your own search parameter).
Then copy the id!
Code: Select all
//example station id: station-eindhoven
var publictransport = {}
publictransport.ovinfo= { show_via: true, station: 'station-eindhoven', title:'OV Info', show_lastupdate:true, provider: '9292', icon: 'train', results: 5 };
publictransport.ovinfotrain= { show_via: true, station: 'station-eindhoven', title:'Bus', show_lastupdate:true, provider: '9292-bus', icon: 'bus', results: 5 };
publictransport.ovinfobus= { show_via: true, station: 'station-eindhoven', title:'Trein', show_lastupdate:true, provider: '9292-train', icon: 'train', results: 5 };
To call the function properly, you will need the correct station name, for example:
Luxembourg/Centre, Royal
Then add this to config.js:
Code: Select all
var publictransport = {}
publictransport.ovinfobus = { key:'ovinfobus', show_via: false, station: 'Luxembourg/Centre, Royal', provider: 'mobiliteit',title:'Royal Stop',show_lastupdate:true, icon: 'bus', width:6, results: 4}
icon is simply font-awesome without fa, interval = time in seconds for refreshing the data, and results = number of shown results. Also possible is to customize the width, but i would not change the value of 12 because of the size of the output.
If anyone can provide JSON-output from other transport companies, please send me a message and I will add these!