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-OlympicGames

    Scheduled Pinned Locked Moved Sport
    olympic games2022olympic winter gamesolympiabeijing
    41 Posts 15 Posters 26.9k Views 15 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.
    • strawberry 3.141S Offline
      strawberry 3.141 Project Sponsor Module Developer
      last edited by strawberry 3.141

      Link to module https://github.com/fewieden/MMM-OlympicGames

      [1.1.0]

      MagicMirror² version >= 2.15.0 required.

      Fixed

      • Installation instructions

      Added

      • Nunjuck template
      • Dependency: node-fetch
      • Dependency: lodash
      • Github actions: build and changelog
      • Github config files

      Changed

      • Data source
      • Preview image
      • Config options
      • Country names are now translated with the Intl object
      • Translations

      Removed

      • Dependency: request
      • Travis-CI integration

      d2483796-1e10-4308-9349-72aaeee13b2f-image.png

      [card:fewieden/MMM-OlympicGames]

      Please create a github issue if you need help, so I can keep track

      W 1 Reply Last reply Reply Quote 2
      • W Offline
        Wenike @strawberry 3.141
        last edited by

        @strawberry-3-141 Thank you for updating this!

        1 Reply Last reply Reply Quote 0
        • M Offline
          mlhote
          last edited by

          Hello, great job !!!
          I update the module but It’s stay “Loading”
          The log

          0|MagicMirror | [02.02.2022 10:24.38.381] [ERROR]
          0|MagicMirror | Error getting olympic game medals FetchError: invalid json response body at https://www.bloomberg.com/tosv2.html?vid=&uuid=eeef6240-8409-11ec-a0ac-73657468704e&url=L2dyYXBoaWNzL2JlaWppbmctMjAyMi1vbHltcGljcy1kYXRhL2N1cnJlbnQuanNvbg== reason: Unexpected token < in JSON at position 0
          0|MagicMirror | at /home/pi/MagicMirror/modules/MMM-OlympicGames/node_modules/node-fetch/lib/index.js:273:32
          0|MagicMirror | at runMicrotasks (:null:null)
          0|MagicMirror | at processTicksAndRejections (internal/process/task_queues.js:93:5)
          0|MagicMirror | at Class.getCountryMedals (/home/pi/MagicMirror/modules/MMM-OlympicGames/node_helper.js:54:36)
          0|MagicMirror | {
          0|MagicMirror | type: ‘invalid-json’
          0|MagicMirror | }

          What I have to do to repair ?
          Sorry for my poor English
          Mat

          mumblebajM strawberry 3.141S 2 Replies Last reply Reply Quote 0
          • mumblebajM Offline
            mumblebaj Module Developer @mlhote
            last edited by

            @mlhote Did you run npm install in the MMM-OlympicGames folder?

            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
            • M Offline
              mlhote
              last edited by

              Yes
              it’s write on the github

              mumblebajM 1 Reply Last reply Reply Quote 0
              • mumblebajM Offline
                mumblebaj Module Developer @mlhote
                last edited by

                @mlhote I just clicked the link in your Error and it directs to the below.

                c64f6338-23f3-41f6-bf3d-6cd61dc2ad19-image.png
                29030dd3-d77e-450e-9319-c3988157667d-image.png

                It seems to be working fine for me though

                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
                • strawberry 3.141S Offline
                  strawberry 3.141 Project Sponsor Module Developer @mlhote
                  last edited by

                  @mlhote I had the same issue initially, but after telling the API that I’m not a server but actually using the latest version of the Google Chrome browser here it worked for me and I didn’t experience the same issue again.

                  Maybe you changed the reload interval to something that is too frequent.

                  Can you please show your config of the module?

                  Please create a github issue if you need help, so I can keep track

                  J 1 Reply Last reply Reply Quote 0
                  • M Offline
                    mlhote
                    last edited by

                    Great it’s work
                    Thk at everybody

                    1 Reply Last reply Reply Quote 0
                    • M Offline
                      mlhote
                      last edited by

                      Great it’s work 1 time !!!

                      When i reboot MM, i have to click again on the url…
                      see my config
                      {
                      module: ‘MMM-OlympicGames’,
                      position: ‘top_right’,
                      disabled: false,
                      config: {
                      // all your config options, which are different than their default values
                      }
                      },

                      So the trouble is not fix

                      1 Reply Last reply Reply Quote 0
                      • J Offline
                        justdreambig @strawberry 3.141
                        last edited by justdreambig

                        @strawberry-3-141

                        Hello,

                        I hope you can help me… This is my first time posting in the message board so please excuse any formatting mistakes.

                        the module is on my MM but just says loading…

                        Here is the error

                        [03.02.2022 12:44.24.245] [ERROR] Error getting olympic game medals FetchError: invalid json response body at https://www.bloomberg.com/tosv2.html?vid=&uuid=12216a4d-8532-11ec-99d5-6f52634e6775&url=L2dyYXBoaWNzL2JlaWppbmctMjAyMi1vbHltcGljcy1kYXRhL2N1cnJlbnQuanNvbg== reason: Unexpected token < in JSON at position 0

                        I have clicked on the link and it takes you to a page that if you hold on the button it unlocks the data. I know someone else was dealing with that so I hope they found and answer

                        Here is some info about what I have done so far

                        MM version MagicMirror: v2.15.0
                        Synology Docker v20.10.3-1239

                        First I cloned the MMM-OlympicGames to my modules folder
                        then added to my config file (see below)
                        ]MM-Olympics.png )

                            {
                                module: 'MMM-OlympicGames',
                                position: 'bottom_left',
                                config: {
                        
                        
                              }
                          },
                        

                        then I ran npm install --production in ~/MagicMirror/modules/MMM-OlympicGames directory.

                        added Locale to the default settings

                        locale: "en-US",
                        

                        then I restarted the MM and it still says loading…

                        I even tried removing it and staring over step by step this morning and still have loading…

                        Any ideas to point me in the right direction would be most helpful. I really like this module and would like to use it

                        Thanks

                        KristjanESPERANTOK 1 Reply Last reply Reply Quote 0
                        • KristjanESPERANTOK Offline
                          KristjanESPERANTO Module Developer @justdreambig
                          last edited by

                          I also had the “invalid json response” problem. After I upgraded node-fetch to 3.x, it works fine.

                          M 1 Reply Last reply Reply Quote 0
                          • strawberry 3.141S Offline
                            strawberry 3.141 Project Sponsor Module Developer
                            last edited by

                            In the beginning, I had the same issues with the invalid response. But I never had to click the link in order to fix it, I just started using the fake user agent in the module. Every time I restart the mirror it’s loading the data for me.

                            The module is not using an official API. Everything else I found is charging money for it or does not return data.

                            I was hoping once the games are starting that some other APIs start spitting out some data, so I could potentially switch.

                            I’m open to links from free JSON APIs that would solve your issues.

                            Please create a github issue if you need help, so I can keep track

                            1 Reply Last reply Reply Quote 1
                            • strawberry 3.141S Offline
                              strawberry 3.141 Project Sponsor Module Developer
                              last edited by

                              Most sport news sites including the official olympic games website still show 0 medals.

                              medals.png

                              Please create a github issue if you need help, so I can keep track

                              1 Reply Last reply Reply Quote 1
                              • M Offline
                                mlhote @KristjanESPERANTO
                                last edited by

                                @kristjanesperanto Couldyou explain how to upgrade ?

                                KristjanESPERANTOK 1 Reply Last reply Reply Quote 0
                                • KristjanESPERANTOK Offline
                                  KristjanESPERANTO Module Developer @mlhote
                                  last edited by

                                  @mlhote In the meantime it works also with node-fetch v2 for me, so an upgrade seems not to be necessary.

                                  One assumption is that this occurs when you restart the mirror several times. Then the API is often queried in a short time and therefore you are blocked.

                                  1 Reply Last reply Reply Quote 0
                                  • strawberry 3.141S Offline
                                    strawberry 3.141 Project Sponsor Module Developer
                                    last edited by

                                    Link to module https://github.com/fewieden/MMM-OlympicGames

                                    [1.2.0]

                                    Added

                                    • Added another data source, see new config option provider.

                                    Changed

                                    • Countries with same medals share the same rank

                                    [card:fewieden/MMM-OlympicGames]

                                    Please create a github issue if you need help, so I can keep track

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

                                      I’ve specified the en-US locale but the country names seem to be in Catalan.

                                      Capture d’écran 2022-02-06 111322.png

                                      Here is my config file

                                      {
                                                              module: "MMM-OlympicGames",
                                                              position: "top_left",
                                                              config: {
                                                                      // all your config options, which are different$
                                                                      locale: "en_US",
                                                                      highlight: "CA",
                                                                      maxRows: "10",
                                                                      reloadInterval: "3600000",
                                                                      provider: "nbc"
                                                                      }
                                                      }
                                      ```Edited to fix locale typo
                                      S 1 Reply Last reply Reply Quote 0
                                      • S Offline
                                        sdetweil @SirFM
                                        last edited by sdetweil

                                        @sirfm I think the option is locale

                                        u have local

                                        computers are picky

                                        Sam

                                        How to add modules

                                        learning how to use browser developers window for css changes

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

                                          @sdetweil Just saw that after posting and made the correction. Unfortunaly I get the same result with the typo corrected.

                                          KristjanESPERANTOK 1 Reply Last reply Reply Quote 0
                                          • KristjanESPERANTOK Offline
                                            KristjanESPERANTO Module Developer @SirFM
                                            last edited by

                                            @sirfm locale has to be direcly under config not in the module config: https://github.com/fewieden/MMM-OlympicGames/blob/master/.github/global.png

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