Last active
April 19, 2018 02:28
-
-
Save fedden/ede6fff01e06f4dbedfcf79196c289eb to your computer and use it in GitHub Desktop.
Home Automation Pi Install
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Instructions: | |
# | |
# To install this script, run: | |
# wget <RAW_URL> -O - | bash | |
# | |
# Update the OS and packages. | |
sudo apt-get update -y | |
sudo apt-get dist-upgrade -y | |
sudo apt-get update -y | |
# Basic python/dev stuff. | |
cd ~ | |
sudo apt-get install build-essential tk-dev -y | |
sudo apt-get install portaudio19-dev python-all-dev python3-all-dev -y | |
sudo apt-get install python3-pip python3-pyaudio -y | |
sudo apt-get install git -y | |
# Speech recognition. | |
sudo apt-get install libatlas-base-dev -y | |
sudo pip3 install numpy -i https://www.piwheels.hostedpi.com/simple | |
sudo pip3 install apiai SpeechRecognition | |
# Smart light library. | |
cd ~ | |
git clone https://github.com/mclarkk/lifxlan.git | |
cd lifxlan | |
sudo python3 setup.py install | |
# Swig for SnowBoy compilation. | |
cd ~ | |
sudo apt-get install libpcre3-dev -y | |
wget https://sourceforge.net/projects/swig/files/swig/swig-3.0.12/swig-3.0.12.tar.gz/download?use_mirror=datapacket | |
mv download?use_mirror=datapacket s.tar.gz | |
tar xzvf s.tar.gz | |
rm s.tar.gz | |
cd swig-3.0.12 | |
./configure | |
make | |
sudo make install | |
# Albus's codebase. | |
cd ~ | |
git clone https://github.com/fedden/HomeAutomation.git | |
# SnowBoy. | |
cd ~ | |
git clone https://github.com/Kitt-AI/snowboy.git | |
cd snowboy/swig/Python3 | |
make | |
mv _snowboydetect.so ~/HomeAutomation | |
mv snowboydetect.py ~/HomeAutomation | |
sudo pip3 install netifaces | |
sudo pip3 install bitstring | |
# Some useful things for monitoring the raspberry pi. | |
cd ~ | |
sudo apt-get install vim screenfetch htop -y | |
# Install tinzonia dependancies and the app itself. | |
sudo apt-get install flac -y | |
sudo apt-get install libxml2-dev libxslt1-dev -y | |
sudo pip install lxml | |
curl -kL https://goo.gl/Vu8qGR | bash | |
# Sort out audio configuration so that tinzonia works. | |
sed -i -e 's/audio_renderer.pulseaudio/audio_renderer.alsa/g' ~/.config/tizonia/tizonia.conf | |
sudo sed -i -e 's/defaults.ctl.card 0/defaults.ctl.card 1/g' /usr/share/alsa/alsa.conf | |
sudo sed -i -e 's/defaults.pcm.card 0/defaults.pcm.card 1/g' /usr/share/alsa/alsa.conf | |
sudo echo "" >> /boot/config.txt | |
sudo echo "# Setting GPU memory for tizonia." >> /boot/config.txt | |
sudo echo "gpu_mem=192" >> /boot/config.txt | |
# Networking | |
sudo apt install libdnet -y | |
sudo pip3 install mesh-networking |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment