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.

    Changed a few compliments, hosed it up - not fixed, still hosed

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    13 Posts 5 Posters 4.5k Views 5 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.
    • M Offline
      motdog
      last edited by motdog

      I had added a couple of compliments and things were good. I went in to the compliments module and made the changes. Now I added a few more and something isn’t right. Been trying for a while to figure whats up. Hopefully new eyes can tell me. This code is taken from compliments. js

      Module.register("compliments", {
      
      	// Module config defaults.
      	defaults: {
      		compliments: {
      			anytime: [
      				"Hey there sexy!"
      			],
      			morning: [
      				"Good morning, handsome!",
      				"Enjoy your day!",
      				"How was your sleep?",
      				"Coffee Time!",
      				"Whats goin on?",
      				"What a fine looking Jew"
      			],
      			afternoon: [
      				"Hello, beauty!",
      				"You look sexy!",
      				"Looking good today!",
      				"Keep on Keepin on",
      				"All right Hamilton",
      				"Almost quitting time"
      				
      			],
      			evening: [
      				"Wow, you look hot!",
      				"You look nice!",
      				"Hi, sexy!",
      				"Did you lose weight?",
      				"Rock Chalk Jayhawk"
      				"Get a good nights rest"
      				
      			],
      		}
      
      		}
      		updateInterval: 30000,
      		remoteFile: null,
      		fadeSpeed: 4000,
      		morningStartTime: 3,
      		morningEndTime: 12,
      		afternoonStartTime: 12,
      		afternoonEndTime: 17
      	},
      
      CyruS1337C 1 Reply Last reply Reply Quote 0
      • CyruS1337C Offline
        CyruS1337 Project Sponsor @motdog
        last edited by

        @motdog said in Changed a few compliments, hosed it up:

          	evening: [
          		"Wow, you look hot!",
          		"You look nice!",
          		"Hi, sexy!",
          		"Did you lose weight?",
          		"Rock Chalk Jayhawk",
          		"Get a good nights rest"
        

        do you miss a comma?

        1 Reply Last reply Reply Quote 0
        • yawnsY Offline
          yawns Moderator
          last edited by

          Missing comma after "Rock Chalk Jayhawk", missing comma and one unneeded closing bracket in

          			],
          		}
          
          		}
          
          1 Reply Last reply Reply Quote 0
          • M Offline
            motdog
            last edited by

            Thanks everyone. Got it fixed

            1 Reply Last reply Reply Quote 0
            • M Offline
              motdog
              last edited by

              no I don’t ugh. cant figure out what I am missing. Here is compliment config and main config. I went back to the original compliment config thinking once I got that straight I could slowly add to it. NOPE.

              Compliments

              Module.register("compliments", {
              
              	// Module config defaults.
                     config:  {
              		compliments: {
              			anytime: [
              			"Hey there sexy!"
              		],
              		morning: [
              			"Good morning, handsome!",
              			"Enjoy your day!",
              			"How was your sleep?"
              		],
              		afternoon: [
              			"Hello, beauty!",
              			"You look sexy!",
              			"Looking good today!"
              		],
              		evening: [
              			"Wow, you look hot!",
              			"You look nice!",
              			"Hi, sexy!"
              		]
              	
              }
              }
              
              		
              		updateInterval: 30000,
              		remoteFile: null,
              		fadeSpeed: 4000,
              		morningStartTime: 3,
              		morningEndTime: 12,
              		afternoonStartTime: 12,
              		afternoonEndTime: 17
              	},
              
              

              Main config

              
              	language: "en",
              	timeFormat: 12,
              	units: "Imperial",
              
              	modules: [
              		{
              			module: "alert",
              		},
              		{
              			module: "updatenotification",
              			position: "top_bar"
              		},
              		{
              			module: "clock",
              			position: "top_left"
              		},
              		{
              			module: "calendar",
              			
              			position: "top_left",
              			config: {
              				calendars: [
              					{
              						symbol: "calendar-check",
              						url: "webcal://www.calendarlabs.com/templates/ical/US-Holidays.ics"
              					},
              					
              					{
              						symbol: "calendar-check",
              						url: "https://calendar.google.com/calendar/ical/1ci28ki5g1pn81org2g92fxxxxxl%40import.calendar.google.com/public/basic.ics"
              
              					},
              						
              					{
              						symbol: "calendar-check",
              						url: "http://ical-cdn.teamsnap.com/team_schedule/d8dbcf70-3b1e-0133-4d58-3c764xxxxxx.ics"
              
              					},
              
              					{
              						symbol: "calendar-check",
              						url: "http://ical-cdn.teamsnap.com/team_schedule/7xxxxxxx-8341-27d64356a68b.ics"
              
              					},
              
              				]
              			}
              		},
              
              		{
                  module: 'MMM-Remote-Control',
                  // uncomment the following line to show the URL of the remote control on the mirror
                    position: 'bottom_right',
                  // you can hide this module afterwards from the remote control itself
                  config: {
                      customCommand: {},  // Optional, See "Using Custom Commands" below
                      customMenu: "custom_menu.json", // Optional, See "Custom Menu Items" below
                      showModuleApiMenu: true, // Optional, Enable the Module Controls menu
                      apiKey: "",         // Optional, See API/README.md for details
                  }
              },
              
              
              		{
              			module: "compliments",
              			position: "lower_third"
              		},
              		
              		
              
              {
              			  module: "MMM-DarkSkyForecast",
              
              lavolp3L 1 Reply Last reply Reply Quote 0
              • CyruS1337C Offline
                CyruS1337 Project Sponsor
                last edited by CyruS1337

                Is missing with the bracket}, not a comma?

                Module.register("compliments", {
                
                	// Module config defaults.
                       config:  {
                		compliments: {
                			anytime: [
                			"Hey there sexy!"
                		],
                		morning: [
                			"Good morning, handsome!",
                			"Enjoy your day!",
                			"How was your sleep?"
                		],
                		afternoon: [
                			"Hello, beauty!",
                			"You look sexy!",
                			"Looking good today!"
                		],
                		evening: [
                			"Wow, you look hot!",
                			"You look nice!",
                			"Hi, sexy!"
                		]
                	
                },
                
                1 Reply Last reply Reply Quote 0
                • lavolp3L Offline
                  lavolp3 Module Developer @motdog
                  last edited by

                  @motdog Your brackets don’t look good, apart from the missing indentation:

                  Module.register("compliments", {
                  
                  	// Module config defaults.
                         config:  {
                  		compliments: {
                  			anytime: [
                  			"Hey there sexy!"
                  		         ],
                  		morning: [
                  			"Good morning, handsome!",
                  			"Enjoy your day!",
                  			"How was your sleep?"
                  		        ],
                  		afternoon: [
                  			"Hello, beauty!",
                  			"You look sexy!",
                  			"Looking good today!"
                  		        ],
                  		evening: [
                  			"Wow, you look hot!",
                  			"You look nice!",
                  			"Hi, sexy!"
                  		       ]
                  	
                                  },                 < COMMA HERE
                  }            <   THIS NEEDS TO GO AWAY!
                  
                  		
                  		updateInterval: 30000,
                  		remoteFile: null,
                  		fadeSpeed: 4000,
                  		morningStartTime: 3,
                  		morningEndTime: 12,
                  		afternoonStartTime: 12,
                  		afternoonEndTime: 17
                  	},
                  
                  

                  How to troubleshoot modules
                  MMM-soccer v2, MMM-AVStock

                  1 Reply Last reply Reply Quote 0
                  • M Offline
                    motdog
                    last edited by

                    Still hosed…

                    
                    				]
                    			}
                    		},
                    
                    		{
                        module: 'MMM-Remote-Control',
                        // uncomment the following line to show the URL of the remote control on the mirror
                          position: 'bottom_right',
                        // you can hide this module afterwards from the remote control itself
                        config: {
                            customCommand: {},  // Optional, See "Using Custom Commands" below
                            customMenu: "custom_menu.json", // Optional, See "Custom Menu Items" below
                            showModuleApiMenu: true, // Optional, Enable the Module Controls menu
                            apiKey: "",         // Optional, See API/README.md for details
                        }
                    },
                    
                    
                    		{
                    			module: "compliments",
                    			position: "lower_third"
                    
                    			
                    		},
                    		
                    		
                    
                    {
                    
                    S lavolp3L 2 Replies Last reply Reply Quote 0
                    • S Do not disturb
                      sdetweil @motdog
                      last edited by

                      @motdog please run (from the MM folder)

                      npm config:check
                      

                      start at the top and fix any errors
                      repeat til no errros

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

                      lavolp3L 1 Reply Last reply Reply Quote 0
                      • lavolp3L Offline
                        lavolp3 Module Developer @motdog
                        last edited by

                        @motdog
                        go to jshint.com and paste your module file there.
                        It may help you with missing commata or brackets.

                        Beyond that, consider copying your changed comments to another file and doing a

                        git reset --hard
                        

                        to get back to a working state. And then read through the readme of the module about including compliments.

                        How to troubleshoot modules
                        MMM-soccer v2, MMM-AVStock

                        S 1 Reply Last reply 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