Required packages:
sudo apt-get install motion python-alsaaudio socat
# flask in python3, should port the other scripts to python3 as well
sudo pip3 install flask flask-sqlalchemy flask-wtf sqlalchemy-migrate
# for debugging
sudo pip install ipython
# hardlink the motion.conf
ln /etc/motion/motion.conf conf/