public transport destination doesn't work

Dashticz, alternative dashboard based on HTML, CSS, jQuery

Moderators: leecollings, htilburgs, robgeerts

Post Reply
NilsNijenhuis
Posts: 81
Joined: Friday 10 July 2020 22:56
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

public transport destination doesn't work

Post by NilsNijenhuis »

I want to display the train deventer colmschate -> Deventer
if i remove the line destination i get al te trains in both directions.
if i use destination it is blanc, what am i doing wrong?

Code: Select all

var publictransport = {}

publictransport.ovinfotrain_deventer= {
  station: 'station-deventer-colmschate',
  destination: 'station-deventer',
  title:'Colmschate -> Deventer',
  show_via: 'true',
  show_lastupdate:true,
  provider: '9292-train',
  icon: 'fas fa-train',
  results: 5
};
http://api.9292.nl/0.1/locations?lang=nl-NL&q=deventer
gives me :
{
"locations": [
{
"id": "station-deventer",
"type": "station",
"stationId": "dv",
"stationType": "Station",
"name": "Deventer",
"place": {
"name": "Deventer",
"regionCode": "OV",
"regionName": "Overijssel",
"showRegion": false,
"countryCode": "NL",
"countryName": "Nederland",
"showCountry": false
},
"latLong": {
"lat": 52.257079,
"long": 6.160821
},
"urls": {
"nl-NL": "/station-deventer",
"en-GB": "/en/station-deventer"
}
},
Last edited by NilsNijenhuis on Friday 28 August 2020 18:39, edited 2 times in total.
User avatar
HansieNL
Posts: 957
Joined: Monday 28 September 2015 15:13
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: public transport destination doesn't work

Post by HansieNL »

Look like stations-deventer is not a valid id. Can you try with station-deventer as destination?
Blah blah blah
NilsNijenhuis
Posts: 81
Joined: Friday 10 July 2020 22:56
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: public transport destination doesn't work

Post by NilsNijenhuis »

i tried everything below and nothing works
station-deventer
stations-deventer
station deventer
BoelShit
Posts: 10
Joined: Sunday 14 February 2016 11:18
Target OS: Windows
Domoticz version:
Contact:

Re: public transport destination doesn't work

Post by BoelShit »

I think I recall destination is set by using the name tag. So try 'Deventer'.
NilsNijenhuis
Posts: 81
Joined: Friday 10 July 2020 22:56
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: public transport destination doesn't work

Post by NilsNijenhuis »

nope, also the name tag "deventer' doesn't work… :(

does anyone know how to retrieve the correct destination name?
Jimster
Posts: 82
Joined: Tuesday 04 February 2020 11:42
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: The Netherlands
Contact:

Re: public transport destination doesn't work

Post by Jimster »

The destination name needs to be exact the name as shown in Dashticz. So it should be destination: 'Deventer',
I tried it and it works.
lholwerda
Posts: 3
Joined: Saturday 28 November 2020 1:33
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: public transport destination doesn't work

Post by lholwerda »

var publictransport = {}
publictransport.ovinfo = {
show_via: true,
station: 'berkel-en-rodenrijs/metrostation-berkel-westpolder',
destination:'rotterdam',
title:'metro berkel',
provider: '9292-metro',
show_lastupdate:true,
icon: 'fas fa-subway',
width:12,
results: 4
};

I have excactly the sam issue. anybody know the answer?
BoelShit
Posts: 10
Joined: Sunday 14 February 2016 11:18
Target OS: Windows
Domoticz version:
Contact:

Re: public transport destination doesn't work

Post by BoelShit »

Looking at the data (http://api.9292.nl/0.1/locations/berkel ... lang=nl-NL), the destination 'rotterdam' can't be found.
Try 'Slinge' or 'Den Haag Centraal'.

A generic tip for everyone for public transport, the destination is in 99% cases, the destinationname shown on the bus/tram/metro.
NilsNijenhuis
Posts: 81
Joined: Friday 10 July 2020 22:56
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: public transport destination doesn't work

Post by NilsNijenhuis »

Jimster wrote: Wednesday 02 September 2020 22:42 The destination name needs to be exact the name as shown in Dashticz. So it should be destination: 'Deventer',
I tried it and it works.
Thanks!!!! so a capitole D makes the difference :o
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest