• Register
    • Login
    • Search

    Solved Can't install on latest rPi OS

    EXT-Pir
    2
    11
    38
    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.
    • U
      uros76 last edited by

      Hi. I had to upgrade my rpi OS to the latest version and since then the EXT-Pir module stopped working.
      When I try to reinstall it I get below error. What could be wrong? Do I need to update something more?

      ~/MagicMirror/modules/EXT-Pir $ npm install
      npm ERR! code 1
      npm ERR! path /home/pi/MagicMirror/modules/EXT-Pir/node_modules/epoll
      npm ERR! command failed
      npm ERR! command sh -c -- node-gyp rebuild
      npm ERR! make: Entering directory '/home/pi/MagicMirror/modules/EXT-Pir/node_modules/epoll/build'
      npm ERR!   CXX(target) Release/obj.target/epoll/src/epoll.o
      npm ERR! make: Leaving directory '/home/pi/MagicMirror/modules/EXT-Pir/node_modules/epoll/build'
      npm ERR! gyp info it worked if it ends with ok
      npm ERR! gyp info using node-gyp@9.4.0
      npm ERR! gyp info using node@16.20.1 | linux | arm
      npm ERR! gyp info find Python using Python version 3.9.2 found at "/usr/bin/python3"
      npm ERR! gyp info spawn /usr/bin/python3
      npm ERR! gyp info spawn args [
      npm ERR! gyp info spawn args   '/home/pi/MagicMirror/modules/EXT-Pir/node_modules/node-gyp/gyp/gyp_main.py',
      npm ERR! gyp info spawn args   'binding.gyp',
      npm ERR! gyp info spawn args   '-f',
      npm ERR! gyp info spawn args   'make',
      npm ERR! gyp info spawn args   '-I',
      npm ERR! gyp info spawn args   '/home/pi/MagicMirror/modules/EXT-Pir/node_modules/epoll/build/config.gypi',
      npm ERR! gyp info spawn args   '-I',
      npm ERR! gyp info spawn args   '/home/pi/MagicMirror/modules/EXT-Pir/node_modules/node-gyp/addon.gypi',
      npm ERR! gyp info spawn args   '-I',
      npm ERR! gyp info spawn args   '/home/pi/.cache/node-gyp/16.20.1/include/node/common.gypi',
      npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
      npm ERR! gyp info spawn args   '-Dvisibility=default',
      npm ERR! gyp info spawn args   '-Dnode_root_dir=/home/pi/.cache/node-gyp/16.20.1',
      npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/home/pi/MagicMirror/modules/EXT-Pir/node_modules/node-gyp',
      npm ERR! gyp info spawn args   '-Dnode_lib_file=/home/pi/.cache/node-gyp/16.20.1/<(target_arch)/node.lib',
      npm ERR! gyp info spawn args   '-Dmodule_root_dir=/home/pi/MagicMirror/modules/EXT-Pir/node_modules/epoll',
      npm ERR! gyp info spawn args   '-Dnode_engine=v8',
      npm ERR! gyp info spawn args   '--depth=.',
      npm ERR! gyp info spawn args   '--no-parallel',
      npm ERR! gyp info spawn args   '--generator-output',
      npm ERR! gyp info spawn args   'build',
      npm ERR! gyp info spawn args   '-Goutput_dir=.'
      npm ERR! gyp info spawn args ]
      npm ERR! gyp info spawn make
      npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
      npm ERR! make: g++: No such file or directory
      npm ERR! make: *** [epoll.target.mk:115: Release/obj.target/epoll/src/epoll.o] Error 127
      npm ERR! gyp ERR! build error
      npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
      npm ERR! gyp ERR! stack     at ChildProcess.onExit (/home/pi/MagicMirror/modules/EXT-Pir/node_modules/node-gyp/lib/build.js:203:23)
      npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
      npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:293:12)
      npm ERR! gyp ERR! System Linux 6.1.34-v8+
      npm ERR! gyp ERR! command "/usr/bin/node" "/home/pi/MagicMirror/modules/EXT-Pir/node_modules/.bin/node-gyp" "rebuild"
      npm ERR! gyp ERR! cwd /home/pi/MagicMirror/modules/EXT-Pir/node_modules/epoll
      npm ERR! gyp ERR! node -v v16.20.1
      npm ERR! gyp ERR! node-gyp -v v9.4.0
      npm ERR! gyp ERR! not ok
      
      npm ERR! A complete log of this run can be found in:
      npm ERR!     /home/pi/.npm/_logs/2023-07-02T21_43_18_168Z-debug-0.log
      
      1 Reply Last reply Reply Quote 0
      • bugsounet
        bugsounet Main Coder last edited by

        warn: MMM-Pir and Gateway can’t be used in the same time on next release cycle

        (powaaa… he’s boring with its bugsounet rules!)

        My place in France Top committers of Github:
        committers.top badge

        1 Reply Last reply Reply Quote 1
        • bugsounet
          bugsounet Main Coder last edited by bugsounet

          try to install in this order:

          –> MMM-GoogleAssistant

          1. Gateway
          2. EXT-Detector
          3. EXT-Screen
          4. EXT-Pir

          actually g++ dependency is missing (npm ERR! make: g++: No such file or directory)
          this dependency is installed with Gateway and verified again with EXT-Detector installer
          I don’t verify it in EXT-Pir installer

          My place in France Top committers of Github:
          committers.top badge

          1 Reply Last reply Reply Quote 0
          • U
            uros76 last edited by

            Thanks for your reply. I tried to install the Gateway and get this error:

            npm ERR! code 1
            npm ERR! path /home/pi/MagicMirror/modules/Gateway/node_modules/node-pty
            npm ERR! command failed
            npm ERR! command sh -c -- node scripts/install.js
            npm ERR! make: Entering directory '/home/pi/MagicMirror/modules/Gateway/node_modules/node-pty/build'
            npm ERR!   CXX(target) Release/obj.target/pty/src/unix/pty.o
            npm ERR! make: Leaving directory '/home/pi/MagicMirror/modules/Gateway/node_modules/node-pty/build'
            npm ERR! gyp info it worked if it ends with ok
            npm ERR! gyp info using node-gyp@9.4.0
            npm ERR! gyp info using node@16.20.1 | linux | arm
            npm ERR! gyp info find Python using Python version 3.9.2 found at "/usr/bin/python3"
            npm ERR! gyp info spawn /usr/bin/python3
            npm ERR! gyp info spawn args [
            npm ERR! gyp info spawn args   '/home/pi/MagicMirror/modules/Gateway/node_modules/node-gyp/gyp/gyp_main.py',
            npm ERR! gyp info spawn args   'binding.gyp',
            npm ERR! gyp info spawn args   '-f',
            npm ERR! gyp info spawn args   'make',
            npm ERR! gyp info spawn args   '-I',
            npm ERR! gyp info spawn args   '/home/pi/MagicMirror/modules/Gateway/node_modules/node-pty/build/config.gypi',
            npm ERR! gyp info spawn args   '-I',
            npm ERR! gyp info spawn args   '/home/pi/MagicMirror/modules/Gateway/node_modules/node-gyp/addon.gypi',
            npm ERR! gyp info spawn args   '-I',
            npm ERR! gyp info spawn args   '/home/pi/.cache/node-gyp/16.20.1/include/node/common.gypi',
            npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
            npm ERR! gyp info spawn args   '-Dvisibility=default',
            npm ERR! gyp info spawn args   '-Dnode_root_dir=/home/pi/.cache/node-gyp/16.20.1',
            npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/home/pi/MagicMirror/modules/Gateway/node_modules/node-gyp',
            npm ERR! gyp info spawn args   '-Dnode_lib_file=/home/pi/.cache/node-gyp/16.20.1/<(target_arch)/node.lib',
            npm ERR! gyp info spawn args   '-Dmodule_root_dir=/home/pi/MagicMirror/modules/Gateway/node_modules/node-pty',
            npm ERR! gyp info spawn args   '-Dnode_engine=v8',
            npm ERR! gyp info spawn args   '--depth=.',
            npm ERR! gyp info spawn args   '--no-parallel',
            npm ERR! gyp info spawn args   '--generator-output',
            npm ERR! gyp info spawn args   'build',
            npm ERR! gyp info spawn args   '-Goutput_dir=.'
            npm ERR! gyp info spawn args ]
            npm ERR! gyp info spawn make
            npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
            npm ERR! make: g++: No such file or directory
            npm ERR! make: *** [pty.target.mk:111: Release/obj.target/pty/src/unix/pty.o] Error 127
            npm ERR! gyp ERR! build error
            npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
            npm ERR! gyp ERR! stack     at ChildProcess.onExit (/home/pi/MagicMirror/modules/Gateway/node_modules/node-gyp/lib/build.js:203:23)
            npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
            npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:293:12)
            npm ERR! gyp ERR! System Linux 6.1.34-v8+
            npm ERR! gyp ERR! command "/usr/bin/node" "/home/pi/MagicMirror/modules/Gateway/node_modules/.bin/node-gyp" "rebuild"
            npm ERR! gyp ERR! cwd /home/pi/MagicMirror/modules/Gateway/node_modules/node-pty
            npm ERR! gyp ERR! node -v v16.20.1
            npm ERR! gyp ERR! node-gyp -v v9.4.0
            npm ERR! gyp ERR! not ok
            
            npm ERR! A complete log of this run can be found in:
            npm ERR!     /home/pi/.npm/_logs/2023-07-02T22_28_03_916Z-debug-0.log
            
            1 Reply Last reply Reply Quote 0
            • bugsounet
              bugsounet Main Coder last edited by

              try this inside Gateway directory:

              npm run preinstall && npm install
              

              My place in France Top committers of Github:
              committers.top badge

              1 Reply Last reply Reply Quote 0
              • bugsounet
                bugsounet Main Coder last edited by

                I think it’s related to this

                image.png

                My place in France Top committers of Github:
                committers.top badge

                1 Reply Last reply Reply Quote 0
                • U
                  uros76 last edited by

                  I just installed also the MMM-GoogleAssistant and then did the npm run preinstall && npm install inside the Gateway .
                  Now the EXT-Pir managed to install. Will test it soon if it works like it used to.
                  I am also updating the local npm version now.

                  Thanks again for quick help 😊

                  1 Reply Last reply Reply Quote 0
                  • U
                    uros76 last edited by

                    I just tested it all and somehow the EXT-Screen doesn’t countdown the timer to turn of screen.
                    This is in my config.js at the moment. Not sure why the timer doesn’t start.

                    {
                      module: 'EXT-Screen',
                      position: 'bottom_right',
                      config: {
                          delay: 2 * 60 * 1000,
                          turnOffDisplay: true,
                          mode: 1,
                          ecoMode: true,
                          displayCounter: true,
                          displayBar: true,
                          displayStyle: "Text",
                          displayLastPresence: true,
                           }
                    },
                    {
                      module: 'EXT-Pir',
                      config: {
                        gpio: 17,
                        reverseValue: false
                      }
                    },
                    
                    
                    1 Reply Last reply Reply Quote 0
                    • U
                      uros76 last edited by

                      Strange, even the minimal configuration below doesn’t help to trigger the timeout…

                      {
                        module: 'EXT-Screen',
                        position: 'top_left',
                        config: {
                          delay: 2 * 60 * 1000
                        }
                      },
                      
                      1 Reply Last reply Reply Quote 0
                      • bugsounet
                        bugsounet Main Coder last edited by

                        config is good
                        but warn !

                        EXTs are plugins not a module

                        • it needs MMM-GoogleAssistant in Ready state and Gateway initialized
                        • MMM-GoogleAssistant must have no error… Otherwise Gateway will not start
                        • Gateway must have no errors … Otherwise EXTs will not start !

                        Note: EXT-Alert will display any alert and errors

                        My place in France Top committers of Github:
                        committers.top badge

                        1 Reply Last reply Reply Quote 0
                        • U
                          uros76 last edited by

                          Ok, got it. I was not fully aware of these dependencies.
                          I went a different way and used your standalone module https://github.com/bugsounet/MMM-Pir which fits my needs.

                          1 Reply Last reply Reply Quote 0
                          • bugsounet
                            bugsounet Main Coder last edited by

                            warn: MMM-Pir and Gateway can’t be used in the same time on next release cycle

                            (powaaa… he’s boring with its bugsounet rules!)

                            My place in France Top committers of Github:
                            committers.top badge

                            1 Reply Last reply Reply Quote 1
                            • undefined  U uros76 
                            • First post
                              Last post
                            Powered by NodeBB | @bugsounet ©2023