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.

    Transportation module doesn't work

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    magic mirrorsmart mirror
    1 Posts 1 Posters 685 Views 1 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.
    • A Offline
      amateurcoderboy
      last edited by

      Hi,

      I’m a total beginner to this and have only installed 3 modules previous to this one. When I try to add this new one (MMM-SL-PublicTransport) the magicmirror displays the message ‘Please create a config file.’

      If anyone could help me out I would be very grateful ! Here’s the code including the module above it (MMM-Screencast, which works fine):

       {
      		module: 'MMM-Screencast',
      		position: 'bottom_right', // This position is for a hidden <div /> and not the screencast window
      		config: {
      			position: 'bottomCenter',
      			height: 600,
      			width: 750,
      		}
      		},
      	{
      
              module: 'MMM-SL-PublicTransport',
              position: 'top_right',
              header: 'Busses',
              config: {
                  apikey: 'Ipostedmyapihere',         // REQUIRED.
                  stations: [                     // REQUIRED at least one entry. 
                                                  // Definition of the stations that you would like to see
                    {
                      stationId: 'Ipostedmystationidhere',      // REQUIRED. An id of a station. You need to run the utility
                                                  // findStation to get the id(s) of the station(s) you want.
                      stationName: 'stationnamehere',// Optional. This is the name of the station.
                                                  // It's shown in the header if you have set a header on the module
                     // excludeTransportTypes: [],  // Optional. This is an array of types of transport that you DONT 
                                                  // want to see. If not present then all transport types are shown. 
                                                  // The types are: 'Bus', 'Train', 'Metro', 'Tram' and 'Ship'.
                      lines: [                    // Optional. An array of lines that you want to see departing from
                                                  // this station.
                        {
                          line: line-id,          // The id of the line
                          direction: dir,         // Optional. If present only show departures in this direction 
                                                  // for this line.
                          swapDir: false          // Optional. If true, change dir 1 to 2 and vice versa.
                                                  // Shall be used with the "In to town" feature. Note that
                                                  // if direction is defined, that shall be direction swapped to.
                        }
                      ]
                    },
                  ],
                  maxDestinationLength: 999,      // Optional, will truncate the destination string to the set length.
                  displaycount: 10,               // Optional, show this number of departures for each direction.
                  omitDeparturesLeft: false,      // Optional, if set to true departures that have left the station
                                                  // is not shown.
                  showdisturbances: false,        // Not implemented yet
                  fade: true,                     // Optional. Shall the table of departures be faded or not
                  fadePoint: 0.2,                 // Optional. Fraction from end where to start fading
                  delayThreshhold: 60,            // Optional. If a departure is delayed or in advance only
                                                  // show this
                                                  // if the delay/advance is greater than this number in
                                                  // seconds.            
                  updateInterval: 5*60*1000,      // Optional. Number of milliseconds between calls to
                                                  // Trafiklab's API. This value shall preferably be larger then 1 min
                                                  // There are limitations on number of calls per minute and month
                  highUpdateInterval: {},         // Optional if you dont need it don't define it.
                                                  // If defined use higher frequences for updates, see
                                                  // "Set what times to update more frequently" below
                  uiUpdateInterval: 1000,         // Optional. Number of milliseconds between updates of the
                                                  // departure list. This value shall preferably be less then 10 sec
                  SSL: false,                     // Optional. Use https to access the TrafikLab services,
                                                  // defaults to false since I have experienced problems  
                                                  // accessing this service over https. Have an ongoing  
                                                  // discussion with TrafikLab
                  debug: false,                   // Optional. Enable some extra output when debugging
                  ignoreSanityCheck: false,       // Optional. If set to true config sanity checks are not done.
                  useDisplayTime: false,          // Optional. If true use the actual displaytime that is
                                                  // received via the API instead of the ExpectedDateTime and
                                                  // TimeTabledDateTime. See the DisplayTime section below.
                  cleanHeader: false,             // If set to true the last update time is not shown
                                                  // in the header
                  showIcon: true                  // Optional. If true show an icon of the type of transport
      
             }
          },
      	]
      
      };
      
      

      The parts I have changed are apikey, stationId and stationName

      Thanks in advance

      1 Reply Last reply Reply Quote 0

      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

      With your input, this post could be even better 💗

      Register Login
      • 1 / 1
      • 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