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

Changing compliments

Scheduled Pinned Locked Moved Troubleshooting
49 Posts 9 Posters 34.0k Views 9 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
    AliAS @doubleT
    last edited by Feb 17, 2018, 4:02 AM

    @doubleT That worked perfect. Thanks again!

    1 Reply Last reply Reply Quote 0
    • K Offline
      KC5RIL
      last edited by Aug 20, 2020, 1:22 AM

      Oh, great! Another noob needs help configuring the Compliments module. I’ve sussed through this for two days trying to get this up and running to earn ‘cool dad points.’ I’ve followed along and made changes to the config.js file as described. When I run ‘npm start’ I get the following: ```
      code_text

      
      > magicmirror@2.12.0 start /home/pi/MagicMirror
      > DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js
      
      [2020-08-19 20:06:47.257] [LOG]    Starting MagicMirror: v2.12.0
      [2020-08-19 20:06:47.264] [LOG]    Loading config ...
      [2020-08-19 20:06:47.268] [ERROR]  WARNING! Could not validate config file. Starting with default configuration. Please correct syntax errors at or above this line: /home/pi/MagicMirror/config/config.js:68
      			config: {
      			^^^^^^
      
      SyntaxError: Unexpected identifier
          at Module._compile (internal/modules/cjs/loader.js:722:23)
          at Object.Module._extensions..js (internal/modules/cjs/loader.js:798:10)
          at Module.load (internal/modules/cjs/loader.js:645:32)
          at Function.Module._load (internal/modules/cjs/loader.js:560:12)
          at Module.require (internal/modules/cjs/loader.js:685:19)
          at require (internal/modules/cjs/helpers.js:16:16)
          at loadConfig (/home/pi/MagicMirror/js/app.js:67:12)
          at App.start (/home/pi/MagicMirror/js/app.js:202:3)
          at Object.<anonymous> (/home/pi/MagicMirror/js/electron.js:126:7)
          at Module._compile (internal/modules/cjs/loader.js:786:30)
      [2020-08-19 20:06:47.269] [LOG]    Loading module helpers ...
      [2020-08-19 20:06:47.317] [LOG]    Initializing new module helper ...
      [2020-08-19 20:06:47.318] [LOG]    Module helper loaded: updatenotification
      [2020-08-19 20:06:47.321] [LOG]    No helper found for module: helloworld.
      [2020-08-19 20:06:47.322] [LOG]    All module helpers loaded.
      [2020-08-19 20:06:47.445] [LOG]    Starting server on port 8080 ... 
      [2020-08-19 20:06:47.458] [LOG]    Server started ...
      [2020-08-19 20:06:47.459] [LOG]    Connecting socket for: updatenotification
      [2020-08-19 20:06:47.460] [LOG]    Sockets connected & modules started ...
      [2020-08-19 20:06:47.556] [LOG]    Launching application.
      
      

      What am I looking at? And how can I correct? Bear with a middle aged noob. You might have to explain this in crayon. Thanks for the help.

      M S 2 Replies Last reply Aug 20, 2020, 1:24 AM Reply Quote 0
      • M Offline
        Mykle1 Project Sponsor Module Developer @KC5RIL
        last edited by Aug 20, 2020, 1:24 AM

        @KC5RIL

        Post your config entry for compliments in a code block

        Create a working config
        How to add modules

        K 1 Reply Last reply Aug 20, 2020, 1:31 AM Reply Quote 0
        • S Offline
          sdetweil @KC5RIL
          last edited by Aug 20, 2020, 1:26 AM

          @KC5RIL > Unexpected identifier

          90% of the time this means a comma missing on the line above

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          K 1 Reply Last reply Aug 20, 2020, 1:27 AM Reply Quote 1
          • K Offline
            KC5RIL @sdetweil
            last edited by Aug 20, 2020, 1:27 AM

            @sdetweil Stand by, ya’ll. I’m proofing now. Just caught a misplaced comma.

            S 1 Reply Last reply Aug 20, 2020, 1:29 AM Reply Quote 0
            • S Offline
              sdetweil @KC5RIL
              last edited by Aug 20, 2020, 1:29 AM

              @KC5RIL npm config:check can show these errors.

              has a bug in 2.12, temp fix posted to the top of the troubleshooting section

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              1 Reply Last reply Reply Quote 1
              • K Offline
                KC5RIL @Mykle1
                last edited by Aug 20, 2020, 1:31 AM

                @Mykle1 Here’s the code. Figured this seemed like a popular spot to wet my feet. If I could get through this, I could set the rest up.

                {
                			module: "compliments",
                			position: "lower_third"
                
                			config: {
                			 	   compliments: {
                			 	   "....-01-01": [
                			 	   "Happy New Year!"
                				   ],
                			    	   "....-01-07": [
                				   "Happy Birthday, Matt!"
                				   ],
                				   "....-01-08": [
                				   "Hail to the King, Baby!",
                				   "I'm all shook up!",
                				   "You ain't nuthin' but a hound dog!"
                				   ],
                				   "....-01-25": [
                				   "yaD etisoppO yppaH"
                				   ],
                				   "2021-02-02": [
                				   "It's Groundhog Day \nAgain!"
                			   	   ],
                				   "....-02-14": [
                				   "Happy Valentine's Day!"
                				   ],
                				   "2021-02-16": [
                				   "Laissez les bon temps rouler!"
                				   ],
                				   "....-03-14": [
                				   "Time for Pi!"
                				   ],
                				   "2021-03-17": [
                				   "Erin Go Bragh!",
                				   "Kiss Me! \nI'm Irish"
                				   ],
                				   "....-04-01": [
                				   "Your shoes are untied.",
                				   "Made you look.",
                				   "April Fools!"
                				   ],
                				   "2021-04-04": [
                				   "Happy Easter!",
                				   "Rejoice!",
                				   "He is Risen!"
                				   ],
                				   "....-05-04": [
                				   "May the Fourth be with you!"
                				   ],
                				   "....-05-06": [
                				   "Revenge of the Sixth!"
                				   ],
                				   "....-05-09": [
                				   "Happy Mother's Day!"
                				   ],
                				   "....-05-25": [
                				   "Don't forget your towel.",
                				   "42!"
                				   ],
                				   "2021-05-31": [
                				   "Happy Memorial Day!"
                				   ],
                				   "2021-06-20": [
                				   "Happy Father's Day!"
                				   ],
                				   "....-07-04": [
                				   "Celebrate your Independence!",
                				   "Freedom!",
                				   "Happy Fourth of July!"
                				   ],
                				   "....-07-09": [
                				   "Happy Birthday, Noodle!"
                				   ],
                				   "....-08-14": [
                				   "Happy Anniversary!"
                				   ],
                				   "2021-09-06": [
                				   "Happy Labor Day!"
                				   ],
                				   "....-09-11": [
                				   "Never Forget.",
                				   "Some gave all",
                				   "343/61",
                				   "Let's Roll!"
                				   ],
                				   "...-10-..": [
                				   "Boo!"
                				   ],
                				   "....-11-16": [
                				   "Happy Birthday, Susanne!"
                				   ],
                				   "2021-11-25": [
                				   "Gobble! Gobble!",
                				   "Happy Thanksgiving!"
                				   ],
                				   "....-12-07": [
                				   "A day that will live in infamy!"
                				   ],
                				   "....-12-23": [
                				   "Time to air our grievances!",
                				   "Festivus for the rest of us!"
                				   ],
                				   "....-12-25": [
                				   "Merry Christmas, Charlie Brown!",
                				   "Rejoice!",
                				   "Christ the Savior is born!"
                				   ],
                				   anytime: {
                				   "Hey!",
                				   "Hello.",
                				   "Whaddup Dog?",
                				   "Dude!",
                				   "Hej!",
                				   "You stay classy!"
                				   ],
                				   morning: [
                				   "Good Morning!",
                				   "Smile \nIt's a beautiful day!",
                				   "Rise and Shine!",
                				   "Wakey Wakey! \nEggs & Baky!",
                				   "Coffee is ready!"
                				   ],
                				   afternoon: [
                				   "Is it beer-thirty, yet?",
                				   "What a wonderful day!"
                				   ],
                				   evening: [
                				   "Good Evening."
                				   ]
                			}
                		},
                

                While ya’ll are looking at that, I’ll check the troubleshooting section. Thanks

                S 1 Reply Last reply Aug 20, 2020, 1:34 AM Reply Quote 0
                • S Offline
                  sdetweil @KC5RIL
                  last edited by Aug 20, 2020, 1:34 AM

                  @KC5RIL

                  position: "lower_third"
                  
                  			config: {
                  

                  why did I say?
                  comma missing on the line before the error

                  position: "lower_third", // < -----
                  
                  			config: {
                  

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  1 Reply Last reply Reply Quote 0
                  • K Offline
                    KC5RIL
                    last edited by Aug 20, 2020, 1:38 AM

                    Okay! It’s coming together for me. I’m catching a couple more syntax errors. I’ll keep proofing to see if I catch more.

                    S 1 Reply Last reply Aug 20, 2020, 1:44 AM Reply Quote 0
                    • S Offline
                      sdetweil @KC5RIL
                      last edited by sdetweil Aug 20, 2020, 1:47 AM Aug 20, 2020, 1:44 AM

                      @KC5RIL general rules for the value to the right of :

                      numbers and true/false, no quotes,
                      otherwise needs quotes, doesn’t matter which as long as they are matched.

                      be careful on quotes, these curly ones " ’
                      are no good, but these text mode are
                      ok

                      "'
                      

                      also if the next line starts with a word, then this line needs a trailing comma

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

                      K 1 Reply Last reply Aug 20, 2020, 2:19 AM Reply Quote 0
                      • 1
                      • 2
                      • 3
                      • 4
                      • 5
                      • 5 / 5
                      • 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