mmm Dad Jokes



  • Ok, what am I not doing right. I have placed the module
    in the config file and get no errror when running he MMM yet nothing shows on the screen when I run MM other than the normal MM items.



  • Try a reboot. I believe that it’s needed for this module


  • Project Sponsor Module Developer

    @bokow

    Have you cloned the module into your modules folder?

    Your config entry should look like this. There is a comma missing in the example of the README file:

    {
             module: 'MMM-Dad-Jokes',
             position: 'bottom_left', // Or wherever you want
             config: {
                 updateInterval: 60000,
                 fadeSpeed: 4000
             }
         }, 
    

    Notice the closing curly bracket. It has a comma after it that needs to be there which is not depicted in the README example. Here is a screenshot of the module displayed in the lower_third position.

    0_1558642857197_Screenshot from 2019-05-23 16-18-26.png



  • Thanks for all the reply’s will let you know if it works



  • Still have not got it to work, Here are the errors:
    SyntaxError: Unexpected token var
    at new Script (vm.js:74:7)
    at createScript (vm.js:246:10)
    at Object.runInThisContext (vm.js:298:10)
    at Module._compile (internal/modules/cjs/loader.js:678:28)
    at Object.Module._extensions…js (internal/modules/cjs/loader.js:722:10)
    at Module.load (internal/modules/cjs/loader.js:620:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:559:12)
    at Function.Module._load (internal/modules/cjs/loader.js:551:3)
    at Module.require (internal/modules/cjs/loader.js:658:17)
    at require (internal/modules/cjs/helpers.js:20:18)


  • Project Sponsor

    @bokow - Copy & paste your relevant config.js entry for MMM-Dad-Jokes here and we’ll take a quick look at it. Remember to use the markdown features of the board.



  • /* 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: 24,
    units: "metric",
    
    modules: [
    	{
    		module: "alert",
    	},
    	{
    		module: "updatenotification",
    		position: "top_bar"
    	},
    	
    	{
            module: 'MMM-icanhazdadjoke',
            position: 'bottom_right',
            config: {
                // See below for configurable options
            	}
        		},
    	{	
    		module: "clock",
    		position: "top_left"
    	},
    	{
    		module: "calendar",
    		header: "US Holidays",
    		position: "top_left",
    		config: {
    			calendars: [
    				{
    					symbol: "calendar-check",
    					url: "webcal://www.calendarlabs.com/templates/ical/US-Holidays.ics"
    				}
    			]
    		}
    	},
    	{
    		module: "compliments",
    		position: "lower_third"
    	},
    	{
    		module: "currentweather",
    		position: "top_right",
    		config: {
    			location: "Saginaw",
    			locationID: "5007989",  //ID from http://bulk.openweathermap.org/sample/; unzip the gz file and find your city
    			appid: "90f012418925c43d4ac4e54f147c53be"
    		}
    	},
    	{
    		module: "weatherforecast",
    		position: "top_right",
    		header: "Weather Forecast",
    		config: {
    			location: "Saginaw",
    			locationID: "5007989",  //ID from https://openweathermap.org/city
    			appid: "90f012418925c43d4ac4e54f147c53be"
    		}
    	},
    	{
    		module: "newsfeed",
    		position: "bottom_bar",
    		config: {
    			feeds: [
    				{
    					title: "New York Times",
    					url: "http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml"
    				}
    			],
    			showSourceTitle: true,
    			showPublishDate: true
    		}
    	},
    ]
    

    };

    /*************** DO NOT EDIT THE LINE BELOW ***************/
    if (typeof module !== “undefined”) {module.exports = config;}



  • Never mind got the Dad Jokes working by moving where the text was displayed to a blank area of the screen



  • @bokow could u edit your post with the config and add three backticks (shifted left of 1 key) on the 1st line, then config start on line 2, and 3 backticks on the last line by themselves…



  • All I had to do was place the location of the jokes to an unoccupied part of the screen. It now works as advertised but t his raises a new problem with the calendar module. The calendar shows nothing, even holidays. I guess my question is where does this app take the calendar info from??