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 module all showing on one page

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    22 Posts 3 Posters 643 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.
    • S Do not disturb
      sdetweil @hahawoooooo
      last edited by sdetweil

      @hahawoooooo so you are doing npm run server and then launching firefox…
      or is this my runstart.sh and u set the env variable for firefox as the browser over server

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      H 1 Reply Last reply Reply Quote 0
      • H Online
        hahawoooooo @sdetweil
        last edited by

        @sdetweil To be honest, I need to get a bit smarter about the difference between the different start options (npm, pm2, mmpm, running over server). I’m currently just running pm2 start locally and not running a server.

        S 1 Reply Last reply Reply Quote 0
        • S Do not disturb
          sdetweil @hahawoooooo
          last edited by

          @hahawoooooo

          MM is a server with a browser auto started (npm start, electron is the browser), and with any browser connecting too
          or
          MM can be a server (npm run server) with any browser connecting from anywhere

          MM is just an app…

          you can configure the system to start an app on boot multiple ways

          you can edit the system startup settings,
          different on window, mac, linx (and diff linux versions)

          OR you can run ANOTHER app, that does all that work for you
          pm2 (node process manager v2)
          it can start many different apps (mm , mmpm, and any other tool you like,

          I have a spotify plugin on another mirror app, it can use the spotify api to play, pause, blah blah
          if I install and start the spotify player daemon… (librespot or raspotify on pi)
          I use pm2 to launch that too , and I can play on this machine.

          the cool thing about pm2 is YOU don’t need to know HOW the system autostart works,
          pm2 handles all that for you…

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          H 1 Reply Last reply Reply Quote 0
          • H Online
            hahawoooooo @sdetweil
            last edited by sdetweil

            @sdetweil Thanks for the explainer! That really helps to clarify things a bit.

            I am using pm2 to start, and it is running with the electron browser, with the MM running directly on the Raspberry Pi. Your explanation made me realize I can open the magic mirror from any browser in the house while I’m troubleshooting, which is really helpful!

            I still haven’t figured out why the page timing rotation doesn’t work at all. Even if I set modules on different pages (page 0 and page 1, for instance), they all load in when I start up the MM. It’s like the pages aren’t loaded in, so they’re nothing to switch between.

            Here are the logs on firefox from a separate computer while the server is running on the Pi:


            [CX3] Module is not prepared yet, wait a while. MMM-CalendarExt3.js:396:11
            [CX3A] Module is not prepared yet, wait a while. MMM-CalendarExt3Agenda.js:186:11
            Uncaught (in promise) TypeError: searchClass.toLowerCase is not a function
                newModules http://192.168.1.180:8080/js/main.js:526
                modulesByClass http://192.168.1.180:8080/js/main.js:522
                exceptWithClass http://192.168.1.180:8080/js/main.js:507
                animatePageChange http://192.168.1.180:8080/modules/MMM-pages/MMM-pages.js:220
                notificationReceived http://192.168.1.180:8080/modules/MMM-pages/MMM-pages.js:117
                sendNotification http://192.168.1.180:8080/js/main.js:101
                createDomObjects http://192.168.1.180:8080/js/main.js:70
            main.js:526:38
            module tries to update the DOM without being displayed. main.js:678:9
            module tries to update the DOM without being displayed. main.js:678:9
            module tries to update the DOM without being displayed. main.js:678:9
            module tries to update the DOM without being displayed. main.js:678:9
            module tries to update the DOM without being displayed. main.js:678:9
            module tries to update the DOM without being displayed. 2 main.js:678:9
            module tries to update the DOM without being displayed. main.js:678:9
            module tries to update the DOM without being displayed. 5 main.js:678:9
            module tries to update the DOM without being displayed. main.js:678:9
            module tries to update the DOM without being displayed. 2 main.js:678:9
            module tries to update the DOM without being displayed. 3 main.js:678:9
            module tries to update the DOM without being displayed. main.js:678:9
            module tries to update the DOM without being displayed. main.js:678:9
            

            S 1 Reply Last reply Reply Quote 0
            • S Do not disturb
              sdetweil @hahawoooooo
              last edited by

              @hahawoooooo

              Please use code block around logs, code or config

              Uncaught (in promise) TypeError: searchClass.toLowerCase is not a function
              newModules http://192.168.1.180:8080/js/main.js:526
              modulesByClass http://192.168.1.180:8080/js/main.js:522
              exceptWithClass http://192.168.1.180:8080/js/main.js:507
              animatePageChange http://192.168.1.180:8080/modules/MMM-pages/MMM-pages.js:220
              notificationReceived http://192.168.1.180:8080/modules/MMM-pages/MMM-pages.js:117
              

              Can you post your pages config

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              H 1 Reply Last reply Reply Quote 0
              • H Online
                hahawoooooo @sdetweil
                last edited by sdetweil

                @sdetweil Sure thing!

                {  //MMM-Pages
                        module: "MMM-pages",					// flip between pages - goal was to set full page calendar on one page, rest on other
                        config: {
                			timings: {
                				default: 5000			// rotate every 5 seconds
                			},
                			modules: [
                                                ['weather',                          // page 0	
                				'MMM-CalendarExt3',
                				'MMM-CalendarExt3Agenda',
                				'MMM-Chores',
                				'MMM-Dad-Jokes'
                			   ],        				                
                               ['MMM-TitanSchoolMealMenu'],        // page 1
                				],
                			fixed: [
                					['MMM-page-indicator',						// what to show on every page
                					'MMM-SmartTouch',
                					'clock',
                					'MMM-MagicMover',
                					'MMM-Wallpaper']
                				],
                			hiddenPages:{					// modules to not show, or to hide in specific pages 
                				"hidden": [
                					'calendar', 
                					'updatenotification',
                					'MMM-Remote-Control'
                					],      
                				}
                			}
                
                H 1 Reply Last reply Reply Quote 0
                • H Online
                  hahawoooooo @hahawoooooo
                  last edited by

                  Okay, I may have discovered the reason of the pages not rotating, the “searchClass.toLowerCase” not being found, and possibly a of other small strangeness I was seeing.

                  I was running the latest version of magic mirror without realizing you have to do a fresh wipe and re-install for major Raspberry Pi OS updates. I had put aside this project for about a year or so, and picked it back up in October without updating to Trixie.

                  I’m working through the OS update and restoring everything from the restore scripts to see how it runs. Fingers crossed!

                  S 1 Reply Last reply Reply Quote 0
                  • S Do not disturb
                    sdetweil @hahawoooooo
                    last edited by

                    @hahawoooooo you do NOT Have to do a wipe and install again…

                    generally that error message means it was trying to do a string operation (toLowerCase), but the thing was not a string (usually null )

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

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