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.

    Motion Detection with RaspiCam, Non-Module version

    Scheduled Pinned Locked Moved Tutorials
    47 Posts 13 Posters 46.8k Views 17 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.
    • bheplerB Offline
      bhepler Module Developer @AnduriI
      last edited by

      @AnduriI It should be. The motion system will operate independently of the mirror and only controls the signal running down the HDMI cable to the monitor. The Pi camera and the Magic Mirror process are still running.

      If you create a simple python script to control the pinouts on the Pi, you should be able to switch on some simple LED lights to illuminate the front of the mirror.

      1 Reply Last reply Reply Quote 0
      • D Offline
        dam4
        last edited by yawns

        @bhepler
        Hello, I am a true n00b and I am having issues with your process for getting the Pi camera to work. I copied and pasted your first line exactly and I get the following.

        pi@raspberrypi:~ $ sudo apt-get install -y libjpeg-dev libavformat56 libavformat-dev libavcodec56 libavcodec-dev libavutil54 libavutil-dev libc6-dev zlib1g-dev libmysqlclient18 libmysqlclient-dev libpq5 libpq-dev
        Reading package lists... Done
        Building dependency tree
        Reading state information... Done
        Package libmysqlclient-dev is not available, but is referred to by another package.
        This may mean that the package is missing, has been obsoleted, or
        is only available from another source
        
        Package libmysqlclient18 is not available, but is referred to by another package.
        This may mean that the package is missing, has been obsoleted, or
        is only available from another source
        
        E: Unable to locate package libavformat56
        E: Unable to locate package libavcodec56
        E: Unable to locate package libavutil54
        E: Package 'libmysqlclient18' has no installation candidate
        E: Package 'libmysqlclient-dev' has no installation candidate
        pi@raspberrypi:~ $
        

        What did I do wrong? Please help and thank you in advance.

        yawnsY 1 Reply Last reply Reply Quote 0
        • yawnsY Offline
          yawns Moderator @dam4
          last edited by

          @dam4
          Are you running raspbian Jessie or Stretch?

          Looks like the names where changed
          Jessie: https://packages.debian.org/jessie/libmysqlclient-dev
          Stretch: https://packages.debian.org/stretch/default-libmysqlclient-dev

          D 1 Reply Last reply Reply Quote 1
          • D Offline
            dam4 @yawns
            last edited by

            @yawns I am pretty sure I am running Jessie. How do I know for sure?

            yawnsY 1 Reply Last reply Reply Quote 0
            • yawnsY Offline
              yawns Moderator @dam4
              last edited by

              @dam4
              In the terminal run cat /etc/os-release

              Maybe you need to run sudo cat /etc/os-release

              D 1 Reply Last reply Reply Quote 0
              • D Offline
                dam4 @yawns
                last edited by yawns

                @yawns
                It looks like I am running stretch. This is what I get;

                pi@raspberrypi:~ $ cat /etc/os-release
                PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"
                NAME="Raspbian GNU/Linux"
                VERSION_ID="9"
                VERSION="9 (stretch)"
                ID=raspbian
                ID_LIKE=debian
                HOME_URL="http://www.raspbian.org/"
                SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
                BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
                pi@raspberrypi:~ $
                
                J 1 Reply Last reply Reply Quote 0
                • J Offline
                  jasonarends @dam4
                  last edited by jasonarends

                  @dam4 I had the same problem and couldn’t get the correct dependencies resolved, but I just got it to work on stretch by following the Abbreviated Building Guide instructions here: http://htmlpreview.github.io/?https://github.com/Motion-Project/motion/blob/master/motion_guide.html

                  I had already tried the way you did so I had the motion.conf from the other build which I had modified, and it worked with that version.

                  edit:

                  sudo apt-get install autoconf automake build-essential pkgconf libtool libzip-dev libjpeg-dev git libavformat-dev libavcodec-dev libavutil-dev libswscale-dev libavdevice-dev
                  cd ~ 
                  git clone https://github.com/Motion-Project/motion.git 
                  cd motion 
                  autoreconf -fiv 
                  ./configure 
                  make 
                  make install
                  
                  D 1 Reply Last reply Reply Quote 0
                  • D Offline
                    dam4 @jasonarends
                    last edited by dam4

                    @jasonarends
                    I just tried git clone https://github.com/Motion-Project/motion.git and it tells me this;

                    fatal: destination path ‘motion’ already exists and is not an empty directory.

                    I did a ls -al and it doesn’t show up as a directory. Should I remove the ‘motion’ that is in green from the home directory and try again?

                    I have to go to work so I will have to work on this tomorrow. Thank you for your help.

                    J 1 Reply Last reply Reply Quote 0
                    • J Offline
                      jasonarends @dam4
                      last edited by

                      @dam4

                      yep, you have the original motion binary in your home directory still, you can just remove that.

                      D 2 Replies Last reply Reply Quote 0
                      • D Offline
                        dam4 @jasonarends
                        last edited by

                        @jasonarends
                        Thank you for your help. I have tried this and it seemed to install. The only thing I had an issue with was when I entered make install it would not create a directory and it failed. I then ran it as sudo make install and it seemed to install. I am running my MagicMirror now to see if it works. How long does it take to turn the monitor off? Again thank you for your help.

                        1 Reply Last reply Reply Quote 0
                        • 1
                        • 2
                        • 3
                        • 4
                        • 5
                        • 3 / 5
                        • 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