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.

    Installer scripts on Raspberry Pi Zero 2 W

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    14 Posts 2 Posters 583 Views 2 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.
    • K Offline
      kribbitykrab @sdetweil
      last edited by

      @sdetweil Thank you so much for the reply! I believe you are correct, I think this is indeed a Pi Zero W, not the 2W–thanks for getting me on the right track.

      I’ll give the v2.30.0 MM a shot, appreciate it! Will try to send the install log to you over email as well.

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

        @kribbitykrab you can look at the log, search for armv6
        or do

        uname -a

        Sam

        How to add modules

        learning how to use browser developers window for css changes

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

          @sdetweil Ok, so I got the v2.30.0 MM installed using your instructions above, thanks again.

          I also was able to get pm2 installed with a:
          sudo npm install -g pm2

          I was able to get pm2 to auto generate the ecosystem.config.js somehow. I also had to copy an index.js in from somewhere into the MagicMirror directory. I also made a copy of the sample_config.js and titled it config.js just for a dry run.

          But now when I try to do a:
          pm2 start

          I get a few warnings and errors:
          [PM2][WARN] Applications service-worker not running, starting…
          [PM2][ERROR] Error: Script not found: /home/./MagicMirror/service-worker

          I clearly need a service-worker script to start something, guessing something listed in the default config.js. When I do a pm2 list I see the v2.30.0 MM with PID 2444, which is neat I guess.

          How do I figure out what service-worker script I’m missing and how do I get it installed where I need to?

          I should mention at this point I was hoping to use this project to self-host and display a calendar on a display via MM. I’m starting to think I may need to upgrade to a beefier pi than the Zero W given the challenges so far, but want to see how far I can get first given that this is the hardware I already have on hand.

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

            @kribbitykrab just run the fixuppm2 script from my scripts repo

            Sam

            How to add modules

            learning how to use browser developers window for css changes

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

              @kribbitykrab pi 0w is a tough env now.

              i think the next challenge is lack of the electron browser on armv6l processors

              in my installer script when run on armv6l, i setup server mode and launch a browser over it.

              you can run the setup_browser_over_server script to do that outside install

              see the scripts repo readme for the browsers supported and how to inform the startup script which to use

              Sam

              How to add modules

              learning how to use browser developers window for css changes

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

                @sdetweil I executed the following commands one after the other according to the readme:

                export external_browser=midori
                DISPLAY=:0 npm start

                This gives me the following readout:


                magicmirror@2.30.0 start
                npm run start:x11

                magic mirror@2.30.0 start:x11
                DISPLAY=“${DISPLAY:=:0}” ./node_modules/.bin/electron js/electron.js

                sh: 1: ./node_modules/.bin/electron: not found


                I had though that Midori supported electron, and I am (barely) able to get Midori to boot from the desktop environment. Advice?

                Thanks!

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

                  @kribbitykrab if you ran the setup _over_server
                  it should have changed the start script in
                  package.json to

                  "start":"./run-start.sh",
                  

                  can you confirm that

                  looks like i had a bug in the script, run it again

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  K 1 Reply Last reply Reply Quote 1
                  • K Offline
                    kribbitykrab @sdetweil
                    last edited by

                    @sdetweil Ah! I had thought I had to do those steps in the other order so I hadn’t ran the setup_over_server script yet–I have ran it now.

                    The readout after DISPLAY=:0 npm start is not much more promising. Can’t quite share a screenshot from here, but it has gotten to the point where it says “Ready to go! Please point your browser to” and it’s trying to start Midori!

                    Now the waiting game.

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

                      @kribbitykrab did you install midori?
                      can you launch midori from the commandline

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

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

                        @sdetweil Weird sequence of events. Midori did end up booting, but then it just stayed on a blank white page without loading anything else. I let it sit for a couple hours just in case it was being slow, but no dice. I alt-tabbed back to the terminal to see if I had any error logs or something. I didn’t see anything, so I alt-tabbed back, and voila! I have a display!

                        I didn’t change the config.js file, so I assume this is the default setup. I see date, time, holidays in the top left. In the center I see some compliments and some news headlines. In the top right I see the weather!

                        I guess now I can try to fiddle around to get the calendar modules setup how I’d like.

                        Would ideally like this to boot on launch of the pi 0w, any advice there would also be handy.

                        From the default timing display, it appears it’s refreshing anywhere from every second to every ~10seconds.

                        S 1 Reply Last reply Reply Quote 0
                        • 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