Dashticz - Module - Public Transport

Dashticz, alternative dashboard based on HTML, CSS, jQuery

Moderators: leecollings, htilburgs, robgeerts

robgeerts
Posts: 1273
Joined: Saturday 24 January 2015 22:12
Target OS: NAS (Synology & others)
Domoticz version: 3.7067
Location: NL
Contact:

Re: Dashticz - Module - Public Transport

Post by robgeerts »

Added NMBS (Belgium) in latest beta! (Thanks to ericvb)
Try:

Code: Select all

publictransport.mol={station:'Mol',title:'Station Mol',show_lastupdate:true,provider:'irailbe',icon:'train',interval:15,width:7,results:5};
Dlanor
Posts: 67
Joined: Sunday 22 March 2015 16:18
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Dashticz - Module - Public Transport

Post by Dlanor »

Anyone a idea how get rid of the Lijn null?
Knipsel.PNG
Knipsel.PNG (16.93 KiB) Viewed 3290 times

Code: Select all

var publictransport = {}
publictransport.ovinfotrain = { show_via: true, station: 'station-den-haag-ypenburg', title:'NS-Ypenburg', provider: '9292-train', show_lastupdate:true, icon: 'train', width: 5, results: 6 };
Domoticz| Zigbee | SONOFF
amauryverschooren
Posts: 8
Joined: Friday 31 August 2018 19:16
Target OS: Linux
Domoticz version:
Contact:

Re: Dashticz - Module - Public Transport

Post by amauryverschooren »

robgeerts wrote: 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!
hello Rob, is there also a version for in Belgium?
Recky
Posts: 9
Joined: Monday 30 July 2018 7:05
Target OS: Linux
Domoticz version: Latest
Location: Netherlands
Contact:

Re: Dashticz - Module - Public Transport

Post by Recky »

I have a request. Could you add the option to show the balance of the (anonymous) OV card? I'll crosspost this to the official request threat also. Thanks!

https://www.ov-chipkaart.nl/saldo-terug ... hecker.htm#/
User avatar
rolandbreedveld
Posts: 156
Joined: Wednesday 09 March 2016 11:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Contact:

Re: Dashticz - Module - Public Transport

Post by rolandbreedveld »

Is it possible for publictransport.ovinfobus to filter on destination, half of the info is not relevant for me, while the bus is driving the wrong direction.
Raspberry Pi(SSD)+UPS HAT,Dashticz on WallTablet,HomeBridge, P1, HarmonyHub,FritzBox,API to 123Solar+ABB-PowerOne+SMA,ESP-Leds(flashed LSC),Tasmota,Shelly,MQTT,Mosquito,Node-Red,http://wiki.breedveld.net/index.php?title=RPiWaterMeter, Mercedes-Me
Jimster
Posts: 82
Joined: Tuesday 04 February 2020 11:42
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: The Netherlands
Contact:

Re: Dashticz - Module - Public Transport

Post by Jimster »

rolandbreedveld wrote: Friday 21 February 2020 17:56 Is it possible for publictransport.ovinfobus to filter on destination, half of the info is not relevant for me, while the bus is driving the wrong direction.
Yes, you can use destination: 'Name of destination' to filter the destinations.
See https://dashticz.readthedocs.io/en/mast ... sport.html
User avatar
rolandbreedveld
Posts: 156
Joined: Wednesday 09 March 2016 11:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Contact:

Re: Dashticz - Module - Public Transport

Post by rolandbreedveld »

@Jimster, thanxzzz,
I works partly, I can't get "Rotterdam Zuidplein" as destination, what do I wrong:
publictransport.ovinfobus = { show_via: false, station: 'hendrik-ido-ambacht/bushalte-de-heerlijkheid', destination: 'Ridderkerk,Rotterdam Zuidplein', provider: '9292-bus', width: 6, results: 5 };
"Ridderkerk" works! but "Rotterdam Zuidplein" not, if I do without destination, I get :
"12:41 +3 - Lijn 392 - Rotterdam Zuidplein"
Should expect it working, I tried "Rotterdam", "Zuidplein", "Rotterdam Bushalte Zuidplein", "rotterdam/bushalte-zuidplein", and more combinations, but no result

