MagicMirror² v2.4.1 is available! For more information about this release, check out this topic.
Please read the release notes carefully since this update requires adjustments to your Raspberry Pi configuration!

Modifying Compliments module



  • So i’ve been working on this for a few weeks now and i’m completely stuck. I tried to change the compliments module in config.js and get an error at the three lines after position. Can anyone figure out what I’m doing wrong? here is my config.js
    /* Magic Mirror Config Sample

    */

    var config = {
    address: “localhost”, // Address to listen on, can be:
    // - “localhost”, “127.0.0.1”, “::1” to listen on loopback interface
    // - another specific IPv4/6 to listen on a specific interface
    // - “”, “0.0.0.0”, “::” to listen on any interface
    // Default, when address config is left out, is “localhost”
    port: 8080,
    ipWhitelist: [“127.0.0.1”, “::ffff:127.0.0.1”, “::1”], // Set [] to allow all IP addresses
    // or add a specific IPv4 of 192.168.1.5 :
    // [“127.0.0.1”, “::ffff:127.0.0.1”, “::1”, “::ffff:192.168.1.5”],
    // or IPv4 range of 192.168.3.0 --> 192.168.3.15 use CIDR format :
    // [“127.0.0.1”, “::ffff:127.0.0.1”, “::1”, “::ffff:192.168.3.0/28”],

    language: "en",
    timeFormat: 12,
    units: "imperial",
    
    modules: [
    	{
    		module: "alert",
    	},
    	{
    		module: "updatenotification",
    		position: "top_bar"
    	},
    	{
    		module: "clock",
    		position: "top_left"
    	},
    	
    	{
    		module: "compliments",
    		position: "lower_third",
                        Config: {
                            updateInterval: 30000,
                            compliments: {
    	                       morning:  [
                                       “Good morning love!”,
    	                           “Have a great day!”,
                                       “Hey Sexy!”
    		                            ],
                                       afternoon:  [
                                       “Still looking great!”,
                                       “The cats are being bastards again”,
                                                     ],
    	                       evening:  [ 
                                       “How was your day?”,
                                       “You can do anything!”
                                                  ],
                              }
                     }
    	},
    	{
    		module: "currentweather",
    		position: "top_right",
    		config: {
    			location: "New York",
    			locationID: "",  //ID from http://www.openweathermap.org/help/city_list.txt
    			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/help/city_list.txt
    			appid: "YOUR_OPENWEATHER_API_KEY"
    		}
    	},
    	
    ]
    

    };



  • Use a different module for compliments…

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

    A lot easier to use…



  • @cowboysdude I’ll give it a shot, thanks!



  • This is the config…VERY simple!

    {
    module: ‘MMM-NiceThings’,
    position: ‘lower_third’
    },

    @Mykle1 will show you the errors so if you want you can also fix your config 🙂 He’s good like that!


  • Module Developer

    @acbc18 said in Modifying Compliments module:

    Can anyone figure out what I’m doing wrong?

    Your use of curly quotes

    “Good morning love!”,
    

    Should be

    "Good morning love!",
    

    No more curly quotes, EVER! :^)

    Just so we’re clear, you can’t use them at all so you’ll have to check your entire config for them.

    Find ” and “ Replace with "



  • @Mykle1 EVERRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR LOL



  • @Mykle1 Thank you. I’m new at this and didn’t notice it but will do from now on.



  • @Mykle1 Outside of that though is there any syntax issue with the lines starting with config: { down to compliments: {?
    Edit: thanks guys turns out I had left out a comma and putting that in fixed it (after changing the quotes).


  • Module Developer

    @acbc18 said in Modifying Compliments module:

    Thank you. I’m new at this and didn’t notice it but will do from now on.

    No worries friend. We’ve all been there.

    thanks guys turns out I had left out a comma and putting that in fixed it (after changing the quotes).

    Excellent! Those are two things you won’t forget.

    Enjoy your mirror! :^)