• 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.

Config for clock not working

Scheduled Pinned Locked Moved Unsolved Troubleshooting
6 Posts 5 Posters 6.5k Views 4 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.
  • R Offline
    robsch
    last edited by paviro May 24, 2016, 7:56 PM May 24, 2016, 5:29 PM

    Hello folks,

    I know I am doing something dumb. Everything else is working, though my clock is not taking the config: { section. I am trying to change it to 12 hour format (for WAF) and remove the seconds and add a lowercase am/pm.

    Thanks for any suggestions and help!


    Here is my config file :

    /* Magic Mirror Config Sample
     *
     * By Michael Teeuw http://michaelteeuw.nl
     * MIT Licensed.
     */
    
    var config = {
            port: 8080,
            language: 'en',
            units: 'Imperial',
    
            modules: [
                    {
                            module: 'clock',
                            position: 'top_left',
                            config: {
                                     timeformat: 12,
                                     showPeriod: 'true',
                                     displaySeconds: 'false',
                                    }
                    },
    
    
                    {
                            module: 'alert',
                    },
               /*     {
                            module: 'MMM-wordnik',
                            position: 'lower_third',
                            config: {
                                     api_key: '',
                                    }
                    }, */
    
                    {
                            module: 'MMM-Traffic',
                            position: 'top_left',
                            classes: 'dimmed medium', //optional, default is 'bright medium', only applies to commute info not route_name
                            config: {
                                     api_key: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
                                     mode: 'driving',
                                     origin: 'xxxxxxxxxxxxxxxxxxxxxxxx',
                                     destination: 'xxxxxxxxxxxxxxxxxxxxxxxxxx',
                                     route_name: 'Home to Work',
                                     changeColor: true,
                                     showGreen: false,
                                     limitYellow: 5, //Greater than 5% of journey time due to traffic
                                     limitRed: 20, //Greater than 20% of journey time due to traffic
                                     traffic_model: 'pessimistic',
                                     interval: 120000 //2 minutes
                                    }
                    },
    
                    {
                            module: 'MMM-Wunderlist',
                            position: 'top_center',  // This can be any of the regions. Best results in left or right regions.
                            header: 'ToDo List', // This is optional
                            config: {
                                       accessToken: 'xxxxxxxxxxxxxxxxxx',
                                       clientID: 'xxxxxxxxxxxxx',
                                       lists: ["inbox"],
                                       interval: 60,
                                       fade: true
    
    
    
    // See 'Configuration options' for more information.
                       }
                    },
                    {
                            module: 'airquality',
                            position: 'top_right', // you may choose any location
                            config: {
                            location: 'Philadelphia' // the location to check the index for
                       }
                   },
    
                    {
                            module: 'calendar',
                            header: 'Family Calendar',
                            position: 'top_left',
                            config: {
                                    calendars: [
                                            {
                                                    symbol: 'calendar-check-o ',
                                                    url: 'webcal://calendar.google.com/calendar/ical/xxxxxxxxxxxxxxxxxxxxx/basic.ics'
                                            }
                                    ]
                            }
                    },
                    {
                            module: 'compliments',
                            position: 'lower_third'
                    },
                    {
                            module: 'currentweather',
                            position: 'top_right',
                            config: {
                                    location: 'Bristol, PA',
                                    appid: 'xxxxxxxxxxxxxxxxxxxxxx'
                            }
                    },
                    {
                            module: 'weatherforecast',
                            position: 'top_right',
                            header: 'Weather Forecast',
                            config: {
                        location: 'Bristol, PA',
                        appid: 'xxxxxxxxxxxxxxxxxxxxxx'
                            }
                    },
                    {
                            module: 'newsfeed',
                            position: 'bottom_bar',
                            config: {
                                    feeds: [
                                            {
                                                    title: "ABC US Headlines",
                                                    url: "http://feeds.abcnews.com/abcnews/usheadlines",
                                            },
                                            {
                                                    title: "Bristol News",
                                                    url: "http://www.buckslocalnews.com/?rss=bristol_pilot/news",
                                            }
                                    ],
                                    showSourceTitle: true,
                                    showPublishDate: true
                            }
                    },
            ]
    
    };
    
    /*************** DO NOT EDIT THE LINE BELOW ***************/
    if (typeof module !== 'undefined') {module.exports = config;}
    

    Note from admin: Please use Markdown on code snippets so it is easier to read!

    1 Reply Last reply Reply Quote 0
    • K Offline
      KirAsh4 Moderator
      last edited by May 25, 2016, 1:55 AM

      And the console error is? Or possibly it could also be in 'pm2 logs <YOUR_MM_TASK_NAME>' …

      A Life? Cool! Where can I download one of those from?

      1 Reply Last reply Reply Quote 0
      • R Offline
        robsch
        last edited by paviro Jun 18, 2016, 6:42 PM May 25, 2016, 2:19 AM

        @KirAsh4 When I hit <CTRL-M> for the console (which is what I assume you mean) I doesn’t give any errors. Everything is working fine. It shows all the data correctly, but the clock is in 24 hour format. It’s almost like it’s just omitting the config section, and moving on. Though it says "No helper found for the module: clock. But I am pretty sure it always has said that.

        Thanks!

        1 Reply Last reply Reply Quote 0
        • M Offline
          MrH
          last edited by paviro Jun 18, 2016, 6:41 PM Jun 18, 2016, 1:01 AM

          Had the same issue. Try removing the ’ marks before and after “true” or “false”

          like this

          config: {
               displaySeconds: false,
           }
          

          worked for me ;)


          Note from admin: Please use Markdown on code snippets!

          1 Reply Last reply Reply Quote 0
          • strawberry 3.141S Offline
            strawberry 3.141 Project Sponsor Module Developer
            last edited by Jun 18, 2016, 6:47 AM

            yes true and false are booleans and no strings, so you need to remove the quotes

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

            1 Reply Last reply Reply Quote 0
            • mochmanM Offline
              mochman Module Developer
              last edited by Jun 18, 2016, 1:17 PM

              @strawberry-3-141 Try timeFormat: 12, instead of timeformat: 12,.

              Capitalization has gotten me more times that I can count.

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