Home Automation

email:frank.evo2@gmail.com
Mobile users click on MENU above.

——— DO NOT DOWNLOAD RASPBIAN JESSIE LITE IT IS BROKEN ! ! ! ! ————
I just love new upgrades!!! (Luckily I checked the page today 4/10/2017)
The lite version does not have pkexec which you will need to make it so you can run commands on the Raspberry Pi from your phone!

———- DO DOWNLOAD THE FULL VERSION ! ! ! ! ————–
Maybe my download was corrupt, if so I will update this page later, just didn’t want you to waste your time ! ! !

Just verified that process still works with FULL BLOWN JESSIE VERSION ! ! !

The command:
www-data ALL=(ALL) NOPASSWD: ALL

Looked like it might have changed, but it did not, it is still correct.

Raspbian image repository if you need it – http://downloads.raspberrypi.org/raspbian/images/

As I have time I will run through setup with all the previous versions and let you know which ones I have tested and if they worked.

Overview:
The process goes:

Use Raspberry Pi OS setup to get a OS up and running on your Raspberry Pi (Download image from web to PC or MAC, transfer OS image to micro SD card for Raspberry Pi, install micro SD card in Raspberry Pi). Connect Raspberry Pi to TV or Monitor, connect mouse and keyboard and network connection, power on Raspberry Pi. Go to terminal app on Raspberry Pi, update(sudo apt-get update) and upgrade(sudo apt-get upgrade) Raspberry Pi OS, install Apache server(sudo apt-get install apache2 -y), Install PHP(sudo apt-get install php5 libapache2-mod-php5 -y), set permissions for running PHP commands so you can run them from your phone(www-data ALL=(ALL) NOPASSWD: ALL), install GIT(sudo apt-get install git-core), get my python scripts from GIT(sudo git clone https://github.com/z4x4van/Home-Automation-Production.git), and put them in the right place. Connect relay to your Raspberry Pi, get your IP address for your Raspberry Pi(ifconfig) and the GPIO pin numbers you are using. Get one of my free apps and see if you can turn on the relay. All of this is covered in depth below,Raspberry Pi OS setup and Quick Sheet shows everything.

Windows Process

Go here

Select Raspbian

Download this

Wait til done

Unzip image using 7zip

Select downloaded zip file

Extract it

let finish

when you have a .img file

Use disk imager on windows machine

write image to micro sd card

when write is complete, eject micro sd card from PC and put in Raspberry Pi

Open terminal app

Update Raspbian

Upgrade Raspbian

Upgrade can take a while, so watch some TV or do something else for a half hour.

Install Apache Server

Install PHP

Open file to set permissions

Scroll to end of file and add permission line

ctrl-o to save
ctrl-x to exit

Install GIT:

Install GIT

Make a GIT directory in /home/pi (you should already be there)

Go into GIT directory:

GIT directory

Get my files from GIT:

Get my files from GIT

Go into new directory with my files:

Home-Automation-Production

Enter into dangerous admin mode:

sudo su

Copy PHP files:

cp *.php /var/www/html

Copy Python files:

cp *.py /home/pi

EXIT OUT OF ADMIN MODE!

exit

DONE! You can make sure the files are where they need to be if you want:

file check

PHP files

Welcome Page

Welcome

My apps use the Broadcom GPIO pin layout numbering system:

GPIO LAYOUT

Broadcom GPIO Pin Layout

Broadcom GPIO Pin Layout for Raspberry Pi Model B/B+

Configuration Quick Sheet

Quick Sheet

Raspbian OS Install

Raspberry Pi OS

Apache Web Server / PHP Install

Apache / PHP

Necessary PHP and Python scripts that my App uses on GIT

PHP / Python Scripts from GIT

YouTube Video

My Home automation demo’s:
Webcam, Lights, and TV control
Garage Door and Garage Lights control

Smart PowerStrips
App Demo
Hardware close-up

Smart Outlets
Voice Commands – App View
Voice Commands – Wide View
Button Control – App View
Button Control – Wide View

iOS Interface
Smart Outlet – iOS Interface

Garage Door Opener
YouTube – Raspberry Pi – Home Automation – Garage Door Opener

I’ve been doing all kinds of things that relate to Internet of Things that I will be adding to my blog over the next couple of weeks.

First, let’s take a look at some pictures of what we will be doing . . .

(in backwards order)

Webcam, Lights, and TV control
Garage Door and Garage Lights control

We will end with using your phone to turn on and off wall outlets and power strip outlets from anywhere in the world with a phone connection, with each project costing about $50 a piece at the most, minus the phone.

Powerstrips . . .

IMG_0525

YouTube Links of Smart PowerStrips in action!
App Demo
Hardware close-up

Wall Outlets . . .

YouTube Links of Smart Outlets in action!
Voice Commands – App View
Voice Commands – Wide View
Button Control – App View
Button Control – Wide View

iOS Interface
Smart Outlet – iOS Interface

Smart Outlet Installed - Close Up

Smart Outlet Installed – Close Up

Smart Outlet Installed - Wide View

Smart Outlet Installed – Wide View

Smart Outlet Installed and in use.

Smart Outlet Installed and in use.

Smart Outlet Preparation

Smart Outlet Preparation

IMG_0520

IMG_0514

IMG_0508

IMG_0496

Light Switches . . .

wallswitch

Wireless Remote Outlets

IMG_0389

IMG_0387

IMG_0388

IMG_0397

Garage Door Opener . . .

YouTube – Raspberry Pi – Home Automation – Garage Door Opener

In depth hardware explanation

IMG_0390

IMG_0377

Power Strip 2.0

Power Strip 2.0

Power Strip 2.0 - Rear

Power Strip 2.0 – Rear

Power Strip 2.0

Sprinkler Systems

Sprinkler Systems

Sprinkler Systems