This comes from the api:
{
"id": "rotterdam/bushalte-zuidplein",
"type": "stop",
"stopType": "Bushalte",
"name": "Zuidplein",
"place": {
"name": "Rotterdam",
"regionCode": "ZH",
"regionName": "Zuid-Holland",
"showRegion": false,
"countryCode": "NL",
"countryName": "Nederland",
"showCountry": false
},
"latLong": {
"lat": 51.886946,
"long": 4.488258
},
"urls": {
"nl-NL": "/rotterdam/bushalte-zuidplein",
"en-GB": "/en/rotterdam/bushalte-zuidplein"
}
},
Raspberry Pi(SSD)+UPS HAT,Dashticz on WallTablet,HomeBridge, P1, HarmonyHub,FritzBox,API to 123Solar+ABB-PowerOne+SMA,ESP-Leds(flashed LSC),Tasmota,Shelly,MQTT,Mosquito,Node-Red,http://wiki.breedveld.net/index.php?title=RPiWaterMeter, Mercedes-Me
Jimster
Posts: 82
Joined: Tuesday 04 February 2020 11:42
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: The Netherlands
Contact:

Re: Dashticz - Module - Public Transport

Post by Jimster »

Problably is 'Rotterdam Zuidplein' not the full name of that destination. Set show_via to true to see the full name. Then you can use the full name.
User avatar
rolandbreedveld
Posts: 156
Joined: Wednesday 09 March 2016 11:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Contact:

Re: Dashticz - Module - Public Transport

Post by rolandbreedveld »

Jimster wrote: Saturday 22 February 2020 16:42 Problably is 'Rotterdam Zuidplein' not the full name of that destination. Set show_via to true to see the full name. Then you can use the full name.
Yes, thanxz that did the trick it was "Rotterdam Zuidplein via Lombardijen"
Raspberry Pi(SSD)+UPS HAT,Dashticz on WallTablet,HomeBridge, P1, HarmonyHub,FritzBox,API to 123Solar+ABB-PowerOne+SMA,ESP-Leds(flashed LSC),Tasmota,Shelly,MQTT,Mosquito,Node-Red,http://wiki.breedveld.net/index.php?title=RPiWaterMeter, Mercedes-Me
Omemanti
Posts: 6
Joined: Saturday 06 October 2018 13:24
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz - Module - Public Transport

Post by Omemanti »

For a couple of weeks, my public transport as well as the garbage module stopped getting data.

it worked for months without a hassle. (I didn't update anything on domotics, only Linux updates)

anyone else got this issue?
Lokonli
Posts: 2287
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz - Module - Public Transport

Post by Lokonli »

Both modules make use of PHP functionality. Maybe one of the required PHP libraries is not installed correctly.


Sent from my SM-A320FL using Tapatalk

User avatar
HansieNL
Posts: 964
Joined: Monday 28 September 2015 15:13
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz - Module - Public Transport

Post by HansieNL »

Publictransport block will not load at the moment. Only the message “Loading” is shown.
Are there more people with this error at this moment?
Blah blah blah
JeroenG
Posts: 27
Joined: Monday 06 January 2020 20:57
Target OS: Raspberry Pi / ODroid
Domoticz version: 20231
Contact:

Re: Dashticz - Module - Public Transport

Post by JeroenG »

Hansie,

same here for bus and train since few days.
Jimster
Posts: 82
Joined: Tuesday 04 February 2020 11:42
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: The Netherlands
Contact:

Re: Dashticz - Module - Public Transport

Post by Jimster »

HansieNL wrote: Thursday 06 January 2022 18:58 Publictransport block will not load at the moment. Only the message “Loading” is shown.
Are there more people with this error at this moment?
Yes, me too, seems like since the beginning of the year.
I think 9292 took their API down. The URL gives an 404 :(
http://api.9292.nl/0.1/locations?lang=nl-NL&q=

I hope there is an alternative :roll:
Seems like everyone needs to request for access to their API:
https://9292.nl/zakelijk/9292-reisadvies-api

Maybe OvAPI is an alternative: https://github.com/skywave/KV78Turbo-OVAPI/wiki
Or NDOV https://ndovloket.nl/
Doudy
Posts: 246
Joined: Tuesday 09 August 2016 9:09
Target OS: -
Domoticz version:
Contact:

Re: Dashticz - Module - Public Transport

Post by Doudy »

Hello,
To Robgeerts,
robgeerts wrote: Wednesday 02 May 2018 9:16 Added NMBS (Belgium) in latest beta! (Thanks to ericvb)
Try:

Code: Select all

publictransport.mol={station:'Mol',title:'Station Mol',show_lastupdate:true,provider:'irailbe',icon:'train',interval:15,width:7,results:5};
Hello,
Is it possible to also provide information in French?
E.g.: spoor = voie
Bergen = Mons
Charleroi-Zuid = Charleroi-Sud
etc...
Thank you
;)
RaspberryPi - RFLink - Zwave - WH2600
Domoticz : 2020.2 | Dashticz : V3.12 Master | dzvents : 3.0.2 | Python : 3.7.3
Lokonli
Posts: 2287
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz - Module - Public Transport

Post by Lokonli »

Doudy wrote: Monday 21 February 2022 10:42 Hello,
To Robgeerts,
robgeerts wrote: Wednesday 02 May 2018 9:16 Added NMBS (Belgium) in latest beta! (Thanks to ericvb)
Try:

Code: Select all

publictransport.mol={station:'Mol',title:'Station Mol',show_lastupdate:true,provider:'irailbe',icon:'train',interval:15,width:7,results:5};
Hello,
Is it possible to also provide information in French?
E.g.: spoor = voie
Bergen = Mons
Charleroi-Zuid = Charleroi-Sud
etc...
Thank you
;)
The irail.be API supports other languages as well (ne, en, de, fr)

