Home‎ > ‎

Install or Upgrade PrivateEyePi

Follow the following steps to install  the PrivateEyePi software on your Raspberry Pi. You can follow the same steps for upgrading your system

Log in to your Raspberry Pi and go to the command prompt.

It is always good to make sure you are on the latest version of your operating system. Type the following commands to update your system:

  sudo apt-get update
  sudo apt-get upgrade

Next install PrivateEyePi by downloading the install shell script and running it. You can install the system in any directory (folder) you wish. All out tutorials assume you have installed PrivateEyePi from the /home/pi/pep directory. Type the following commands at the command prompt:

For first time install:
  cd /home/pi
  mkdir pep
  cd pep

For upgrade:
  cd /home/pi/pep
  
The PEP Applications have been updated for Python 3 and they will not work under Python 2.
Both downloads are available.

For Python 2 version run:
wget -N www.privateeyepi.com/downloads/install.sh

For Python 3 version run:
wget -N www.privateeyepi.com/downloads/python3/install.sh

You should see something like in Figure 1 below:


Figure 1: Download the install shell script

  
Now run the install by typing the following command (if you are upgrading, a backup is kept of your previous version - see below for more details).  

sh install.sh

You should see something like Figure 2 below:


Figure 2: Run the install


The files that you see in the bottom of Figure 2 are the various programs we've developed for each of our projects. These programs are written in the Python programming language. Here is a brief description of each:

alarm.py  - Is used in the alarm system project.
dallas.py - Is used for monitoring temperature using the DS18B20 sensor.
dht22.py - Is used for monitoring temperature and humidity using the DHT22 sensor.
rfsensor.py - Is used for interfacing a range of wireless sensors (wireless switch, wireless temperature sensor, wireless motion sensor and a wireless relay).
restarter.py - Is a utility you can use to automate the above programs so that they automatically restart whenever you restart your Raspberry Pi. This also enables you to run multiple programs (e.g. alarm.py and dallas.py) at the same time. 
globals.py - This program contains global configurations like your username and password that each of the above programs need to log into the PrivateEyePi server. You will need to edit this file to configure your system (explained in each tutorial).
alarmfunctionsr.py - This contains multiple common functions used by the above programs. 

Backup Files

If you are upgrading to a new version of PrivateEyePi then the installation will automatically keep copies of the previous version of the system in the pep_backup directory. The pep_backup directory is a sub-directory of the directory where you installed PrivateEyePI. So in our case the backup files are in the /home/pi/pep/pep_backup directory. Figure 3 shows a listing of the /home/pi/pep/pep_backup directory.