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

MMM-DynamicWeather Failed getting api: 401

Scheduled Pinned Locked Moved Solved Troubleshooting
21 Posts 4 Posters 777 Views 4 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
    JohnGalt @sdetweil
    last edited by Oct 28, 2024, 11:14 PM

    @sdetweil – Thanks, Sam.

    If I want to try this, can I just do it in the module folder now, or do I go back in there first and undo the edits I performed manually? I’m not clear on whether it does or doesn’t make a difference.

    S 1 Reply Last reply Oct 28, 2024, 11:25 PM Reply Quote 0
    • S Away
      sdetweil @JohnGalt
      last edited by sdetweil Oct 28, 2024, 11:27 PM Oct 28, 2024, 11:25 PM

      @JohnGalt in the module folder

      if you made file changes, you should revert those first

      git reset --hard HEAD 
      

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      J 1 Reply Last reply Oct 29, 2024, 10:20 PM Reply Quote 0
      • J Offline
        JohnGalt @sdetweil
        last edited by Oct 29, 2024, 10:20 PM

        @sdetweil – I intended to try the above, but the MagicMirror indicated it was due for an update, so I ran your update script first… Now it won’t run.

        Rather than hijacking this thread, I will put the particulars in a new thread.

        i just didn’t want if to look like I left this one hanging out there…

        S 1 Reply Last reply Nov 8, 2024, 12:21 PM Reply Quote 0
        • S Away
          sdetweil @JohnGalt
          last edited by Nov 8, 2024, 12:21 PM

          @JohnGalt have you resolved this?

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          J 1 Reply Last reply Nov 8, 2024, 5:26 PM Reply Quote 0
          • J Offline
            JohnGalt @sdetweil
            last edited by Nov 8, 2024, 5:26 PM

            @sdetweil – No, it’s still erroring but oddly, possibly not on every API call.

            I just now fired up a terminal session and ran pm2 logs. The output appears to show this module getting weather API data without error, then the last log lines show errors.

            The really strange part is there appear to be timestamps for sucessful and error API calls right around the same time [but not contiguous in the log display]. pm2 logs output follows:

            0|MagicMir | [2024-11-08 08:33:43.472] [INFO]  [MMM-DynamicWeather] Getting Weather API data
            0|MagicMir | [2024-11-08 08:36:28.802] [INFO]  Newsfeed-Fetcher: Broadcasting 30 items.
            0|MagicMir | [2024-11-08 08:36:34.550] [INFO]  Newsfeed-Fetcher: Broadcasting 31 items.
            0|MagicMir | [2024-11-08 08:37:18.166] [INFO]  Newsfeed-Fetcher: Broadcasting 25 items.
            0|MagicMir | [2024-11-08 08:41:10.851] [INFO]  Newsfeed-Fetcher: Broadcasting 35 items.
            0|MagicMir | [2024-11-08 08:43:43.885] [INFO]  [MMM-DynamicWeather] Getting Weather API data
            0|MagicMir | [2024-11-08 08:46:29.642] [INFO]  Newsfeed-Fetcher: Broadcasting 30 items.
            0|MagicMir | [2024-11-08 08:46:34.913] [INFO]  Newsfeed-Fetcher: Broadcasting 32 items.
            0|MagicMir | [2024-11-08 08:47:18.479] [INFO]  Newsfeed-Fetcher: Broadcasting 25 items.
            0|MagicMir | [2024-11-08 08:53:43.477] [INFO]  [MMM-DynamicWeather] Getting Weather API data
            0|MagicMir | [2024-11-08 08:56:11.172] [INFO]  Newsfeed-Fetcher: Broadcasting 35 items.
            0|MagicMir | [2024-11-08 08:56:30.089] [INFO]  Newsfeed-Fetcher: Broadcasting 30 items.
            0|MagicMir | [2024-11-08 08:56:35.273] [INFO]  Newsfeed-Fetcher: Broadcasting 32 items.
            0|MagicMir | [2024-11-08 08:57:18.818] [INFO]  Newsfeed-Fetcher: Broadcasting 25 items.
            0|MagicMir | [2024-11-08 09:03:43.477] [INFO]  [MMM-DynamicWeather] Getting Weather API data
            0|MagicMir | [2024-11-08 09:06:30.344] [INFO]  Newsfeed-Fetcher: Broadcasting 30 items.
            0|MagicMir | [2024-11-08 09:06:35.673] [INFO]  Newsfeed-Fetcher: Broadcasting 32 items.
            0|MagicMir | [2024-11-08 09:07:19.177] [INFO]  Newsfeed-Fetcher: Broadcasting 25 items.
            0|MagicMir | [2024-11-08 09:11:11.483] [INFO]  Newsfeed-Fetcher: Broadcasting 35 items.
            0|MagicMir | [2024-11-08 09:13:43.480] [INFO]  [MMM-DynamicWeather] Getting Weather API data
            
            /home/pi/.pm2/logs/MagicMirror-error.log last 50 lines:
            0|MagicMir | [2024-11-08 01:03:43.562] [ERROR] [MMM-DynamicWeather] Failed getting api:  401
            0|MagicMir | [2024-11-08 01:13:43.563] [ERROR] [MMM-DynamicWeather] Failed getting api:  401
            0|MagicMir | [2024-11-08 01:23:43.532] [ERROR] [MMM-DynamicWeather] Failed getting api:  401
            0|MagicMir | [2024-11-08 01:33:43.574] [ERROR] [MMM-DynamicWeather] Failed getting api:  401
            0|MagicMir | [2024-11-08 01:43:43.559] [ERROR] [MMM-DynamicWeather] Failed getting api:  401
            0|MagicMir | [2024-11-08 01:53:43.559] [ERROR] [MMM-DynamicWeather] Failed getting api:  401
            <snip>
            0|MagicMir | [2024-11-08 08:53:43.658] [ERROR] [MMM-DynamicWeather] Failed getting api:  401
            0|MagicMir | [2024-11-08 09:03:43.690] [ERROR] [MMM-DynamicWeather] Failed getting api:  401
            0|MagicMir | [2024-11-08 09:13:43.694] [ERROR] [MMM-DynamicWeather] Failed getting api:  401
            
            
            S 1 Reply Last reply Nov 8, 2024, 6:11 PM Reply Quote 0
            • S Away
              sdetweil @JohnGalt
              last edited by sdetweil Nov 8, 2024, 6:14 PM Nov 8, 2024, 6:11 PM

              @JohnGalt the 2 logs are stdout and stderr. pm2 shows them separately not merged like at console

              401 means your apikey is bad.

              did you install the pull request
              https://forum.magicmirror.builders/post/120866

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              J 1 Reply Last reply Nov 11, 2024, 11:57 PM Reply Quote 0
              • J Offline
                JohnGalt @sdetweil
                last edited by Nov 11, 2024, 11:57 PM

                @sdetweil – Thanks Sam. I’m certain the API key is good, as I can format queries as web addresses and paste them into the browser and get openweathermap to return the data.

                I didn’t install the pull request.

                S 1 Reply Last reply Nov 12, 2024, 12:03 AM Reply Quote 0
                • S Away
                  sdetweil @JohnGalt
                  last edited by Nov 12, 2024, 12:03 AM

                  @JohnGalt you NEED to install the pull request to get the updated module code using the 3.0 api…

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  J 1 Reply Last reply Nov 12, 2024, 12:37 AM Reply Quote 0
                  • J Offline
                    JohnGalt @sdetweil
                    last edited by Nov 12, 2024, 12:37 AM

                    @sdetweil Yes, I realize that… I guess I skipped some thoughts that were rolling around in my head but never made it to the keyboard: I had disabled the module, figuring I would just wait for it to be updated.

                    I should have some time this evening to go in and install the pull request - I will let you know what happens.

                    S 1 Reply Last reply Nov 12, 2024, 12:38 AM Reply Quote 0
                    • S Away
                      sdetweil @JohnGalt
                      last edited by Nov 12, 2024, 12:38 AM

                      @JohnGalt yes, but its unlikely to be updated by the author, but you have the pull request as a substitute/the update

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

                      J 1 Reply Last reply Nov 12, 2024, 1:37 AM Reply Quote 0
                      • 1
                      • 2
                      • 3
                      • 2 / 3
                      • 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