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

Struggling with Weather... module

Scheduled Pinned Locked Moved Solved Troubleshooting
34 Posts 5 Posters 7.8k 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.
  • D Offline
    D3dl3g
    last edited by D3dl3g Jun 27, 2022, 3:46 PM Jun 27, 2022, 3:13 PM

    hi all
    been trying for a while to get the default “weather” app to work for me and im struggling a little bit, NPM syntax check comes back clean.
    6fb032b7-3a67-45a9-bceb-24b71ee413b8-image.png

    im 95% sure i have all the relevant info in the config.js file.
    83848943-1277-4345-a212-c482bae3b322-image.png

    But im not seeing weather output on screen. 64f3c4ef-666f-4162-b397-2dd39792e637-image.png

    Figured i’d put it here instead of Discord.

    All suggestions warmly recieved

    S 1 Reply Last reply Jun 27, 2022, 4:01 PM Reply Quote 0
    • D Offline
      D3dl3g
      last edited by D3dl3g Jun 30, 2022, 3:12 PM Jun 30, 2022, 3:06 PM

      This “issue” is fixed.

      Advised by Sam, I ran these 2 commands to find modified files that differ from a “clean install/default” of MM.

      git status
      git diff
      

      Any that varied… I ran:

      git checkout <dir-tree>/file.extension
      

      Rebuilt my config.js and found that apiBase HAS to be commented out.

      On reflection DO NOT CHANGE ANY FILE aside from “config.js”
      I had 3 causes for this issue.

      • (edit) i had longitude set in config.js to “long:”… it should be “lon:” and the lat/lon do not have to be surrounded by any quote marks.
      • I’d modified other *.js files, that didn’t need to be modified.
      • the “apiBase” argument listed in (MagicMirror Documentation > Modules > Weather Module > Configuration Options) was, in my case, not “REQUIRED”.
        c82b60b1-1dd9-43bb-a09a-94a3009810bb-image.png

      @sdetweil … Sam, publically, I cant thank you enough for your help with this. Sorry for being a n00b, your insight and help was invaluable, and you taught me some stuff, which is great!!

      S 1 Reply Last reply Jun 30, 2022, 3:16 PM Reply Quote 2
      • S Offline
        sdetweil @D3dl3g
        last edited by Jun 27, 2022, 4:01 PM

        @D3dl3g cool… can u show the messages at runtime

        where you do npm start, or if using pm2, then the command

        pm2 logs --lines=???

        will show the output

        ??? is a number, default 15, but may need to be higher to see the output…

        you can do pm2 flush to empty the log and then start again (pm2 restart all)

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        T D 3 Replies Last reply Jun 27, 2022, 4:24 PM Reply Quote 0
        • T Offline
          thgmirror @sdetweil
          last edited by thgmirror Jun 27, 2022, 5:08 PM Jun 27, 2022, 4:24 PM

          @D3dl3g as a first check, you can use my working config-entry and extend it one by one with your needs:

          //#################################################################################
          		{
          			disabled: false,
          			module: "weather",
          			position: "top_right",
          			header: "Wetter aktuell",
          			config: {
          				type: "current",
          				location: "Bonn",
          				locationID: "2946447",  
          				apiKey: "myKey",
          				showWindDirectionAsArrow: true,
          				showHumidity: true,
          				showFeelsLike: false
          				}
          		},
          //#################################################################################
          

          Just replace the apikey.

          S D 2 Replies Last reply Jun 27, 2022, 5:58 PM Reply Quote 0
          • S Offline
            sdetweil @thgmirror
            last edited by Jun 27, 2022, 5:58 PM

            @thgmirror nice, but he is trying a different provider.

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            T 1 Reply Last reply Jun 27, 2022, 6:44 PM Reply Quote 0
            • T Offline
              thgmirror @sdetweil
              last edited by Jun 27, 2022, 6:44 PM

              @sdetweil I know, but to have a first sense of achievement he will see something different than “LOADING”

              S 1 Reply Last reply Jun 27, 2022, 7:19 PM Reply Quote 0
              • S Offline
                sdetweil @thgmirror
                last edited by Jun 27, 2022, 7:19 PM

                @thgmirror yes, but his API key is to a different service…

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                1 Reply Last reply Reply Quote 0
                • D Offline
                  D3dl3g @sdetweil
                  last edited by Jun 27, 2022, 8:17 PM

                  @sdetweil

                  ce169421-e550-4506-82ec-9468556769d4-image.png

                  1 Reply Last reply Reply Quote 0
                  • D Offline
                    D3dl3g @thgmirror
                    last edited by Jun 27, 2022, 8:23 PM

                    @thgmirror I’d gladly try, but I’d need an API key, my friend.
                    without an API for that particular weather service, it will just come up with “loading” as the server will not give the info to you.

                    i saw the post of yours earlier, but as it didnt match my issue with UK Met Office weather service.

                    K 1 Reply Last reply Jun 27, 2022, 10:09 PM Reply Quote 0
                    • D Offline
                      D3dl3g @sdetweil
                      last edited by Jun 27, 2022, 9:34 PM

                      @sdetweil said in Struggling with Weather... module:

                      you can do pm2 flush to empty the log and then start again (pm2 restart all)

                      bf704162-d1b7-46ef-adea-3bda155af77d-image.png

                      S 1 Reply Last reply Jun 27, 2022, 10:39 PM Reply Quote 0
                      • K Offline
                        kayakbabe @D3dl3g
                        last edited by kayakbabe Jun 27, 2022, 10:10 PM Jun 27, 2022, 10:09 PM

                        @D3dl3g if you get a free api key from openweathermap and then you can test with a known weather api that we all know works. (openweathermap works for me ). then you’ll narrow down the possibilities of why your particular setup isn’t working. 1) if it is the way you have installed the module, or 2) if the problem is with the weather endpoint you are trying to use. 3) maybe the uk weather api isn’t availble to you if you aren’t physically in the uk, 4) something else…

                        but getting the module working first in a known working configuration… will narrow down a lot of possibilities. it doesn’t mean that you can’t use the api you want later (unless that’s the issue).

                        D 1 Reply Last reply Jun 29, 2022, 7:49 AM Reply Quote 0
                        • 1
                        • 2
                        • 3
                        • 4
                        • 1 / 4
                        1 / 4
                        • First post
                          1/34
                          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