• 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-Sensor not working with latest release - display does not turn off

Scheduled Pinned Locked Moved Solved Troubleshooting
11 Posts 4 Posters 4.8k Views 4 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.
  • K Offline
    Kugelfang
    last edited by Kugelfang Apr 4, 2019, 3:42 PM Apr 4, 2019, 6:03 AM

    Dear all,

    I’ve been using MM for over 1,5 years now. Unfortunately my SD card died yesterday so I took the opportunity to start from scratch.

    I installed the latest release 2.7.1 on my RBPi 3. using the “Full KMS” OpenGl driver. Unfortunately my PIR Sensor does not work anymore as my display stays on all the time. Interestingly I’m able to turn the display on an off manually via SSH using

    vcgencmd display_power 0
    
    vcgencmd display_power 1
    

    I already checked the wiring (which I actually did not change from my setup which was working for a long time) and I also checked the signal line of the PIR Sensor. Both are ok.

    My configuration looks like this:

    		{
    			module: 'MMM-PIR-Sensor',
    			config: {
    				sensorPIN: 23,
    				powerSavingDelay: 15
    			}
    		},
    

    It would be great if someone could help me out as I’m clearly missing something…

    T 1 Reply Last reply Apr 4, 2019, 6:50 AM Reply Quote 0
    • T Offline
      thedoorsfanatic @Kugelfang
      last edited by Apr 4, 2019, 6:50 AM

      @Kugelfang
      Hi, I updated to 2.7.1 yesterday and also installed MMM-PIR-Sensor which works fine for me (https://youtu.be/5Cs3pCZamuM)
      I am not using the Full KMS driver though
      Did you follow these steps also:
      Execute npm install to install the node dependencies.
      Add your user (pi?) to the gpio group by executing sudo usermod -a -G gpio pi.
      Execute sudo chmod u+s /opt/vc/bin/tvservice && sudo chmod u+s /bin/chvt to allow turning on/off the hdmi output.
      Reboot your Pi.

      My Smart Mirror YouTube playlist: https://www.youtube.com/playlist?list=PL9Iv_4Mvy6o2tnvdhNBstVWNefgUP9ELp

      1 Reply Last reply Reply Quote 0
      • K Offline
        Kugelfang
        last edited by Apr 4, 2019, 3:42 PM

        Yes, I did. to my best knowledge the tcservice does not work with the KMS driver.

        Also looking into the details at GitHub I thought that MMM-PIR-Sensor actually uses the vcgencmd

        T 1 Reply Last reply Apr 4, 2019, 3:56 PM Reply Quote 0
        • T Offline
          thedoorsfanatic @Kugelfang
          last edited by Apr 4, 2019, 3:56 PM

          @Kugelfang
          I am really no expert at all but here is another tipp of mine:
          I also use these modules to turn off my monitor:
          MMM-ModuleScheduler + MMM-Remote-Control (at a certain time)
          and MMM-NetworkScanner (when my phone is not connected to my WLAN)

          My Smart Mirror YouTube playlist: https://www.youtube.com/playlist?list=PL9Iv_4Mvy6o2tnvdhNBstVWNefgUP9ELp

          1 Reply Last reply Reply Quote 0
          • K Offline
            Kugelfang
            last edited by Apr 4, 2019, 4:35 PM

            actually I checked the pm2 logs and found loots of this messages:

            npm ERR! A complete log of this run can be found in:
            npm ERR!     /home/pi/.npm/_logs/2019-04-03T22_01_36_315Z-debug.log
            /home/pi/MagicMirror/node_modules/electron/dist/electron js/electron.js: symbol lookup error: /home/pi/MagicMirror/modules/MMM-PIR/node_modules/epoll/build/Release/epoll.node: undefined symbol: _ZN2v816FunctionTemplate3NewEPNS_7IsolateEPFvRKNS_20FunctionCallbackInfoINS_5ValueEEEENS_5LocalIS4_EENSA_INS_9SignatureEEEiNS_19ConstructorBehaviorENS_14SideEffectTypeE
            npm ERR! file sh
            npm ERR! code ELIFECYCLE
            npm ERR! errno ENOENT
            npm ERR! syscall spawn
            npm ERR! magicmirror@2.7.1 start: `sh run-start.sh`
            npm ERR! spawn ENOENT
            npm ERR! 
            npm ERR! Failed at the magicmirror@2.7.1 start script.
            npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
            

            does anybody know how to fix this?

            S 1 Reply Last reply Apr 4, 2019, 4:53 PM Reply Quote 0
            • S Away
              sdetweil @Kugelfang
              last edited by Apr 4, 2019, 4:53 PM

              @Kugelfang yes, you will need to install electron-rebuild in that module

              from the MMM-PIR folder

              npm install electron-rebuild
              

              then run it to force the epoll rebuild

              node_modules/.bin/electron-rebuild
              

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              1 Reply Last reply Reply Quote 1
              • K Offline
                Kugelfang
                last edited by Kugelfang Apr 5, 2019, 5:27 AM Apr 4, 2019, 5:05 PM

                @sdetweil said in MMM-PIR-Sensor not working with latest release - display does not turn off:

                node_modules/.bin/electron-rebuild

                Holy SHIT that worked. I’m now using the MMM-PIR instead of the MMM-PIR-Sensor

                thanks you so much!!!

                EDIT:

                for the record: there are two PIR modules avaliable: Initially I intended to go with MMM-PIR-Sensors as I’ve been using this in the past. Unfortunately I couldn’t get it to work with the newly installed setup. Hence I choose MMM-PIR.

                Besides the suggestion from @sdetweil I also modified the displayOff.sh and displayON.sh from

                tvservice -o
                

                to

                vcgencmd display_power 0
                

                so the module works with the full KMS OpenGL driver.

                S 1 Reply Last reply Apr 12, 2019, 7:52 PM Reply Quote 0
                • S Offline
                  shgmongohh @Kugelfang
                  last edited by Apr 12, 2019, 7:52 PM

                  @Kugelfang

                  Where did you change the displaOff.sh? Where can I find this?

                  Sebastain

                  S 1 Reply Last reply Apr 12, 2019, 8:01 PM Reply Quote 0
                  • S Away
                    sdetweil @shgmongohh
                    last edited by Apr 12, 2019, 8:01 PM

                    @shgmongohh in the module folder

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    S 1 Reply Last reply Apr 12, 2019, 8:25 PM Reply Quote 0
                    • S Offline
                      shgmongohh @sdetweil
                      last edited by Apr 12, 2019, 8:25 PM

                      @sdetweil

                      In which folder ?
                      0_1555100722499_Unbenannt.PNG

                      S 1 Reply Last reply Apr 12, 2019, 8:37 PM Reply Quote 0
                      • 1
                      • 2
                      • 1 / 2
                      • First post
                        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