MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    1. Home
    2. mrlowndes
    3. Posts
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.
    M
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 7
    • Posts 46
    • Groups 0

    Posts

    Recent Best Controversial
    • RE: Weather module config

      @sdetweil Thanks so much, the documentation doesn’t make that clear at all

      posted in Troubleshooting
      M
      mrlowndes
    • RE: Weather module config

      @sdetweil Do you have any suggestions as to what I should try next?

      posted in Troubleshooting
      M
      mrlowndes
    • RE: Weather module config

      @sdetweil do you know where I could get an appid for weathergov? The documentation for the module is very thin

      posted in Troubleshooting
      M
      mrlowndes
    • RE: Weather module config

      @sdetweil Thanks for the tip. The errors were at the bottom. This is what I found:

      Failed to load resource: the server responded with a status of 400 ()
      weathergov.js:55 Could not load data ...  
      XMLHttpRequest
      weather.js:151 New weather information available.
      main.js:301 [Intervention] Slow network is detected. See https://www.chromestatus.com/feature/5636954674692096 for more details. Fallback font will be used while loading: http://localhost:8080/vendor/node_modules/weathericons/font/weathericons-regular-webfont.woff
      api.openweathermap.o…xxxxxxxxxxxxxxxx:1 Failed to load resource: the server responded with a status of 401 (Unauthorized)
      weatherforecast.js:266 weatherforecast: Your AppID does not support long term forecasts. Switching to fallback endpoint.
      (index):1 Refused to apply style from 'http://localhost:8080/css/custom.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled
      
      posted in Troubleshooting
      M
      mrlowndes
    • RE: Weather module config

      @sdetweil thanks. That got rid of the errors, now when I npm start the weather module seems to be just loading indefinitely. Any ideas?

      posted in Troubleshooting
      M
      mrlowndes
    • Weather module config

      Just to clarify, I’m talking about the ‘weather’ module, NOT the ‘current weather’ or 'weather forecast" modules. I have added it to my config.js file with some configurations, as outlined in the documentation for the ‘weather’ module, but it wont run. Question for module configs, do I use "true", or 'true', to encapsulate my values? Its seems to vary depending on what I’m reading. Here is my config.js script:

      /* Magic Mirror Config Sample
       *
       * By Michael Teeuw http://michaelteeuw.nl
       * MIT Licensed.
       *
       * For more information on how you can configure 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 or empty, 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"],
      
      	useHttps: false, 		// Support HTTPS or not, default "false" will use HTTP
      	httpsPrivateKey: "", 	// HTTPS private key path, only require when useHttps is true
      	httpsCertificate: "", 	// HTTPS Certificate path, only require when useHttps is true
      
      	language: "en",
      	timeFormat: 24,
      	units: "metric",
      	// serverOnly:  true/false/"local" ,
      			     // local for armv6l processors, default
      			     //   starts serveronly and then starts chrome browser
      			     // false, default for all  NON-armv6l devices
      			     // true, force serveronly mode, because you want to.. no UI on this device
      
      	modules: [
      		{
      			module: "currentweather",
      			position: "top_right",
      			config: {
      				location: "Santa Barbara",
      				locationID: "5392952", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city
      				appid: "112847e0ff924d7f26338d5873e7be3d"
      			}
      		},
      		{
      			module: "weatherforecast",
      			position: "top_right",
      			header: "Weather Forecast",
      			config: {
      				location: "Santa Barbara",
      				locationID: "5392952", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city
      				appid: "xxxxxxxxxxxxxx"
      			}
      		},
      		{
      		module: "weather",
      		position: "top_left",
      		config: {
      			weatherProvider: "weathergov",
      			units: "metric",
      			roundTemp: "true",
      			degreeLabel: "true",
      			updateInterval" "3600000",
      			colored: "true",
      			showPrecipitationAmount: "true",
      			apiBase: "https://api.weather.gov/points/",
      			weatherEndpoint: "/forecast",
      			lat: "xxx.xxxxxx",
      			lon: "xxx.xxxxxx",
      			type: "forecast"
      		}
      	},
      	]
      
      };
      
      /*************** DO NOT EDIT THE LINE BELOW ***************/
      if (typeof module !== "undefined") {module.exports = config;}
      

      and here are the errors I’m getting:

      [2020-04-28 11:31:59.700] [ERROR]  WARNING! Could not validate config file. Starting with default configuration. Please correct syntax errors at or above this line: /home/pi/MagicMirror/config/config.js:65
      			updateInterval" "3600000",
      			              ^^^
      
      SyntaxError: Unexpected string
          at Module._compile (internal/modules/cjs/loader.js:722:23)
          at Object.Module._extensions..js (internal/modules/cjs/loader.js:798:10)
          at Module.load (internal/modules/cjs/loader.js:645:32)
          at Function.Module._load (internal/modules/cjs/loader.js:560:12)
          at Module.require (internal/modules/cjs/loader.js:685:19)
          at require (internal/modules/cjs/helpers.js:16:16)
          at loadConfig (/home/pi/MagicMirror/js/app.js:69:12)
          at App.start (/home/pi/MagicMirror/js/app.js:210:3)
          at Object.<anonymous> (/home/pi/MagicMirror/js/electron.js:115:7)
          at Module._compile (internal/modules/cjs/loader.js:786:30)
      
      posted in Troubleshooting
      M
      mrlowndes
    • 1
    • 2
    • 3
    • 4
    • 5
    • 5 / 5