Trainspotting with Node-RED

As my IoT Club is currently suspended, due to the Covid pandemic, I've written this tutorial so my students (who own a Raspberry Pi) can try out a Node-RED project at home. No extra hardware is needed.

The project should be a lot of fun as it involves extracting information from Network Rail's data-stream and displaying this information using a debug node. Adventurous students could extend it to the Dashboard.

Please note:
This tutorial has been written for my students based in the UK who have access to Network Rail's website.
Students based outside the UK will have to check if their rail transportation system publishes similar data.

Here are some pictures to give you an idea of the project.

This is one of Network Rail's realtime maps. This one shows part of the London North Western region.


Real-time map for London North Western region

After processing the data-stream messages, this is what they look like in a debug node.
Screen Shot 11-25-20 at 10.55 AM

Trainspotting project - Tutorial

I'm sure my adventurous students will make some really creative dashboards to show the results.

Note:
You may experience a delay in getting your Network Rail registration approved. Just be patient.
Mine took 30-minutes but one of my friends' registration took nearly 5-days to come through!!!

15 Likes

A contribution for a simple dashboard for train 'Arrivals' - it has been colour-keyed to names of stations.
Screen Shot 12-01-20 at 05.42 PM

1 Like

Just tried making an arrivals board for specific stations. You can click the image for an expanded view.


I'll write-up a tutorial to show how I did it (later in the week).

2 Likes

Just discovered there is a webcam at Princes Risborough - fits nicely in the newly released ui-iframe node.

6 Likes

This topic was automatically closed after 60 days. New replies are no longer allowed.