Dashticz - Module - Public Transport

Dashticz, alternative dashboard based on HTML, CSS, jQuery

Moderators: htilburgs, robgeerts

User avatar
robgeerts
Posts: 1135
Joined: Saturday 24 January 2015 23:12
Target OS: NAS (Synology & others)
Domoticz version: 3.7067
Location: Son, NL
Contact:

Dashticz - Module - Public Transport

Post by robgeerts » Monday 15 May 2017 23:00

First of all, thanks to @ultrara1n who started to build this module just the way the calendar- and trashmodule is coded too :)
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 };
9292.nl:
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 };
Mobiliteit.lu:
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!
Creator of Dashticz, Do you appreciate my work and want to buy me a beer? You can send Bitcoins to 17Qy4bsLM9J238fCZt5kaRc2bD5S1Aw6og or donate via PayPal: https://www.paypal.me/robgeerts

User avatar
robgeerts
Posts: 1135
Joined: Saturday 24 January 2015 23:12
Target OS: NAS (Synology & others)
Domoticz version: 3.7067
Location: Son, NL
Contact:

Re: Dashticz - Module - Public Transport

Post by robgeerts » Tuesday 16 May 2017 9:51

In latest beta, NS is working too!
Creator of Dashticz, Do you appreciate my work and want to buy me a beer? You can send Bitcoins to 17Qy4bsLM9J238fCZt5kaRc2bD5S1Aw6og or donate via PayPal: https://www.paypal.me/robgeerts

User avatar
EdwinK
Posts: 912
Joined: Sunday 22 January 2017 22:46
Target OS: Raspberry Pi
Domoticz version: BETA
Location: Rhoon
Contact:

Re: Dashticz - Module - Public Transport

Post by EdwinK » Tuesday 16 May 2017 10:21

Thanks again. I don't really need it, but it's good to see it can be placed

Don't know if you can use this, but this is a dataset of RET Rotterdam.

http://rotterdamopendata.nl/dataset/ret

There are more API's to be found from parking garages in Rotterdam (and maybe even other cities)
Last edited by EdwinK on Tuesday 16 May 2017 11:32, edited 2 times in total.
Running latest BETA on a Pi-3 | Toon Thermostat | RFxcom | Dashticz V2 |

qwerk
Posts: 271
Joined: Tuesday 22 July 2014 7:21
Target OS: Raspberry Pi
Domoticz version: beta
Location: Netherlands
Contact:

Re: Dashticz - Module - Public Transport

Post by qwerk » Tuesday 16 May 2017 10:27

real nice, Dashticz is getting better and better, I have the stations I need.
Will there be a possibility for title? ( For I have multiple stations in view)
And is the bus also coming ??

Rob , keep up the good work.

User avatar
robgeerts
Posts: 1135
Joined: Saturday 24 January 2015 23:12
Target OS: NAS (Synology & others)
Domoticz version: 3.7067
Location: Son, NL
Contact:

Re: Dashticz - Module - Public Transport

Post by robgeerts » Tuesday 16 May 2017 11:22

I was already looking into a timetable for buses.
I could use the 9292.nl-API..
Creator of Dashticz, Do you appreciate my work and want to buy me a beer? You can send Bitcoins to 17Qy4bsLM9J238fCZt5kaRc2bD5S1Aw6og or donate via PayPal: https://www.paypal.me/robgeerts

User avatar
robgeerts
Posts: 1135
Joined: Saturday 24 January 2015 23:12
Target OS: NAS (Synology & others)
Domoticz version: 3.7067
Location: Son, NL
Contact:

Re: Dashticz - Module - Public Transport

Post by robgeerts » Tuesday 16 May 2017 12:40

Check latest beta :)
And first post of this topic for the configuration ;)
Creator of Dashticz, Do you appreciate my work and want to buy me a beer? You can send Bitcoins to 17Qy4bsLM9J238fCZt5kaRc2bD5S1Aw6og or donate via PayPal: https://www.paypal.me/robgeerts

qwerk
Posts: 271
Joined: Tuesday 22 July 2014 7:21
Target OS: Raspberry Pi
Domoticz version: beta
Location: Netherlands
Contact:

Re: Dashticz - Module - Public Transport

Post by qwerk » Tuesday 16 May 2017 13:15

that was quick ( as always)
do you use the word "station" in the script?
I would like to use the nearest busstop,

normally you would give station-village station-arnhem
but now I would like to be able to http://9292.nl/andelst/bushalte-wilhelminastraat

Is that do-able?

goodluck.....

User avatar
robgeerts
Posts: 1135
Joined: Saturday 24 January 2015 23:12
Target OS: NAS (Synology & others)
Domoticz version: 3.7067
Location: Son, NL
Contact:

Re: Dashticz - Module - Public Transport

Post by robgeerts » Tuesday 16 May 2017 13:16

Yes, use:

Code: Select all

var publictransport = {}
publictransport.ovinfobus= { station: 'andelst/bushalte-wilhelminastraat', provider: '9292-bus', icon: 'bus', results: 5 };
Creator of Dashticz, Do you appreciate my work and want to buy me a beer? You can send Bitcoins to 17Qy4bsLM9J238fCZt5kaRc2bD5S1Aw6og or donate via PayPal: https://www.paypal.me/robgeerts

qwerk
Posts: 271
Joined: Tuesday 22 July 2014 7:21
Target OS: Raspberry Pi
Domoticz version: beta
Location: Netherlands
Contact:

Re: Dashticz - Module - Public Transport

Post by qwerk » Tuesday 16 May 2017 13:24

