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.

    Is there a way to temporarily disable a module?

    Scheduled Pinned Locked Moved General Discussion
    27 Posts 6 Posters 13.6k Views 6 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.
    • S Offline
      sdetweil @BigDanT
      last edited by

      @BigDanT i have not seen such a thing…

      also, most of the image displaying modules display in the background ‘under’ the other modules,
      you appear to want it ABOVE the other modules, hiding them… not seen any capable of doing that

      Sam

      How to add modules

      learning how to use browser developers window for css changes

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

        @BigDanT it might not be too hard…

        the PIR type modules send a notification 'USER_PRESENCE true/false when a user is detected or not

        so, if u can change the image handler module to position:‘foreground’, and add a tiny bit of code,

        in the notificationRecieved function add a handler for the user_presence message, if true, this.hide() (allow other module content to show thru)
        otherwise this.show() (hide everything behind)

        Sam

        How to add modules

        learning how to use browser developers window for css changes

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

          @BigDanT I tried moving MMM-ImagesPhotos to the fullscreen_above position, and it hides all the content behind, but… on each image transition it exposes the stuff behind… so it will be a bit more involved to make a module out front that does what u want.

          sorry, there was an intentional delay between pics… removing that keeps the stuff hidden behind, so it might work

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          1 Reply Last reply Reply Quote 0
          • R Offline
            RIKKO14
            last edited by

            @teitlebot
            I am not a coder but if you comment you config.js like this the module doen’t work :

            /*{
            	disabled: true,
            	module: "MMM-KitchenTimer",       
            	position: "top_center",
            	config: {
            		volume: 1
            	}
            },*/
            

            but
            but this may not be the answer you want…

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

              @RIKKO14 said in Is there a way to temporarily disable a module?:

              disabled: true,

              you don’t need any comments if you have

              disabled: true, 
              

              you can’t disable a module WHILE it is running… you could ‘hide’ it

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              1 Reply Last reply Reply Quote 0
              • R Offline
                RIKKO14
                last edited by

                ok, sorry…

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

                  @BigDanT

                  by changing ImagesPhotos and my SleepWake, it does want u described… so it is possible

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  1 Reply Last reply Reply Quote 0
                  • wishmaster270W Online
                    wishmaster270 Module Developer
                    last edited by wishmaster270

                    Hi,

                    I use profiles to implement pages on my mirror. I also modified my screensaver module MMM-Screen-Powersave-Notification to change to a specific profile instead of hiding the modules or shut off the screen. So it should be possible to just configure the behavior you like instead of coding stuff.

                    Edit: Just saw that the code had been in the development branch and not in the master. Drafted a new release a few minutes ago.

                    The module also supports changing the timeout during runtime or disable screensave

                    1 Reply Last reply Reply Quote 0
                    • B Offline
                      BigDanT
                      last edited by

                      Hi @sdetweil,

                      That’s not really what I mean, but thanks for the explanation/ investigation.

                      What I mean is this.

                      The MMM-Plexslideshow fills the back ground with an image rather than blank/black background.

                      This means the two way Perspex is not a mirror (as there’s an image rather than black background)

                      What I want to do is if the pir detects motion to deactivate the “mmm-plexslideshow” whilst the magic mirror is running. Or to select a black/blank background (which ever works)

                      That way when someone approaches the mirror the slideshow will stop and The mirror shown (due to the black background)

                      When the pir doesn’t detect someone then the slideshow starts up again.

                      I hope this makes more sense ??

                      Cheers

                      D

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

                        @BigDanT yes, and I said, (not using your modules) I did that exact thing with my camera based motion sensor module and a full screen image show module… to prove it would work…

                        Sam

                        How to add modules

                        learning how to use browser developers window for css changes

                        1 Reply Last reply Reply Quote 0
                        • B Offline
                          BigDanT
                          last edited by

                          Hi @sdetweil,

                          That’s great! Any chance you could point me in the direction of some instructions?

                          Cheers

                          D.

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

                            @BigDanT I had to change code in both modules…

                            someone else @wishmaster270 says if you use THIS module, then you can configure what you want, no coding changes…
                            https://forum.magicmirror.builders/topic/9986/is-there-a-way-to-temporarily-disable-a-module/18?page=2
                            I don’t know anything about that module

                            Sam

                            How to add modules

                            learning how to use browser developers window for css changes

                            1 Reply Last reply Reply Quote 0
                            • B Offline
                              BigDanT
                              last edited by

                              @wishmaster270 this looks great !!!

                              I’m going to start to tinker tonight with the PIR thats just arrived.

                              I dont suppose you have an example config file you could share that shows how you set-up profiles across the other modules ??

                              Cheers

                              D.

                              wishmaster270W 1 Reply Last reply Reply Quote 0
                              • wishmaster270W Online
                                wishmaster270 Module Developer @BigDanT
                                last edited by wishmaster270

                                @BigDanT Hi, sorry but I don’t use the modules in exact this configuration so I do not have a config that contains all parts. But I included an example folder to my GPIO module which contains instructions of how to setup an PIR. Maybe it is a good start: examples

                                B 1 Reply Last reply Reply Quote 0
                                • B Offline
                                  BigDanT @wishmaster270
                                  last edited by

                                  @wishmaster270 Thanks for the link.

                                  Using your instructions ive gotten the PIR up and running using your example config’s.

                                  It would be ace to see how you have set-up profiles across a number of modules (doesnt matter which one) and how they are switched using MMM-Screen-Powersave-Notification ??

                                  I understand the principles but cant for the life of me find ANY examples of how this is set-up in the config file to experiment with.

                                  Any help/exmaples would be great ?

                                  Thanks

                                  D.

                                  B 1 Reply Last reply Reply Quote 0
                                  • B Offline
                                    BigDanT @BigDanT
                                    last edited by

                                    @wishmaster270

                                    I’ve had a crack at writing an example config file to show you what im trying to do:-

                                    I’ve taken out anything that is sensitive.

                                    In short i want it to show every module, unless the PIR detects motion then it will disable the “Digital-Pictureframe” profile.

                                    I assume if you use “classes” thats a profile ? and if it doesnt have a “classes” set then its considered default.

                                    var config = {
                                        address: '0.0.0.0',
                                        electronOptions: {},
                                        ipWhitelist: [],
                                        modules: [
                                    
                                            //Screen on & off timer{
                                            {
                                                module: 'MMM-ModuleScheduler',
                                                config: {
                                                    notification_schedule: [
                                                        // TURN THE MONITOR/SCREEN ON AT 07:30 EVERY DAY
                                                        {
                                                            notification: 'REMOTE_ACTION',
                                                            schedule: '00 07 * * *',
                                                            payload: {
                                                                action: "MONITORON"
                                                            }
                                                        },
                                                        // TURN THE MONITOR/SCREEN OFF AT 22:30 EVERY DAY
                                                        {
                                                            notification: 'REMOTE_ACTION',
                                                            schedule: '30 22 * * *',
                                                            payload: {
                                                                action: "MONITOROFF"
                                                            }
                                                        },
                                                    ]
                                                }
                                            }, {
                                                module: 'alert',
                                                config: {}
                                            }, {
                                                module: 'updatenotification',
                                                position: 'top_bar',
                                                config: {
                                                    ignoreModules: []
                                                }
                                            }, {
                                                module: 'clock',
                                                position: 'top_left',
                                                config: {}
                                            },
                                    
                                            // top Right Calenar
                                            {
                                                module: 'calendar',
                                                header: 'Family Calendar',
                                                position: 'top_left',
                                                config: {
                                                    calendars: [{
                                                            symbol: 'calendar-check',
                                                            url: 'https://calendar.google.com/calendar/ical/xxx.ics',
                                                        }
                                                    ],
                                                }
                                            },
                                    
                                       
                                            // Weather Section
                                            {
                                                module: 'currentweather',
                                                position: 'top_right',
                                                config: {
                                                    location: 'UK',
                                                    locationID: 'xxx',
                                                    appid: 'xxx',
                                                }
                                            }, {
                                                module: 'weatherforecast',
                                                position: 'top_right',
                                                header: 'Weather Forecast',
                                                config: {
                                                    location: 'false',
                                                    locationID: 'xxx',
                                                    appid: 'xxx',
                                                }
                                            },
                                    
                                            //Screencast
                                    
                                            {
                                                module: 'MMM-Screencast',
                                                position: 'bottom_right',
                                                config: {
                                                    position: 'center',
                                                    height: 600,
                                                    width: 800,
                                                    castName: 'MagicMirror',
                                                }
                                            },
                                    
                                            
                                            //PLex Slideshow
                                            {
                                                module: 'MMM-PlexSlideshow',
                                                classes: 'Digital-Pictureframe',
                                                position: 'fullscreen_below',
                                                config: {
                                                    plex: {
                                                        hostname: '192.168.1.123',
                                                        port: 32400,
                                                        username: 'xxx@xxx.com',
                                                        password: 'password',
                                                    },
                                                    transitionImages: true,
                                                }
                                            },
                                    
                                            //MM Remote Control
                                            {
                                                module: 'MMM-Remote-Control',
                                                header: '',
                                                config: {
                                                    customCommand: {},
                                                    customMenu: 'custom_menu.json',
                                                    showModuleApiMenu: true,
                                                    apiKey: ''
                                                }
                                            },
                                    
                                            //News Headlines
                                    		{
                                            module: 'newsfeed',
                                            position: 'top_bar',
                                            header: '',
                                            config: {
                                            feeds: [{
                                            title: 'BBC News',
                                            url: 'http://feeds.bbci.co.uk/news/rss.xml'
                                            }
                                            ],
                                            startTags: [],
                                            endTags: [],
                                            prohibitedWords: []
                                            }
                                            },
                                    
                                            {
                                                module: 'MMM-GPIO-Notifications',
                                                config: {
                                                    '4': {
                                                        gpio_state: 1,
                                                        gpio_debounce: 0,
                                                        delay: 30000,
                                                        notifications: [{
                                                                notification: 'SCREEN_ON',
                                                                payload: {
                                                                    'forced': false
                                                                }
                                                            }, {}
                                                        ]
                                                    }
                                                }
                                            },
                                            {
                                                module: 'MMM-Screen-Powersave-Notification',
                                                config: {
                                                    delay: 60,
                                                    profiles: {
                                                        "Digital-Pictureframe": 600
                                                    }
                                                }
                                            },
                                            {
                                                module: 'MMM-ViewNotifications',
                                                position: 'bottom_left',
                                                header: 'Notifications',
                                                config: {
                                                    timeout: 0,
                                                    format: '{time}: "{module}" sent "{notification}" with {payloadData}', // See below for configurable options
                                                    includeModules: ["MMM-GPIO-Notifications", "MMM-Screen-Powersave-Notification"]
                                                }
                                            },
                                    
                                        ]
                                    };
                                    
                                    /*************** DO NOT EDIT THE LINE BELOW ***************/
                                    if (typeof module !== 'undefined') {
                                        module.exports = config;
                                    }
                                    
                                    

                                    I just need to understand how to add a module to a profile and then using your example PIR code how to transition from one profile to another

                                    wishmaster270W 1 Reply Last reply Reply Quote 0
                                    • wishmaster270W Online
                                      wishmaster270 Module Developer @BigDanT
                                      last edited by wishmaster270

                                      @BigDanT
                                      Hi,

                                      you need another module to get it work: MMM-ProfileSwitcher

                                      The idea is to define a “normal” class to which all modules do belong that will be displayed if motion is detected. The Slideshow will be in class “slideshow”.
                                      The Screensave module is configured to not shutoff the monitor but change to the “slideshow” profile.
                                      If SCREEN_ON is triggered the Screensave module will change back to the profile that was used before the screensave (in our case “nomal”).

                                      I updated the config example to do the job (but i could not test it at the moment):

                                      var config = {
                                          address: '0.0.0.0',
                                          electronOptions: {},
                                          ipWhitelist: [],
                                          modules: [
                                      
                                              //Screen on & off timer{
                                              {
                                                  module: 'MMM-ModuleScheduler',
                                                  config: {
                                                      notification_schedule: [
                                                          // TURN THE MONITOR/SCREEN ON AT 07:30 EVERY DAY
                                                          {
                                                              notification: 'SCREEN_ON',
                                                              schedule: '00 07 * * *',
                                                              payload: {
                                                                  'forced': true
                                                              }
                                                          },
                                                          // TURN THE MONITOR/SCREEN OFF AT 22:30 EVERY DAY
                                                          {
                                                              notification: 'SCREEN_OFF',
                                                              schedule: '30 22 * * *',
                                                              payload: {
                                                                  'forced': true
                                                              }
                                                          },
                                                      ]
                                                  }
                                              },
                                      
                                              {
                                                  module: 'alert',
                                                  config: {},
                                                  classes: 'normal'
                                              },
                                      
                                              {
                                                  module: 'updatenotification',
                                                  position: 'top_bar',
                                                  config: {
                                                      ignoreModules: []
                                                  },
                                                  classes: 'normal'
                                              },
                                      
                                              {
                                                  module: 'clock',
                                                  position: 'top_left',
                                                  config: {},
                                                  classes: 'normal'
                                              },
                                      
                                              // top Right Calenar
                                              {
                                                  module: 'calendar',
                                                  header: 'Family Calendar',
                                                  position: 'top_left',
                                                  config: {
                                                      calendars: [{
                                                              symbol: 'calendar-check',
                                                              url: 'https://calendar.google.com/calendar/ical/xxx.ics',
                                                          }
                                                      ],
                                                  },
                                                  classes: 'normal'
                                              },
                                      
                                              // Weather Section
                                              {
                                                  module: 'currentweather',
                                                  position: 'top_right',
                                                  config: {
                                                      location: 'UK',
                                                      locationID: 'xxx',
                                                      appid: 'xxx',
                                                  },
                                                  classes: 'normal'
                                              }, {
                                                  module: 'weatherforecast',
                                                  position: 'top_right',
                                                  header: 'Weather Forecast',
                                                  config: {
                                                      location: 'false',
                                                      locationID: 'xxx',
                                                      appid: 'xxx',
                                                  },
                                                  classes: 'normal'
                                              },
                                      
                                              //Screencast
                                      
                                              {
                                                  module: 'MMM-Screencast',
                                                  position: 'bottom_right',
                                                  config: {
                                                      position: 'center',
                                                      height: 600,
                                                      width: 800,
                                                      castName: 'MagicMirror',
                                                  },
                                                  classes: 'normal'
                                              },
                                      
                                              
                                              //PLex Slideshow
                                              {
                                                  module: 'MMM-PlexSlideshow',
                                                  classes: 'Digital-Pictureframe',
                                                  position: 'fullscreen_above',
                                                  config: {
                                                      plex: {
                                                          hostname: '192.168.1.123',
                                                          port: 32400,
                                                          username: 'xxx@xxx.com',
                                                          password: 'password',
                                                      },
                                                      transitionImages: true,
                                                  },
                                                  classes: 'slideshow'
                                              },
                                      
                                              //MM Remote Control
                                              {
                                                  module: 'MMM-Remote-Control',
                                                  header: '',
                                                  config: {
                                                      customCommand: {},
                                                      customMenu: 'custom_menu.json',
                                                      showModuleApiMenu: true,
                                                      apiKey: ''
                                                  }
                                              },
                                      
                                              //News Headlines
                                      		{
                                                  module: 'newsfeed',
                                                  position: 'top_bar',
                                                  header: '',
                                                  config: {
                                                      feeds: [
                                                          {
                                                              title: 'BBC News',
                                                              url: 'http://feeds.bbci.co.uk/news/rss.xml'
                                                          }
                                                      ],
                                                      startTags: [],
                                                      endTags: [],
                                                      prohibitedWords: []
                                                  },
                                                  classes: 'normal'
                                              },
                                      
                                              {
                                                  module: 'MMM-GPIO-Notifications',
                                                  config: {
                                                      '4': {
                                                          gpio_state: 1,
                                                          gpio_debounce: 0,
                                                          delay: 30000,
                                                          notifications: [{
                                                                  notification: 'SCREEN_ON',
                                                                  payload: {
                                                                      'forced': false
                                                                  }
                                                              }, {}
                                                          ]
                                                      }
                                                  }
                                              },
                                              {
                                                  module: 'MMM-Screen-Powersave-Notification',
                                                  config: {
                                                      delay: 60,
                                                      hideInsteadShutoff: true, //do not shutoff the screen
                                                      changeToProfile: "slideshow" //change to this profile instead of hiding the modules
                                                  }
                                              },
                                              {
                                                  module: 'MMM-ViewNotifications',
                                                  position: 'bottom_left',
                                                  header: 'Notifications',
                                                  config: {
                                                      timeout: 0,
                                                      format: '{time}: "{module}" sent "{notification}" with {payloadData}', // See below for configurable options
                                                      includeModules: ["MMM-GPIO-Notifications", "MMM-Screen-Powersave-Notification"]
                                                  },
                                                  classes: 'normal'
                                              },
                                              {
                                                  //https://github.com/tosti007/MMM-ProfileSwitcher
                                      			module: "MMM-ProfileSwitcher",
                                      			config: {
                                      				defaultClass: "normal",
                                      				ignoreModules: [
                                                          "MMM-ModuleScheduler",
                                                          "MMM-Remote-Control",
                                                          "MMM-GPIO-Notifications",
                                      				],
                                      			}
                                      		},
                                      
                                          ]
                                      };
                                      
                                      /*************** DO NOT EDIT THE LINE BELOW ***************/
                                      if (typeof module !== 'undefined') {
                                          module.exports = config;
                                      }
                                      
                                      1 Reply Last reply Reply Quote 0
                                      • S sletrabf referenced this topic on
                                      • S sletrabf referenced this topic on

                                      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
                                      • 1
                                      • 2
                                      • 1 / 2
                                      • 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