• 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.

MMM-PIR Busy Issue

Scheduled Pinned Locked Moved Unsolved Troubleshooting
6 Posts 2 Posters 222 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.
  • S Offline
    siujd2001
    last edited by Jan 9, 2025, 1:27 AM

    Upon fresh startup, rpm run start:wayland works as intended

    • MagicMirror starts and all modules appear to work as intended
    • MMM-Pir reads sensor and refreshes countdown timer as desired

    After control-Q to stop the MagicMirror, each successive operation of npm run start:wayland returns error “PIR Error Detected: Error: ‘GPIO busy”

    • Log shows [ERROR] [MMM-Pir] [LIB] [PIR] Error: ‘GPIO Busy’
    • MagicMirror works, including all other modules except MMM-Pir

    Sensor AMR312 connected to 3v power (Pin 1), Ground (Pin 6), and GPIO21 (Pin 40)

    Current config.js settings

    module: ‘MMM-Pir’,
       position: ‘top_left’,
       config: {
           debug: false,
           Display: {
        timeout: 60 * 1000,
               animate: true,
              style: 1,
               colorFrom: “#FF0000”,
               colorTo: “#00FF00”,
    //         mode: 1,
    //     mode: 7,
        mode: 8,
               counter: true,
               lastPresence: true,
               lastPresenceTimeFormat: “LL H:mm”,
        availability: false,
    //         availability: true,
               autoDimmer: false,
              xrandrForceRotation: “normal”,
              wrandrForceRotation: “normal”,
              wrandrForceMode: null,
              waylandDisplayName: “wayland-0”,
    //     waylandDisplayName: “HDMI-A-1”,
               relayGPIOPin: 0,  //<-- default was 0
        ddcutil: {
          powerOnCode: “01”,
          powerOffCode: “04”,
          skipSetVcpCheck: false
        }
         },
         Pir: {
      mode: 1,
            gpio: 21
    //   gpio: 4 // <–connected to 4
    }

    R 1 Reply Last reply Jan 9, 2025, 2:30 AM Reply Quote 0
    • S Offline
      siujd2001
      last edited by Jan 9, 2025, 2:27 AM

      on boot, gpioinfo shows “GPIO21” unused input active-high. first start of npm run start:wayland works as intended.

      After CTRL-Q, gpioinfo shows “GPIO21” “lg” input active-high [used pull-down]. Successive npm run start:wayland shows GPIO Busy error.

      1 Reply Last reply Reply Quote 0
      • R Offline
        redfishbluefish @siujd2001
        last edited by Jan 9, 2025, 2:30 AM

        @siujd2001 in your config you have:

        Pir: {
          mode: 1,
          gpio: 21
        //   gpio: 4 // <–connected to 4
        }
        

        Did you try with mode: 0 ?

        Mode 1 uses an external python script and since that’s an external executable, there’s always a chance that the script has locked up the GPIO so when you start MMM-Pir again, it tries to start a new version of the script.

        S 1 Reply Last reply Jan 9, 2025, 3:33 AM Reply Quote 0
        • S Offline
          siujd2001 @redfishbluefish
          last edited by Jan 9, 2025, 3:33 AM

          @redfishbluefish

          Switching to mode:0 does now appear to work, in that there is no gpio error and ctrl-q and restarts don’t throw an error. So that’s great! Thank you.

          Screen blanks but does not turn all the way off, so that’s still an issue.

          R 1 Reply Last reply Jan 9, 2025, 1:01 PM Reply Quote 0
          • R Offline
            redfishbluefish @siujd2001
            last edited by Jan 9, 2025, 1:01 PM

            @siujd2001 you hadn’t mentioned anything about screen.

            I recently switched to using start:wayland also and found that in MMM-Pir, the ddcutil mode worked best. Screen control in general seems to vary on RPi depending on the monitor you have.

            S 1 Reply Last reply Jan 9, 2025, 3:11 PM Reply Quote 0
            • S Offline
              siujd2001 @redfishbluefish
              last edited by Jan 9, 2025, 3:11 PM

              @redfishbluefish

              Thank you. I will look at ddcutil mode next and update.

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              1 / 1
              • First post
                1/6
                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