• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
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.

PIR problem RPi 4B, Bullseye 64 bit

Scheduled Pinned Locked Moved Unsolved Troubleshooting
23 Posts 3 Posters 3.5k 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 Away
    sdetweil @wyovino
    last edited by Jul 6, 2023, 12:02 PM

    @wyovino maybe python needs some path info, env setup

    Sam

    How to add modules

    learning how to use browser developers window for css changes

    W 1 Reply Last reply Jul 6, 2023, 1:39 PM Reply Quote 0
    • W Offline
      wyovino @sdetweil
      last edited by Jul 6, 2023, 1:39 PM

      @sdetweil It’s running the program but the commands to control the monitor are ignored, The program is logging the activity. Here is the scenario that works:

      Boot the Pi
      Connect via SSH and issue command “pm2 stop mm”
      Connect directly to the Pi using a connected keyboard and start my PIR program, then enter “pm2 start mm”

      This works but is obviously inconvenient as I need to have a keyboard connected to the Magic Mirror. I’m going to see if I can run my program from crontab under the “pi” account. Maybe that’s the issue.

      S 1 Reply Last reply Jul 6, 2023, 1:43 PM Reply Quote 0
      • S Away
        sdetweil @wyovino
        last edited by Jul 6, 2023, 1:43 PM

        @wyovino what do the pm2 logs show?

        stop mm via pm2
        pm2 stop all
        pm2 flush – clear old logs

        pm2 start 0

        pm2 logs --lines=50

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        W 2 Replies Last reply Jul 6, 2023, 2:30 PM Reply Quote 0
        • W Offline
          wyovino @sdetweil
          last edited by Jul 6, 2023, 2:30 PM

          @sdetweil
          pm2 logs --lines=50
          [TAILING] Tailing last 50 lines for [all] processes (change the value with --lines option)
          /home/pi/.pm2/pm2.log last 50 lines:
          PM2 | 2023-07-06T10:26:31: PM2 log: App [mm:0] starting in -fork mode-
          PM2 | 2023-07-06T10:26:31: PM2 log: App [mm:0] online

          /home/pi/.pm2/logs/mm-out.log last 50 lines:
          0|mm |
          0|mm | > magicmirror@2.23.0 start
          0|mm | > DISPLAY=“${DISPLAY:=:0}” ./node_modules/.bin/electron js/electron.js
          0|mm |
          0|mm | [06.07.2023 10:26.34.272] [LOG] Starting MagicMirror: v2.23.0
          0|mm | [06.07.2023 10:26.34.280] [LOG] Loading config …
          0|mm | [06.07.2023 10:26.34.284] [DEBUG] config template file not exists, no envsubst
          0|mm | [06.07.2023 10:26.34.290] [LOG] Loading module helpers …
          0|mm | [06.07.2023 10:26.34.292] [LOG] No helper found for module: alert.
          0|mm | [06.07.2023 10:26.34.309] [LOG] Initializing new module helper …
          0|mm | [06.07.2023 10:26.34.310] [LOG] Module helper loaded: updatenotification
          0|mm | [06.07.2023 10:26.34.311] [LOG] No helper found for module: clock.
          0|mm | [06.07.2023 10:26.34.318] [LOG] Initializing new module helper …
          0|mm | [06.07.2023 10:26.34.319] [LOG] Module helper loaded: MMM-MyScoreboard
          0|mm | [06.07.2023 10:26.34.550] [LOG] Initializing new module helper …
          0|mm | [06.07.2023 10:26.34.553] [LOG] Module helper loaded: calendar
          0|mm | [06.07.2023 10:26.34.555] [LOG] No helper found for module: weather.
          0|mm | [06.07.2023 10:26.34.592] [LOG] Initializing new module helper …
          0|mm | [06.07.2023 10:26.34.593] [LOG] Module helper loaded: newsfeed
          0|mm | [06.07.2023 10:26.35.237] [LOG] Initializing new module helper …
          0|mm | [06.07.2023 10:26.35.238] [LOG] Module helper loaded: MMM-Jast
          0|mm | [06.07.2023 10:26.35.238] [LOG] All module helpers loaded.
          0|mm | [06.07.2023 10:26.35.252] [LOG] Starting server on port 8080 …
          0|mm | [06.07.2023 10:26.35.462] [LOG] Server started …
          0|mm | [06.07.2023 10:26.35.463] [LOG] Connecting socket for: updatenotification
          0|mm | [06.07.2023 10:26.35.466] [LOG] Starting module helper: updatenotification
          0|mm | [06.07.2023 10:26.35.467] [LOG] Connecting socket for: MMM-MyScoreboard
          0|mm | [06.07.2023 10:26.35.468] [LOG] Starting node_helper for module [MMM-MyScoreboard]
          0|mm | [06.07.2023 10:26.35.831] [LOG] Connecting socket for: calendar
          0|mm | [06.07.2023 10:26.35.831] [LOG] Starting node helper for: calendar
          0|mm | [06.07.2023 10:26.35.832] [LOG] Connecting socket for: newsfeed
          0|mm | [06.07.2023 10:26.35.833] [LOG] Starting node helper for: newsfeed
          0|mm | [06.07.2023 10:26.35.834] [LOG] Connecting socket for: MMM-Jast
          0|mm | [06.07.2023 10:26.35.834] [LOG] MMM-Jast helper method started…
          0|mm | [06.07.2023 10:26.35.836] [LOG] Sockets connected & modules started …
          0|mm | [06.07.2023 10:26.35.876] [LOG] Launching application.
          0|mm | [06.07.2023 10:26.38.724] [LOG] Create new calendarfetcher for url: https://calendar.google.com/calendar/ical/wyovino%40gmail.com/private-b71db2843aaff911c63405db3b5da429/basic.ics - Interval: 300000
          0|mm | [06.07.2023 10:26.38.762] [LOG] Create new newsfetcher for url: https://www.yahoo.com/news/rss - Interval: 300000
          0|mm | [06.07.2023 10:26.38.769] [LOG] Create new newsfetcher for url: https://www.mlb.com/mets/feeds/news/rss.xml?_gl=1*1hyw7gs*_gcl_au*MTM2MjI0OTI5My4xNjgyMzQ1ODU3 - Interval: 300000
          0|mm | [06.07.2023 10:26.38.773] [LOG] Create new newsfetcher for url: https://api.foxsports.com/v2/content/optimized-rss?partnerKey=MB0Wehpmuj2lUhuRhQaafhBjAJqaPU244mlTDK1i&aggregateId=7f83e8ca-6701-5ea0-96ee-072636b67336 - Interval: 300000
          0|mm | [06.07.2023 10:26.40.378] [INFO] Newsfeed-Fetcher: Broadcasting 50 items.
          0|mm | [06.07.2023 10:26.40.491] [INFO] Newsfeed-Fetcher: reloadInterval set to ttl=10800000 for url https://api.foxsports.com/v2/content/optimized-rss?partnerKey=MB0Wehpmuj2lUhuRhQaafhBjAJqaPU244mlTDK1i&aggregateId=7f83e8ca-6701-5ea0-96ee-072636b67336
          0|mm | [06.07.2023 10:26.40.517] [INFO] Newsfeed-Fetcher: Broadcasting 25 items.
          0|mm | [06.07.2023 10:26.40.779] [INFO] Checking git for module: MMM-MyScoreboard
          0|mm | [06.07.2023 10:26.40.846] [INFO] Newsfeed-Fetcher: Broadcasting 75 items.
          0|mm | [06.07.2023 10:26.40.861] [INFO] Checking git for module: MMM-Jast
          0|mm | [06.07.2023 10:26.40.891] [INFO] Checking git for module: MagicMirror
          0|mm | [06.07.2023 10:26.41.016] [INFO] Calendar-Fetcher: Broadcasting 1 events.

          /home/pi/.pm2/logs/mm-error.log last 50 lines:
          0|mm | MESA-LOADER: failed to retrieve device information
          0|mm | MESA-LOADER: failed to retrieve device information
          0|mm | MESA-LOADER: failed to retrieve device information
          0|mm | MESA-LOADER: failed to open kms_swrast: /usr/lib/dri/kms_swrast_dri.so: cannot open shared object file: Permission denied (search paths /usr/lib/aarch64-linux-gnu/dri:$${ORIGIN}/dri:/usr/lib/dri)
          0|mm | failed to load driver: kms_swrast
          0|mm | MESA-LOADER: failed to open swrast: /usr/lib/dri/swrast_dri.so: cannot open shared object file: Permission denied (search paths /usr/lib/aarch64-linux-gnu/dri:$${ORIGIN}/dri:/usr/lib/dri)
          0|mm | failed to load swrast driver
          0|mm | [06.07.2023 10:26.41.236] [WARN] API request for IXIC failed: Quote not found for ticker symbol: IXIC
          0|mm | [06.07.2023 10:26.43.980] [ERROR] Failed to retrieve repo info for MagicMirror: Error: Command failed: cd /home/pi/MagicMirror/ && git fetch -n --dry-run
          0|mm | error: object file .git/objects/94/aeda9d76a88f9691fbebf7f4f50a39887c626e is empty
          0|mm | fatal: loose object 94aeda9d76a88f9691fbebf7f4f50a39887c626e (stored in .git/objects/94/aeda9d76a88f9691fbebf7f4f50a39887c626e) is corrupt
          0|mm | fatal: unpack-objects failed
          0|mm |

          1 Reply Last reply Reply Quote 0
          • W Offline
            wyovino @sdetweil
            last edited by Jul 6, 2023, 2:33 PM

            @sdetweil I appreciate your help in this as it’s obvious this is an environmental issue, not a Magic Mirror issue.

            S 1 Reply Last reply Jul 6, 2023, 6:22 PM Reply Quote 0
            • S Away
              sdetweil @wyovino
              last edited by Jul 6, 2023, 6:22 PM

              @wyovino I don’t see anything related to python there

              to get rid of the mesa errors, add

              export ELRCTRON_DISABLE_GPU=1

              in the mm.sh in front of the npm start

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              1 Reply Last reply Reply Quote 0
              • H Offline
                htilburgs
                last edited by htilburgs Jul 10, 2023, 3:34 PM Jul 10, 2023, 3:33 PM

                I had issues that look the same. After a system crash (defect SD card after 6 years) I could fallback on a backup, but I decided to do a fresh install wih the latest rPi OS. After that my PIR didn’t function anymore. Screen didn’t went of and back on again.

                In my case the solution to put the GL driver back to legacy.

                • sudo raspi-config
                • advanced options
                • GL driver
                • Legacy

                After that my Python script and the PIR worked as they should.p

                (still trying to learn JS, but not afraid to ask) ☺

                W 2 Replies Last reply Jul 17, 2023, 1:15 AM Reply Quote 0
                • W Offline
                  wyovino @htilburgs
                  last edited by Jul 17, 2023, 1:15 AM

                  @htilburgs said in PIR problem RPi 4B, Bullseye 64 bit:

                  I had issues that look the same. After a system crash (defect SD card after 6 years) I could fallback on a backup, but I decided to do a fresh install wih the latest rPi OS. After that my PIR didn’t function anymore. Screen didn’t went of and back on again.

                  In my case the solution to put the GL driver back to legacy.

                  • sudo raspi-config
                  • advanced options
                  • GL driver
                  • Legacy

                  After that my Python script and the PIR worked as they should.p

                  Interesting. Are you using the MMM-PIR-Sensor module?

                  H 1 Reply Last reply Jul 17, 2023, 6:02 PM Reply Quote 0
                  • H Offline
                    htilburgs @wyovino
                    last edited by Jul 17, 2023, 6:02 PM

                    @wyovino No, I’m not using MMM-PIR.
                    I’ve documented it on my website, but it is in Dutch ;-)

                    https://magicmirror.tilburgs.com/pir-configuratie/

                    (still trying to learn JS, but not afraid to ask) ☺

                    S 1 Reply Last reply Jul 17, 2023, 8:22 PM Reply Quote 2
                    • S Away
                      sdetweil @htilburgs
                      last edited by Jul 17, 2023, 8:22 PM

                      @htilburgs easy to translate these days

                      nice write up

                      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
                      • 2 / 3
                      2 / 3
                      • First post
                        16/23
                        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