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

    Posts

    Recent Best Controversial
    • RE: MMM-PIR-Sensor error

      @sdetweil I have the same error, tried your commands but running into another issue:

      ⠼ Building module: epoll, Completed: 0make: Verzeichnis „/home/pi/MagicMirror/mo                                                                                                                                                             dules/MMM-PIR-Sensor/node_modules/epoll/build“ wird betreten
        CXX(target) Release/obj.target/epoll/src/epoll.o
      ⠴ Building module: epoll, Completed: 0In file included from ../../nan/nan.h:288                                                                                                                                                              ,
                       from ../src/epoll.cc:15:
      ../../nan/nan_typedarray_contents.h: In constructor ‘Nan::TypedArrayContents<T>:                                                                                                                                                             :TypedArrayContents(v8::Local<v8::Value>)’:
      ../../nan/nan_typedarray_contents.h:34:43: error: ‘class v8::ArrayBuffer’ has no                                                                                                                                                              member named ‘GetContents’; did you mean ‘IsContext’?
             data   = static_cast<char*>(buffer->GetContents().Data()) + byte_offset;
                                                 ^~~~~~~~~~~
                                                 IsContext
      ⠏ Building module: epoll, Completed: 0make: *** [epoll.target.mk:117: Release/ob                                                                                                                                                             j.target/epoll/src/epoll.o] Fehler 1
      make: Verzeichnis „/home/pi/MagicMirror/modules/MMM-PIR-Sensor/node_modules/epol                                                                                                                                                             l/build“ wird verlassen
      ✖ Rebuild Failed
      
      An unhandled error occurred inside electron-rebuild
      node-gyp failed to rebuild '/home/pi/MagicMirror/modules/MMM-PIR-Sensor/node_mod                                                                                                                                                             ules/epoll'.
      For more information, rerun with the DEBUG environment variable set to "electron                                                                                                                                                             -rebuild".
      
      Error: `make` failed with exit code: 2
      
      
      
      Error: node-gyp failed to rebuild '/home/pi/MagicMirror/modules/MMM-PIR-Sensor/n                                                                                                                                                             ode_modules/epoll'.
      For more information, rerun with the DEBUG environment variable set to "electron                                                                                                                                                             -rebuild".
      
      Error: `make` failed with exit code: 2
      
      
          at NodeGyp.rebuildModule (/home/pi/MagicMirror/node_modules/electron-rebuild                                                                                                                                                             /lib/src/module-type/node-gyp.js:109:19)
          at processTicksAndRejections (internal/process/task_queues.js:95:5)
          at async ModuleRebuilder.rebuildNodeGypModule (/home/pi/MagicMirror/node_mod                                                                                                                                                             ules/electron-rebuild/lib/src/module-rebuilder.js:94:9)
          at async Rebuilder.rebuildModuleAt (/home/pi/MagicMirror/node_modules/electr                                                                                                                                                             on-rebuild/lib/src/rebuild.js:226:9)
          at async Rebuilder.rebuild (/home/pi/MagicMirror/node_modules/electron-rebui                                                                                                                                                             ld/lib/src/rebuild.js:184:17)
          at async /home/pi/MagicMirror/node_modules/electron-rebuild/lib/src/cli.js:1                                                                                                                                                             54:9
      
      

      Do you have an idea how to solve it?

      //edit: Just removed the MMM-PIR-Sensor directory, cloned it again from GitHub and made a fresh installation worked. Seems like I messed up the node_modules folder.

      posted in Troubleshooting
      C
      ChrizZz
    • RE: MagicMirror² v2.15.0 is available don't work.

      @chrizzz said in MagicMirror² v2.15.0 is available don't work.:

      I do have some strange things after the update.

      At first, the new weather module is just “loading” without displaying content. Even after 30+ minutes. Is there something wrong with the config? I saw that there is a minor issue with the data request which will cause it to load for ~10min (or to reduce the update interval).

      {
      			module: "weather",
      			position: "top_right",
      			classes: "always",
      			config: {
      				// See 'Configuration options' for more information.
      				type: "current",
      				locationID: "YYY",
      				appid: "XXX"
      			}
      		},
      

      I checked this again with switching back to the old module and the old module works. The forcasting takes 10min (as expected) but the module itself works. I thought this might be something with the connection to the API. Any ideas?

      posted in Troubleshooting
      C
      ChrizZz
    • RE: MagicMirror² v2.15.0 is available don't work.

      @sdetweil yes I did and both worked.

      I did npm install in all module folders too and did the npm install of MM multiple times just to check if something is wrong

      posted in Troubleshooting
      C
      ChrizZz
    • RE: MagicMirror² v2.15.0 is available don't work.

      I do have some strange things after the update.

      At first, the new weather module is just “loading” without displaying content. Even after 30+ minutes. Is there something wrong with the config? I saw that there is a minor issue with the data request which will cause it to load for ~10min (or to reduce the update interval).

      {
      			module: "weather",
      			position: "top_right",
      			classes: "always",
      			config: {
      				// See 'Configuration options' for more information.
      				type: "current",
      				locationID: "YYY",
      				appid: "XXX"
      			}
      		},
      

      And I have new lines of errors in the log, I don’t understand why these syntax errors appear. I checked my config file and everything looks fine. Regarding git, does this mean it couldn’t connect to github?

      [03.04.2021 23:22.22.900] [ERROR] Failed to parse data , error SyntaxError: Unexpected end of JSON input
      [03.04.2021 23:22.24.037] [ERROR] Failed to parse data , error SyntaxError: Unexpected end of JSON input
      [03.04.2021 23:22.25.987] [ERROR] Failed to fetch git data for MMM-CountEvents: Error: block timeout reached
      [03.04.2021 23:22.27.080] [ERROR] Failed to fetch git data for MMM-Parcel: Error: block timeout reached
      [03.04.2021 23:22.35.518] [ERROR] Failed to fetch git data for MMM-Face-Reco-DNN: Error: block timeout reached
      [03.04.2021 23:22.39.290] [ERROR] Failed to fetch git data for MMM-PIR-Sensor: Error: block timeout reached
      [03.04.2021 23:32.42.638] [ERROR] Failed to fetch git data for MMM-CountEvents: Error: block timeout reached
      [03.04.2021 23:37.14.466] [ERROR] Failed to parse data , error SyntaxError: Unexpected end of JSON input
      [03.04.2021 23:37.14.577] [ERROR] Failed to parse data , error SyntaxError: Unexpected end of JSON input
      [03.04.2021 23:52.14.126] [ERROR] Failed to parse data , error SyntaxError: Unexpected end of JSON input
      [03.04.2021 23:52.14.377] [ERROR] Failed to parse data , error SyntaxError: Unexpected end of JSON input
      
      posted in Troubleshooting
      C
      ChrizZz
    • RE: Updatenotification bar doesn't show up

      It works again. I think it was my mistake in the config based on the classes setting or compared with the carousel module.

      posted in Troubleshooting
      C
      ChrizZz
    • RE: Updatenotification bar doesn't show up

      @sdetweil

      git version 2.20.1
      
      posted in Troubleshooting
      C
      ChrizZz
    • RE: Updatenotification bar doesn't show up

      @sdetweil but I have modules with available updates and the update notification module doesn’t work for a few months. I did my last MM update without been notified. I did it just because it was weird to have such a long time without the update notification

      posted in Troubleshooting
      C
      ChrizZz
    • RE: Updatenotification bar doesn't show up

      @sdetweil sorry Sam, I think I don’t get your answer.

      posted in Troubleshooting
      C
      ChrizZz
    • Updatenotification bar doesn't show up

      Hey guys,

      I am struggling with the default module “updatenotification”. It doesn’t show the notification bar if there is an update for MM or one of the modules.

      The mm-out.log shows:

      [08.02.2021 18:55.19.771] [LOG]   Initializing new module helper ...
      [08.02.2021 18:55.19.773] [LOG]   Module helper loaded: updatenotification
      [08.02.2021 18:55.24.000] [LOG]   Connecting socket for: updatenotification
      

      There aren’t any log entries in mm-error.log

      My config has these lines for the module:

      {
      			module: "updatenotification",
      			position: "top_bar",
      			classes: "always"
      },
      

      I tried it without the classes line too.

      My MM version is 2.14.0

      //e: I used the “Troubleshooting” space and not the one in modules because I thought default modules would fit to this space better.

      posted in Troubleshooting
      C
      ChrizZz
    • RE: new update/upgrade script, ready for testing

      @evroom said in new update/upgrade script, ready for testing:

      @ChrizZz said in new update/upgrade script, ready for testing:

      Now my Pi is downloading the electron v3.1.13 version with 3.01 kB/s.

      It looks like github has problems. I also cannot download other stuff from it with proper speed or without running into a timeout. Perhaps local or depends on your ISP region.

      I started installing electron in a new terminal session and it is downloading now with 16 kB/s. Maybe a stupid decission, maybe not.

      Current status: 45% downloaded in the new terminal session, 18.5% downloaded as part of the MM update.

      //edit: I stopped the inital installation, downloaded the right electron file from a mirror and placed the zip file in the /home/pi/.cache/electron folder. After that I updated electron manually. It worked well and after that I started npm install of the new MM version again. Now everything is updated without waiting years to download the zip from Github.

      posted in General Discussion
      C
      ChrizZz
    • RE: new update/upgrade script, ready for testing

      @sdetweil said in new update/upgrade script, ready for testing:

      @surger13 ok, looks like we have to fight the manual way

      do

      cd ~/MagicMirror
      git stash
      git merge
      npm install
      

      took the manual way too because of the same probs. Now my Pi is downloading the electron v3.1.13 version with 3.01 kB/s. can I stop the installation process to update electron manually?

      posted in General Discussion
      C
      ChrizZz
    • RE: Problem with updating to 2.10.0 from 2.9.0 using update script

      sorry to use the same topic. I have also trouble with the update to 2.10.0. The update script works, but I still have the notification that there is an update for MM. But the update log ends with “Upgrade ended - Do Jan 2 20:24:45 CET 2020”.

      posted in Troubleshooting
      C
      ChrizZz
    • RE: MMM-Face-Reco-DNN - All new Face Recognition

      I have a new strange error and I think it’s just if I restart mm with “pm2 restart mm”. If I reboot my pi, everything is fine.

      SyntaxError: Unexpected token m in JSON at position 0
          at JSON.parse (<anonymous>:null:null)
          at PythonShell.asJson (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:375:21)
          at /home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:326:42
          at Array.forEach (<anonymous>:null:null)
          at PythonShell.receiveInternal (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:322:15)
          at PythonShell.receiveStderr (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:306:21)
          at Socket.<anonymous> (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:109:22)
          at Socket.emit (events.js:182:13)
          at addChunk (_stream_readable.js:279:12)
          at readableAddChunk (_stream_readable.js:260:13)
          at Socket.Readable.push (_stream_readable.js:219:10)
          at Pipe.onread (net.js:636:20)
      
      SyntaxError: Unexpected token T in JSON at position 0
          at JSON.parse (<anonymous>:null:null)
          at PythonShell.asJson (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:375:21)
          at /home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:326:42
          at Array.forEach (<anonymous>:null:null)
          at PythonShell.receiveInternal (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:322:15)
          at PythonShell.receiveStderr (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:306:21)
          at Socket.<anonymous> (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:109:22)
          at Socket.emit (events.js:182:13)
          at addChunk (_stream_readable.js:279:12)
          at readableAddChunk (_stream_readable.js:260:13)
          at Socket.Readable.push (_stream_readable.js:219:10)
          at Pipe.onread (net.js:636:20)
      
      { Error: mmal: mmal_vc_port_enable: failed to enable port vc.null_sink:in:0(OPQV): ENOSPC
      mmal: mmal_port_enable: failed to enable connected port (vc.null_sink:in:0(OPQV))0x631b2f0 (ENOSPC)
      mmal: mmal_connection_enable: output port couldn't be enabled
      Traceback (most recent call last):
        File "modules/MMM-Face-Reco-DNN/tools/facerecognition.py", line 56, in <module>
          vs = VideoStream(usePiCamera=True).start()
        File "/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/tools/stream.py", line 18, in __init__
          framerate=framerate)
        File "/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/tools/picam.py", line 10, in __init__
          self.camera = PiCamera()
        File "/usr/lib/python3/dist-packages/picamera/camera.py", line 433, in __init__
          self._init_preview()
        File "/usr/lib/python3/dist-packages/picamera/camera.py", line 513, in _init_preview
          self, self._camera.outputs[self.CAMERA_PREVIEW_PORT])
        File "/usr/lib/python3/dist-packages/picamera/renderers.py", line 558, in __init__
          self.renderer.inputs[0].connect(source).enable()
        File "/usr/lib/python3/dist-packages/picamera/mmalobj.py", line 2212, in enable
          prefix="Failed to enable connection")
        File "/usr/lib/python3/dist-packages/picamera/exc.py", line 184, in mmal_check
          raise PiCameraMMALError(status, prefix)
      picamera.exc.PiCameraMMALError: Failed to enable connection: Out of resources
      
          at PythonShell.parseError (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:268:21)
          at terminateIfNeeded (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:139:32)
          at ChildProcess.<anonymous> (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:131:13)
          at ChildProcess.emit (events.js:182:13)
          at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12)
      
        executable: 'python3',
        options: null,
        script: 'modules/MMM-Face-Reco-DNN/tools/facerecognition.py',
        args:
         [ '--cascade=modules/MMM-Face-Reco-DNN/tools/haarcascade_frontalface_default.xml',
           '--encodings=modules/MMM-Face-Reco-DNN/tools/encodings.pickle',
           '--usePiCamera=1',
           '--method=dnn',
           '--detectionMethod=hog',
           '--interval=2000',
           '--output=0' ],
        exitCode: 1 }
      
      posted in Utilities
      C
      ChrizZz
    • RE: MMM-doomsDay - The countdown module,

      Is it possible to add more than 1 event and the module switches between the events with fade in and fade out?

      posted in Utilities
      C
      ChrizZz
    • RE: MMM-Face-Reco-DNN - All new Face Recognition

      @dragontattoo said in MMM-Face-Reco-DNN - All new Face Recognition:

      Is it working fine??

      Depends on how you define working fine…The face recognition is working quite good, setting it up is easy with the advice you get in this thread. For me it’s just the “slow” reaction to activate the display which is an issue. But I’m optimistic that there is a way to solve it and I have a special environment with a display which hasn’t CEC control.

      posted in Utilities
      C
      ChrizZz
    • RE: MMM-Face-Reco-DNN - All new Face Recognition

      @nischi said in MMM-Face-Reco-DNN - All new Face Recognition:

      @ChrizZz
      Sound a little bit long to me, for me it works faster. But it took a while until they are startet. Do you use default settings?

      My logs file is also a bit weird:

      [MMM-Face-Reco-DNN] Users ChrizZz logged in.
      CECControl received (current, new): off on
      CECControl received (current, new): on off
      CECControl received (current, new): off on
      CECControl received (current, new): on off
      CECControl received (current, new): off on
      CECControl received (current, new): on off
      [MMM-Face-Reco-DNN] Users ChrizZz logged out.
      CECControl received (current, new): off on
      CECControl received (current, new): on off
      CECControl received (current, new): off on
      CECControl received (current, new): on off
      [MMM-Face-Reco-DNN] Users ChrizZz logged in.
      CECControl received (current, new): off on
      CECControl received (current, new): on off
      [MMM-Face-Reco-DNN] Users ChrizZz logged out.
      [MMM-Face-Reco-DNN] Users ChrizZz logged in.
      CECControl received (current, new): off on
      CECControl received (current, new): on off
      CECControl received (current, new): off on
      CECControl received (current, new): on off
      [MMM-Face-Reco-DNN] Users ChrizZz logged out.
      CECControl received (current, new): off on
      CECControl received (current, new): on off
      CECControl received (current, new): off on
      CECControl received (current, new): on off
      
      

      This is a 3min part of the logs and the 1st time I was in front of the mirror and recognized by the module this evening.

      My settings are:

      		{
      			module: 'MMM-CECControl',
          				config: {
            					  // Comport of your Raspberry Pi
            					  comport: 'RPI',
            					  // Turn the TV off if the Mirror start
             					 offOnStartup: true
          					}
      		},
      		{
          			module: 'MMM-MotionControl',
         				 config: {
           					   // Delay to turn the TV off
             						 delay: 60000,
             					 // Interval to check modules
       					       interval: 5000,
       				       // Use the module MMM-Facial-Recognition-OCV3
        				      useFacialRecognitionOCV3: false,
         				     // Use the module MMM-Face-Reco-DNN
         				     useMMMFaceRecoDNN: true,
         				     // Array where tv should be on
      				        ontime: []
      					    }
      		},
      		{
      			module: 'MMM-Face-Reco-DNN',
          				config: {
            					// Logout 15 seconds after user was not detecte anymore, if they will be detected between this 15 Seconds, they delay will start again
            					logoutDelay: 30000,
            					// How many time the recognition starts, with a RasPi 3+ it would be good every 2 seconds
            					checkInterval: 2000,
            					// Module set used for strangers and if no user is detected
            					defaultClass: 'default',
            					// Set of modules which should be shown for every user
            					everyoneClass: 'everyone',
            					// XML to recognize with haarcascae
            					cascade: 'modules/MMM-Face-Reco-DNN/tools/haarcascade_frontalface_default.xml',
            					// Pre encoded pickle with the faces
            					encodings: 'modules/MMM-Face-Reco-DNN/tools/encodings.pickle',
            					// You wanna use pi camera or usb / builtin (1 = raspi camera, 0 = other camera)
            					usePiCamera: 1,
            					// Method of face detection (dnn = deep neural network, haar = haarcascade)
            					method: 'dnn',
            					// Which face detection model to use. "hog" is less accurate but faster on CPUs. "cnn" is a more accurate deep-learning model which is GPU/CUDA accelerated (if available).
            					detectionMethod: 'hog',
            					// How fast in ms should the modules hide and show (face effect)
            					animationSpeed: 0,
            					// Path to Python to run the face recognition (null / '' means default path)
            					pythonPath: null,
            					// Should shown welcome message over alert module from MagicMirror
            					welcomeMessage: true
          					}
      		},
      
      posted in Utilities
      C
      ChrizZz
    • RE: MMM-Face-Reco-DNN - All new Face Recognition

      is it common that it takes 40sec between face recognition and turning the TV on?

      I see it happen after a freshly restarted pi, that it takes 40/45sec. The scenario is that I restart my pi, mm is autostarting and the TV is turned off by the module. Between the restart and the 1st face recognition is ~3min time.

      posted in Utilities
      C
      ChrizZz
    • RE: MMM-Face-Reco-DNN - All new Face Recognition

      @nischi said in MMM-Face-Reco-DNN - All new Face Recognition:

      @ChrizZz
      Yes you need to use one of the Face Reco Module that this works. Better my new Module ;) it’s much more accurate.

      Thanks, I will use your new module.

      During the setup I have another issue. It’s when I want to start encoding I get this error message:

      Traceback (most recent call last):
        File "encode.py", line 5, in <module>
          from imutils import paths
        File "/usr/local/lib/python3.7/dist-packages/imutils/__init__.py", line 8, in <module>
          from .convenience import translate
        File "/usr/local/lib/python3.7/dist-packages/imutils/convenience.py", line 6, in <module>
          import cv2
      ModuleNotFoundError: No module named 'cv2'
      

      I think it’s a problem of my OpenCV installation where I skipped the virtualenvs. In step 6 of the tutorial I should do this:

      $ cd ~/.virtualenvs/cv/lib/python3.5/site-packages/
      $ ln -s /usr/local/python/cv2/python-3.5/cv2.cpython-35m-arm-linux-gnueabihf.so cv2.so
      $ cd ~
      

      I skipped that because I have no idea where I have to create the link when I install this without virtualenvs. But it seems that I have to link it…

      //edit: Key to success:

      cd ~/opencv-4.0.0/build/lib/python3
      sudo cp cv2.cpython-35m-arm-linux-gnueabihf.so /usr/local/lib/python3.5/dist-packages/cv2.so
      
      posted in Utilities
      C
      ChrizZz
    • RE: MMM-Face-Reco-DNN - All new Face Recognition

      oh, I didn’t know that you have a modul for it. But unfortunately it isn’t working on my Pi. Your modul doesn’t recognize a motion.

      Do I have to uninstall the MMM-MotionDetector first?
      Or do I need to run Face-Reco-DNN or the OCV3 version?

      //edit: I think I know why it isn’t working. Maybe my display isn’t HDMI-CEC ready. I changed the command of your node_helper.js.
      Default:

      turnOn: function() {
      		var self = this;
      		exec('echo "on 0" | cec-client ' + this.config.comport + ' -s -d 1', function (error, stdout, stderr) {
      			self.status = 'on';
      

      My version:

      turnOn: function() {
      		var self = this;
      		exec('vcgencmd display_power 1', function (error, stdout, stderr) {
      			self.status = 'on';
      

      Instead of sending a note to my display for standby I switch off the display_power. But I can’t wake up the display again. I think I have to use Face-Reco-DNN or Facial-Recognition-OCV3. Currently I don’t use them because I have to do the setup for the DNN version.

      posted in Utilities
      C
      ChrizZz
    • RE: MMM-Face-Reco-DNN - All new Face Recognition

      damn - 2nd try without a virtual environment.

      @nischi: Is there a chance that you merge your module also with MMM-MotionDetector? Currently I use the camera to activate and deactive my screen and Google told me that it isn’t possible that 2 processes use the same camera. The suggested solution was to use a 2nd camera, merge both processes or stream the camera picture.

      posted in Utilities
      C
      ChrizZz
    • 1 / 1