London Travel Information

All code for this project is on GitHub.

As a London commuter, I need to know how the trains, buses and tubes are running in the morning. As a Microsoft developer I was also interested in trying Windows IOT. I therefore decided to do a project in C# and XAML to solve this problem. I wanted to have a single screen showing the status of the buses, trains and tubes that the family use in the morning. To do this I needed to use two different APIs:

  • London Transport for London Unified API for my local buses, Overground trains and the tubes.
  • National Rail Darwin API for Southern Rail trains
  • I used a Raspberry Pi 3 Model B running Windows IOT along with the official Raspberry Pi 7″ touch screen for the project. To be honest I was quite impressed with Windows running on the Pi. I love Raspbian but I think Microsoft have done a good job implementing Windows on such a small device and XAML makes it very easy to build rich user interfaces. The project runs on a PC as well and will also run on a Windows phone/tablet though might need some tweaking as the screen size is set for the Official Raspberry Pi screen.

    The first issue I had was that National Rail restrict the number of calls to their API that you can make in a month. TfL don’t have a restriction. For it to be useful it had to make frequent calls to the APIs. I therefore decided that it only really needs to do it in the morning while I am getting ready to go to work, so for the rest of the time it will randomly cycle through my photos stored on a server and then stop doing anything overnight. Also touching the screen anywhere will change the display to the Travel Information screen. Useful when I have a lie in and the screen is in photo mode.

    The top left portion of the screen shows the number of minutes until a bus will arrive at our nearest bus stop. The bottom left portion shows the time that a train is scheduled to arrive and the time that it is due. This is a combination of trains obtained from TfL and National Rail. the top right shows any alerts on the main tube lines and the bottom portion shows the arrival boards at the different tube stations. I find they are the best indication of how the tubes are running. All this is updated every minute (configurable).

    All code for this project is on GitHub.

    Leave a Reply

    Your email address will not be published. Required fields are marked *