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-Tube-Status (London Underground)

    Scheduled Pinned Locked Moved Transport
    25 Posts 5 Posters 20.4k Views 6 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.
    • D Offline
      djbenny07
      last edited by

      ’

      var config = {
      port: 8080,

          language: 'en',
          timeFormat: 24,
          units: 'metric',
      
          modules: [
                  {
                          module: 'alert',
                  },
                  {
                          module: 'clock',
                          position: 'top_left'
                  },
                  {
                          module: 'calendar',
                          header: 'Public Holidays',
                          position: 'top_left',
                          config: {
                                  calendars: [
                                          {
                                                  symbol: 'calendar-check-o ',
                                                  url: 'webcal://www.calendarlabs.com/templates/ical/UK-Holidays.ics'
                                          }
                                  ]
                          }
                  },
                  {
                          module: 'compliments',
                          position: 'lower_third'
                  },
                  {
                          module: 'currentweather',
                          position: 'top_right',
                          config: {
                                  location: 'London',
                                  locationID: '245613',  //ID from http://www.openweathermap.org
                                  appid: 'ID Number taken out'
                          }
                  },
                  {
                          module: 'weatherforecast',
                          position: 'top_right',
                          header: 'Weather Forecast',
                          config: {
                      location: 'London',
                                  locationID: '245613',  //ID from http://www.openweathermap.org
                      appid: 'ID Number taken out'
                          }
                  },
                  {
      

      ’

      D 1 Reply Last reply Reply Quote 0
      • D Offline
        djbenny07 @djbenny07
        last edited by djbenny07

        @djbenny07 i took it out of there as it didnt work. could it be corrected? is it possible to get it on the right hand upper corner underneath the clock?

        bheplerB 1 Reply Last reply Reply Quote 0
        • bheplerB Offline
          bhepler Module Developer @djbenny07
          last edited by

          @djbenny07 Is that the entire config file? I ask because it’s not closed properly.

          Please put the module configuration that you’re trying to get to work back in and post the entire file for us so we can check it all. We’ll get you running.

          1 Reply Last reply Reply Quote 0
          • D Offline
            djbenny07
            last edited by

            yes, it is the entire file it currently works.0_1477919911491_config.png

            N 1 Reply Last reply Reply Quote 0
            • N Offline
              nigel-daniels @djbenny07
              last edited by nigel-daniels

              @djbenny07 I noticed that at the end of the file the last two lines should change and it should end something like:

              {
              module: 'weatherforecast',
              position: 'top_right',
              header: 'Weather Forecast',
              config: {
              location: 'London',
              locationID: '245613', //ID from http://www.openweathermap.org
              appid: 'ID Number taken out'
              }
              }]
              };

              /*************** DO NOT EDIT THE LINE BELOW ***************/
              if (typeof module !== 'undefined') {module.exports = config;}

              If you then want to add the tube status module something like this should work:

              {
              module: 'weatherforecast',
              position: 'top_right',
              header: 'Weather Forecast',
              config: {
              location: 'London',
              locationID: '245613', //ID from http://www.openweathermap.org
              appid: 'ID Number taken out'
              }
              },
              {
              module: 'MMM-Tube-Status',
              position: 'top_left',
              header: 'Tube Status'
              }]
              };

              /*************** DO NOT EDIT THE LINE BELOW ***************/
              if (typeof module !== 'undefined') {module.exports = config;}

              I hope that helps.

              1 Reply Last reply Reply Quote 0
              • N Offline
                nigel-daniels
                last edited by

                BTW I have just updated the code so that if the optional show_all=false config is used and all of the lines are offering a good service there is a line displayed to indicate this rather than the module just disappearing.

                1 Reply Last reply Reply Quote 0
                • D Offline
                  djbenny07
                  last edited by

                  OK I have found that i didn’t copy all the text. the below does not work

                  ’

                  var config = {
                  port: 8080,

                      language: 'en',
                      timeFormat: 24,
                      units: 'metric',
                  
                      modules: [
                              {
                                      module: 'alert',
                              },
                              {
                                      module: 'clock',
                                      position: 'top_left'
                              },
                              {
                                      module: 'calendar',
                                      header: 'Public Holidays',
                                      position: 'top_left',
                                      config: {
                                              calendars: [
                                                      {
                                                              symbol: 'calendar-check-o ',
                                                              url: 'webcal://www.calendarlabs.com/templates/ical/UK-Holidays.ics'
                                                      }
                                              ]
                                      }
                              },
                              {
                                      module: 'compliments',
                                      position: 'lower_third'
                              },
                              {
                                      module: 'currentweather',
                                      position: 'top_right',
                                      config: {
                                              location: 'London',
                                              locationID: '264443',  //ID from http://www.openweathermap.org
                                              appid: 'number'
                                      }
                              },
                              {
                                      module: 'weatherforecast',
                                      position: 'top_right',
                                      header: 'Weather Forecast',
                                      config: {
                                  location: 'London',
                                              locationID: '264443',  //ID from http://www.openweathermap.org
                                  appid: 'Number'
                                      }
                              },
                              {
                              module: 'MMM-Tube-Status'
                              position: 'top_left'
                              header: 'Tube'
                              }
                              {
                                      module: 'newsfeed',
                                      position: 'bottom_bar',
                                      config: {
                                              feeds: [
                                                      {
                                                              title: "BBC Top Stories",
                                                              url: "http://feeds.bbci.co.uk/news/rss.xml"
                                                      }
                                              ],
                                              showSourceTitle: true,
                                              showPublishDate: true
                                      }
                              },
                      ]
                  

                  };

                  /*************** DO NOT EDIT THE LINE BELOW ***************/
                  if (typeof module !== ‘undefined’) {module.exports = config;}
                  ’

                  strawberry 3.141S N 2 Replies Last reply Reply Quote 0
                  • strawberry 3.141S Offline
                    strawberry 3.141 Project Sponsor Module Developer @djbenny07
                    last edited by

                    @djbenny07 you missed 3 commas in there

                    {
                        module: 'MMM-Tube-Status',
                        position: 'top_left',
                        header: 'Tube'
                    },
                    

                    Please create a github issue if you need help, so I can keep track

                    1 Reply Last reply Reply Quote 0
                    • N Offline
                      nigel-daniels @djbenny07
                      last edited by

                      @djbenny07 ok there were a couple issues here that my linter picked up:

                      1. the tube module must look like this:

                      {
                      module: 'MMM-Tube-Status',
                      position: 'top_left',
                      header: 'Tube'
                      },

                      Note the terminating commas on each line bar the last one in the braces.

                      1. The final line seems to use ticks to quote undefined not single quotes so it should be:

                      if (typeof module !== 'undefined') {module.exports = config;}

                      It can happen that copying between editors, email clients, browsers, etc introduces this sort of error and it’s a real pain to spot!

                      I hope this fixes it up for you.

                      1 Reply Last reply Reply Quote 0
                      • D Offline
                        djbenny07
                        last edited by djbenny07

                        can the position be the same as another module though? i still get the message to saying ‘Please create config file’

                        as my clock is in top_left

                        EDIT: Just noticed that i missed the ’ from the module name. added that in and still issue

                        0_1477936546318_config.png

                        yawnsY 1 Reply Last reply Reply Quote 0
                        • 1
                        • 2
                        • 3
                        • 2 / 3
                        • 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