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.

    Default Weather module still not displaying

    Scheduled Pinned Locked Moved Solved Troubleshooting
    39 Posts 6 Posters 16.3k Views 6 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.
    • S Offline
      sdetweil @Jarhead96097
      last edited by sdetweil

      @Jarhead96097

      this is on pi, or windows, or ??

      ok, do this

      cd ~/MagicMirror
      rm -rf node_modules
      npm install 
      #added
      git checkout modules/default/weather/weather.js
      git status
      

      then try again

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      S Jarhead96097J 2 Replies Last reply Reply Quote 1
      • B Offline
        Blackeye @Jarhead96097
        last edited by

        @Jarhead96097 Could be the comma after “true” on the last line of config … not necessary, and causes an error when I run a :check

        1 Reply Last reply Reply Quote 0
        • S Offline
          sdetweil @sdetweil
          last edited by

          @Jarhead96097

          I added a command above to restore the original weather.js from the git repo

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          Jarhead96097J 1 Reply Last reply Reply Quote 0
          • Jarhead96097J Offline
            Jarhead96097 @sdetweil
            last edited by

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

            Jarhead96097

            S mumblebajM 2 Replies Last reply Reply Quote 0
            • Jarhead96097J Offline
              Jarhead96097 @sdetweil
              last edited by

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

              Jarhead96097

              Jarhead96097J 1 Reply Last reply Reply Quote 0
              • S Offline
                sdetweil @Jarhead96097
                last edited by

                @Jarhead96097 please never do audit… causes more problems than it fixes

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                Jarhead96097J 1 Reply Last reply Reply Quote 2
                • mumblebajM Offline
                  mumblebaj Module Developer @Jarhead96097
                  last edited by

                  @Jarhead96097 Rule of thumb is to never run npm audit fix.

                  Check out my modules at: https://github.com/mumblebaj?tab=repositories
                  Check my blog-post: https://mumblebaj.xyz/
                  Check my MM Container: https://hub.docker.com/repository/docker/mumblebaj/magicmirror/general

                  S 1 Reply Last reply Reply Quote 1
                  • S Offline
                    sdetweil @mumblebaj
                    last edited by

                    @mumblebaj and we have found npm install parms to turn off the warning coming in next release, and already in my scripts.

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    mumblebajM 1 Reply Last reply Reply Quote 2
                    • mumblebajM Offline
                      mumblebaj Module Developer @sdetweil
                      last edited by

                      @sdetweil That’s great

                      Check out my modules at: https://github.com/mumblebaj?tab=repositories
                      Check my blog-post: https://mumblebaj.xyz/
                      Check my MM Container: https://hub.docker.com/repository/docker/mumblebaj/magicmirror/general

                      1 Reply Last reply Reply Quote 0
                      • Jarhead96097J Offline
                        Jarhead96097 @sdetweil
                        last edited by

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

                        Jarhead96097

                        S 1 Reply Last reply Reply Quote 0
                        • O Offline
                          OldSunGuy
                          last edited by OldSunGuy

                          May I ask how you are using

                          classes: "daytime_scheduler"
                          

                          Are there two instances of

                          daytime_scheduler
                          

                          I use

                          classes: “currentweather”
                          
                          type: “current”
                          

                          and

                          classes: “weatherforcast”
                          
                          type: “forecast”
                          

                          to replace the deprecated modules.

                          Jarhead96097J 1 Reply Last reply Reply Quote 1
                          • S Offline
                            sdetweil @Jarhead96097
                            last edited by

                            @Jarhead96097 use my install script

                            see
                            https://github.com/sdetweil/MagicMirror_scripts

                            Sam

                            How to add modules

                            learning how to use browser developers window for css changes

                            1 Reply Last reply Reply Quote 0
                            • Jarhead96097J Offline
                              Jarhead96097 @Jarhead96097
                              last edited by

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

                              Jarhead96097

                              S 1 Reply Last reply Reply Quote 0
                              • S Offline
                                sdetweil @Jarhead96097
                                last edited by

                                @Jarhead96097 ah, one other question, what is the current node level

                                node --version

                                Sam

                                How to add modules

                                learning how to use browser developers window for css changes

                                Jarhead96097J B 2 Replies Last reply Reply Quote 1
                                • Jarhead96097J Offline
                                  Jarhead96097 @sdetweil
                                  last edited by

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

                                  Jarhead96097

                                  1 Reply Last reply Reply Quote 0
                                  • B Offline
                                    Blackeye @sdetweil
                                    last edited by

                                    @sdetweil On my RPi4 it’s 16.16.0, and I’m getting the same problems as Jarhead. After an upgrade there’s now just no reaction to starting mm.

                                    S 1 Reply Last reply Reply Quote 0
                                    • S Offline
                                      sdetweil @Blackeye
                                      last edited by

                                      @Blackeye can u show the output of the npm start or, if using pm2 , then

                                      pm2 logs --lines=50

                                      how did u do the upgrade?

                                      Sam

                                      How to add modules

                                      learning how to use browser developers window for css changes

                                      S B 2 Replies Last reply Reply Quote 0
                                      • S Offline
                                        sdetweil @sdetweil
                                        last edited by

                                        @Blackeye also, can u show me the contents of line 159 from

                                        ~/MagicMirror/modules/default/weather/weather.js
                                        

                                        Sam

                                        How to add modules

                                        learning how to use browser developers window for css changes

                                        Jarhead96097J 1 Reply Last reply Reply Quote 0
                                        • Jarhead96097J Offline
                                          Jarhead96097 @OldSunGuy
                                          last edited by

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

                                          Jarhead96097

                                          1 Reply Last reply Reply Quote 0
                                          • Jarhead96097J Offline
                                            Jarhead96097 @sdetweil
                                            last edited by

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

                                            Jarhead96097

                                            Jarhead96097J S 2 Replies Last reply Reply Quote 0

                                            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                            With your input, this post could be even better 💗

                                            Register Login
                                            • 1
                                            • 2
                                            • 1 / 2
                                            • First post
                                              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