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

Default Weather module still not displaying

Scheduled Pinned Locked Moved Solved Troubleshooting
39 Posts 6 Posters 9.7k 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.
  • J Offline
    Jarhead96097
    last edited by Aug 5, 2022, 5:17 PM

    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!

    Jarhead96097

    1 Reply Last reply Reply Quote 1
    • S Offline
      sdetweil @Jarhead96097
      last edited by Aug 5, 2022, 7:54 PM

      @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

      J 1 Reply Last reply Aug 5, 2022, 7:57 PM Reply Quote 2
      • O Offline
        OldSunGuy
        last edited by Aug 5, 2022, 5:50 PM

        The only thing I noticed was you’re trying to use http and the default is https for the apiBase.

        Weather Options

        J 1 Reply Last reply Aug 5, 2022, 5:57 PM Reply Quote 1
        • J Offline
          Jarhead96097 @OldSunGuy
          last edited by Aug 5, 2022, 5:57 PM

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

          Jarhead96097

          S 1 Reply Last reply Aug 5, 2022, 7:04 PM Reply Quote 0
          • S Offline
            sdetweil @Jarhead96097
            last edited by Aug 5, 2022, 7:04 PM

            @Jarhead96097 remove all the options except

            apiKey
            and
            locationID

            default type is current
            default provider is openweathermap

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            J 1 Reply Last reply Aug 5, 2022, 7:11 PM Reply Quote 1
            • J Offline
              Jarhead96097 @sdetweil
              last edited by Aug 5, 2022, 7:11 PM

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

              Jarhead96097

              S 1 Reply Last reply Aug 5, 2022, 7:25 PM Reply Quote 0
              • S Offline
                sdetweil @Jarhead96097
                last edited by sdetweil Aug 5, 2022, 7:46 PM Aug 5, 2022, 7:25 PM

                @Jarhead96097

                ok, I just did this

                		{
                			module: "weather",
                			position: "top_right",
                			config: {
                				locationID: "361058",
                				apiKey: "xxxxx"
                				}
                		},
                

                try that with your openweathermap apiKey

                Screenshot_2022-08-05_14-24-42.png

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                J 1 Reply Last reply Aug 5, 2022, 7:34 PM Reply Quote 1
                • J Offline
                  Jarhead96097 @sdetweil
                  last edited by Aug 5, 2022, 7:34 PM

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

                  Jarhead96097

                  S B 2 Replies Last reply Aug 5, 2022, 7:40 PM Reply Quote 0
                  • S Offline
                    sdetweil @Jarhead96097
                    last edited by sdetweil Aug 5, 2022, 7:48 PM Aug 5, 2022, 7:40 PM

                    @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 J 2 Replies Last reply Aug 5, 2022, 7:49 PM Reply Quote 1
                    • B Offline
                      Blackeye @Jarhead96097
                      last edited by Aug 5, 2022, 7:44 PM

                      @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 Aug 5, 2022, 7:49 PM

                        @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

                        J 1 Reply Last reply Aug 5, 2022, 7:53 PM Reply Quote 0
                        • 1
                        • 2
                        • 3
                        • 4
                        • 1 / 4
                        1 / 4
                        • First post
                          5/39
                          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