• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
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-EyeCandy shown when USER_PRESENCE

Scheduled Pinned Locked Moved Unsolved Troubleshooting
8 Posts 3 Posters 1.9k Views 3 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.
  • T Offline
    thedk
    last edited by Feb 14, 2019, 7:53 PM

    Searching for a while, how i can hide modules when PIR doesnt detect movement. So i used the voice control part from EyeCandy modul.
    I’m new in MagicMirror, is it correct like this:

    notificationReceived: function(notification, payload) {
            if (payload === false) {
                this.hide();
            } else if (notification === 'USER_PRESENCE') {
                this.show(2000);
            }
    
        },
    
    

    this.show means how long the eyecandy is shown?

    M 1 Reply Last reply Feb 15, 2019, 1:02 AM Reply Quote 0
    • M Offline
      Mykle1 Project Sponsor Module Developer @thedk
      last edited by Mykle1 Feb 15, 2019, 1:05 AM Feb 15, 2019, 1:02 AM

      @thedk said in MMM-EyeCandy shown when USER_PRESENCE:

      this.show means how long the eyecandy is shown?

      this.show(2000); means the transition from hidden to shown is 2000ms, or 2 seconds…

      Now, in order to hide all modules “when the PIR doesn’t detect any movement”, you could try something like this within the PIR module

      notificationReceived: function(notification, payload) {
              if (payload === false) {
                    MM.getModules().enumerate((module) => {
                                 module.hide(2000);
                            });
              } else if (notification === 'USER_PRESENCE') {
                    MM.getModules().enumerate((module) => {
                                 module.show(2000);
                            });
              },
      

      Something like that.

      Create a working config
      How to add modules

      1 Reply Last reply Reply Quote 1
      • T Offline
        thedk
        last edited by Feb 15, 2019, 6:39 AM

        Thanks for that.
        To hide all modules i an other problem. I have a discussion about that, when the screen goes off to save energy.
        I wanr to use this code just for eyecandy an maybe newsfeed cause of the high Temperatur of the Pi when its always running.

        1 Reply Last reply Reply Quote 0
        • T Offline
          thedk
          last edited by Feb 15, 2019, 12:53 PM

          Is it possible to add a duration how long the eyecandy is shown?
          Rest works fine.

          M 1 Reply Last reply Feb 16, 2019, 3:22 PM Reply Quote 0
          • M Offline
            Mykle1 Project Sponsor Module Developer @thedk
            last edited by Feb 16, 2019, 3:22 PM

            @thedk said in MMM-EyeCandy shown when USER_PRESENCE:

            Is it possible to add a duration how long the eyecandy is shown?

            I’ll take a look at it when I get a chance. In the meantime, you could use something like this https://github.com/ianperrin/MMM-ModuleScheduler to accomplish that. Or, there are a few voice modules that can hide or show modules upon command.

            Create a working config
            How to add modules

            1 Reply Last reply Reply Quote 0
            • T Offline
              thedk
              last edited by Feb 16, 2019, 3:55 PM

              With the Sheduler it wouldnt work, i guess.
              I just want to show the eyecandy when PIR detects movement for some seconds. Maybe it isnt that complicated and just a little command?

              1 Reply Last reply Reply Quote 0
              • E Offline
                ejay-ibm Project Sponsor Module Developer
                last edited by ejay-ibm Feb 27, 2019, 6:52 PM Feb 27, 2019, 11:38 AM

                Hi all,
                I’m looking for something similar than the main thread request.
                I need to switch between 2 gif images on notification sent by other module.
                Eg : On notification 1 , diplay gif one , on notification 2 display Gif 2 .
                I can’t find how to achieve this…
                @Mykle1 Do you still make developement on this module ? If yes would it be possible to implement some notification consideration in your module to handle multiple custom images ?
                Thank you !

                Ejay

                M 1 Reply Last reply Feb 28, 2019, 12:57 PM Reply Quote 0
                • M Offline
                  Mykle1 Project Sponsor Module Developer @ejay-ibm
                  last edited by Feb 28, 2019, 12:57 PM

                  @ejay-ibm

                  That is really not the purpose of this module. It was designed to simply show animations. Perhaps one of the image modules would be better suited to your needs. I will look into this when I am not so busy.

                  Create a working config
                  How to add modules

                  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