Raspberry Pi 3 Home Automation Projects

Author: Shantanu Bhadoria   Ruben Oliva Ramos  

Publisher: Packt Publishing‎

Publication year: 2017

E-ISBN: 9781783283880

P-ISBN(Paperback): 9781783283873

Subject: TP39 computer application

Language: ENG

Access to resources Favorite

Disclaimer: Any content in publications that violate the sovereignty, the constitution or regulations of the PRC is not accepted or approved by CNPIEC.

Raspberry Pi 3 Home Automation Projects

Chapter

Chapter 1: Creating a Raspberry Pi-Powered Magic Mirror

What is the Raspberry Pi?

Purchasing the Raspberry Pi

Setting up the Raspberry Pi

Moving on to the LXTerminal

Basic Linux commands

Helpful commands

The Magic Mirror

Downloading the Magic Mirror repository

Installing Node.js

Installing Grunt

Working with the configuration file

Editing the configuration file

Understanding the module

Installing third-party modules

Summary

Chapter 2: Automated Gardening System

Items required for the project

Waterproof junction box

Arduino Pro Mini 5v ATMEGA328P

USB FTDI connector

5V power supply

5V relay

Soil humidity sensor (hygrometer)

Photoresistor

Submersible pump

Drip irrigation system

Water reservoir

Setting up gardening system code (reading humidity)

Setting up the Arduino IDE

Testing the Arduino Pro Mini

Connecting the Arduino Pro Mini to the USB FTDI connector (FT232RL) and your computer

Deploying your code

Reading the humidity sensor

Connect the humidity sensor to the Arduino Pro Mini

Uploading the sketch and testing humidity measurements

Connecting the pump power and control

Connecting the relay to the control circuit (Arduino Pro Mini)

Connecting Arduino to the relay

Uploading the relay test sketch to the Arduino

Triggering the pump with the hygrometer

Adding another sensor (photoresistor) to optimize your gardening

Connecting the photoresistor

Updating the sketch to add photoresistor readings to the decision-making

Connecting it all together

Summary

Chapter 3: Integrating CheerLights into a Holiday Display

Items required for this project

Adafruit HUZZAH ESP8266 breakout

USB FTDI connector

WS2811 NeoPixels LED strip

5V and 3.3V (optional) power supply

1000μF capacitor

Logic level shifting IC

400-600Ω resistor

JST SM or JST PH connectors (optional)

Getting the CheerLights code set up

Set up the Arduino IDE

Installing the NeoPixel library

Testing the ESP8266

Connect the ESP8266 Huzzah to the USB FTDI connector (FT232RL) and your computer

Switching the ESP8266 Huzzah into deployment mode

Deploying your code

Connecting it all together

Connecting the data pins

Power the NeoPixels

Power up the ESP8266

Programming the ESP8266 Huzzah for CheerLights

Let's try a simple single-color display

Let's try some interesting modifications

Summary

Chapter 4: Erase Parking Headaches with OpenCV and Raspberry Pi

Introduction to smart parking systems

Sensor devices for smart parking

Presence sensor

Ultrasonic sensor 

Camera

Configure the camera

Accessing our Raspberry Pi via SSH

Machine vision systems

Introduction to machine vision

Testing the camera

Installing OpenCV on the Raspberry Pi

Detecting the vehicle plate number

OpenALPR

Integrating the library

Programming the script for Python

Cloud API

PHP REST API script for OpenALPR

Architecture of the parking system

Logging spaces in a database

Configuring a MySQL database server

Installing MySQL

Installing the MySQL driver for PHP

Testing PHP and MySQL

Installing phpMyAdmin for administrating databases

Configuring the Apache server

Entering the phpMyAdmin remote panel

Integrating the Raspberry Pi and camera into the database

Programming the script software

Node Express app for openALPR

Amazon Web Services IoT

AWS IoT components

Accessing AWS IoT

Services

Setting up the Raspberry Pi with AWS IoT

AWS IoT connections

Integrating the system

Future parking systems

Summary

Chapter 5: Building Netflix's The Switch for the Living Room

Setting up the Particle Photon

Getting started

What's in the box?

The architecture of the Particle Photon

Requirements

Software

Hardware

Wi-Fi settings

Specifications of the board

Connecting your Particle Photon to the internet using the setup web application

Blinking an LED

Hardware

Software

Testing the code

Hardware and software requirements

Hardware configuration

The architecture of the home automation system

Reading IR signals

Sensor IR receiver

Hardware connections

Code to read IR signals

Programming the button

Testing the code for remote control for a Netflix TV

Testing the code for a Philips TV

Assembling the electronics

The circuit to be built

The final circuit

The circuit layout

Controlling smart lights

Getting started

Step 1

Step 2

Step 3

The Philips Hue API

Turning a light on or off

Changing the intensity of the lights

Sending notifications with IFTTT

Parts of an IFTTT

Enabling sensors with Particle Photon

Creating the IFTTT applet

Sending notifications

Future ideas for projects

Summary

Chapter 6: Lock Down with a Windows IoT Face Recognition Door System

Getting started: Installing and configuring Windows 10 IoT on the Raspberry Pi 3

Preparation

Installing Windows 10 Desktop

Getting the package to install Windows 10 IoT Core

Downloading and installing Windows 10 IoT Core

Deploying Windows 10 IoT Core on Raspberry Pi 3

Downloading and flashing the image

Connecting the board to the network

Attaching the MicroSD card on Raspberry Pi 3

Putting them all together

Ethernet and Wi-Fi connection

Installing Visual Studio

Enabling the Developer Mode on Windows 10 Desktop

Creating a first example

Writing our first application

Loading the project in Visual Studio

Connecting the LED to your Windows IoT device

Hardware pins

Hardware connections

Deploying the app

Developing the code

Timer code

Starting GPIO pins

Modify the state of a pin

Running the application

Applications for the Internet of Things

Real-life examples of the Internet of Things

Smart home devices

Wireless bulbs

Smart refrigerators

Applications of the Raspberry Pi in the Internet of Things

Media center using the Raspberry Pi 3

Cloud storage using Raspberry Pi 3

Tracker using Raspberry Pi 3

Web server using Raspberry Pi 3

Gateway for Bluetooth devices using Raspberry Pi 3

The architecture of the security system

Materials required

Hardware connections

Initial setup

Software required

Software setup

Software development

Running the interface

Integrating the system and putting it all together

Future ideas

Summary

Index

The users who browse this book also browse


No browse record.