I get nothing anymore ( transportation) herokuapp issues?
exception
:
{type: "System.Web.HttpException", message: "Not Found"}
message
:
"Not Found"
type
:
"System.Web.HttpException"

User avatar
robgeerts
Posts: 1135
Joined: Saturday 24 January 2015 23:12
Target OS: NAS (Synology & others)
Domoticz version: 3.7067
Location: Son, NL
Contact:

Re: Dashticz - Module - Public Transport

Post by robgeerts » Tuesday 16 May 2017 13:30

qwerk wrote: Will there be a possibility for title? ( For I have multiple stations in view)
Title now possible (see startpost for example config)
Download latest beta!
Creator of Dashticz, Do you appreciate my work and want to buy me a beer? You can send Bitcoins to 17Qy4bsLM9J238fCZt5kaRc2bD5S1Aw6og or donate via PayPal: https://www.paypal.me/robgeerts

vgr2
Posts: 89
Joined: Monday 29 August 2016 12:02
Target OS: -
Domoticz version:
Contact:

Re: Dashticz - Module - Public Transport

Post by vgr2 » Tuesday 16 May 2017 16:01

Hi rob, with some of your last update multiple stations did not work correctly in showing the time at the 5 results. First station looks fine, second and more station only the last result is correct. 1-4 results are not updated. Can You check this please?

qwerk
Posts: 271
Joined: Tuesday 22 July 2014 7:21
Target OS: Raspberry Pi
Domoticz version: beta
Location: Netherlands
Contact:

Re: Dashticz - Module - Public Transport

Post by qwerk » Tuesday 16 May 2017 16:56

My bus and train stations all look fine and are updated.

User avatar
robgeerts
Posts: 1135
Joined: Saturday 24 January 2015 23:12
Target OS: NAS (Synology & others)
Domoticz version: 3.7067
Location: Son, NL
Contact:

Re: Dashticz - Module - Public Transport

Post by robgeerts » Tuesday 16 May 2017 16:57

Mine are updated too..
Creator of Dashticz, Do you appreciate my work and want to buy me a beer? You can send Bitcoins to 17Qy4bsLM9J238fCZt5kaRc2bD5S1Aw6og or donate via PayPal: https://www.paypal.me/robgeerts

User avatar
blacksn0w
Posts: 111
Joined: Friday 10 March 2017 23:27
Target OS: Raspberry Pi
Domoticz version: Beta
Location: Germany
Contact:

Re: Dashticz - Module - Public Transport

Post by blacksn0w » Tuesday 16 May 2017 18:15

What are about the "loading..." text, why not updating it silent in the background instead of creating this visual distraction?
This post was made with ♥ in Cologne. Raspberry Pi 3B (with SSD), Aeotec Z-Stick Gen5, RFLink R48, MiHome

vgr2
Posts: 89
Joined: Monday 29 August 2016 12:02
Target OS: -
Domoticz version:
Contact:

Re: Dashticz - Module - Public Transport

Post by vgr2 » Tuesday 16 May 2017 18:17

That's my. Only first station is ok.
Attachments
Unbenannt.JPG
Unbenannt.JPG (47.23 KiB) Viewed 1700 times

User avatar
robgeerts
Posts: 1135
Joined: Saturday 24 January 2015 23:12
Target OS: NAS (Synology & others)
Domoticz version: 3.7067
Location: Son, NL
Contact:

Re: Dashticz - Module - Public Transport

Post by robgeerts » Tuesday 16 May 2017 18:18

Could you send me your config?
Creator of Dashticz, Do you appreciate my work and want to buy me a beer? You can send Bitcoins to 17Qy4bsLM9J238fCZt5kaRc2bD5S1Aw6og or donate via PayPal: https://www.paypal.me/robgeerts

vgr2
Posts: 89
Joined: Monday 29 August 2016 12:02
Target OS: -
Domoticz version:
Contact:

Re: Dashticz - Module - Public Transport

Post by vgr2 » Tuesday 16 May 2017 18:27

I had send you my config by PN

User avatar
robgeerts
Posts: 1135
Joined: Saturday 24 January 2015 23:12
Target OS: NAS (Synology & others)
Domoticz version: 3.7067
Location: Son, NL
Contact:

Re: Dashticz - Module - Public Transport

Post by robgeerts » Tuesday 16 May 2017 20:43

vgr2 wrote:I had send you my config by PN
Thansk, could you test latest beta version?
blacksn0w wrote:What are about the "loading..." text, why not updating it silent in the background instead of creating this visual distraction?
Fixed in latest beta version!
Creator of Dashticz, Do you appreciate my work and want to buy me a beer? You can send Bitcoins to 17Qy4bsLM9J238fCZt5kaRc2bD5S1Aw6og or donate via PayPal: https://www.paypal.me/robgeerts

freakshock
Posts: 55
Joined: Friday 14 April 2017 13:39
Target OS: NAS (Synology & others)
Domoticz version:
Location: The Netherlands
Contact:

Re: Dashticz - Module - Public Transport

Post by freakshock » Tuesday 16 May 2017 21:06

Idea for a configurable feature for this module:
How about making it possible to exclude results between the current time and the first departure time listed?

For instance: I have added my local trainstation near my house. It takes at least 15 minutes from my house to get there. It would be nice to be able to exclude results that show the trains leaving from the current time +15 minutes.

If I don't have this feature I have to make my list really long :lol:

vgr2
Posts: 89
Joined: Monday 29 August 2016 12:02
Target OS: -
Domoticz version:
Contact:

Re: Dashticz - Module - Public Transport

Post by vgr2 » Tuesday 16 May 2017 21:36

Now it's perfect,

Is there a possibility for me to change the font size?

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests