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

Total rookie, got it "running" but need help

Scheduled Pinned Locked Moved Solved Troubleshooting
8 Posts 4 Posters 1.5k Views 3 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 Feb 20, 2019, 4:51 AM Feb 20, 2019, 4:41 AM

    I am a total novice with coding but I can follow directions. I did the auto installation on a 3b+ using the Tutorial by KirAsh4

    I tried to turn the wireless power option off but I didn’t have the wlan section so I tried manually typing it and following the directions. When I rebooted, it still had wireless power on.

    My config file was the sample so I followed the directions here https://forum.magicmirror.builders/topic/195/need-help-with-config-file

    when I open it, its still all the sample stuff, should I delete it before adding a weather module?

    I went here https://forum.magicmirror.builders/topic/4231/how-to-add-modules-for-absolute-beginners

    I followed the directions but instead of Jeopardy, I went here https://github.com/jclarke0000/MMM-DarkSkyForecast

    I did the git clone https://github.com/jclarke0000/MMM-DarkSkyForecast.git and everthing seems to be fine.

    I am stuck at the following which goes along with my config file queston:

    Enter the new MMM-DarkSkyForecast directory and execute npm install.
    Configuration
    At a minimum you need to supply the following required configuration parameters:

    apikey ( I did go to Dark Sky and get a key)
    latitude
    longitude

    Can somebody help me figure this out. Old guy here with no coding experience at all, trying to make a present for a kid going away to college.

    Thanks for all of your help!

    Crap, I tried to run it before going to bed and I’m getting the please create a config file. More help please & thank you

    1 Reply Last reply Reply Quote 0
    • G Offline
      ganget
      last edited by Feb 20, 2019, 9:17 AM

      @motdog If you could post your config file without the secret’s in it. Secrets being api keys and other sensitive information I can help you further.

      If you enclose your code with ``` it will be more readable.

      //your code here
      

      Answers for your questions
      To install de dependecies for MMM-DarkSkyForecast, you will need to use the command prompt (can be found in the start menu). You can use this info to navigate to the right folder being MMM-DarkSkyForecast. When you are in the right folder use the command npm install to install all the dependecies.

      Latitude and longitude can be found on here

      Good luck and if you have any more questions ask!

      greetings Ganget

      1 Reply Last reply Reply Quote 0
      • M Offline
        motdog
        last edited by motdog Feb 20, 2019, 4:18 PM Feb 20, 2019, 4:14 PM

        here is what is in my config.js file I see weatherforcast as a module ,so not sure why it didnt show up when I ran the mirror. I had a , after js and I removed it so I can access the mirror. Still not sure where to go from here, want weather and would like the clock not to be in 24 hour format.

        Thanks

        /* 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: "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: "New York",
        			locationID: "",  //ID from http://bulk.openweathermap.org/sample/; unzip the gz file and find your city
        			appid: "YOUR_OPENWEATHER_API_KEY"
        		}
        	},
        	{
        		module: "weatherforecast",
        		position: "top_right",
        		header: "Weather Forecast",
        		config: {
        			location: "New York",
        			locationID: "5128581",  //ID from https://openweathermap.org/city
        			appid: "YOUR_OPENWEATHER_API_KEY"
        		}
        	},
        	{
        		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;}

        B 1 Reply Last reply Feb 20, 2019, 4:52 PM Reply Quote 0
        • B Offline
          bhepler Module Developer @motdog
          last edited by bhepler Feb 20, 2019, 4:53 PM Feb 20, 2019, 4:52 PM

          @motdog - Okay, let’s get you fixed up. First step is how to use the markdown features of the forum. Read that real quick before you reply. Especially the part at the bottom about posting code.

          By default, the current weather and the weather forecast don’t work. That’s because it needs a key to access the web API that contains the forecast data and it needs a location to load weather data. Let’s look at the part of config.js that is specific to the current weather module. It currently reads:

          {
          module: "currentweather",
          position: "top_right",
          config: {
          	location: "New York",
          	locationID: "",  //ID from htttp://bulk.openweathermap.org/sample/; unzip the gz file and find your city
          	appid: "YOUR_OPENWEATHER_API_KEY"
                  }
          },
          

          For starters, you can delete everything after the // characters on the line that reads locationID. That’s a helpful comment and isn’t executed by the system. Get rid of it to clean it up a bit.

          You have to do two things here: Find the location ID for your area and you have to sign up for an OpenWeather API key. Location is easy. Go to OpenWeatherMap and search for where you live. Follow that link and use the search box to type in your city. I’ll use Little Rock, Arkansas as an example. When I search for that city, I get a handful of results. Pick one and click on it. You’ll get a webpage with current weather and forecast, right? Look at the URL of that page and you’ll see something like this: https://openweathermap.org/city/4898342

          That seven digit number is the location ID. Plug that into the config.js as the value of the locationID key. Like so:

          {
          module: "currentweather",
          	position: "top_right",
          	config: {
          		location: "New York",
          		locationID: "4898342",  
          		appid: "YOUR_OPENWEATHER_API_KEY"
          	}
          },
          

          Once you have that, go back to your web browser on the OpenWeatherMap web page. At the top is a menu item called “API”. Click on it. You’ll be given several options on how to sign up for their service and obtain an API Key. Go ahead and register for the free tier. Once you’ve successfully registered, you can click on the Sign In option and you’ll be given a sub-menu that includes a link to “API Keys”. Follow that link and you’ll see the interface to generate an API key. Punch in a name for your key and click on “Generate”. It will show you a stream of gibberish. That is your API key. Copy that down, 'cuz you’re going to need it.

          Now you just need to plug your API key back into the config.js file.

          {
          module: "currentweather",
          position: "top_right",
          config: {
          	location: "New York",
          	locationID: "4898342",  
          	appid: "1234567890ABBACADABBA"
                  }
          },
          

          Save your file and restart your Mirror process (pm2 restart 0). You should see the current weather. I’ll leave the configuration of the weather forecast as an exercise for the newbie. :)

          M 2 Replies Last reply Feb 20, 2019, 7:06 PM Reply Quote 0
          • M Offline
            motdog @bhepler
            last edited by Feb 20, 2019, 7:06 PM

            @bhepler Thanks. I’m a visual learner so seeing it broken down like this helps. I also found a few youtube videos that hopefully will do the same. I get changing the forecast will be the same as the current weather with the proper info in place.

            1 Reply Last reply Reply Quote 0
            • M Offline
              motdog @bhepler
              last edited by Feb 21, 2019, 4:23 AM

              @bhepler ok things are a mess. Thought I did the weather thing correct. When I try to launch I get the dreaded please create a config file Totally appreciate the help

              /* 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: 12
              	units: "Imperial",
              
              	modules: [
              		{
              			module: "alert",
              		},
              		{
              			module: "updatenotification",
              			position: "top_bar"
              		},
              		{
              			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: "Cottleville",
              				locationID: "4382491",  
              			}
              		},
              		{
              			module: "weatherforecast",
              			position: "top_right",
              			header: "Weather Forecast",
              			config: {
              				location: "Cottleville",
              				locationID: "4382491",  
              				appid: "06ba2b8cec1e843098c058756882d642"
              			}
              		},
              		{
              			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
              			}
              		},
              	]
              
              };
              
              1 Reply Last reply Reply Quote 0
              • M Offline
                motdog
                last edited by Feb 21, 2019, 4:37 AM

                Don’t know if I properly copied sample file to config.js kinda guessed how to do so

                1 Reply Last reply Reply Quote 0
                • E Offline
                  ejay-ibm Project Sponsor Module Developer
                  last edited by ejay-ibm Feb 21, 2019, 7:48 AM Feb 21, 2019, 7:48 AM

                  @motdog said in Total rookie, got it "running" but need help:

                  timeFormat: 12

                  You are missing a comma at line 25

                  it should be

                  timeFormat: 12,
                  

                  Ejay

                  1 Reply Last reply Reply Quote 0
                  • 1 / 1
                  1 / 1
                  • First post
                    8/8
                    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