You can use any (or all) of the five demo shields . For the most simplistic setup, we will use the switch shield, which contains an LED that can be switched on and off through the web interface or a button on the shield.
The following picture shows a setup with four Arduinos and a Raspberry Pi 2 running the Caretaker server:
I start with a fresh installation of Raspbian. I assume that the Raspberry is connected to your local network and has the IP address raspberry_ip.
First we need to install some general network and development tools.
sudo apt-get update sudo apt-get upgrade sudo apt-get install -y git curl zlib1g-dev subversion openssl libreadline6-dev git-core zlib1g libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf automake libtool bison
In order to build the web client code of the Caretaker server, we need node.js and npm.
sudo wget http://nodejs.org/dist/v0.12.3/node-v0.12.3.tar.gz tar -xzf node-v0.12.3.tar.gz cd node-v0.12.3 ./configure make sudo make install
Since the Caretaker server is written in Ruby, we need to install the Ruby SDK.
# You may need to import a GPG key. Check the output # of the following command: curl -L get.rvm.io | bash -s stable # Re-login to your Raspberry to load the RVM shell script rvm install ruby-2.3.0
Now we can install and start the Caretaker server:
git clone https://github.com/grappendorf/caretaker-server cd caretaker-server gem install bundler bundle install --without=development test RACK_ENV=production rake db:demo export SECRET_KEY=...enter lots (e.g. 128) of random characters... export PUBLIC_IP=raspberry_ip rackup -E production -p 3000 -o 0.0.0.0 &
Next we install the Caretaker web app, build the web client files and start the web server:
git clone https://github.com/grappendorf/caretaker-webapp cd caretaker-webapp npm install ./bin/bower install ./bin/grunt &
Point your Chrome web browser to http://raspberry_ip:8000 and login with user: email@example.com password: admin.