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

    Posts

    Recent Best Controversial
    • RE: Default Weather module still not displaying

      @sdetweil Sam, thanks for all of your help. I’ve finished rebuilding without running ‘npm audit fix’ and everything is working as it should! I used your installation script and everything worked fine. I also took the opportunity to move things around and try a couple of new 3rd party modules… everything is back to normal!

      Thanks again,
      Jarhead96097

      posted in Troubleshooting
      Jarhead96097J
      Jarhead96097
    • RE: Default Weather module still not displaying

      @sdetweil here is what my weather.js (newly rebuilt, but not yet configured) has on lines 148 to 166:

      	// What to do when the weather provider has new information available?
      	updateAvailable: function () {
      		Log.log("New weather information available.");
      		this.updateDom(0);
      		this.scheduleUpdate();
      
      		if (this.weatherProvider.currentWeather()) {
      			this.sendNotification("CURRENTWEATHER_TYPE", { type: this.weatherProvider.currentWeather().weatherType.replace("-", "_") });
      		}
      
      		const notificationPayload = {
      			currentWeather: this.weatherProvider?.currentWeatherObject?.simpleClone() ?? null,
      			forecastArray: this.weatherProvider?.weatherForecastArray?.map((ar) => ar.simpleClone()) ?? [],
      			hourlyArray: this.weatherProvider?.weatherHourlyArray?.map((ar) => ar.simpleClone()) ?? [],
      			locationName: this.weatherProvider?.fetchedLocationName,
      			providerName: this.weatherProvider.providerName
      		};
      		this.sendNotification("WEATHER_UPDATED", notificationPayload);
      	},
      
      posted in Troubleshooting
      Jarhead96097J
      Jarhead96097
    • RE: Default Weather module still not displaying

      @OldSunGuy I use the MMM-ModuleScheduler 3rd party module to control when my MM turns off everything except the clock and dims the display at night. “daytime_scheduler” is the class I used to turn off those modules at night.

      posted in Troubleshooting
      Jarhead96097J
      Jarhead96097
    • RE: Default Weather module still not displaying

      @sdetweil sorry, already using your installation script (but no “npm audit fix” this time around).

      posted in Troubleshooting
      Jarhead96097J
      Jarhead96097
    • RE: Default Weather module still not displaying

      @sdetweil “On branch master,” and up to date with origin/master. I also meant to reply earlier that this is on a RPI 4B. Unfortunately, still getting the same error and the weather module is not displaying information.

      I appreciate everyone’s time…but I’m going to cut to the chase and rebuild using your install script.

      Thanks again for the time, you’re always very helpful, and I appreciate it.

      posted in Troubleshooting
      Jarhead96097J
      Jarhead96097
    • RE: Default Weather module still not displaying

      @sdetweil Good to know…that may be the root cause of all of this. After rebuilding my MM on 2.20.0, I did the npm audit fix. If we can’t get to a resolution in the next few minutes, I’ll chalk this up to a learning experience and do another rebuild.

      posted in Troubleshooting
      Jarhead96097J
      Jarhead96097
    • RE: Default Weather module still not displaying

      @sdetweil Oh, okay. Let me try that updated string of commands…

      posted in Troubleshooting
      Jarhead96097J
      Jarhead96097
    • RE: Default Weather module still not displaying

      @sdetweil I added “npm audit fix” as there was 1 high severity vulnerability found. It didn’t solve the vulnerability (didn’t try “npm audit fix --force”), and I’m getting the same error.

      posted in Troubleshooting
      Jarhead96097J
      Jarhead96097
    • RE: Default Weather module still not displaying

      @sdetweil no luck. Still receiving the same error on line 159, and no display on the MM.

      posted in Troubleshooting
      Jarhead96097J
      Jarhead96097
    • RE: Default Weather module still not displaying

      @sdetweil thanks… Well, no change. I’ve tried that and also copied the portion of the weather module from the original config.js, which was renamed as config.js.sample during setup. Both attempts still result in the Unexpected Syntax Error: Unexpected token message coming from line 159 of weather.js.

      You’re always very helpful, thanks for your time. Any other ideas?

      posted in Troubleshooting
      Jarhead96097J
      Jarhead96097
    • RE: Default Weather module still not displaying

      @OldSunGuy thanks… I didn’t make any changes to the script before updating to 2.20.0 , but I changed to https. Unfortunately, it didn’t make a difference. Neither the current nor the forecast weather module instances are showing, and I’m still receiving the “Uncaught SyntaxError: Unexpected token.” error on line 159 of weather.js. And of course, I haven’t changed anything in weather.js.

      Any other ideas? I appreciate your time!

      posted in Troubleshooting
      Jarhead96097J
      Jarhead96097
    • Default Weather module still not displaying

      After upgrading to 2.20.0, the default Weather module has stopped displaying. I finally had some time and rebuilt my MM, reusing the same config.js. Unfortunately, I’m still receiving the “Uncaught SyntaxError: Unexpected token” error on line 159 of weather.js. Here’s my config.js with personal data xxxx’d out:

      			module: "weather",
      			disabled: false,
      			position: "top_left",
      			classes: "daytime_scheduler",
      			config: {
      				initialLoadDelay: 3000,
      				weatherProvider: "openweathermap",
      				type: "current",
      				apiKey: "XXXX6abf89276a4b3cc00cfbcca7XXXX",
      				location: "XXXXXX, XX",
      				apiBase: "http://api.openweathermap.org/data/",
      				weatherEndpoint: "/weather",
      				locationID: 5574093,
      				degreeLabel: true,
      				updateInterval: 1800000,
      				//lat: "XX.XXXX70",    //used for troubleshooting with other providers
      				//lon: "-1XX.XXXX10",
      				appendLocationNameToHeader: true,
      				showLocationAsHeader: true,
      				showWindDirection: true,
      				showHumidity: true,
      			}
      		},
      

      Any ideas on what to do are appreciated in advance!

      posted in Troubleshooting
      Jarhead96097J
      Jarhead96097
    • RE: Default weather module not showing after MM update

      @01ZerosOnes01 @sdetweil Glad to hear you’re up and running on a fresh install… I’m hoping to avoid having to rebuild mine. Any other thoughts?

      And thanks for your time in advance!

      posted in Troubleshooting
      Jarhead96097J
      Jarhead96097
    • RE: Default weather module not showing after MM update

      @mumblebaj Well, unfortunately, removing the quotes around locationID did not resolve the issue on my configuration. I still receive “Uncaught SyntaxError: Unexpected token” in weather.js:159.

      posted in Troubleshooting
      Jarhead96097J
      Jarhead96097
    • RE: Default weather module not showing after MM update

      @sdetweil I also upgraded from 2.19.0, which had been upgraded from 2.18.0. No problems before today.

      posted in Troubleshooting
      Jarhead96097J
      Jarhead96097
    • RE: Default weather module not showing after MM update

      @01ZerosOnes01 said in Default weather module not showing after MM update:

      @mumblebaj Okay this is what I get when I run shift + ctrl + i

      Load script: modules/default/weather/weather.js
      :8080/modules/default/weather/weather.js:159 Uncaught SyntaxError: Unexpected token .

      I’m receiving the same error after updating to 2.20.0. Here’s the text from the weather.js error line 159: " currentWeather: this.weatherProvider?.currentWeatherObject?.simpleClone() ?? null,(RED X)"

      posted in Troubleshooting
      Jarhead96097J
      Jarhead96097
    • RE: MMM-WeatherOrNot

      @Mykle1 said in MMM-WeatherOrNot:

      @Jarhead96097

      I tried that. No luck. If you wanted to try for yourself, do:

      Make copy of module folder
      Rename copy folder to MMM-WeatherOrNot2
      Open the MMM-WeatherOrNot2 folder
      Rename the css file to MMM-WeatherOrNot2,css
      Rename the MMM_WeatherOrNot.js file to MMM-WeatherOrNot2,js
      Open the MMM-WeatherOrNot2,js file
      Change line 8 to Module.register("MMM-WeatherOrNot2",{
      Change line 49 return ["MMM-WeatherOrNot2.css"];
      Make new entry in config for MMM-WeatherOrNot2

      Yes, unfortunately, I had the same result. Is there a way to create an array and display all of the configured locations?

      posted in System
      Jarhead96097J
      Jarhead96097
    • RE: MMM-WeatherOrNot

      @Mykle1

      Would I need to edit the MMM-WeatherOrNot2.js and MMM-WeatherOrNot3.js code to somehow reference different iframes? Is there a different way to reference multiple iframes running on MM?

      posted in System
      Jarhead96097J
      Jarhead96097
    • RE: MMM-WeatherOrNot

      @Mykle1 Well, glad to hear it isn’t related to my individual setup. If there’s anything I can help test, please let me know.

      posted in System
      Jarhead96097J
      Jarhead96097
    • RE: MMM-WeatherOrNot

      @Mykle1 Thanks for all the help! I love the module… just wish I could figure out why the information goes stale.

      posted in System
      Jarhead96097J
      Jarhead96097
    • 1 / 1