Read the statement by Michael Teeuw here.
Show/Hide my own module in combination with MMM-Facial-Recognition
-
Hello. I’ve written a module the hides itself when no data is currently available, otherwise it shows itself. I’m using the standard this.hide() / this.show() methods.
However things get messed up when I combine this with MMM-Facial-Recognition. I’ve read about using lockStrings to lock the module’s visibility, but as far as I understand it, I’d need the Facial Recognition module to supply a lock string upon sending the hide command as well as my own module to supply a lockString to itself upon hiding.
Essentially I want the following behaviour:
- My Module has no data, never show, even if called to be displayed by MMM-FR
- My module supplies a lockString to itself with its hide command
- module remains hidden regardless of what MMM-FR wants to do
- My module has data, but MMM-FR wants it hidden
- MMM-FR would need to supply a lock string with its hide command
- module remains hidden regardless of the fact that there is data
- My module has data AND MMM-FR wants it visible
- both call the show() method with their respective lockStrings, thereby removing both lockStrings from my module
- module is visible.
- Do I understand this correctly?
- Is there another way to get this behaviour without requiring a modification to MMM-Facial-Recognition? I can see myself running into this problem with some other show/hide modules, and I’d rather not have manage my own modified versions of others’ modules.
- My Module has no data, never show, even if called to be displayed by MMM-FR
-
For more context on this, in fact my understanding above is correct. I modified both MMM-Facial-Recognition and my own module to use a
lockStringoption, and the module is showing and hiding as I expect / want now.However it doesn’t address my second question – could I have accomplished this without modifying MMM-Facial-Recognition?
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