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.

    How can I change the variable value of the config after the magic mirror is run? I want to change the config of MMM-embedYoutube through MMM-Modulebar.

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    9 Posts 2 Posters 1.4k Views 2 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.
    • E Offline
      emrhssla @sdetweil
      last edited by

      @sdetweil omg…Is there really no solution?

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

        @emrhssla and u have no idea how each module uses the config.

        Mine create some internal variable at start time, and pass all that to my node helper with a private notice… So even if u could send me another config block I wouldn’t use it.

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        E 1 Reply Last reply Reply Quote 0
        • E Offline
          emrhssla
          last edited by

          This post is deleted!
          1 Reply Last reply Reply Quote 0
          • E Offline
            emrhssla @sdetweil
            last edited by

            @sdetweil So you mean to use functions like recievedsendnotification? That’s because I’m a beginner. I’d appreciate it if you could give me a hint.

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

              @emrhssla yes, from outside a module, all you can do is sendNotification…

              but the module config is setup and defined before start() is called… i don’t know what you would do that could really work effectively.

              you ‘might’ be able to inspect the module object and locate its config variable and then check and copy over any missing items (defined in the module defaults) into the config object you created, and then replace the existing config object…

              but no guaranty that the module will use those new values… a couple of my modules would not…

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              E 2 Replies Last reply Reply Quote 0
              • E Offline
                emrhssla @sdetweil
                last edited by

                @sdetweil My purpose of coding is to show YouTube on various topics. MMM-Embedyoutube was renamed in many ways. ex)MMM-Embeddyoutube1 implements buttons where the game subject YouTube, MMM-Embeddyoutube2 is the exercise subject YouTube,…), where the corresponding module appears once again and the corresponding module disappears. Press button 1 to run MMM-Embedyoutube1 and hide remaining YouTube modules. When button 2 is pressed, it runs MMM-Embeddyoutube2 and hides the remaining YouTube modules. However, if the position of the Embeddyoutube is in the same position, the replay click or other click does not work. ex)Position of all modules botom-center

                So I gave up various Embeddyoutube modules and did it with one Embeddyoutube module. Press button 1 to switch the video_id of Embeddyoutube to the game-themed YouTube video_id. Press button 2 to switch the video_id of the Embedyoutube to the exercise subject YouTube video_id. However, the console has also changed, but not on the real screen. I can’t think of another way. I’ll try the sendnotification() for now.

                1 Reply Last reply Reply Quote 0
                • E Offline
                  emrhssla @sdetweil
                  last edited by

                  @sdetweil success using notification! thank you!

                  1 Reply Last reply Reply Quote 0
                  • 1 / 1
                  • 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