Raspberry Pi

From ago control wiki
Revision as of 08:19, 5 September 2014 by Tang (Talk | contribs)

Jump to: navigation, search

This is a full walk-through example install on a headless Raspberry Pi.



OS (headless)

Download Raspian from [1]
Get the image to an SD card, e.g. using this tutorial: [2]
Insert the SD card, connect an ethernet cable and power up the RPi.
Find the IP adress it has received, e.g. look at the DHCP table in your router
Open a term window and ssh into the RPi

ssh pi@192.168.x.xx

password: raspberry

Set the password to something new

sudo passwd pi

Start the RPi configuration

sudo raspi-config

Use these options:

  • 1 (expand filesystem)
  • 3 (boot options) -- console
  • 8 (Advanced options)
    • A2 (change name) -- Set whichever host name you like
    • A3 (memory split) – 16
    • A7 (update)

Go into sudo-mode

sudo bash

Set your time zone:

dpkg-reconfigure tzdata  

Remove some unneeded packages

(( Experimental - still doing verifications that nothing broke! ))

sudo apt-get remove --purge x11-common
sudo tasksel remove gnome-desktop
sudo apt-get remove x11-*
sudo apt-get autoremove

((so far it seems OK, but the 2 below commands seems to have broken df. ago control still OK))

sudo apt-get purge lxappearance* lxde-common* lxde-icon-theme* lxpolkit* lxrandr* lxtask*
sudo apt-get purge desktop-base desktop-file-utils gnome-icon-theme gnome-themes-standard leafpad menu-xdg omxplayer scratch xarchiver zenity

Approx 1 GB will be removed

Upgrade the OS to latest version

apt-get update
apt-get upgrade

aGo Control

Get the installation key & add installation source

wget http://mirror.at.agocontrol.com/debian/conf/agocontrol.gpg.key
apt-key add agocontrol.gpg.key
echo "deb http://mirror.at.agocontrol.com/debian unstable main" >> /etc/apt/sources.list

Install aGo Control (Currently approx. 180 MB additional disk) You'll be asked for a QPID daemon password during the install: Set it to something apt-get update apt-get install agocontrol apt-get install systemd systemd-sysv (optional, see "Sysvinit" section below) reboot

After reboot, ssh into the RPI again

ssh pi@192.168.x.xx

password: the new password you set before

Add your location to the config file

nano /etc/opt/agocontrol/conf.d/system.conf

add eg:

lat= 56.05

press [CTRL]X to save

Now open http://192.168.x.xx:8008 on another machine
In the Web UI, add rooms & floorplans

If you get some strange problems with sudo:

echo $PATH


By default, raspi is pre-installed with sysv-init. You can replace it by systemd as explained above.

But if you don't want, you can copy this script into /etc/init.d/agocontrol file.

wget "http://git.agocontrol.com/agocontrol/agocontrol/raw/develop/conf/sysvinit/agocontrol.in" -O /etc/init.d/agocontrol

And execute this command to start agocontrol at raspi startup:

update-rc.d agocontrol defaults

Also make sure all your installed plugins are listed in APPS variable.

APP="agorpc agodatalogger agoevent agoresolver agoscenario agotimer <add here all your plugins bin>"
Personal tools