• Stars
    star
    108
  • Rank 319,416 (Top 7 %)
  • Language
    Python
  • Created over 7 years ago
  • Updated over 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Use Raspberry Pi 3 as home automation device with Alexa

IOT-Pi3-Alexa-Automation

I updated the code. It is working with Echo dot Gen 3 and Gen 2

Youtube tutorial https://www.youtube.com/watch?v=uS5dTx8vjq4

Use Raspberry Pi 3 as home automation device with Alexa. This project allows you to control multiple devices connected to Raspberry Pi 3 with voice command. You are able to control GPIO pins thus control GPIO connected devices.

Ported from original repos for python 3 https://github.com/toddmedema/echo https://github.com/xtacocorex/CHIP_IO

Instructions:

  1. Download "RASPBIAN STRETCH WITH DESKTOP" and unzip "2017-04-10-raspbian-jessie.zip" https://www.raspberrypi.org/downloads/raspbian/

  2. Download "win32diskimager-1.0.0-install.exe" program from following URL https://sourceforge.net/projects/win32diskimager/files/latest/download

  3. Install "win32diskimager-1.0.0-install.exe"

  4. Connect mini-sd card to a computer. In windows explorer right click your sd card drive letter and click on format menu. In format window select "FAT" in "File System" list and click start. Wait for the task to complete.

    alt text

  5. Launch "win32diskimager" program. Select image file "2017-04-10-raspbian-jessie.img" and your sd card drive letter and click "Write" (Wait for program to finish writing REAPBIAN image to the sd card)

    alt text

  6. Once image writing is completed, Copy "ssh" (ssh file is empty) and "wpa_supplicant.conf" files to root of the sd card. Open "wpa_supplicant.conf" in text editor and update ssid (wi-fi name) & password.

  7. Insert the sd card into Raspberry Pi 3 and boot and wit for 10 seconds

  8. In windows go to run & type "cmd" and type arp -a in command prompt. Look for "Physical Address" that starts with b8-27* & note the Internet Address. This is your Raspberry Pi3 Wi-fi IP address on your network.

    alt text

  9. Download "Putty.exe" from following URL https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html

  10. Run "Putty.exe" and type IP address in host name field and click start button & click yes to popup. On putty command line type in "pi" for "Login as:" & enter. For password enter "raspberry" and hit enter. You should see "pi@raspberrypi:~ $" prompt.

    alt text

  11. Type "sudo raspi-config" and go to "Interfacing Options" and enable VNC. Reboot pi3 by typing this command "sudo reboot". You will loose ssh connection.

  12. (Optional) download and install VNC client on youe pc https://www.realvnc.com/download/vnc/windows/. Connect VNC to Respberry Pi3 using IP address. Login with user name "pi" and password "raspberry". You should see Pi3 desktop.

    alt text

  13. Launch Pi ssh session with putty or localy through VNC and type following two commands Pi command prompt to update it. "sudo apt-get update" and "sudo apt-get upgrade" (This will take a while)

  14. Download this github project as zip file with following command "wget https://github.com/nassiramalik/IOT-Pi3-Alexa-Automation/archive/master.zip"

  15. Unzip downloaded zip file with "unzip master.zip" command and type "cd IOT-Pi3-Alexa-Automation-master" command after unzip completes

  16. (Optional) Entery "sudo pip install virtualenv" command to install virtualenv on Pi

  17. (Optional) Enter "virtualenv ipaa-env" command to create virtual environment for your project

  18. (Optional) Enter ". ipaa-env/bin/activate" command to activate your project's virtualen vironment

  19. Enter "sudo python3 RPi_name_port_gpio.py" command to run Pi IOT program

  20. Give voice command to Alex to discover devices "Alexa discover devices" it will search your network and discover your Raspberry Pi 3 as an IOT device.

  21. Give a voice command to Alexa "Turn on the office" you should hear a relay clicking sound and led turn on

  22. Give a voice command to Alexa "Turn off the office" you should hear a relay clicking sound and led should turn off

More Repositories

1

IOT-ESP8266-Google-Home

Control ESP8266 with Google Home without using IFTTT or opening a firewall
C++
141
star
2

IOT-AC-Light-Dimmer-With-Alexa

IOT-Light-Dimmer
C++
71
star
3

IOT-ESP8266-Alexa_Automation

IOT - Control a single switch with single ESP8266 using Alexa
C++
53
star
4

IOT-ESP8266-ESP12E-Alexa-Multiple-Devices

IOT - Control multiple switches with single ESP8266 using Alexa
C++
36
star
5

Add-Wifi-And-GPIO-To-Arduino-Uno-With-NodeMcu

Add Wifi and GPIO To Arduino Uno With NodeMcu
C++
25
star
6

BLDC_Hover_Board_Motor_Controller

BLDC_Hover_Board_Motor_Controller
C++
25
star
7

IFTTT-Alexa-And-GoogleHome-Control-Single-Device

C++
17
star
8

IOT-Smart-Temperature-Switch-With-Alexa-NodeMcu

Control a relay switch based on temperature and humidity
C++
12
star
9

IOT-NodeMcu-Alexa_Automation_4Way_Switch

C++
11
star
10

Smart_Thermostat_Just_Like_Google_Nest

Smart_Thermostat_Just_Like_Google_Nest
C++
11
star
11

Node-Red_Wemos_Mini_Alexa_HomeAssistant_MQTT_Switch

Node-Red_Wemos_Mini_Alexa_HomeAssistant_MQTT_Switch
C++
10
star
12

IOT-Pi3-Google-Home-Mini-Automation

IOT-Pi3-Alexa-Automation
Python
7
star
13

Home_Assistant_LCD_Dashboard

Home_Assistant_LCD_Dashboard
6
star
14

Carbon_Monnoxide_MQ-7_With_NodeRed_Blynk_Wemos_Mini_Home_Assistant

NodeRed_Blynk_Wemos_Mini_Home_Assistant_Carbon_Monnoxide
C++
5
star
15

WiFi-Switchmate-Lighting-Control-With-Alexa_and_Phone

WiFi-Switchmate-Lighting-Control-With-Alexa_and_Phone
Arduino
5
star
16

IOT-Alexa-GoogleHome-GameRoom_Automation

C++
5
star
17

IOT-DIY-Sonoff-Temperature-Switch-With-Alexa

C++
5
star
18

IOT-3Way-Switch-Without_Current-Meter-Auto-Calibrating

NodeMcu
C++
5
star
19

Alexa_LinkIt_Smart_7688_Duo_AC_Switch

Alexa_LinkIt_Smart_7688_Duo_AC_Switch
Python
5
star
20

IOT-ESP8266-Alexa_Automation_3Way_Switch

Control lights and devices with manual switch and Alexa
Arduino
4
star
21

Alexa_Taking_Out_The_Trash

Alexa_Taking_Out_The_Trash
C++
4
star
22

IOT-Home-Automation-Smart-Surge-Protector-Power-Strip

Smart-Surge-Protector-Power-Strip
C++
4
star
23

4CH_Dimmer_Switch_Touch_Screen_Wemos

4CH Dimmer Switch Touch Screen Wemos mini
C++
4
star
24

IOT-ESP8266-Alexa_Skills_Garage_Door

C++
4
star
25

Controlling_Sonoff_With_Alexa_And_Home_Assistant

Controlling Sonoff with alexa and Home Assistant
C++
3
star
26

Lora-GPS-Wemos-ESP32-Oled

C++
1
star
27

UnitestExample

Unitest Example
Python
1
star
28

IOT-Pi3-3Way_Switch_Home_Automation

Pi3 3way switch
Python
1
star