-
Notifications
You must be signed in to change notification settings - Fork 3
Home
The idea is to use a raspberry pi as a gateway for a rf24 arduino network that automate and monitor my house. I use code form http://code.mios.com/trac/mios_arduino-sensor for the ardunio network. This repository contains the code needed to collect, store, view and mange the ardunio network. Installation This can be done much smolder but that’s for the futher.
On the raspberry pi install the standard Raspbain – wheezy release
Install the python tornado and serial packages. sudo apt-get install python-tornado python-serial php5-common php5-cli php5-fpm php-pear php5-dev nginx
Since there isn’t a prepared package for mongodb to raspberry use the following instruction to install the files needed. You can compile it from the source code but according to varius blogs it will take you 4+ hours do it.
git clone https://github.com/brice-morin/ArduPi.git cd ArduPi/mongodb-rpi/ sudo cp -r mongo/ /opt/ sudo mv /opt/mongo/ /opt/mongodb/
PATH=$PATH:/opt/mongo/bin/ export PATH
cd /etc/init.d/ sudo wget https://raw.github.com/brnt/mongo-pi/master/init.d/mongodb
DAEMON=/opt/mongo/bin/mongod DATA=/var/lib/mongodb
\#\# BEGIN INIT INFO \# Provides: mongod \# Required-Start: $remote_fs $syslog \# Required-Stop: $remote_fs $syslog \# Default-Start: 2 3 4 5 \# Default-Stop: 0 1 6 \# Short-Description: Start mongod at boot time \# Description: Enable service provided by daemon. \### END INIT INFO
sudo chmod +x mongodb && sudo update-rc.d mongodb defaults
cd /etc sudo wget https://raw.github.com/RickP/mongopi/master/debian/mongodb.conf
sudo mkdir /var/lib/mongodb && sudo mkdir /var/log/mongodb/ sudo chown -R pi:pi /var/lib/mongodb /var/log/mongodb/ /opt/mongodb/ sudo chmod u+x,g+x /opt/mongo/bin/*
sudo pecl install mongo
add "extension=mongo.so" to
sudo vi /etc/php5/cli/php.ini sudo vi /etc/php5/fpm/php.ini sudo service php5-fpm restart