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.

    3rd Party Modules with APIs not loading.

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    32 Posts 3 Posters 11.3k Views 3 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 @bflbarlow
      last edited by sdetweil

      @bflbarlow what did you configure for the info you wanted to display?

      MyStandings
      i tested for baseball, and got a block of data back

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      1 Reply Last reply Reply Quote 0
      • B Offline
        bflbarlow
        last edited by bflbarlow

        Here’s what I have for my config for those four 3rd Party Modules.

        The MMM-Launch config is directly copy/pasted from the module’s README, minus the location to “bottom_right”.

        		{
        				module: "MMM-MyStandings",
        				position: "top_left",
        				config: {
        				updateInterval: 60 * 60 * 1000, // every 60 minutes
        				rotateInterval: 1 * 60 * 1000, // every 1 minute
        				sports: [
        				{ league: "NBA", groups: ["Atlantic", "Central", "Southeast", "Northwest", "Pacific", "Southwest"] },
        					]
        			}
        		},
        		{
        				module: "MMM-NFL",
        				position: "top_left",
        				config: {
        				focus_on: "GB"
        			}
        		},
        		{
        			module: "MMM-CollegeFootballTop25",
        			position: "top_left",
        			config: {
        				headerText: "AP Top 25",
        				teamsToShowAtATime: 2,
        				showColumnHeaders: false,
        				showPollWeekAndDate: false,
        				textClass: "small",
        				highlightTeams: ["Wisconsin::#6a2c3e"],
        				colorRankChange: false,
        				onScreenRefreshRate: 6000,
        				animationSpeed: 3000,
        			}
        		},
        		{
            		module: 'MMM-Launch',
            		position: 'bottom_right',               // Best in left or right region
            		config: {
        				showPix: "Yes",                 // No = No picture
        				showAgency: "Yes",              // No = Launch Agency not shown
        				showDescription: "No",          // Yes = full description of mission under picture
        				useHeader: false,               // false if you don't want a header
        				header: "We have liftoff!",     // Any text you want. useHeader must be true
        				maxWidth: "300px",
            		}
        		},
        
        Mykle1M 1 Reply Last reply Reply Quote 0
        • Mykle1M Offline
          Mykle1 Project Sponsor Module Developer @bflbarlow
          last edited by

          @bflbarlow said in 3rd Party Modules with APIs not loading.:

          The MMM-Launch config is directly copy/pasted from the module’s README, minus the location to “bottom_right”.

          I just ran this module. There is a delay in loading (< 30 seconds). I believe it to be an api delay issue because the module will run in less than 30 seconds.

          I just took this screenshot.

          0_1571354538989_Screenshot from 2019-10-17 19-15-12.png

          Create a working config
          How to add modules

          1 Reply Last reply Reply Quote 0
          • Mykle1M Offline
            Mykle1 Project Sponsor Module Developer
            last edited by Mykle1

            And another as it goes through the rotation.

            0_1571354630587_Screenshot from 2019-10-17 19-23-23.png

            Create a working config
            How to add modules

            1 Reply Last reply Reply Quote 0
            • B Offline
              bflbarlow
              last edited by bflbarlow

              I’m glad yours works.

              Mine still doesn’t.

              If 30 seconds is what I have to wait, then I’m already 120+ times past that (over an hour) with no rotation.

              I’m curious if you have any suggestions on things to try to help narrow this issue down.

              Mykle1M 1 Reply Last reply Reply Quote 0
              • Mykle1M Offline
                Mykle1 Project Sponsor Module Developer @bflbarlow
                last edited by Mykle1

                @bflbarlow

                Try disabling the other modules to see if it loads. If not, I would delete the MMM- Launch module folder and clone it again, trying it alone again. If that does not work then something else is amiss. I assure you, the module does work and it should work for you.

                Create a working config
                How to add modules

                1 Reply Last reply Reply Quote 0
                • B Offline
                  bflbarlow
                  last edited by bflbarlow

                  I’ll give that a try.

                  I’m not concerned with that specific module not working. 3rd Party Modules I’ve installed that do not utilize APIs work perfectly well and the default modules work perfectly well as well.

                  It is a trend however, that of the six total 3rd Party Modules that I have tried and tested that do connect to APIs, none of them appear to be receiving data, which is why I am still slightly suspicious about something being wrong in the general Raspberry Pi configuration. But that wouldn’t explain why the default modules work perfectly well despite pulling from the openweathermap API.

                  Mykle1M 1 Reply Last reply Reply Quote 0
                  • Mykle1M Offline
                    Mykle1 Project Sponsor Module Developer @bflbarlow
                    last edited by Mykle1

                    @bflbarlow

                    Then my suggestion should confirm or eliminate that suspicion. Good luck and report back here.

                    Create a working config
                    How to add modules

                    1 Reply Last reply Reply Quote 0
                    • B Offline
                      bflbarlow
                      last edited by bflbarlow

                      Removing the modules file, starting from a fresh config.js, cloning back the modules file, and adding the MMM-Launch config didn’t yield any data after the last 5 minutes.

                      I’m thinking I’ll just cut ties and start again from scratch with a fresh install of raspbian. Maybe that’ll reset anything that might have gone haywire in the setup.

                      1 Reply Last reply Reply Quote 0
                      • B Offline
                        bflbarlow
                        last edited by bflbarlow

                        Unfortunately, a fresh raspbian image and MagicMirror install doesn’t appear to solve the problem.

                        Still open to any/all suggestions.

                        It’s been sitting on T - Minus 5 seconds for the last 10 minutes.

                        0_1571358660682_fbd0d71d-c011-445b-90d1-bec16ef1f63f-image.png

                        Mykle1M 1 Reply Last reply Reply Quote 0
                        • Mykle1M Offline
                          Mykle1 Project Sponsor Module Developer @bflbarlow
                          last edited by

                          @bflbarlow

                          Please start MM using npm start dev. You should see an error for MMM-Launch.

                          Question: You are cloning the module into the MagicMirror/modules folder? Not into the default folder?

                          Create a working config
                          How to add modules

                          1 Reply Last reply Reply Quote 0
                          • Mykle1M Offline
                            Mykle1 Project Sponsor Module Developer
                            last edited by Mykle1

                            The error, in the dev console on loading, should look like this

                            Uncaught (in promise) TypeError: Cannot read property 'name' of undefined. As the api is slow to respond. Then, upon refresh, the module works normally, or should.

                            Create a working config
                            How to add modules

                            1 Reply Last reply Reply Quote 0
                            • B Offline
                              bflbarlow
                              last edited by bflbarlow

                              MMM-Launch is located at home/pi/MagicMirror/modules.

                              The only errors were for openweathermap, so I removed that from the config.

                              I’m only seeing some warnings, but no more errors.

                              1_1571359413131_2019-10-17-194212_1824x984_scrot.png 0_1571359413130_2019-10-17-194220_1824x984_scrot.png

                              1 Reply Last reply Reply Quote 0
                              • B Offline
                                bflbarlow
                                last edited by bflbarlow

                                I’ll include a screenshot here in a minute, but I’m noticing that “MMM-Launch received a module notification: CLOCK_SECOND from sender: clock” is being logged. Is that expected?

                                EDIT: Screenshot.

                                0_1571359742261_2019-10-17-194801_1824x984_scrot.png

                                Mykle1M 3 Replies Last reply Reply Quote 0
                                • Mykle1M Offline
                                  Mykle1 Project Sponsor Module Developer @bflbarlow
                                  last edited by

                                  @bflbarlow

                                  I believe that is just the clock module broadcasting a notification and should have no affect on MMM-Launch as MMM-Launch has no action to perform when receiving.

                                  Create a working config
                                  How to add modules

                                  1 Reply Last reply Reply Quote 0
                                  • Mykle1M Offline
                                    Mykle1 Project Sponsor Module Developer @bflbarlow
                                    last edited by

                                    @bflbarlow

                                    Can you open a browser and try this url?

                                    https://launchlibrary.net/1.2/launch?next=60&mode=verbose

                                    Create a working config
                                    How to add modules

                                    1 Reply Last reply Reply Quote 0
                                    • B Offline
                                      bflbarlow
                                      last edited by

                                      This post is deleted!
                                      1 Reply Last reply Reply Quote 0
                                      • Mykle1M Offline
                                        Mykle1 Project Sponsor Module Developer @bflbarlow
                                        last edited by

                                        @bflbarlow

                                        Going out for a smoke. I’ll be back in 10.

                                        Create a working config
                                        How to add modules

                                        1 Reply Last reply Reply Quote 0
                                        • B Offline
                                          bflbarlow
                                          last edited by bflbarlow

                                          That URL worked great on the browser.

                                          I really appreciate the help troubleshooting.

                                          0_1571360825227_2019-10-17-200616_1824x984_scrot.png

                                          Mykle1M 1 Reply Last reply Reply Quote 0
                                          • Mykle1M Offline
                                            Mykle1 Project Sponsor Module Developer @bflbarlow
                                            last edited by Mykle1

                                            @bflbarlow

                                            No problem. Ok, so you can get data. Now let’s see what the module tells us about getting the data. Can you go in the MMM-Launch.js file and uncomment line 124. Save. Run MM again using npm start dev and see if it reports receiving the data from the api. It should look something like this

                                            >Array (60)

                                            Create a working config
                                            How to add modules

                                            1 Reply 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