For those interested in adapting the AquaPi to post its temp data to Xively, below are some notes from the documentation I started to produce. Donating is a little screwed as it is a cut and paste but can share out a link to the doc if required.
AquaPi
Table Of Contents
Hardware Build
Hardware Requirements
Software Build
Raspbian
Wifi Configuration
Raspbian Configuration
1-Wire Configuration
OWFS 1 Wire Filesystem
Hardware Build
Hardware Requirements
The AquaPi requires the following hardware to be purchased.
Raspberry Pi Style A or B (I used style B)
Software Build
Raspbian
The first thing you will need to start to build your AquaPi is an SD Card built with the Raspbian operating system. For those new to Raspberry Pi's, Raspbian is a Linux based operating system distribution which is used to start up your Raspberry Pi. To put it another way, the Raspberry Pi is the hardware, Raspbian is the base software to power the Raspberry Pi hardware and then applications are layered on top of the base operating system software to run the AquaPi.
This guide provides some basic information on building the SD Card but for further detail, please refer to the Raspberry Pi website.
References:
Raspberry Pi SD Card Setup
http://elinux.org/RPi_Easy_SD_Card_Setup
Raspbian Download
http://www.raspberrypi.org/downloads
Note: The following instructions have been written installing AquaPi from a Ubuntu Linux PC.
Install Raspbain by copying the Raspbian image to the SD Card:
sudo dd bs=4M if=image-name-you-downloaded of=/dev/device-name-mounted-by-linux
Note: Note that when specifying “of=/dev/device-name-mounted-by-linux” this is the device name not the partition name.
Wifi Configuration
If you wish your Raspberry Pi to connect to your home network router wirelessly, the Raspbian operating system must know the configuration of your home network. This information is stored in a file named interfaces and can be found in the directory /etc/network. Edit this file using your favorite Linux text editor and amend the file to the following configuration.
auto wlan0
iface wlan0 inet dhcp
wpa-ssid the-name-of-your-wireless-network
wpa-psk the-password-used-to-connect-to-your-wireless-password
wireless-power off
Although beyond the scope of this document, you may wish to configure your home wireless router to allocate the same IP address to your Raspberry Pi each time it is rebooted by assigning your chosen IP address to the MAC address from the Raspberry Pi wireless USB adapter. If you choose not to do this, your Raspberry Pi will be allocated a random IP address each time it is rebooted. However you wish to configure the IP address, make a note of the address as it will be needed in order to login to your Raspberry Pi.
Raspbian Configuration
Once you have powered on your Raspberry Pi, you should now be able to connect to it from another Linux computer using ssh. To do this run the command
ssh -l pi the-ip-address-of-your-Raspberry-Pi
Example: ssh -l pi 192.168.0.200
You will be prompted for a password which is
raspberry
Once logged in, you have the ability to configure the Raspbian operating system with some basic settings and to do this type
sudo rpi-update
UPDATE_SELF=0 rpi-update
sudo raspi-config
The basic configuration is to expand the Raspbian image which will ensure Raspbian uses all the space available on the SD Card. You can also change things such as the username and password which is used to log into the Raspberry Pi and setting the hostname of the Raspberry Pi.
After another reboot, it is time to ensure that Raspbian is updated with any patched software that have been released since the Raspbian image was created. This should be done on a regular basis to ensure your Raspberry Pi’s software is secure. To do this type the following commands and answer Yes to any prompts asking you to install software.
sudo apt-get update
sudo apt-get upgrade
Reboot your Raspberry Pi by entering the command
sudo reboot
Once rebooted, connect to your Raspberry Pi again
ssh -l pi the-ip-address-of-your-Raspberry-Pi
Example: ssh -l pi 192.168.0.200
Now run the following command to remove all the old Raspian packages
sudo apt-get autoclean
1-Wire Configuration
Raspian needs a number of configuration changes and additional software in order for it to communicate to the 1-wire Pi board. The first configuration change is to the raspi-blacklist.conf file. To edit this file enter:
sudo nano /etc/modprobe.d/raspi-blacklist.conf
Add # before the line “blacklist i2c-bcm2708” and then save this file.
Example: #blacklist i2c-bcm2708
Now we need to make a change to the modules file. To edit this file enter:
sudo nano /etc/modules
Add new line containing the following and then save the file.
i2c-dev
Now install some additional software but entering the command:
sudo apt-get install automake autoconf autotools-dev gcc-4.7 libtool libusb-dev libfuse-dev swig python2.6-dev tcl8.4-dev php5-dev i2c-tools
Once this software has been installed, reboot the Raspberry Pi using the command:
sudo reboot
After the Raspberry Pi has completed its reboot, connect to the Raspberry Pi and enter the command:
sudo i2cdetect -y 1
If everything is working correctly, the 1wire board should connect to the Raspberry Pi at I2C address 18 and successfully display:
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- 18 -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
OWFS 1 Wire Filesystem
Now the base Raspbian operating system is installed, configured and updated we are now ready to move onto the next step and layer the OWFS file system software onto Raspbian.
First, from your Linux computer, download the latest 1-wire filesystem from
http://owfs.org/index.php?page=download
You will then need to transfer this file to your Raspberry Pi by using the command
scp 1-wire-filename Raspberry-Pi-username@ the-ip-address-of-your-Raspberry-Pi:/usr/src
Example: scp owfs-2.9p1.tar.gz pi@192.168.0.200:~
The password you are prompted for is the password you set on your Raspberry Pi if you changed it. If not, the password will be raspberry.
The 1-wire filesystem you transferred to the Raspberry Pi will be compressed also known as tar. You will now need to uncompress, untar the file before you can begin setting up the 1-wire filesystem. To do this type the following on your Raspberry Pi:
cd /usr/src
tar xvzf 1-wire-filename
Example: tar xvzf owfs-2.9p1.tar.gz
Now type the following commands below to compile the 1-wire software:
cd 1-wire-filename
sudo ./configure
Note: This command will take approximately 3 minutes to complete.
sudo make
Note: This command will take approximately 30 minutes to complete.
sudo make install
Note: This command will take approximately 3 minutes to complete.
sudo mkdir /mnt/1wire
sudo nano /etc/fuse.conf
Update the line “#user_allow_other” and remove the # from the start, then save your changes.
END OF DOCUMENT
MORE TO FOLLOW SHORTLY
sudo /opt/owfs/bin/owfs --i2c=ALL:ALL --allow_other /mnt/1wire/
sudo /opt/owfs/bin/owfs --i2c=ALL:ALL --allow_other /mnt/1wire/
# Starts OWFS
/opt/owfs/bin/owserver -p 3001 --i2c=/dev/i2c-1:ALL
/opt/owfs/bin/owhttpd -s 3001 -p 3002
# Setup Serial Port
stty -F /dev/ttyAMA0 raw 38400 cs8 -ignpar -cstopb eol 255 eof 255
sudo apt-get install sqlite3
sudo apt-get install ftp
wlan
Cron
@reboot sudo sh /home/pi/wlan.sh
@reboot sudo python /home/pi/xively_tutorial/aquapixreef.py
@reboot sudo python /home/pi/xively_tutorial/aquapixroom.py
@reboot sudo python /home/pi/xively_tutorial/aquapixcabinet.py
@reboot sudo python /home/pi/xively_tutorial/aquapixleft.py
@reboot sudo python /home/pi/xively_tutorial/aquapixright.py
@reboot sudo sh /home/pi/aquapi.sh
* * * * * sudo sh /home/pi/aquapiup.sh
@hourly sudo /sbin/reboot
wget
http://downloads.sourceforge.net/project/owfs/owfs/2.8p17/owfs-2.8p17.tar.gz
/USR.SRC
Glossary
Operating System
Distribution
MAC Address
IP Address