MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    MMM-UKNationalRail - Rail departure info for specific UK Railway stations

    Scheduled Pinned Locked Moved Transport
    uk railtransport
    33 Posts 15 Posters 19.0k Views 16 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • G Offline
      Glass92 @tenpinmark
      last edited by Glass92

      @tenpinmark

      Hi Tenpin,

      Sounds like me and you want the same thing!
      I’m currently having issues with my module updating after a refresh though, don’t know what is going on there! Essentially after I restart the Mirror, the module will work for a couple of hours, then when I get up the next day it will still be showing last nights times, almost like it’s frozen.
      How did you get the Header sorted and column headings?

      I am also using MMM-ModuleScheduler to display the specific Trains at different times.
      I have three modules running see below, where my app id and app key I have replaced with xxx.
      One for my partner, Monday to Friday from Home to Work in the morning. Stirling - Dundee (See Station Code is Stirling, calling_at: Dundee)
      One for my partner, Monday to Friday from Work to Home in the evening. Dundee - Stirling (See Station Code is Stirling, called_at: Dundee)
      One for me, Tuesday to Thursday from Home to Work in the morning. Stirling - Glasgow (See Station Code is Stirling, calling_at: Glasgow)

      {
      			module: 		'MMM-UKNationalRail',
      			position: 		'bottom_left',
      			header:			'Stirling - Glasgow',		//Optional - delete this line to turn OFF the header completely
      			classes: 'scheduler',
      			config: {
      				module_schedule: {from: '0 7 * * 2-4', to: '0 9 * * 2-4' },
      				stationCode: 		'STG', 		// CRS code for station
      				calling_at: 		'GLQ',
      				app_id: 			'xxx', 		// TransportAPI App ID
      				app_key: 			'xxx', 		// TransportAPI App Key
      				maxResults: 		3,  		//Optional - Maximum results to display.
      				showOrigin: 		true   	//Optional - Show the origin of the train in the table
      			}
      		},
      			{
      			module: 		'MMM-UKNationalRail',
      			position: 		'bottom_left',
      			header:			'Stirling - Dundee',		//Optional - delete this line to turn OFF the header completely
      			classes: 'scheduler',
      			config: {
      				module_schedule: {from: '0 7 * * 1-5', to: '0 9 * * 1-5' },
      				stationCode: 		'STG', 		// CRS code for station
      				calling_at: 		'DEE',
      				app_id: 			'xxx', 		// TransportAPI App ID
      				app_key: 			'xxx', 		// TransportAPI App Key
      				maxResults: 		3,  		//Optional - Maximum results to display.
      				showOrigin: 		true   	//Optional - Show the origin of the train in the table
      			}
      		},
      			{
      			module: 		'MMM-UKNationalRail',
      			position: 		'bottom_left',
      			header:			'Dundee to Stirling',		//Optional - delete this line to turn OFF the header completely
      			classes: 'scheduler',
      			config: {
      				module_schedule: {from: '0 17 * * 1-5', to: '30 19 * * 1-5' },
      				stationCode: 		'STG', 		// CRS code for station
      				called_at: 			'DEE',
      				app_id: 			'xxx', 		// TransportAPI App ID
      				app_key: 			'xxx', 		// TransportAPI App Key
      				maxResults: 		3,  		//Optional - Maximum results to display.
      				showOrigin: 		true   	//Optional - Show the origin of the train in the table
      			}
      		},
      

      This is my partner’s trians for coming home
      https://imgur.com/a/OGflgLi
      See it doesn’t list Stirling. It lists end destination and origin station.

      1 Reply Last reply Reply Quote 0
      • B Offline
        Bob
        last edited by

        @tenpinmark Any chance you can post the code you used to fix it ? (or submit a fork to switch to instead)

        @Glass92 I had similar problems (and only with this module). My solution was to create a cron job to reboot the mirror after midnight, which restarted the code. It’s not ideal, and actually introduces other issues with the HDMI port (will sometimes fail to initialise the display). I’ve since removed the cron job, and now just manually reboot if needed (usually once every couple of days)

        1 Reply Last reply Reply Quote 0
        • A Offline
          alexbell62
          last edited by

          Is there a way to make it work?

          1 Reply Last reply Reply Quote 0
          • M Offline
            matt216
            last edited by

            Getting emails from transportapi.com saying I’m over my call limit. Anyone else?

            1 Reply Last reply Reply Quote 0
            • M Offline
              matt216
              last edited by

              Looks like transportAPI.com has changed their free tier to just 30 calls per day. This module (for me) seems to have used almost 300 per day previously.
              Also it doesn’t look like the module is maintained by the developer anymore.

              1 Reply Last reply Reply Quote -1
              • B Offline
                Bungle68
                last edited by

                Is anyone able to show how I can get arrivals as well as departures showing?
                I tried this, but it’s still only showing Departures.

                {
                	module: 	'MMM-UKNationalRail',
                	position: 	'bottom_left',
                	header:		'Departure',		//Optional - delete this line to turn OFF the header completely
                	config: {
                		stationCode: 		'CUF', 		// CRS code for station
                		app_id: 		'8e9c6489', 	// TransportAPI App ID
                		app_key: 		'd8*********************7c9c45550', 	// TransportAPI App Key
                		maxResults: 		5,  		//Optional - Maximum results to display.
                		showOrigin: 		false,   	//Optional - Show the origin of the train in the table
                		type: "arrival,departure"
                	}
                },
                
                S 1 Reply Last reply Reply Quote 0
                • S Offline
                  sdetweil @Bungle68
                  last edited by

                  @Bungle68 it appears this module is no longer maintained, and most of the code is 6 years old.

                  wko knows what has changed in that time

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  B 1 Reply Last reply Reply Quote 0
                  • B Offline
                    Bungle68 @sdetweil
                    last edited by

                    @sdetweil Thanks
                    It seems to be working now, I just can’t get the platform numbers up.
                    Is there an alternative module? 🙏

                    S 2 Replies Last reply Reply Quote 0
                    • S Offline
                      sdetweil @Bungle68
                      last edited by

                      @Bungle68 sorry, no idea

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

                      1 Reply Last reply Reply Quote 0
                      • S Offline
                        sdetweil @Bungle68
                        last edited by

                        @Bungle68 what shows for showPlatform:true??

                        says - if no platform info

                        Sam

                        How to add modules

                        learning how to use browser developers window for css changes

                        1 Reply Last reply Reply Quote 0
                        • 1
                        • 2
                        • 3
                        • 4
                        • 2 / 4
                        • First post
                          Last post
                        Enjoying MagicMirror? Please consider a donation!
                        MagicMirror created by Michael Teeuw.
                        Forum managed by Sam, technical setup by Karsten.
                        This forum is using NodeBB as its core | Contributors
                        Contact | Privacy Policy