THIS GUIDE IS NOT YET FULLY TESTED
First of all, this implementation uses the Motion software. Not any version but a specially tweaked one that supports the PiCamera module for image taking. Probably we will see PiCamera support also on the standard version of Motion in the future, but for now let's use this how-to. And again this is not my invention or anything, I only adjusted the one or other thing to fit my purpose. For my setup, you simply need a “naked” Raspbian. The software will be running under user pi.
Befor you even start, make sure your Raspberry Pi is configured for and working with the PiCamera module.
sudo apt-get update sudo apt-get install libjpeg62 libjpeg62-dev libavformat53 libavformat-dev libavcodec53 libavcodec-dev libavutil51 libavutil-dev libc6-dev zlib1g-dev libmysqlclient18 libmysqlclient-dev libpq5 libpq-dev
mkdir /tmp/motionsetup cd /tmp/motionsetup
wget https://www.dropbox.com/s/xdfcxm5hu71s97d/motion-mmal.tar.gz tar xvfz motion-mmal.tar.gz
This will extract into the binary
motion and a sample configuration
motionbinary now to
sudo mv motion /usr/bin/motion
and we can clean up the other two files which we do not need any more (of course you can keep them if you like to)
motion. If you did not copy the
/usr/bin/before, you might overwrite it with the init.d-script.
pibecause I didn't have the official motion package installed before and didn't want to create an extra user.
motion.defaultand add the following lines
# set 'yes' to enable the motion daemon start_motion_daemon=yes
sudo mv motion.conf /etc/motion.conf sudo mv motion.default /etc/default/motion sudo mv motion.service /etc/init.d/motion sudo chmod 644 /etc/motion.conf sudo chmod 644 /etc/default/motion sudo chmod 755 /etc/init.d/motion sudo chown root.root /etc/motion.conf sudo chown root.root /etc/default/motion sudo chown root.root /etc/init.d/motion
sudo update-rc.d motion defaults
If you want to uninstall the service later, this can be done by
sudo update-rc.d -f motion remove
If you payed attention, you recognise that there is still the HTTP wrapper in our working directory. You could install a web server on your Pi, put the wrapper into its htdocs directory and add localhost:8090 as image source. Or you can put it on another web server and point it to your ParrotPi. Or just skip this if you are fine with the results so far.