Solved Hide/Show Recipe
-
@venditti69500 said in Hide/Show Recipe:
it’s not just the magic mirror, this man too @bugsounet . I was not talking about modifying the module, I use MMM-page-selector module in order to have 2 pages on my mirror, I then created a very basic recipe in the MMM-GA recipe folder using the page_increment/page_decrement actions to juggle with pages vocally. I was thinking of something similar.
Yes, naturaly, incoming notifications is coded natively
-
-
@bugsounet Thank you so much for this. Tested and workes as expected. I really thought that you don’t reply bacause you are tired of all my “newbie questions”. The least I can do is buy you a coffee
One last thing. Can I add in this recipe thesoundExec: { sound: "/../.mp3", },
function? And where exactly should I add it?
-
Thanks for this donate
I’ve Upgrade my code sample
-
@Anthony : it’s good ?
-
@bugsounet It is not Just goog. It awesome. Now I will try to find out how to start the module hidden at start up. Thank you one more time. From now on whenever I post a question in the forum I will wait for your answer even if it will come in a month . The work and help you provide here deserves more than 1-2 coffees.
-
something like that ?
Sample:
var recipe = { commands: { "hide_on_start": { moduleExec: { module: () => { MM.getModules().enumerate((m)=> { if (m.name == "clock") m.hide(1000, {lockString: "RECIPE_LOCKED"}) if (m.name == "MMM-WiFiPassword") m.hide(1000, {lockString: "RECIPE_LOCKED"}) }) } } } }, plugins: { onReady: "hide_on_start" } } exports.recipe = recipe
Note: modules will be hidden when GA is ready
-
@bugsounet Goodmorning from Greece. Man I will try your addition and if it works I really have to buy you more coffees. If this works you have solved my biggest problem. Thanks one more time for your effort and your help. I will try it when I get home and let you know.
-
@Anthony it work very well ! @bugsounet is a real ass-kicker. I will try to change somethings on my recipe like you do for this in order to change pages
-
@alex69 I am pretty sure it will work. He is the inly one for this job. There is nothing that he cannot do. And if there is it cannot be done at all. That’s why from now on whenever I post a question in the forum I will wait for his answer even if it will come in a month.
-
-
@Anthony i’ve test with status too, the module Is hide when GA start, but the command “show” seems don’t run at the same time
-
perhaps a constraint should be added, such as an execution ranking
-
@Anthony thanks, my recipe run good actualy
-
@Anthony in French, prefer the pattern “masque” rather than “cache” ,generates less secondary trouble.
-
@alex69 For MMM-WiFiPassword I tested it works fine. I just changed the “show” command to “close” because I am from Greece and my accent is not good for GA. But both commands Show/Close works fine. I will try with some other modules too and I let you know.
-
@alex69 Next thing I want to ask bugsounet how to do it is if there is way when I show a hidden module to hide again by itself after some seconds and return to home screen. But it is not so important to bother him now. I will make a new topic sometime asking for it and when he finds time he will answer.
-
@Anthony :
just add a timer
From my Hide/show recipe, I add a timer un “show_clock” block
"show_clock": { moduleExec: { module: () => { MM.getModules().enumerate((m)=> { if (m.name == "clock") { m.show(1000, {lockString: "RECIPE_LOCKED"}) setTimeout(() => { m.hide(1000, {lockString: "RECIPE_LOCKED"}) }, 1000 * 15) } }) } },
Note: with
1000 * 15
value, I have set 15sec for hide the module -
@bugsounet Hello. I am speechless. Both the recipe with timer and the hide on start recipe worked perfectly from start. I really don’t know what to say. So you must not lie to everyone that you are not a magician. Nobody believes you. You are the Magic Mirror Magician. Anyway thank you from the bottom of my heart for your help and your time. I would never have done it myself. I will buy you coffees whenever I can because you must not stop providing this help (at least for newbies like me). Goodnight my friend and thank you once again.
-
I’m happy that all works
-
@bugsounet I am happier, believe me And of course you can mark this topic as solved eventually.
-