Bugsounet Coding

    • Register
    • Login
    • Search
    This Forum is now reserved to registred users!

    Solved No PIR output in logs

    EXT-Pir
    2
    8
    37
    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.
    • R
      robotfishe last edited by

      I have EXT-Pir and EXT-Screen installed. Here’s my configuration:

      	{
      		module: "EXT-Screen",
      		position: "bottom_left",
      		config: {
      			debug: true,
      			delay: 3 * 60 * 1000,
      			autoHide: false,
       				displayCounter: true,
      			displayBar: true,
      			displayStyle: "Text",
      			displayLastPresence: false
      		}
      	},
      	{
      		module: "EXT-Pir",
      		config: {
      			debug: true,
      			gpio: 14
      		}
      	},
      

      I am able to use <gpio readall> over SSH to my rpi to confirm that when I move around the room, BCM port number 14 changes from 0 to 1.

      I have run update.sh and npm rebuild in the EXT-Pir folder.

      However, no EXT-Pir output appears anywhere in the logs, and when the sensor is triggered, the screen off countdown does not reset.

      Anything I should try to fix this?

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

        Hi! (I think it’s better to begin by this! 🙂 )

        • Can your try npm run rebuild inside EXT-Pir directory ?
        • Can you see MagicMirror Rebuild Complete at the end of this step ?
        • Eventually, if not working again, past some logs from start of MagicMirror
        bugsounet 1 Reply Last reply Reply Quote 0
        • R
          robotfishe last edited by robotfishe

          Okay I have run npm run rebuild. Here is the output:

          Welcome to EXT-Pir rebuild script
          This script will erase current build and reinstall it
          Do you want to continue ? [Y/n]
          Your choice: y
          
          Deleting: package-lock.json node_modules
          Done.
          
          Upgrading EXT-Pir...
          HEAD is now at e368238 delete pir library
          Already up to date.
          Done.
          Reinstalling EXT-Pir...
          
          > EXT-Pir@1.0.1 preinstall /home/pi/MagicMirror/modules/EXT-Pir
          > installer/preinstall.sh
          
          Welcome to EXT-Pir v1.0.1
          
          No root checking...
          Checking EXT-Pir: pi/pi
          Checking MagicMirror: pi/pi
          
          Checking OS...
          OS Detected: linux-gnueabihf (raspbian 10 armv7l)
          
          Installing all npm libraries...
          npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
          npm WARN deprecated har-validator@5.1.5: this library is no longer supported
          
          > epoll@4.0.1 install /home/pi/MagicMirror/modules/EXT-Pir/node_modules/epoll
          > node-gyp rebuild
          
          make: Entering directory '/home/pi/MagicMirror/modules/EXT-Pir/node_modules/epoll/build'
            CXX(target) Release/obj.target/epoll/src/epoll.o
            SOLINK_MODULE(target) Release/obj.target/epoll.node
            COPY Release/epoll.node
          make: Leaving directory '/home/pi/MagicMirror/modules/EXT-Pir/node_modules/epoll/build'
          
          > EXT-Pir@1.0.1 postinstall /home/pi/MagicMirror/modules/EXT-Pir
          > installer/postinstall.sh
          
          
          Prepare PIR sensor using
          Done
          
          Rebuilding MagicMirror...
          ⠙ MagicMirror Building module: epoll, Completed: 0make: Entering directory '/home/pi/MagicMirror/modules/EXT-Pir/node_modules/epoll/build'
          ⠹ MagicMirror Building module: epoll, Completed: 0  CXX(target) Release/obj.target/epoll/src/epoll.o
          ⠇ MagicMirror Building module: epoll, Completed: 0  SOLINK_MODULE(target) Release/obj.target/epoll.node
          ⠦ MagicMirror Building module: epoll, Completed: 0  COPY Release/epoll.node
          ⠧ MagicMirror Building module: epoll, Completed: 0make: Leaving directory '/home/pi/MagicMirror/modules/EXT-Pir/node_modules/epoll/build'
          ✔ MagicMirror Rebuild Complete
          
          Support is now moved in a dedicated Server: https://forum.bugsounet.fr
          @bugsounet
          
          EXT-Pir is now installed !
          npm notice created a lockfile as package-lock.json. You should commit this file.
          added 195 packages from 175 contributors and audited 195 packages in 112.525s
          
          22 packages are looking for funding
            run `npm fund` for details
          
          found 0 vulnerabilities
          

          When I run pm2 start mm and pm2 logs, I do see this:

          1|mm  | [22.05.2022 13:41.22.656] [LOG]   Module helper loaded: EXT-Pir
          1|mm  | [22.05.2022 13:41.22.658] [LOG]   No helper found for module: MMM-Anti-Screen-Burn-In.
          1|mm  | [22.05.2022 13:41.22.660] [LOG]   All module helpers loaded.
          1|mm  | [22.05.2022 13:41.23.107] [LOG]
          1|mm  | Starting server on port 8080 ...
          1|mm  | [22.05.2022 13:41.23.146] [WARN]
          1|mm  | You're using a full whitelist configuration to allow for all IPs
          1|mm  | [22.05.2022 13:41.23.168] [LOG]
          1|mm  | Server started ...
          1|mm  | [22.05.2022 13:41.23.173] [LOG]   Connecting socket for: calendar
          1|mm  | [22.05.2022 13:41.23.178] [LOG]
          1|mm  | Starting node helper for: calendar
          1|mm  | [22.05.2022 13:41.23.182] [LOG]   Connecting socket for: currentweather
          1|mm  | [22.05.2022 13:41.23.185] [WARN]  The module 'currentweather' is deprecated in favor of the 'weather'-module, please refer to the documentation for a migration path
          1|mm  | [22.05.2022 13:41.23.190] [WARN]  The module 'weatherforecast' is deprecated in favor of the 'weather'-module, please refer to the documentation for a migration path
          1|mm  | [22.05.2022 13:41.23.189] [LOG]   Connecting socket for: weatherforecast
          1|mm  | [22.05.2022 13:41.23.192] [LOG]   Connecting socket for: MMM-Tronity
          1|mm  | [22.05.2022 13:41.23.194] [LOG]   Starting node_helper for MMM-Tronity
          1|mm  | [22.05.2022 13:41.23.195] [LOG]   Connecting socket for: MMM-UKNationalRail
          1|mm  | [22.05.2022 13:41.23.197] [LOG]   MMM-UKNationalRail helper started ...
          1|mm  | [22.05.2022 13:41.23.201] [LOG]   Connecting socket for: EXT-Screen
          1|mm  | [22.05.2022 13:41.23.206] [LOG]   Connecting socket for: EXT-Pir
          1|mm  | [22.05.2022 13:41.23.210] [LOG]   Sockets connected & modules started ...
          1|mm  | [22.05.2022 13:41.26.091] [LOG]
          

          After that, I can see a lot of log entries with [SCREEN] but none with [PIR], not even the initialisation message. So something is going wrong very early before pirLib.js even gets started.

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

            what is your MM version ?

            1 Reply Last reply Reply Quote 0
            • R
              robotfishe last edited by

              It’s version 2.18.

              I have found where the problem is: EXT-Pir works if I disable my own module I have recently created, MMM-Tronity.

              This is a fairly simple module that pulls data from a web API. It consists of a main .js file, a node_helper.js, and a css stylesheet. Do you have any idea what kind of elements might interfere with EXT-Pir?

              (The code is at https://github.com/robotfishe/MMM-Tronity if helpful)

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

                The main reason of it don’t work is:

                • your module have crash.
                • So Main core of MM have break and crash too and will stop real time reading

                Try to run npm start dev and inspect red line in console tab (I think you should have it for this module)
                Better wait is using node_helper.js for fetch data, sort it and send needed via socket noti
                This method prevent to don’t crash the HTML page

                I can’t help more because i don’t use Tronity Platform so i can’t debug it 😕

                1 Reply Last reply Reply Quote 0
                • R
                  robotfishe last edited by

                  Thank you! I didn’t know about npm start dev, I was debugging from a remote machine so I couldn’t see what was happening at startup. My module was returning a null object via getDom() until it fetched API data, which crashed the HTML. All is working again. 🙂

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

                    Art of coding is prevent all crash 😉

                    Perfect if’s solved 😉

                    Happy use (and Happy coding)

                    1 Reply Last reply Reply Quote 0
                    • Topic has been marked as solved  bugsounet bugsounet 
                    • First post
                      Last post
                    Powered by NodeBB | @bugsounet ©2022