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-Page-Selector: A page switcher that can set positions of modules

    Scheduled Pinned Locked Moved System
    94 Posts 14 Posters 83.0k Views 15 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.
    • V Offline
      Veldrovive Module Developer
      last edited by

      I copied your config and it actually allowed me to catch a couple of bugs that I will be working to fix over the next few days. The main one that you are having trouble with stems from the fact that multiple modules with the same name are being used. I don’t know why I didn’t think about that during development, but it causes problems now. I’m going to fix that up and I’ll post again when it’s done. It’s a bit of a large change, however, so it probably won’t be done for at least 24 hours.

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

        Hey, just no hectic and stress.
        Then I’m just the beta tester ;-)

        What long matures will be good.
        Thank you

        1 Reply Last reply Reply Quote 0
        • V Offline
          Veldrovive Module Developer
          last edited by

          Ok, changes have been made and now the module is much more resilient.
          The second method for setting up pages has become pretty powerful now, but that came with it becoming more complicated. I would suggest reading the readme section carefully before trying to implement it.
          If you have any question, I am more than happy to clarify and edit the readme.

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

            Wow, that was fast.
            Will it morning look at rest, and test.
            But what I read so far looks like this for me:
            First list all the modules as before.
            Below that, under “pages:” and the page names, insert the module names with location.

            And I have to give the modules a name (name:) which is then used in pages: for the position.

            So roughly right?

            Oh! One question:
            How implement more then 1 module in exclusion?

            exclusion: [
            {
            "module": "MMM-Cursor"
            },
            {
            "MMM-page-indicator",
                position: "bottom_center"
            }
            ]
            
            1 Reply Last reply Reply Quote 0
            • V Offline
              Veldrovive Module Developer
              last edited by

              So the exclusions array takes a list of selectors. Those selectors could be the name of a module (Like MMM-Cursor) or they could be the prop name. Here’s some sample code:
              This is the inside the module array:

              {
                  module: "MMM-page-indicator",
                  name: "noHide",
                  position: "bottom_center"
              },
              

              And then this is the exclusions:

              [
                  "noHide",
              ]
              

              This one works because the name noHide is a selector.

              You could also just use the name of the module:

              [
                  "MMM-Cursor",
              ]
              

              because it is also just a selector.

              The pages config also works off of selectors in the same way. noHide is a selector that you assign with the name prop while MMM-page-indicator is a selector that is assigned via the fact that it is the name of the module.

              1 Reply Last reply Reply Quote 0
              • P Offline
                Peter_Froberg @Veldrovive
                last edited by

                @veldrovive Thanks, for the reply. I finnaly did find the problem. It was as always a typo from my side. I have now konverted the config to the “second” config option which I like better as I can gather all the pages config in one section.
                Thanks for a greate module :)

                1 Reply Last reply Reply Quote 0
                • V Offline
                  Veldrovive Module Developer
                  last edited by

                  Ah good. I’m glad that the changes I’m making are improving the module.
                  Thank you for the kind words.

                  1 Reply Last reply Reply Quote 0
                  • J Offline
                    Johans
                    last edited by

                    @Veldrovive Installed your module, along with the MMM-page-indicator.
                    Page1 shows OK, but I can’t move to Page2.
                    What i’m doing wrong?
                    Here’s my config

                    	modules: [
                    		{
                    			module: "alert",
                    			pages: "all",
                    		},
                    		{
                    			disabled: false,
                    		        module: "MMM-Page-Selector",
                    		        position: "top_bar",
                    		        config: {
                    			    defaultPage: "Page1",
                    		            displayTitle: true,
                    			    selectPageNotif: ["SELECT_PAGE"],
                    		            incrementPageNotif: ["PAGE_UP"],
                    		            decrementPageNotif: ["PAGE_DOWN"]
                    		        }
                    		},		
                    		{
                    			disabled: false,
                    		        module: 'MMM-page-indicator',
                    		        position: 'bottom_bar',
                    			pages: "all",
                    		        config: {
                    		            pages: 3,
                    		        }
                    		},			
                    		{
                    
                    			module: "updatenotification",
                    			position: "top_bar",
                    			pages: {"Page1": "top_bar"},
                    		},
                    		{
                    			disabled: false,
                    			module: "clock",
                    			position: "top_left",
                    			pages: {"Page1": "top_left"},
                    		},
                    		{
                    			disabled: false,
                    			module: "compliments",
                    			position: "lower_third",
                    			pages: {"Page2": "lower_third"},
                    		},
                    		{	
                    	                disabled: false,
                    	                module: 'MMM-Lunartic',
                    	                position: 'top_center', // Best in left, center, or right regions
                    		        pages: {"Page3": "top_center"},
                    	                config: {
                    		                mode: "rotating", // rotating or static
                    		                image: "current", // animation, current, DayNight or static
                    		                distance: "km", // miles or km
                    		                useHeader: false, // true if you want a header
                    		                header: "Huidige Maan stand", // Any text you want
                    		                maxWidth: "300px",
                    		                animationSpeed: 0,
                    		                rotateInterval: 15000,
                    			       }
                    	        },
                    		{
                    		        disabled: false,			
                    			module: 'MMM-BackgroundSlideshow',
                    		        position: 'fullscreen_below',
                    			pages: {"Page1": "fullscreen_below"},
                    		        config: {
                     		                imagePaths: ['modules/MMM-BackgroundSlideshow/Images/'],
                    		                transitionImages: true,
                    			        slideshowSpeed: 20000,  // 20 Seconds
                    			        //transitionSpeed: '2s',
                    		                randomizeImageOrder: true,
                    		                }
                    		},
                    		{
                    			module: 'MMM-Cursor',
                    			pages: "all",
                    		},
                    	]
                    };
                    
                    /*************** DO NOT EDIT THE LINE BELOW ***************/
                    
                    

                    I have installed MMM-Voice-Command as well, but I really don’t need voice for the moment so I didn’t add this in the config.

                    1 Reply Last reply Reply Quote 0
                    • V Offline
                      Veldrovive Module Developer
                      last edited by

                      One small thing before I actually get into the meat of the issue. It is not necessary to specify the number of pages for MMM-page-indicator since it is overridden by the page selector.

                      While I was developing the new page system, I forgot about the very important issue of capitalization. Basically what was happening is that it was trying to switch to pages that did not exist. If you pull the update, everything should work fine.

                      J 1 Reply Last reply Reply Quote 0
                      • J Offline
                        Johans @Veldrovive
                        last edited by

                        @veldrovive Wow, that was a quick. Works fantastic now. Great job!! Thanks.

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