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

Change Compliments

Scheduled Pinned Locked Moved Solved Troubleshooting
17 Posts 7 Posters 4.9k Views 7 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
    dgregory19
    last edited by Feb 2, 2019, 3:33 PM

    I would like to change the default compliments but dont see them under compliments module. Or do i need to add the config shown in compliments page.

    M 1 Reply Last reply Feb 2, 2019, 3:57 PM Reply Quote 0
    • T Offline
      THeStigh
      last edited by THeStigh Feb 2, 2019, 3:41 PM Feb 2, 2019, 3:38 PM

      Yes, you need to create them within config.js

      This is my config (replace ‘bla bla bla’ as you want):

      		module: "compliments",
      		position: "lower_third",
      			config: {
      			compliments: {
      				morning: [
      					"bla bla bla",
      					"bla bla bla"
      				],
      				afternoon: [
      					"bla bla bla",
      					"bla bla bla"
      					],
      				evening: [
      					"bla bla bla",
      					"bla bla bla"
      					]
      			},
      			updateInterval: 30000,
      			remoteFile: null,
      			fadeSpeed: 4000,
      			morningStartTime: 3,
      			morningEndTime: 12,
      			afternoonStartTime: 12,
      			afternoonEndTime: 17
      		}
      	},
      

      Please mark answer as correct and topic as Solved (if this solved your issue) :)

      D 1 Reply Last reply Feb 3, 2019, 6:03 PM Reply Quote 2
      • M Offline
        Mykle1 Project Sponsor Module Developer @dgregory19
        last edited by Feb 2, 2019, 3:57 PM

        @dgregory19

        Or, use a remote file (as per the compliments readme) so as not to encumber the config.js file with a lengthy entry.

        Create a working config
        How to add modules

        1 Reply Last reply Reply Quote 3
        • C Offline
          cowboysdude Module Developer
          last edited by Feb 2, 2019, 11:41 PM

          OR just use another module…

          https://github.com/cowboysdude/MMM-NiceThings

          1 Reply Last reply Reply Quote 0
          • D Offline
            dgregory19 @THeStigh
            last edited by Feb 3, 2019, 6:03 PM

            @thestigh I’ll try this. It looks different then what is supplied by MM. I think i have the syntax wrong and haven’t learned yet how to do the coding. Thanks.

            T 1 Reply Last reply Feb 3, 2019, 6:44 PM Reply Quote 0
            • T Offline
              THeStigh @dgregory19
              last edited by THeStigh Feb 5, 2019, 8:13 PM Feb 3, 2019, 6:44 PM

              @dgregory19 As @Mykle1 stated, there is another way.

              Personally, I prefer to have all custom configurations in one single file config.js and all custom css in the custom.css, by this I can add/remove/replicate configurations/modules installed from device to device. Makes it easy to backup :)

              Another tip;
              Above each module in config.js, you can add disabled: false / true, to temporarily make a module not load on MM. Like this:

              		{
              			disabled: false,
              			module: 'MMM-Remote-Control'
              		},
              

              If you need anymore help, please let me know.

              1 Reply Last reply Reply Quote 1
              • D Offline
                dgregory19
                last edited by Feb 5, 2019, 4:11 AM

                Thanks everyone! Figured it out. Onto breaking something else…

                1 Reply Last reply Reply Quote 0
                • C Offline
                  CheapDad
                  last edited by CheapDad Apr 24, 2021, 7:46 PM Apr 24, 2021, 7:44 PM

                  My apologies for resurrecting a dead thread, but it seemed like keeping all similar questions to one thread might be useful to others.

                  I was happy with the default compliments, but wanted to customize them to the user. I copied the compliments entries from compliments.js and inserted them into my config.js. I don’t get any errors when I run config:check, but the compliments no longer appear on the screen. Here’s my code:

                  		{
                  			module: "compliments",
                  			position: "lower_third",
                  			config:  {
                  				compliments: {
                  					anytime: ["Hey there Emma!"],
                  					morning: ["Good morning, Emma!", "Enjoy your day!", "How was your sleep?"],
                  					afternoon: ["Hello, Emma!", "You look beautiful!", "Looking good today!"],
                  					evening: ["Wow, you look great!", "You look nice!", "Hi, Emma!"],
                  					"....-01-01": ["Happy new year!"]
                  		}
                  },
                  
                  
                  S 1 Reply Last reply Apr 24, 2021, 8:25 PM Reply Quote 0
                  • S Away
                    sdetweil @CheapDad
                    last edited by sdetweil Apr 24, 2021, 8:26 PM Apr 24, 2021, 8:25 PM

                    @cheapdad u should have gotten an error in the window where u start MM…
                    I do copying your stuff

                    		},
                    		^
                    SyntaxError: Unexpected token '}'
                        at wrapSafe (internal/modules/cjs/loader.js:1060:16)
                        at Module._compile (internal/modules/cjs/loader.js:1108:27)
                        at Object.Module._extensions..js (internal/modules/cjs/loader.js:1173:10)
                        at Module.load (internal/modules/cjs/loader.js:992:32)
                        at Module._load (internal/modules/cjs/loader.js:885:14)
                        at Function.f._load (electron/js2c/asar_bundle.js:5:12738)
                        at loadApplicationPackage (/home/sam/MagicMirror/node_modules/electron/dist/resources/default_app.asar/main.js:110:16)
                        at Object.<anonymous> (/home/sam/MagicMirror/node_modules/electron/dist/resources/default_app.asar/main.js:222:9)
                        at Module._compile (internal/modules/cjs/loader.js:1152:30)
                        at Object.Module._extensions..js (internal/modules/cjs/loader.js:1173:10)
                    

                    and npm config:check says

                    (base) sam@sams:~/MagicMirror$ npm run config:check
                    
                    > magicmirror@2.15.0 config:check /home/sam/MagicMirror
                    > node js/check_config.js
                    
                    [24.04.2021 15:25.20.258] [INFO]  Checking file...  /home/sam/MagicMirror/config/config.js
                    [24.04.2021 15:25.20.270] [ERROR] Your configuration file contains syntax errors :(
                    [24.04.2021 15:25.20.270] [ERROR] Line 56 column 7: Parsing error: Unexpected token {
                    

                    shorter answer, u are missing a }

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    C 1 Reply Last reply Apr 24, 2021, 9:03 PM Reply Quote 0
                    • C Offline
                      CheapDad @sdetweil
                      last edited by Apr 24, 2021, 9:03 PM

                      @sdetweil That’s the strange thing, I’m not getting any errors when I run npm run config:check.

                      Unfortunately, I had to rebuild my config.js since I installed a module, edited config.js and ended up with a blank screen that no commenting the config.js entries didn’t fix.

                      Here’s the new (old) compliments entries:

                      			module: "compliments",
                      			position: "lower_third",
                      			config:  {
                      				compliments: {
                      					anytime: ["Hey there Emma!"],
                      					morning: ["Good morning, Emma!", "Enjoy your day!", "How was your sleep?"],
                      					afternoon: ["Hello, Emma!", "You look beautiful!", "Looking good today!"],
                      					evening: ["Wow, you look great!", "You look nice!", "Hi, Emma!"],
                      					"....-01-01": ["Happy new year!"]
                      		}
                      	},
                      

                      And my npm run config:check:

                      pi@emmasmagicmirror:~/MagicMirror $ npm run config:check
                      
                      > magicmirror@2.15.0 config:check /home/pi/MagicMirror
                      > node js/check_config.js
                      
                      [24.04.2021 16:58.15.197] [INFO]  Checking file...  /home/pi/MagicMirror/config/config.js
                      [24.04.2021 16:58.15.352] [INFO]  Your configuration file doesn't contain syntax errors :)
                      pi@emmasmagicmirror:~/MagicMirror $ 
                      
                      S 1 Reply Last reply Apr 24, 2021, 9:06 PM Reply Quote 0
                      • 1
                      • 2
                      • 1 / 2
                      • 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