• 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-SleepWake turn off but not turn on

Scheduled Pinned Locked Moved Troubleshooting
mmm-sleepwakemagic mirrorturn onturn off
23 Posts 3 Posters 4.3k Views 3 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.
  • S Away
    sdetweil @krosamont
    last edited by sdetweil Jan 18, 2021, 4:28 PM Jan 18, 2021, 4:28 PM

    @krosamont turn off the motion web servers that post video

    i think there are 4 8080-8083
    search the conf file

    Sam

    How to add modules

    learning how to use browser developers window for css changes

    K 1 Reply Last reply Jan 18, 2021, 4:50 PM Reply Quote 0
    • K Offline
      krosamont @sdetweil
      last edited by Jan 18, 2021, 4:50 PM

      @sdetweil

      I have just found 8080 and 8081…there is no 8083.
      I have changed them to 0:

      # TCP/IP port for the http server to listen on (default: 0 = disabled)
      #webcontrol_port 8080
      webcontrol_port 0
      
      # The mini-http server listens to this port for requests (default: 0 = disabled)
      # stream_port  8081
      stream_port 0
      

      I have an error when I run:

      pi@raspberrypi:~/MagicMirror $ sudo motion &
      pi@raspberrypi:~/MagicMirror $ npm start
      

      error:

      [18.01.2021 17:45.26.632] [ERROR] Whoops! There was an uncaught exception...
      [18.01.2021 17:45.26.640] [ERROR] PythonShellError: 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))0x5b77ac0 (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 80, in <module>
          vs = VideoStream(usePiCamera=True, rotation=args["rotateCamera"]).start()
        File "/home/pi/.virtualenvs/cv/lib/python3.7/site-packages/imutils/video/videostream.py", line 18, in __init__
          framerate=framerate, **kwargs)
        File "/home/pi/.virtualenvs/cv/lib/python3.7/site-packages/imutils/video/pivideostream.py", line 10, in __init__
          self.camera = PiCamera()
        File "/home/pi/.virtualenvs/cv/lib/python3.7/site-packages/picamera/camera.py", line 433, in __init__
          self._init_preview()
        File "/home/pi/.virtualenvs/cv/lib/python3.7/site-packages/picamera/camera.py", line 513, in _init_preview
          self, self._camera.outputs[self.CAMERA_PREVIEW_PORT])
        File "/home/pi/.virtualenvs/cv/lib/python3.7/site-packages/picamera/renderers.py", line 558, in __init__
          self.renderer.inputs[0].connect(source).enable()
        File "/home/pi/.virtualenvs/cv/lib/python3.7/site-packages/picamera/mmalobj.py", line 2212, in enable
          prefix="Failed to enable connection")
        File "/home/pi/.virtualenvs/cv/lib/python3.7/site-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:254:21)
          at terminateIfNeeded (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:129:32)
          at ChildProcess.<anonymous> (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:121:13)
          at ChildProcess.emit (events.js:210:5)
          at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12) {
        executable: '/home/pi/.virtualenvs/cv/bin/python3.7',
        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',
          '--source=0',
          '--rotateCamera=0',
          '--method=dnn',
          '--detectionMethod=hog',
          '--interval=4000',
          '--output=0',
          '--extendDataset=False',
          '--dataset=modules/MMM-Face-Reco-DNN/dataset/',
          '--tolerance=0.6'
        ],
        exitCode: 1
      }
      [18.01.2021 17:45.26.642] [ERROR] MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
      [18.01.2021 17:45.26.643] [ERROR] If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
      [18.01.2021 17:45.49.329] [LOG]   sleep-wake helper in socket notification=start_sleep
      

      weird…

      S 1 Reply Last reply Jan 18, 2021, 4:57 PM Reply Quote 0
      • S Away
        sdetweil @krosamont
        last edited by Jan 18, 2021, 4:57 PM

        @krosamont u have to turn off the servers not set the ports to zero

        i think the settings are false. on my phone from hospital cant help more. motion doc is pretty good

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        K 1 Reply Last reply Jan 19, 2021, 1:23 PM Reply Quote 0
        • K Offline
          krosamont @sdetweil
          last edited by Jan 19, 2021, 1:23 PM

          @sdetweil I am sorry to hear that. I hope you will have a fast recovery!
          I don’t understand which parameters I am suppose to change inside motion.conf

          I have also checked the documentation but sorry…I don’t get your point.
          Here is the list of all the parameters linked to the HTTP based control :

          ############################################################
          # HTTP Based Control
          ############################################################
          
          # TCP/IP port for the http server to listen on (default: 0 = disabled)
          webcontrol_port 8080
          #webcontrol_port 0
          
          # Restrict control connections to localhost only (default: on)
          webcontrol_localhost on
          #webcontrol_localhost off
          
          # Output for http server, select off to choose raw text plain (default: on)
          webcontrol_html_output on
          #webcontrol_html_output off
          
          # Authentication for the http based control. Syntax username:password
          # Default: not defined (Disabled)
          ; webcontrol_authentication username:password
          
          # Parameters to include on webcontrol.  0=none, 1=limited, 2=advanced, 3=restricted
          # Default: 0 (none)
          webcontrol_parms 0
          
          S 1 Reply Last reply Jan 19, 2021, 3:27 PM Reply Quote 0
          • S Away
            sdetweil @krosamont
            last edited by Jan 19, 2021, 3:27 PM

            @krosamont change the magicmirror port to like 8090

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            1 Reply Last reply Reply Quote 0
            • C Offline
              chanster @krosamont
              last edited by chanster Jan 21, 2021, 12:14 AM Jan 21, 2021, 12:13 AM

              @krosamont said in MMM-SleepWake turn off but not turn on:

              Hello @chanster,
              How do you run your magic mirror project please?

              I have a script that starts Motion whenever my Rpi restarts :

              #!/bin/bash
              cd /home/pi/.motion/
              sudo motion &
              

              You need to make sure that you are running Motion in the directory where it installed ie “.motion”. If you start motion outside of this directory, it’ll use a generic motion config not your config in the “.motion” directory.

              If Motion is detecting motion properly, you see lines like these in your motion log :

              motion_detected: Motion detected - starting event 1
              mlp_actions: End of event 1
              event_newfile: File of type 8 saved to: /home/pi/Pictures/motion/02-20210109005258.mkv
              

              The directory where these files are being saved to is what you define in your motion config. Look in that folder to make sure you have files showing up there. If you don’t see any files being saved in that directory, it means Motion is not using your motion config but the generic motion config. Refer to my bolded comments above.

              Hopefully this helps.

              S K 2 Replies Last reply Jan 21, 2021, 12:19 AM Reply Quote 0
              • S Away
                sdetweil @chanster
                last edited by Jan 21, 2021, 12:19 AM

                @chanster pm2 could start motion on boot too

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                1 Reply Last reply Reply Quote 0
                • K Offline
                  krosamont @chanster
                  last edited by Jan 24, 2021, 1:02 PM

                  @chanster @sdetweil Thanks for your help guys.
                  I understood my problem. I was trying to use facial recognition and motion detection at the same time with 2 different services. I can’t work with MMM-SleepWake and MMM-Face-Reco-DNN at the same time.

                  S 1 Reply Last reply Jan 24, 2021, 1:29 PM Reply Quote 0
                  • S Away
                    sdetweil @krosamont
                    last edited by Jan 24, 2021, 1:29 PM

                    @krosamont i wanted to try that, never got there

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    K 1 Reply Last reply Jan 24, 2021, 2:15 PM Reply Quote 0
                    • K Offline
                      krosamont @sdetweil
                      last edited by Jan 24, 2021, 2:15 PM

                      @sdetweil Thanks sincerely for your time and your willingness. I would like to start to fork and try implement modification on some modules but I am not confident enough in Javascript. Do you have any suggestion for me. Where to start? Should I go with nodeJS basic tutorials?

                      S 1 Reply Last reply Jan 24, 2021, 3:00 PM Reply Quote 0
                      • 1
                      • 2
                      • 3
                      • 2 / 3
                      2 / 3
                      • First post
                        16/23
                        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