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-pages - how to know which page index my module has?

    Scheduled Pinned Locked Moved Development
    29 Posts 4 Posters 2.5k Views 4 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 Away
      sdetweil @mvrlogins
      last edited by sdetweil

      @mvrlogins why not? what triggers the notification??

      button, command , …

      you could prove this with the MMM-CommandtoNotification module

      Sam

      How to add modules

      learning how to use browser developers window for css changes

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

        @sdetweil

        I’m using MMM-Remote Control

        The issue is that the video is shown all the time on page0.

        I have 2 pages set up with MMM-Pages

        • 1 page to be shown all the time
        • 1 hidden page to be shown only when called.

        The video needs to be on the hidden page. If I put classes : “hidden_page” under MMM-Player, the video feed shows on the page0 regardless.

        The hidden page, when called, shows only the header fro MMM-Player and is otherwise blank

        The page calling works fine with MMM-RemoteControl

         {
                module: "MMM-pages",
                config: {
                    rotationTime: 1000 * 20, // rotate every 20 seconds
                    modules: [
                        ["page1"],           // class name for page 1
                    ],
                    fixed: ["fixed_page"],
                    hiddenPages: {
                        "Doorbell": ["doorbell_page"],
                   
                    }
                }
            },
        
        

        and

        {
        	module: 'MMM-MPlayer',
                classes: "doorbell_page",
                disabled: false,
                position: "top_left",
                header: "MPlayer",
        	config: {
        	  useTwoWindows: true,
        	  layout: 'column',
        	  monitorAspect: 0,
        	  rotate: -1,
        	  windowSize: { width: 640, height: 480 },
        	  windowPosition: { x: 5, y: 225 },
        	  streamInterval: 30000,
        	  streams: {
        		window1: [
        		  'rtsp://10.0.1.1:7447/gv9eHrB9yZyPhgvN',
        		],
        		window2: [
        		  'rtsp://10.0.1.1:7447/D89zTJyDwN8YtKix',
        		  
        		]
        	  }
        	}
        },
        
        M 1 Reply Last reply Reply Quote 0
        • M Offline
          mvrlogins @mvrlogins
          last edited by mvrlogins

          Only thing I can think of right now is to put the video on page0 and the rest on page1

          and then use a combination of the PAGE_CHANGED and PAUSE_ROTATION notifications to get what I want

          Or is there a way to permanently pause rotation?

          Then I can only use the PAGE_CHANGED call to get to the page I want

          would the below disable rotation?

          rotationTime: 1000 * 0,

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

            @mvrlogins i believe so. but you should have been able to send the notification for the named hidden page

            “SHOW_HIDDEN_PAGE”, “Doorbell”

            right?!

            Sam

            How to add modules

            learning how to use browser developers window for css changes

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

              @sdetweil said in MMM-pages - how to know which page index my module has?:

              @mvrlogins i believe so. but you should have been able to send the notification for the named hidden page

              “SHOW_HIDDEN_PAGE”, “Doorbell”

              right?!

              Yes, the notification works fine.

              But mplayer does not show up on the hidden page, only on the main page

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

                @mvrlogins hm, that makes no sense as the MagicMirror operations are the same

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                M 1 Reply Last reply Reply Quote 0
                • S Away
                  sdetweil @mvrlogins
                  last edited by sdetweil

                  @mvrlogins i opened this issue
                  https://github.com/evroom/MMM-MPlayer/issues/4

                  try my fork

                  cd ~/MagicMirror/modules
                  rename the existing folder out of the way
                  git clone https://github.com/sdetweil/MMM-MPlayer
                  

                  change the page config to have the hidden page and the
                  remote_control notification

                  I submitted this change to the module for inclusion, depending on your results.

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

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

                    @sdetweil said in MMM-pages - how to know which page index my module has?:

                    @mvrlogins hm, that makes no sense as the MagicMirror operations are the same

                    Maybe something to do with mplayer itself, not the module MMM-Mplayer?

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

                      @mvrlogins no, i fixed in my fork

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

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

                        @sdetweil said in MMM-pages - how to know which page index my module has?:

                        git clone https://github.com/sdetweil/MMM-MPlayer

                        Did as you suggested

                        The video appears only on page index 0 and not on the hidden page

                        See the 2 video images on the attached screenshot - both are over the weather module

                        The header for the MPlayer appears on the hidden page

                        I can change to the hidden page with Remote Control, no problem

                            {
                                module: "MMM-pages",
                                config: {
                                    rotationTime: 1000 * 86400, // rotate every 20 seconds
                                    modules: [
                        	
                                        ["page1"],           // class name for page 1
                                 //       ["page2"],           // class name for page 2
                                //        ["page3"],           // class name for page 3
                                    ],
                                    fixed: ["fixed_page"],
                                    hiddenPages: {
                                        "Doorbell": ["doorbell_page"],
                                   
                                    }
                                }
                            },
                        
                        {
                        	module: 'MMM-MPlayer',
                                classes: "doorbell_page",
                                disabled: false,
                                position: "top_left",
                                header: "MPlayer",
                        	config: {
                        	  useTwoWindows: true,
                        	  layout: 'column',
                        	  monitorAspect: 0,
                        	  rotate: -1,
                        	  windowSize: { width: 640, height: 360 },
                        	  windowPosition: { x: 5, y: 225 },
                        	  streamInterval: 30000,
                        	  streams: {
                        		window1: [
                        		  'rtsp://10.0.1.1:7447/gv9eHrB9yZyPhgvN',
                        		],
                        		window2: [
                        		  'rtsp://10.0.1.1:7447/D89zTJyDwN8YtKix',
                        		  
                        		]
                        	  }
                        	}
                        },
                        

                        ScreenFloat Shot of Preview at 20 Feb 2025 at 16_57_07.jpg

                        1 Reply Last reply Reply Quote 0
                        • 1
                        • 2
                        • 3
                        • 2 / 3
                        • 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