keep running against a wall



  • can someone look at my code and tell me what iam doing wrong?```
    //
    language: “en”,
    – timeFormat: 24,
    – units: “metric”,

    – modules: [
    – {
    – module: “alert”,
    – },
    – {
    – module: “updatenotification”,
    – position: “top_bar”
    – },
    – {
    – module: “clock”,
    – position: “top_left”
    – },
    – {
    – module: “rainfc”,
    – position: “top_right”,
    – header: “Rain forecast”,
    – config: {
    – lat: “52.525”,
    – lon: “5.71806”,
    – width: 200,
    – height: 150,
    – lineWidth: 2,
    – lineColor: “#e0ffe0”,
    – fillColor: “#e0ffe0”,
    – maxPower: 300,
    – rainText: "Tot: ",
    – noRainText: "Geen regen tot: ",
    – nrOfTimeLabels: 5 // advised values: 2-5
    – },
    – {
    – module: “calendar”,
    – header: “agenda”,
    – position: “top_left”,
    – config: {
    – calendars: [
    – {
    – symbol:“calendar”,
    – url:“https://calendar.google.com/calendar/ical/my info.calendar.google.com/public/basic.ics”,
    – },
    – symbol: "calendar-check-o ",
    – url: “https://calendar.google.com/calendar/ical/myinf%40gmail.com/public/basic.ics
    – }
    – ]
    – }
    – },



  • Please use the markdown features to make your code easier to read.

    The name of the module must match the name of the Github project and (more importantly) the name of the directory where the module resides. Try module: “MMM-rainfc”,. Also, it looks like you closed the config of the rainfc module, but you didn’t close the module itself. So:

    {
    module: “MMM-rainfc”,
    position: “top_right”,
    header: “Rain forecast”,
    config: {
    lat: “52.525”,
    lon: “5.71806”,
    width: 200,
    height: 150,
    lineWidth: 2,
    lineColor: “#e0ffe0”,
    fillColor: “#e0ffe0”,
    maxPower: 300,
    rainText: "Tot: ",
    noRainText: "Geen regen tot: ",
    nrOfTimeLabels: 5 // advised values: 2-5
    }  
    },
    


  • i hope i changed it correctly it is all new for me and english is my second Language

    --/* Magic Mirror Config Sample
    -- *
    -- * By Michael Teeuw http://michaelteeuw.nl
    -- * MIT Licensed.
    -- *
    -- * For more information how you can configurate this file
    -- * See https://github.com/MichMich/MagicMirror#configuration
    -- *
    -- */
    --
    --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: "clock",
    --			position: "top_left"
    --		},
    --		{
    --		module: "MMM-rainfc",
    --		position: “top_right”,
    --            	header: “Rain forecast”,
    --		config: {
    --			lat: "52.525",
    --			lon: "5.71806",
    --			width: 200,
    --			height: 150,
    --			lineWidth: 2,
    --			lineColor: "#e0ffe0",
    --			fillColor: "#e0ffe0",
    --			maxPower: 300,
    --			rainText: "Tot: ",
    --			noRainText: "Geen regen tot: ",
    --			nrOfTimeLabels: 5 // advised values: 2-5
    --		}
          },
    --		{
    --			module: "calendar",
    --			header: "agenda",
    --			position: "top_left",
    --			config: {
    --				calendars: [
    --					{
    --				symbol:"calendar",
    --				url:"https://calendar.google.com/calendar/ical/8tjs1qac4300edu3evdqsh3gp8%40group.calendar.google.com/public/basic.ics",
    --			},
    --						symbol: "calendar-check-o ",
    --						url: "https://calendar.google.com/calendar/ical/ferrynoiz%40gmail.com/public/basic.ics"
    --					}
    --				]
    --			}
    --		},
    --		{
    --			module: "compliments",
    --			position: "lower_third"
    --		},
    --
    --			module: "newsfeed",
    --			position: "bottom_bar",
    --			config: {
    --				feeds: [
    --					{
    --						title: "Nu",
    --						url: "https://www.nu.nl/rss/Algemeen.xml"
    --					}
    --				],
    --				showSourceTitle: true,
    --				showPublishDate: true
    --			}
    --		},
    --	]
    --
    --};
    --
    --/*************** DO NOT EDIT THE LINE BELOW ***************/
    --if (typeof module !== "undefined") {module.exports = config;}
    
    

  • Module Developer

    I’m pretty sure that these type of quotes “MMM-rainfc”will cause syntax errors. Notice the difference between those and these "MMM-rainfc"

    Edit: Nevermind! 🙂



  • @Mykle1 said in keep running against a wall:

    “MMM-rainfc”

    that is so small i did not see it can you recommend a good text editor for a noob?


  • Module Developer

    I prefer notepad++ on PC and notepadqq on linux but there are others. Sublime is another favorite of many people


  • Module Developer

    @noiz13 said in keep running against a wall:

    https://www.nu.nl/rss/Algemeen.xml

    Ok, I took a look at this at Peter’s request, so you can thank him. A number of things wrong with this config.

    1. This calendar url fails to load
      https://calendar.google.com/calendar/ical/8tjs1qac4300edu3evdqsh3gp8%40group.calendar.google.com/public/basic.ics

    2. This calendar url:
      https://calendar.google.com/calendar/ical/ferrynoiz%40gmail.com/public/basic.ics

    Only returns this
    0_1516051365022_1.PNG

    1. This newfeed url is not working
      https://www.nu.nl/rss/Algemeen.xml

    2. The author of “rainfc” created the repo in the name of MMM-rainfc. This is a problem because the module files are named “rainfc.js” and “rainfc.css”. So, for now, you can simply rename your MMM-rainfc folder to “rainfc” to coincide with your config.js entry. You can message the author about the error.

    3. the rainfc module loaded once for me with a black and white graph. The very next time I tried to run it I saw the message “NO DATA” and this:
      0_1516052020800_2.PNG

    I highly suspect that the API for this module is having troubles, at least at the moment of my testing.

    1. I have no idea where all those double dashes in your config came from. Those have to go. If you can simply copy and paste you can use this, saved as a js file and named “config.js”
    /* Magic Mirror Config Sample
     *
     * By Michael Teeuw http://michaelteeuw.nl
     * MIT Licensed.
     *
     * For more information how you can configurate this file
     * See https://github.com/MichMich/MagicMirror#configuration
     *
     */
    
    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: "clock",
    			position: "top_left"
    		},
    		{
    		module: "rainfc",
    		position: "top_right",
                	header: "Rain forecast",
    		config: {
    			lat: "52.37",
    			lon: "4.90", 
    			width: 200,
    			height: 150,
    			lineWidth: 2,
    			lineColor: "#e0ffe0",
    			fillColor: "#e0ffe0",
    			maxPower: 300,
    			rainText: "Tot: ",
    			noRainText: "Geen regen tot: ",
    			nrOfTimeLabels: 5 // advised values: 2-5
    		}
    	},
    		{
    			module: "calendar",
    			header: "US Holidaysz",
    			position: "top_left",
    			config: {
    				calendars: [
    					{
    						symbol: "calendar-check-o ",
    						url: "https://calendar.google.com/calendar/ical/ferrynoiz%40gmail.com/public/basic.ics"
    					//	url: "https://calendar.google.com/calendar/ical/8tjs1qac4300edu3evdqsh3gp8%40group.calendar.google.com/public/basic.ics"
    					//	url: "webcal://www.calendarlabs.com/templates/ical/US-Holidays.ics"
    					}
    				]
    			}
    		},
    		{
    			module: "compliments",
    			position: "lower_third"
    		},
    		{
    			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"
    			}
    		},
    		{
    			module: "newsfeed",
    			position: "bottom_bar",
    			config: {
    				feeds: [
    					{
    						title: "New York Times",
    					//	url: "https://www.nu.nl/rss/Algemeen.xml",
    						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;}
    
    


  • thank you this is awesome much appreciated. now i can appropriated old laptop and use it as my test set.


  • Module Developer

    @noiz13

    Graag gedaan! (I googled that)

    Old laptops are an excellent choice for getting to know the MM software or for driving the mirror itself. In fact, they are all I use these days. They are widely available, relatively inexpensive and have everything you need built right in. I’ve made 2 mirrors using just a laptop. They perform exceptionally well.

    Peace.



  • @Mykle1 it works thank you for your code now i can learn more.

    regarding the os i have put raspian on the laptop because my thought is that works the best.
    however MM is seeing my laptop as a raspberry 1 witch is incompatible with MM can i use normal debian would that be better?