Cov txheej txheem:

Alexa Echo + ESP 8266 = Smart Power Plug: 4 Cov Kauj Ruam (nrog Duab)
Alexa Echo + ESP 8266 = Smart Power Plug: 4 Cov Kauj Ruam (nrog Duab)

Video: Alexa Echo + ESP 8266 = Smart Power Plug: 4 Cov Kauj Ruam (nrog Duab)

Video: Alexa Echo + ESP 8266 = Smart Power Plug: 4 Cov Kauj Ruam (nrog Duab)
Video: Wait what 😱 Flipper Zero 🐬 2024, Hlis ntuj nqeg
Anonim
Image
Image
Alexa Echo + ESP 8266 = Ntse Lub Hwj Huam Plug
Alexa Echo + ESP 8266 = Ntse Lub Hwj Huam Plug
Alexa Echo + ESP 8266 = Ntse Lub Hwj Huam Plug
Alexa Echo + ESP 8266 = Ntse Lub Hwj Huam Plug

Cov lus qhia siv ALEXA ECHO tswj ncaj qha ESP8266.

Kuv tus neeg rau zaub mov tsuas yog txhawb kev tso cai ESP8266 rau Amazon server.

Kuv tus neeg rau zaub mov tsis thaub qab koj cov ntaub ntawv.

Pov npav rau kuv: D Ua tsaug!

Kauj ruam 1: Yuav tsum tau ua

Yuav tsum muaj
Yuav tsum muaj
Yuav tsum muaj
Yuav tsum muaj

HARDWARE

  • ESP8266 WiFi 5V 1 Channel Relay Ncua Sijhawm Module
  • FTDI USB rau cov qauv siv (tsis xav tau yog siv nodemcu)
  • Amazon Echo
  • Txiv neej thiab poj niam lub hwj chim ntsaws

SOFTWARE

  • · Arduino IDE nrog ESP8266 txuas ntxiv pob teeb tsa cov lus qhia ntawm no:

    github.com/esp8266/arduino

  • Kuv sketch ntawm no:

    github.com/kim7tin/ESP8266-Smart-Power-Plug

  • Kuv qhov txuj ci alexa hu ua "ESP8266 Smart Power Plug"

Kauj Ruam 2: Flash Tshiab Frimware

Flash Tshiab Frimware
Flash Tshiab Frimware

1. Tshem tawm ESP8266 los ntawm tus qauv

Duab
Duab

2. Connect module rau USB rau Uart module:

Duab
Duab

NQA -------- | GND TX | -------- RX ------- | IO2 EN | -------- 3V3GND ------- | IO0 RST | -------- BUTTON -------- GNDTX ------- | RX 3V3 | ------ 3V3

==================================================

Ua ntej FLASH, Nias lub pob kom rov ua dua (IO0 ib txwm txuas rau GND -> ESP8266 tau txais hom nyem tom qab rov pib dua)

==================================================

3. Flash kuv firmware

  • Download tau kuv daim duab:

    github.com/kim7tin/ESP8266-Smart-Power-Plu…

  • Qhib hauv Arduino IDE, thiab hloov pauv:

    • wifi_ssid: koj lub npe wifi
    • wifi_password: koj tus password wifi
    • control_password: koj tus lej zais
    • friendlyName: koj lub npe ntaus ntawv
    • ip/rooj vag/subnet: ESP8266 IP zoo li qub rau NAT
  • Hauv Arduino IDE. Xaiv Cov Cuab Yeej:

    • Pawg Thawj Coj: Node MCU 0.9 ()
    • Upload Ceev: 230400
    • Chaw nres nkoj: Xaiv koj lub USB rau Uart chaw nres nkoj
  • Ntaus Upload icon (ua ntej ntaus, nias lub pob pib dua hauv qib 2)

4. Connect ESP mus rau module dua

Duab
Duab

5. Connect fais fab ntsaws

Kauj ruam 3: Config NAT & DDNS

Config NAT & DDNS
Config NAT & DDNS

Peb xav tau qhib chaw nres nkoj (default 666) los ntawm Amazon server rau peb ESP8266

Kuv tsuas yog qhia nrog kuv tus router. Koj tuaj yeem nrhiav paub yuav qhib koj lub chaw nres nkoj router hauv is taws nem thiab qhib TCP chaw nres nkoj 666 mus rau tus IP teeb tsa hauv kauj ruam 2

yog tias koj tsis muaj tus ip ruaj khov. Koj yuav tsum siv lub npe hloov pauv. Koj tuaj yeem pom ntau tus kws muab kev pabcuam DDNS dawb.

Kauj Ruam 4: Tswj los ntawm ALEXA ECHO

Tswj los ntawm ALEXA ECHO
Tswj los ntawm ALEXA ECHO

1. Ua kom kuv qhov txuj ci muaj npe hu ua "ESP8266 Smart Power Plug

  • Alexa app> Xaiv cov ntawv qhia zaub mov> Txuj ci
  • Tshawb nrhiav lub npe hu ua "ESP8266 Smart Power Plug"
  • Nyem rau Kev Txawj Ntse
  • Nyem ENABLE
  • Nkag mus nrog koj tus IP zoo li qub lossis DDNS puav (suav nrog koj qhov chaw nres nkoj - default 666)

2. Discover ntaus ntawv

  • Alexa app> Xaiv cov ntawv qhia zaub mov> SmartHome
  • Nyem Ntxiv ntaus ntawv thiab tos 20 vib nas this
  • Tam sim no koj tuaj yeem pom ESP8266

3. Control:

"Alexa, tig rau/tua"

Lub suab qhib kev sib tw
Lub suab qhib kev sib tw
Lub suab qhib kev sib tw
Lub suab qhib kev sib tw

Khiav Tawm Hauv Lub Suab Ua Haujlwm Sib Tw

Pom zoo: