• Our booking engine at tickets.railforums.co.uk (powered by TrainSplit) helps support the running of the forum with every ticket purchase! Find out more and ask any questions/give us feedback in this thread!

RealTimeTrains website

Tom

Member
Joined
19 Jan 2008
Messages
556
Location
35,000ft
@Tom is there somewhere I can message to tell you the up to date details for the unit drawing liveries? Well over 50% of Transport for Wales’ fleet have the wrong livery on the little pictures, and a handful of SWR as well. I can inform on which units need updating :) About thirty units are yet to be updated.
As with every time this is asked ;), contact feedback@, the details are on the website.
Also, are there any plans for Southeastern services to join other operators in diagrams having the specific units involved revealed on the day? SWR services have this feature, including their 450/455/458/707 diagrams, which suggests the difficulty of a variety of rolling stock types on a multitude of different diagrams can be overcome.
Highly unlikely.
Does VCN mean a service has been cancelled?
Yes (most of the time). a CAN service can still in theory operate which happens a few times a day.
 
Sponsor Post - registered members do not see these adverts; click here to register, or click here to log in
R

RailUK Forums

martin2345uk

Established Member
Joined
21 Sep 2011
Messages
2,056
Location
Essex
Just noticed RTT is now showing most Freight headcodes without scrambling them... not quite all yet, but this is great!

As a further question, what makes some services just say Freight (FRGT) in the headcode column?
 
Last edited:

Tom

Member
Joined
19 Jan 2008
Messages
556
Location
35,000ft
As mentioned in another thread, there is a new open data feeds platform that has gone live to a selected group. This has essentially no obfuscation at the real-time level: however this still applies at the schedule level and headcodes are not available at that point. RTT transitioned to this feed overnight.

There are other services that have access to, and make use of, another data feed that has the full completeness of the schedules - and some have been for a long time. RTT does have access to such feed but in the interests of keeping it relatively level for everyone else we're keeping the obfuscated feed in place. (And yes, I realise that's a bit hypocritical given the rolling stock consist thing but you work with what you've got within the contractual and legal bounds in which you're permitted to do.)
 

ainsworth74

Forum Staff
Staff Member
Global Moderator
Joined
16 Nov 2009
Messages
27,686
Location
Redcar
As mentioned in another thread, there is a new open data feeds platform that has gone live to a selected group. This has essentially no obfuscation at the real-time level: however this still applies at the schedule level and headcodes are not available at that point. RTT transitioned to this feed overnight.
Ah so would this be why the services which are running have the proper headcodes but ones which haven't been activated are still showing as FRGT? For instance looking around here today we have this one which is running and is showing a headcode:


Whilst this one which isn't is just showing as FRGT:


Either way massive improvement so well done to any and all that made it happen!
 

Class 466

Established Member
Joined
5 Mar 2010
Messages
1,426
As mentioned in another thread, there is a new open data feeds platform that has gone live to a selected group. This has essentially no obfuscation at the real-time level: however this still applies at the schedule level and headcodes are not available at that point. RTT transitioned to this feed overnight.

There are other services that have access to, and make use of, another data feed that has the full completeness of the schedules - and some have been for a long time. RTT does have access to such feed but in the interests of keeping it relatively level for everyone else we're keeping the obfuscated feed in place. (And yes, I realise that's a bit hypocritical given the rolling stock consist thing but you work with what you've got within the contractual and legal bounds in which you're permitted to do.)
I’m just glad that the industry has finally seen sense and realised that the public knowing a headcode isn’t some form of security risk.

(Unlike pretending a train has sparks coming from it just to get a better photo :D)
 

Tom

Member
Joined
19 Jan 2008
Messages
556
Location
35,000ft
Oh OK. What else was removed other than that then?
Train category, status, service code (oddly only on one version of the feed, but now on both on the new platform) and headcode from scheduling. On the real-time side the sector ID and a couple of other fields in there were removed from TRUST messages. TD obviously just the headcode got scrambled.

(Amusingly the location on my profile is actually pretty accurate for once.)
 

trainmania100

Established Member
Joined
8 Nov 2015
Messages
2,567
Location
Newhaven
I suspect now that the data is becoming a lot more open, freightlocate will presumably be seeing a drop in subscriptions

@Tom do you know if nrod CIF timetables are also being unredacted in the new service or if that remains disclosed until activation?
 
Last edited:

Tom

Member
Joined
19 Jan 2008
Messages
556
Location
35,000ft
Even now, the operator doesn't seem to show up - it just says "ZZ"
The two character TOC codes are a passenger side invention, ZZ is inserted for any TOC/FOC that doesn’t have a code. This is the case for everyone.
From that point Rail Record is far more informative than RTT
I have little interest in tracking all the train service codes (unless it can be done automatically, and more importantly reliably) to get the train operators out of it.
@Tom do you know if nrod CIF timetables are also being unredacted in the new service or if that remains disclosed until activation?
They remain redacted. I have asked what the point in that is when it goes clear at call time.
So just to clarify one way or the other, will real freight headcodes be freely available with these new data feeds?
At the moment, any train that calls (activates) will have its headcode available.
 

Chiltern006

Member
Joined
3 Oct 2018
Messages
658
Tom, wierd one but say you were doing West Midlands Railway for KYT, would you also need LNWR as they are both operated by West Midlands Trains. Similar for GTR when it comes to southern. Essentially can you have one brand from a bigger company and not another?

cheeky i know, but which TOC is next for KYT? :D
 

anamyd

On Moderation
Joined
17 Aug 2018
Messages
3,011
RTT is a great site that I appreciate a lot and have found very useful, but I'd like there to be a way for it to remember that I always search in detailed mode and that I always want to see all day (as defaults that are saved in some way, as I could specify otherwise). It's a little frustrating having to enable detailed mode and change the when? field to all day nearly every time I go to a station page.

Also, it would be good if pages (especially service schedule pages) automatically updated in real time without having to be refreshed, which would make more sense for a real time information site.
 

35B

Established Member
Joined
19 Dec 2011
Messages
2,295
RTT is a great site that I appreciate a lot and have found very useful, but I'd like there to be a way for it to remember that I always search in detailed mode and that I always want to see all day (as defaults that are saved in some way, as I could specify otherwise). It's a little frustrating having to enable detailed mode and change the when? field to all day nearly every time I go to a station page.

Also, it would be good if pages (especially service schedule pages) automatically updated in real time without having to be refreshed, which would make more sense for a real time information site.
I have some key searches saved as favourites.
 

XAM2175

Established Member
Joined
8 Jun 2016
Messages
3,469
Location
Glasgow
I'd like there to be a way for it to remember that I always search in detailed mode and that I always want to see all day (as defaults that are saved in some way, as I could specify otherwise). It's a little frustrating having to enable detailed mode and change the when? field to all day nearly every time I go to a station page.
I have some key searches saved as favourites.
Exactly, just save the station pages you use most often as favourites in your browser and those settings will persist because they're specified in the URL for the page.

Also, it would be good if pages (especially service schedule pages) automatically updated in real time without having to be refreshed, which would make more sense for a real time information site.
I suspect that from a server-load perspective this is undesirable.
 

Peter0124

Established Member
Joined
20 Nov 2016
Messages
1,966
Location
Glasgow
I prefer to use 0200-0159 as it'll include midnight trains at the bottom rather than top, does anyone else use it?
 

357

Established Member
Joined
12 Nov 2018
Messages
1,372
I prefer to use 0200-0159 as it'll include midnight trains at the bottom rather than top, does anyone else use it?
Yes, much easier when looking at stuff from an operational perspective
 

Statto

Established Member
Joined
8 Feb 2011
Messages
3,218
Location
At home or at the pub
I prefer to use 0200-0159 as it'll include midnight trains at the bottom rather than top, does anyone else use it?

I always use 0200 to 0159 too, unless i'm looking for a specific time, much easier when most of the network has trains 0000 to 0200, even if they are ECS movements.
 

Peter0124

Established Member
Joined
20 Nov 2016
Messages
1,966
Location
Glasgow
Tom, how do you use the Realtime Trains API in Python? How do I like enter my login details through the Python script so I can retrieve the data? The code below gives an error. Appreciate any help given.
 

Attachments

  • Realtime Trains Code.PNG
    Realtime Trains Code.PNG
    8.6 KB · Views: 67
Last edited:

sftfan1909

Member
Joined
8 Aug 2018
Messages
377
Location
Gloucester
Tom, how do you use the Realtime Trains API in Python? How do I like enter my login details through the Python script so I can retrieve the data? The code below gives an error. Appreciate any help given.
You need something like
Python:
import requests
from requests.auth import HTTPBasicAuth

response = requests.get("https://api.rtt.io/api/v1/json/search/NTN", auth=HTTPBasicAuth(API_USERNAME, API_PASSWORD))
print(response.json())
 

Peter0124

Established Member
Joined
20 Nov 2016
Messages
1,966
Location
Glasgow
And does anyone know if the unit numbers from Know Your Train are available to grab through the API requests?
Or if not then will there ever be any plans to include them? Thanks :D

You need something like
Python:
import requests
from requests.auth import HTTPBasicAuth

response = requests.get("https://api.rtt.io/api/v1/json/search/NTN", auth=HTTPBasicAuth(API_USERNAME, API_PASSWORD))
print(response.json())
Ohh thank you very much!
 
Last edited:

takno

Established Member
Joined
9 Jul 2016
Messages
5,074
I suspect that from a server-load perspective this is undesirable.
Real time updates are potentially a lot cheaper in terms of server-load than having people constantly hit refresh. They are, however, much more difficult to code up reliably, and you can end up having to provide the non-update-based version anyway to improve accessibility
 

Rhysdabeast

Established Member
Joined
10 Apr 2020
Messages
2,609
Location
Crewe
And does anyone know if the unit numbers from Know Your Train are available to grab through the API requests?
Or if not then will there ever be any plans to include them? Thanks :D


Ohh thank you very much!
By default the API runs in simple mode so you won't have access to the data given by Know Your Train. If get in contact with RTT you can get access to the detailed version of the API which might give that data out but I'm not 100% certain.
 

Peter0124

Established Member
Joined
20 Nov 2016
Messages
1,966
Location
Glasgow
By default the API runs in simple mode so you won't have access to the data given by Know Your Train. If get in contact with RTT you can get access to the detailed version of the API which might give that data out but I'm not 100% certain.
Ohh right thank you! I have no idea why it operates in simple mode only to start with considering most people who would use the API I'd imagine will need to ask for detailed mode anyway. I don't even know whether I am on simple or detailed as when I search for services, passenger services and headcodes show up in the JSON but not empty stock services. Because I am fairly certain I have asked for detailed mode in the past.
 

Peter0124

Established Member
Joined
20 Nov 2016
Messages
1,966
Location
Glasgow
Allocations are not in the API for contractual reasons.
Oh, are there any plans to include them in the future? Sorry I keep asking so much but I also requested detailed mode today via email so hopefully you are able to have a look when possible :D

Sorry, I am just so desperate to start working with it and make a project, as terminating services aswell as ECS moves aren't showing in the JSON.
 
Last edited:

Top