It's not too difficult to add a language block parameter (which could get a default value derived from the Dashticz language setting).
Lokonli
Posts: 2287
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz - Module - Public Transport

Post by Lokonli »

Doudy wrote: Monday 21 February 2022 10:42 Hello,
To Robgeerts,
robgeerts wrote: Wednesday 02 May 2018 9:16 Added NMBS (Belgium) in latest beta! (Thanks to ericvb)
Try:

Code: Select all

publictransport.mol={station:'Mol',title:'Station Mol',show_lastupdate:true,provider:'irailbe',icon:'train',interval:15,width:7,results:5};
Hello,
Is it possible to also provide information in French?
E.g.: spoor = voie
Bergen = Mons
Charleroi-Zuid = Charleroi-Sud
etc...
Thank you
;)
Implemented in latest beta (3.9.2)
Doudy
Posts: 246
Joined: Tuesday 09 August 2016 9:09
Target OS: -
Domoticz version:
Contact:

Re: Dashticz - Module - Public Transport

Post by Doudy »

👍

Thank you. 'Spoor' is not translated!

;)
RaspberryPi - RFLink - Zwave - WH2600
Domoticz : 2020.2 | Dashticz : V3.12 Master | dzvents : 3.0.2 | Python : 3.7.3
Lokonli
Posts: 2287
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz - Module - Public Transport

Post by Lokonli »

Doudy wrote: Monday 28 February 2022 7:59 👍

Thank you. 'Spoor' is not translated!

;)
Should work now...
(it will follow the Dashticz language setting, not the block parameter)
Beschuitje
Posts: 32
Joined: Saturday 24 February 2018 12:07
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz - Module - Public Transport

Post by Beschuitje »

If not posted in the right topic, a request to the moderator to show me in the right direction?

Rediscovering Dashticz and setting up a new dashboard for the last couple of days. Using 3.10.1 beta.

Having problems however with the public tranport block. I am wrestling with it for a few days now but cannot get it solved.
Is there a problem perhaps with 'ovapi'?
I am getting "loading' result;
Lijn 53.png
Lijn 53.png (34.8 KiB) Viewed 2009 times

Code: Select all

blocks['ovapi'] = {
tpc: '09542',
title: 'Lijn 53 Diemen Zuid - Centraal Station',
show_lastupdate: true,
provider: 'ovapi',
show_via: true,
icon: 'fas fa-subway',
interval: '120',
newindow: '1',
results: 5,
width: 6
 

tpc code is for GVB lines 50 and 53 at station 'Diemen Zuid'
09542.png
09542.png (68.77 KiB) Viewed 2009 times

When i load 'treinen' for station Diemen Zuid it works perfectly.
Is this because ovapi is not working correct or am i doing something wrong?
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 1 guest