TheAdrianProject / AdrianSmartAssistant

Introducing Adrian, your advanced open source Smart Home Assistant. Bringing simplicity to your home through voice automation. Get a morning news update, stream music, control your smart devices & ask just about anything. www.theadrianproject.com
Apache License 2.0
43 stars 23 forks source link

Installing Adrian on fresh Raspbian install #10

Closed bbbenji closed 6 years ago

bbbenji commented 7 years ago

The steps outlined in this issue are as far as I have gotten Adrian running on a fresh install of Raspbian. I will be updating this issue as I make progress.

So far this documentation is incomplete and ends by throwing out the following error:

[------------------------------------ START SNOWBOY - CUSTOM -----------------------------------]
events.js:160
      throw er; // Unhandled 'error' event
      ^

Error: connect ECONNREFUSED 127.0.0.1:9150
    at Object.exports._errnoException (util.js:1022:11)
    at exports._exceptionWithHostPort (util.js:1045:20)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1090:14)
GOOGLE SPEACH DEAMON : Port listening on : http://localhost: 9950
# Install Mopidy
wget -q -O - https://apt.mopidy.com/mopidy.gpg | sudo apt-key add -
sudo wget -q -O /etc/apt/sources.list.d/mopidy.list https://apt.mopidy.com/jessie.list
sudo apt-get update
sudo apt-get install mopidy

# Configure Mopidy: https://docs.mopidy.com/en/latest/config/
mkdir ~/.config/mopidy
nano ~/.config/mopidy/mopidy.conf

# Get and configure Adrian
git clone https://github.com/TheAdrianProject/AdrianSmartAssistant.git
cd AdrianSmartAssistant
cp constants_defaults.js constants.js
nano constants.js

# Install/configure MySQL
sudo apt-get install mysql-server --fix-missing
mysql -u root -p
CREATE DATABASE adrian_new;
QUIT;
mysql -u root -p adrian_new < adrian_new.sql

# Install Node.js
curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -
sudo apt install nodejs

# Downgrade NodeJS and update modules
sudo npm cache clean -f
sudo npm install -g n
sudo n 7.4
sudo ln -sf /usr/local/n/versions/node/7.4.0/bin/node /usr/bin/node
sudo apt-get remove nodejs
npm install node-pre-gyp
npm install grpc
npm rebuild

# Configure Snowboy: http://docs.kitt.ai/snowboy/#running-on-pi

# Configure ALSA
sudo nano /usr/share/alsa/alsa.conf
# Apply the following changes
  defaults.ctl.card 1
  defaults.pcm.card 1
  #pcm.rear cards.pcm.rear
  #pcm.center_lfe cards.pcm.center_lfe
  #pcm.side cards.pcm.side
  #pcm.hdmi cards.pcm.hdmi
  #pcm.modem cards.pcm.modem
  #pcm.phoneline cards.pcm.phoneline

# Just in case
sudo reboot

# Run
./adrian

adrian_new.zip (Source: https://github.com/TheAdrianProject/AdrianSmartAssistant/issues/1)