Skip to content
MagicMirror module for Realtime Irish Rail API
JavaScript Python
Branch: master
Clone or download


This an extension for the MagicMirror. It is specifically for Irish rail customers, It accesses the Realtime Irish Rail API via a Python SimpleHTTPServer, which makes the request, then parses the response and returns json formatted data to the module for use in the MagicMirror.

This is version 1.0 and therefore not at a stage for widespread use.


  1. Navigate into your MagicMirror's modules folder and execute git clone A new folder will appear.
  2. Change directory into the new folder: cd DWD-RealtimeIrishRail/
  3. Install python: brew install python or yum install python
  4. Install pip: easy_install install pip
  5. Install requests: pip install requests
  6. Install beautiful soup 4: pip install beautifulsoup4
  7. Install xmltodict: pip install xmltodict
  8. Run the SimpleHTTPServer on the pi: python > /dev/null Or you can set up a cron to do this on reboot: sudo crontab -e append a new line at the bottom of this file with the following line of text: @reboot python /path/to/MagicMirror/DWD-RealtimeIrishRail/ > /dev/null then do a reboot: sudo reboot (to check if the server is running: ps -ef | grep python this should show all running python processes with the listed, if not then make sure to execute the prior steps)
  9. Add DWD-RealtimeIrishRail to the modules array in the config/config.js (see next step below)

Using the module

To use this module, add it to the modules array in the config/config.js file:

modules: [
		module: 'DWD-RealtimeIrishRail',
		position: 'bottom_bar',	// This can be any of the regions. Best results in bottom_bar or top_bar (if clear of other modules) regions.
		header: 'DWD-RealtimeIrishRail', // This is optional
		config: {
			// See 'Configuration options' for more information.

Configuration options

The following properties can be configured:

Option Description
updateInterval The rate (in ms) in which the module will refresh the train data.

Possible values: int
Default value: 60000
httpRequestURL (this is the url for the python trains server we just started above)
TrainUrl The api request url for the specific train station that you want to target. API URLs can be found here:

Possible values:
  • Dublin Heuston:
  • Dublin Connolly:
  • Park West and Cherry Orchard:
  • Clondalkin Fonthill:
  • Adamstown:
  • Hazelhatch and Celbridge:
  • Sallins and Naas:
  • Newbridge:
  • Kildare:
  • Athy:
  • Carlow:
  • Muine Bheag:
  • Kilkenny:
  • Thomastown:
  • Waterford:
  • Monasterevin:
  • Portarlington:
  • Portlaoise:
  • Ballybrophy:
  • Templemore:
  • Thurles:
  • Limerick Junction:
  • Tipperary:
  • Cahir:
  • Clonmel:
  • Carrick-on-Suir:
  • Charleville:
  • Mallow:
  • Cork:
  • Little Island:
  • Glounthaune:
  • Midleton:
  • Fota:
  • Carrigaloe:
  • Rushbrooke:
  • Cobh:
  • Banteer:
  • Millstreet:
  • Rathmore:
  • Killarney:
  • Farranfore:
  • Tralee:
  • Limerick (Colbert):
  • Ennis:
  • Gort:
  • Athenry:
  • Oranmore:
  • Galway:
  • Roscrea:
  • Cloughjordan:
  • Nenagh:
  • Birdhill:
  • Tullamore:
  • Clara:
  • Athlone:
  • Ballinasloe:
  • Woodlawn:
  • Attymon:
  • Roscommon:
  • Castlerea:
  • Ballyhaunis:
  • Claremorris:
  • Manulla Junction:
  • Castlebar:
  • Westport:
  • Foxford:
  • Ballina:
  • Rosslare Europort:
  • Rosslare Strand:
  • Wexford:
  • Enniscorthy:
  • Gorey:
  • Arklow:
  • Rathdrum:
  • Wicklow:
  • Kilcoole:
  • Greystones:
  • Bray:
  • Shankill:
  • Killiney:
  • Dalkey:
  • Glenageary:
  • Sandycove:
  • Dun Laoghaire:
  • Salthill:
  • Dublin Pearse:
  • Tara Street:
  • Docklands:
  • Drumcondra:
  • Broombridge:
  • Ashtown:
  • Navan Road Parkway:
  • Castleknock:
  • Coolmine:
  • Clonsilla:
  • Leixlip (Confey):
  • Leixlip (Louisa Bridge):
  • Maynooth:
  • Kilcock:
  • Enfield:
  • Mullingar:
  • Edgeworthstown:
  • Longford:
  • Dromod:
  • Carrick on Shannon:
  • Boyle:
  • Ballymote:
  • Collooney:
  • Sligo:
  • Hansfield:
  • Dunboyne:
  • M3 Parkway:
  • Clontarf Road:
  • Drogheda:
  • Dundalk:

Default value: ""


  • Python 2.7
  • SimpleHTTPServer named

The MIT License (MIT)

Copyright © 2016 Darren Daly

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

The software is provided “as is”, without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and non infringement. In no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software.

You can’t perform that action at this time.