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.
-
@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.
-
This post is deleted! -
@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.
-
@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…
-
@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.
-
@sdetweil success using notification! thank you!