• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
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.

sample config and clock

Scheduled Pinned Locked Moved Troubleshooting
7 Posts 2 Posters 5.0k Views 2 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.
  • E Offline
    emos
    last edited by emos Feb 8, 2017, 3:26 PM Feb 8, 2017, 3:24 PM

    Hello, I came a cross a topic on this forum saying that all you need to remove the second from the clock is

    config: { 
    displaySeconds: false, 
    }
    

    I stared out with the sample.config, added the info for seconds. When i start up the mirror now it just says i need to create a config. wtf?

    This is the full config

    /* Magic Mirror Config Sample
     *
     * By Michael Teeuw http://michaelteeuw.nl
     * MIT Licensed.
     */
    
    var config = {
            port: 8080,
            ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.1.1/120"],
    
            language: 'nb',
            timeFormat: 24,
            units: 'metric',
    
            modules: [
                    {
                            module: 'alert',
                    },
                    {
                            module: "updatenotification",
                            position: "top_bar"
                    },
                    {
                            module: 'clock',
                            position: 'top_left'
                            config: {
                                    displaySeconds: false,
                                    }
                    },
                    {
                            module: 'calendar',
                            header: 'US Holidays',
                            position: 'top_left',
                            config: {
                                    calendars: [
                                            {
                                                    symbol: 'calendar-check-o ',
                                                    url: 'webcal://www.calendarlabs.com/templates/ical/US-Holidays.ics'
                                            }
                                    ]
                            }
                    },
                    {
                            module: 'compliments',
                            position: 'lower_third'
                    },
                    {
                            module: 'currentweather',
                            position: 'top_right',
                            config: {
                                    location: 'New York',
                                    locationID: '',  //ID from http://www.openweathermap.org
                                    appid: 'YOUR_OPENWEATHER_API_KEY'
                            }
                    },
                    {
                            module: 'weatherforecast',
                            position: 'top_right',
                            header: 'Weather Forecast',
                            config: {
                                    location: 'New York',
                                    locationID: '5128581',  //ID from http://www.openweathermap.org
                                    appid: 'YOUR_OPENWEATHER_API_KEY'
                            }
                    },
                    {
                            module: 'newsfeed',
                            position: 'bottom_bar',
                            config: {
                                    feeds: [
                                            {
                                                    title: "New York Times",
                                                    url: "http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml"
                                            }
                                    ],
                                    showSourceTitle: true,
                                    showPublishDate: true
                            }
                    },
            ]
    
    };
    
    /*************** DO NOT EDIT THE LINE BELOW ***************/
    if (typeof module !== 'undefined') {module.exports = config;}
    
    
    
    S 1 Reply Last reply Feb 8, 2017, 3:55 PM Reply Quote 0
    • S Offline
      strawberry 3.141 Project Sponsor Module Developer @emos
      last edited by Feb 8, 2017, 3:55 PM

      @emos you forgot an , behind the position

      {
        module: 'clock',
        position: 'top_left',
        config: {
          displaySeconds: false
        }
      }
      

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

      E 1 Reply Last reply Feb 8, 2017, 4:02 PM Reply Quote 1
      • E Offline
        emos @strawberry 3.141
        last edited by Feb 8, 2017, 4:02 PM

        @strawberry-3.141
        Thank you, it did the trick :)

        I see that you have removed the ‘,’ behind ‘false’. The last argument, or string, is that the only one that’s not suppose to have an ‘,’ at the end?

        S 1 Reply Last reply Feb 8, 2017, 4:12 PM Reply Quote 0
        • S Offline
          strawberry 3.141 Project Sponsor Module Developer @emos
          last edited by Feb 8, 2017, 4:12 PM

          @emos that’s correct it’s like writing a list you seperate them by comma except the last item

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

          E 1 Reply Last reply Feb 8, 2017, 4:47 PM Reply Quote 1
          • E Offline
            emos @strawberry 3.141
            last edited by Feb 8, 2017, 4:47 PM

            @strawberry-3.141 Thank you so much, that helped me alot :thumbsup:

            1 Reply Last reply Reply Quote 0
            • E Offline
              emos
              last edited by Feb 8, 2017, 5:05 PM

              one more question regarding the last ‘,’

              Does the same rule apply with the ‘[’ and ‘]’?

                              {
                                      module: 'compliments',
                                      position: 'lower_third',
                                      config: {
                                              compliments: {
                                                      day_sunny: [
                                                              'Today is a sunny day',
                                                              'It\'s a beautiful day',
                                                              ],
                                                      snow: [
                                                              'Snowball battle!',
                                                              ],
                                                      rain: [
                                                              'Don\'t forget your umbrella'
                                                              ]
                                                      }
                                              }
                              },
              
              

              Or does each square bracket count as individual values. So if there’s only one you don’t need to close it?

              S 1 Reply Last reply Feb 8, 2017, 5:08 PM Reply Quote 0
              • S Offline
                strawberry 3.141 Project Sponsor Module Developer @emos
                last edited by strawberry 3.141 Feb 8, 2017, 5:17 PM Feb 8, 2017, 5:08 PM

                @emos you have to seperate each level with commas things day_sunny, snow, rain has to be seperated with commas

                thats what inside the square brackets has to be seperated by commasas well

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

                1 Reply Last reply Reply Quote 0
                • 1 / 1
                1 / 1
                • First post
                  1/7
                  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