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

keep running against a wall

Scheduled Pinned Locked Moved Troubleshooting
11 Posts 3 Posters 3.8k Views 2 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.
  • N Offline
    noiz13
    last edited by Jan 15, 2018, 11:11 AM

    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”
    – }
    – ]
    – }
    – },

    1 Reply Last reply Reply Quote 0
    • B Offline
      bhepler Module Developer
      last edited by bhepler Jan 15, 2018, 12:27 PM Jan 15, 2018, 12:20 PM

      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
      }  
      },
      
      1 Reply Last reply Reply Quote 1
      • N Offline
        noiz13
        last edited by Jan 15, 2018, 12:55 PM

        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;}
        
        
        1 Reply Last reply Reply Quote 0
        • Mykle1M Offline
          Mykle1 Project Sponsor Module Developer
          last edited by Mykle1 Jan 15, 2018, 12:57 PM Jan 15, 2018, 12:55 PM

          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! :-)

          Create a working config
          How to add modules

          N 1 Reply Last reply Jan 15, 2018, 12:57 PM Reply Quote 2
          • N Offline
            noiz13 @Mykle1
            last edited by Jan 15, 2018, 12:57 PM

            @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?

            1 Reply Last reply Reply Quote 0
            • Mykle1M Offline
              Mykle1 Project Sponsor Module Developer
              last edited by Jan 15, 2018, 1:00 PM

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

              Create a working config
              How to add modules

              1 Reply Last reply Reply Quote 0
              • Mykle1M Offline
                Mykle1 Project Sponsor Module Developer
                last edited by Jan 15, 2018, 9:38 PM

                @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;}
                
                

                Create a working config
                How to add modules

                1 Reply Last reply Reply Quote 3
                • N Offline
                  noiz13
                  last edited by Jan 16, 2018, 6:59 AM

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

                  Mykle1M 1 Reply Last reply Jan 16, 2018, 12:14 PM Reply Quote 0
                  • Mykle1M Offline
                    Mykle1 Project Sponsor Module Developer @noiz13
                    last edited by Jan 16, 2018, 12:14 PM

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

                    Create a working config
                    How to add modules

                    N 1 Reply Last reply Jan 17, 2018, 9:36 AM Reply Quote 0
                    • N Offline
                      noiz13 @Mykle1
                      last edited by Jan 17, 2018, 9:36 AM

                      @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?

                      Mykle1M 1 Reply Last reply Jan 17, 2018, 12:17 PM Reply Quote 0
                      • 1
                      • 2
                      • 1 / 2
                      1 / 2
                      • First post
                        1/11
                        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