-
Notifications
You must be signed in to change notification settings - Fork 0
Xively Install
Paul Cowan edited this page Jun 4, 2013
·
1 revision
This will change once we have a make/make install script.
** Based on Arch Linux ARM (archlinux-hf-2013-02-11) **
This will not work on Raspbian or any distro other than Arch Linux!
#!sh
# set the hostname
hostnamectl set-hostname kegnet-client
# change the root password
passwd
# initialize pacman and update the system
pacman-key --init
pacman -Syu
# there's no real need to adjust the timezone or locale, the KegNet server will
# present the data appropriately
# install the following required packages
pacman -S python2 python2-pip sudo gcc make automake glib2 pkg-config swig git iw wicd
# disable netcfg
systemctl disable netcfg@ethernet-eth0
# enable wicd
systemctl enable wicd
# set openntpd to restart after a network connection to force a time synch
echo 'systemctl restart openntpd&' > /etc/wicd/scripts/postconnect/openntpd
chmod u+x /etc/wicd/scripts/postconnect/openntpd
# install the following python libraries
pip2 install pyinotify virtualenv requests xively-python
# download and build WiringPi
git clone git://git.drogon.net/wiringPi /usr/src/wiringPi
cd /usr/src/wiringPi
./build
# download and build the KegNet client
git clone https://github.com/kegnet/kegnet-client.git /usr/share/kegnet-client
cd /usr/share/kegnet-client
./make-pourd
# install kegnet-client service to startup on boot
ln -s /usr/share/kegnet-client/service/kegnet-client.service /etc/systemd/system/multi-user.target.wants/
# install pourd service to startup on boot - this creates a daemon for pins 0 and 3, although they will
# only startup if a config file for the pin exists in /usr/local/share/kegnet/conf
ln -s /usr/share/kegnet-client/service/pourd\@.service /etc/systemd/system/multi-user.target.wants/[email protected]
ln -s /usr/share/kegnet-client/service/pourd\@.service /etc/systemd/system/multi-user.target.wants/[email protected]
# configure the kernel modules for the w1 temperature sensor
echo 'w1-gpio' >> /etc/modules-load.d/w1-therm.conf
echo 'w1_therm' >> /etc/modules-load.d/w1-therm.conf
# finished, reboot, KegNet client should startup
reboot
# make sure the system clock is correct
date
# check logs for "kegnet" and "pourd"
# verify ping is retrieving a temperature from the probe
# test the flow meter
tail -f /var/log/user.log
# configure wifi (optional)
wicd-curses
# using the menus, arrow down to your Wifi and press RIGHT ARROW
# >>> DO NOT PRESS ENTER ON YOUR WIFI, PRESS RIGHT ARROW <<<
# Arrow down to "Automatically connect to this network" and press Enter to check the box
# Arrow down to "Key" and enter your Wifi password
# Press F10 to save it
# Now you can press enter on the Wifi network to cause it to connect
Note: wicd connects to only 1 network at a time, so if you connect to Wifi, it will disconnect ethernet automatically.