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

    Scheduled Pinned Locked Moved Sport
    23 Posts 7 Posters 8.2k Views 7 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 Do not disturb
      sdetweil @chrisfr1976
      last edited by

      @chrisfr1976 what is the module property for the api key? that is what ‘token’ means.

      and typically [apikey]
      means replace all that with the quoted string of the apikey

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      1 Reply Last reply Reply Quote 0
      • 0m4r0 Offline
        0m4r Module Developer @chrisfr1976
        last edited by

        @chrisfr1976 can you share the config you set up for the module (obviously hiding the token)? Apart from a problem with the token itself, I cannot think of anything wrong with what you describe.

        https://github.com/0m4r

        S 1 Reply Last reply Reply Quote 0
        • S Do not disturb
          sdetweil @0m4r
          last edited by sdetweil

          @0m4r the sample is missing the config:{} section

          {
            disabled: false,
            module: "MMM-euro2024",
            position: "bottom_center",
            defaults: {
              updateInterval: 60 * 1000, // one minute
            },
            token: [YOUR_TOKEN]
          }
          

          should be

          
          {
            disabled: false,
            module: "MMM-euro2024",
            position: "bottom_center",
            config:{
                 updateInterval: 60 * 1000, // one minute
                 token: [YOUR_TOKEN]
             }
          }
          

          your module passes this.config to the node_helper, but there is no config block, so only {} gets passed

          this.sendSocketNotification(this.name + 'CONFIG', this.config);
          

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          S 1 Reply Last reply Reply Quote 2
          • S Do not disturb
            sdetweil @sdetweil
            last edited by sdetweil

            @0m4r
            also, the defaults go in the modulename.js not in the node_helper.js

            defaults: {
                competitionId: 2018, // Euro 2024
                updateInterval: 60 * 1000, // 1 minute
              },
            

            this provides overridable properties via config.js

            from the doc
            https://docs.magicmirror.builders/development/core-module-file.html#available-module-instance-properties

            Screenshot_20240404_052415_Chrome.jpg

            Screenshot_20240404_052424_Chrome.jpg

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            0m4r0 1 Reply Last reply Reply Quote 1
            • 0m4r0 Offline
              0m4r Module Developer @sdetweil
              last edited by

              @sdetweil thanks for the detailed feedback.
              I will update it as soon as I get a moment :)

              https://github.com/0m4r

              0m4r0 1 Reply Last reply Reply Quote 1
              • 0m4r0 Offline
                0m4r Module Developer @0m4r
                last edited by

                The README.md is updated.
                The configuration instructions should be now correct: https://github.com/0m4r/MMM-euro2024?tab=readme-ov-file#configuration

                https://github.com/0m4r

                S 1 Reply Last reply Reply Quote 0
                • S Do not disturb
                  sdetweil @0m4r
                  last edited by sdetweil

                  @0m4r i want to nudge you a little more, on the defaults.

                  my MMM-Config module presents a form for config customization, and it does this by discovering the parameters in the defaults section of the modulename.js. as it sits, your module would have no parameters for the user to configure

                  just move that one section to the modulename.js from the node helper and all will be good. no other change to your module is required because you did that change.

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  0m4r0 1 Reply Last reply Reply Quote 0
                  • R Offline
                    robiv8
                    last edited by

                    I get a black screen when I activate the module?
                    Original Config as in description and token available.
                    Does anyone know what this could be?

                    Ich bekomme einen Schwarzen Schirm wenn ich das Modul Aktiviere?
                    Original Config wie in Beschreibung und Token vorhanden.
                    Weiß jemand was das sein könnte?

                    Danke
                    Robert

                    0m4r0 1 Reply Last reply Reply Quote 0
                    • 0m4r0 Offline
                      0m4r Module Developer @robiv8
                      last edited by

                      @robiv8 hey, I am sorry to hear that.
                      Are you able to provide some logs?

                      https://github.com/0m4r

                      1 Reply Last reply Reply Quote 0
                      • 0m4r0 Offline
                        0m4r Module Developer @sdetweil
                        last edited by

                        @sdetweil this is done in version 1.0.4

                        https://github.com/0m4r

                        R S 2 Replies Last reply Reply Quote 0
                        • R Offline
                          robiv8 @0m4r
                          last edited by

                          @0m4r
                          das log sagt: Please correct syntax errors at or above this line: ReferenceError: b1e6…meinToken…67c8c5 is not defined

                          0m4r0 1 Reply Last reply Reply Quote 0
                          • 0m4r0 Offline
                            0m4r Module Developer @robiv8
                            last edited by

                            @robiv8 I think your configuration is wrong.
                            Is the token wrapped into quotes?

                            {
                              disabled: false,
                              module: 'MMM-euro2024',
                              position: 'center',
                              header: 'Euro 2024',
                              config: {
                                updateInterval: 60 * 1000,
                                token: "M4g1cM1rr0r"
                              }
                            },
                            

                            https://github.com/0m4r

                            R 1 Reply Last reply Reply Quote 0
                            • S Do not disturb
                              sdetweil @0m4r
                              last edited by

                              @0m4r this is what your module config looks like in MMM-Config
                              Screenshot at 2024-04-08 11-06-32.png

                              Sam

                              How to add modules

                              learning how to use browser developers window for css changes

                              0m4r0 1 Reply Last reply Reply Quote 0
                              • 0m4r0 Offline
                                0m4r Module Developer @sdetweil
                                last edited by

                                @sdetweil this is good, isn’t it?

                                https://github.com/0m4r

                                S 1 Reply Last reply Reply Quote 0
                                • S Do not disturb
                                  sdetweil @0m4r
                                  last edited by

                                  @0m4r yes… it works

                                  Sam

                                  How to add modules

                                  learning how to use browser developers window for css changes

                                  1 Reply Last reply Reply Quote 0
                                  • R Offline
                                    robiv8 @0m4r
                                    last edited by robiv8

                                    @0m4r
                                    Hallo.
                                    This i my config, as described in GitHub

                                    {
                                    	disabled: false,
                                    	module: "MMM-euro2024",
                                    	position: "center",
                                    	header: "Euro 2024",
                                    	config: {
                                    	updateInterval: 60 * 1000,
                                    	token: [b1e67..myToken..67c8c5],
                                    	}
                                    },
                                    

                                    Ok Danke,
                                    with superscripts it works.
                                    Why isn’t that right in GitHub?

                                    0m4r0 1 Reply Last reply Reply Quote 0
                                    • 0m4r0 Offline
                                      0m4r Module Developer @robiv8
                                      last edited by

                                      @robiv8 try with this:

                                      {
                                      	disabled: false,
                                      	module: "MMM-euro2024",
                                      	position: "center",
                                      	header: "Euro 2024",
                                      	config: {
                                      	updateInterval: 60 * 1000,
                                      	token: "b1e67..myToken..67c8c5",
                                      	}
                                      },
                                      

                                      https://github.com/0m4r

                                      1 Reply Last reply Reply Quote 0
                                      • L Offline
                                        leafarenuk
                                        last edited by

                                        Hi guys,
                                        I cannot get this module to run…

                                        I also opened an issue in the repo: https://github.com/0m4r/MMM-euro2024/issues/2

                                        Can somebody from here help me? @0m4r ?

                                        Thanks in advance

                                        0m4r0 1 Reply Last reply Reply Quote 0
                                        • 0m4r0 Offline
                                          0m4r Module Developer @leafarenuk
                                          last edited by

                                          @leafarenuk I replied to you on Git Hub a week ago or so.
                                          As I have not heard back from you since then, I assume the problem is resolved.

                                          If not, feel free to get in touch again.

                                          https://github.com/0m4r

                                          1 Reply Last reply Reply Quote 0
                                          • C Offline
                                            com1cedric @0m4r
                                            last edited by

                                            @0m4r Hello and thank you for your great module.

                                            after installing it, it appears on my mirror, but stays on “loading…”.

                                            Do you maybe know this issue?

                                            Thanks in advance for your helps.

                                            Kind regards

                                            Capture d’écran 2024-06-19 à 17.27.57.jpg

                                            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