MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    1. Home
    2. Jazz
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.
    J
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 2
    • Groups 0

    Jazz

    @Jazz

    0
    Reputation
    1
    Profile views
    2
    Posts
    0
    Followers
    0
    Following
    Joined
    Last Online

    Jazz Unfollow Follow

    Latest posts made by Jazz

    • RE: Module error after updating - MMM-Pir: Pir Error detected: EINVAL: invalid argument, write

      @bugsounet Changing pir_ mode from 0 to 1 has fixed the problem :)

      Thanks for your help.

      Regards,

      Jazz

      posted in Troubleshooting
      J
      Jazz
    • Module error after updating - MMM-Pir: Pir Error detected: EINVAL: invalid argument, write

      Hi,

      I’m running on a Raspberry Pi 4…

      jazz@magicmirror:~ $ cat /sys/firmware/devicetree/base/model;echo
      Raspberry Pi 4 Model B Rev 1.5
      

      Please note that my account is a member of the gpio group…

      jazz@magicmirror:~ $ groups
      jazz adm dialout cdrom sudo audio video plugdev games users input render netdev lpadmin gpio i2c spi
      

      I’ve had a magic mirror up for several months now. Due to the recent reports of problems being discovered with OpenSSH, I decided to do a full system update (that is, I did a ‘sudo apt update’ followed by a ‘sudo apt full-upgrade’) of the system. Note that i’m running raspbian 12…

      jazz@magicmirror:~ $ cat /etc/os-release|grep -e NAME -e VERSION
      PRETTY_NAME="Raspbian GNU/Linux 12 (bookworm)"
      NAME="Raspbian GNU/Linux"
      VERSION_ID="12"
      VERSION="12 (bookworm)"
      VERSION_CODENAME=bookworm
      

      I then updated the magic mirror software (‘git pull && npm run install-mm’). I then updated my modules, including MMM-Pir (https://github.com/bugsounet/MMM-Pir) via ‘npm run update’ and ‘npm run rebuild’. Everything proceeded as expected, but afterwards when I restarted, I was presented with an error in the notifications section of the magic mirror display saying “MMM-Pir: Pir Error detected: EINVAL: invalid argument, write”.

      Note that i’ve made no changes to the wiring of the PIR sensor or to the module configuration, which looks like…

      {
          module: 'MMM-Pir',
          position: 'top_left',
          config: {
              debug: false,
              delay: 2 * 60 * 1000,
              mode: 10,
              displayCounter: false,
              displayBar: false,
              displayStyle: "Text",
              displayLastPresence: true,
              lastPresenceTimeFormat: "LL H:mm",
              pir_mode: 0,
              pir_gpio: 17,
              pir_reverseValue: false,
              mode6_gpio: 20,
              mode6_clearGpioValue: true,
              xrandrForceRotation: "normal",
              wrandrForceRotation: "normal",
              wrandrForceMode: "1920x1080",
              touchMode: 0
          }
      }
      

      Note that if I do a ‘pm2 logs magic-mirror’, here are some of the last entries in /home/jazz/.pm2/logs/magic-mirror-error.log…

      0|magic-mi | [4347:0702/141938.410247:ERROR:gbm_wrapper.cc(74)] Failed to get fd for plane.: No such file or directory (2)
      0|magic-mi | [4347:0702/141938.410629:ERROR:gbm_wrapper.cc(257)] Failed to export buffer to dma_buf: No such file or directory (2)
      0|magic-mi | [2024-07-02 14:19:40.939] [ERROR] [MMM-Pir] [LIB] [PIR] Error: EINVAL: invalid argument, write
      0|magic-mi | /home/jazz/MagicMirror/node_modules/electron/dist/electron exited with signal SIGINT
      

      Anyone have any ideas on how to resolve the issue? I’ve tried changing the module ‘mode’ values to 9 and 2, but 10 seems to be the right value for my raspberry pi.

      Regards,

      Jazz

      posted in Troubleshooting
      J
      Jazz