MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord
    1. Home
    2. Jarhead96097
    • Profile
    • Following 0
    • Followers 0
    • Topics 5
    • Posts 34
    • Best 3
    • Controversial 0
    • Groups 0

    Jarhead96097

    @Jarhead96097

    Relative noob but enjoying the building, configuring, maintenance and upgrading of MM.

    6
    Reputation
    42
    Profile views
    34
    Posts
    0
    Followers
    0
    Following
    Joined Last Online
    Location State of Jefferson (NorCal)

    Jarhead96097 Unfollow Follow

    Best posts made by Jarhead96097

    • RE: My mirror finally finished and installed

      @supersook Nice job on your mirror!

      The cost of one-way glass made us consider alternatives. As we recently remodeled our family room, we decided to mount the monitor inside a frame on the wall. I was able to route power and install an outlet inside the open wall and frame. We added a monitor arm and use the Dell monitor USB to power the Raspberry Pi 4. It is physically located on the wall by our kitchen, so it is convenient and easy to reference. It is also quite a conversation starter!

      Scott

      20200602_091753 (2).jpg

      posted in Show your Mirror
      Jarhead96097
      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
      Jarhead96097
      Jarhead96097
    • 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
      Jarhead96097
      Jarhead96097

    Latest posts made by Jarhead96097

    • 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
      Jarhead96097
      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
      Jarhead96097
      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
      Jarhead96097
      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
      Jarhead96097
      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
      Jarhead96097
      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
      Jarhead96097
      Jarhead96097
    • RE: Default Weather module still not displaying

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

      posted in Troubleshooting
      Jarhead96097
      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
      Jarhead96097
      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
      Jarhead96097
      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
      Jarhead96097
      Jarhead96097