Cov txheej txheem:
- Kauj Ruam 1: WiFi ESP8266 NodeMcu ESP-12E
- Kauj ruam 2: DDNS
- Kauj Ruam 3: Daim duab
- Kauj Ruam 4: Hloov kho hauv Automacao.ino Cov Ntaub Ntawv
- Kauj ruam 5: Plugin Sau Cov Ntaub Ntawv
- Kauj Ruam 6: Txuag Cov Ntaub Ntawv Html
- Kauj Ruam 7: Xeem
- Kauj ruam 8: Rub tawm Cov Ntaub Ntawv
Video: ESP8266 Automation Nrog Web Interface thiab DDNS: 8 Cov Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:29
Hauv tsab xov xwm niaj hnub no, peb yuav qhia txog kev siv lub tshuab, uas tuaj yeem yog chaw nyob, siv DDNS (Dynamic Domain Name System) feature. Koj yuav nkag siab yuav teeb tsa daim ntawv thov uas koj yuav tso rau ESP8266, ntawm NodeMCU. Tsis tas li, peb yuav pom yuav teeb tsa DDNS li cas los tswj cov cuab yeej ntawm koj lub tsev los ntawm koj lub xov tooj.
Yeej, cov phiaj xwm ua haujlwm raws li hauv qab no: koj lub xov tooj smartphone yuav xa cov ntaub ntawv mus rau huab nrog DDNS cov kev pabcuam, uas yuav nkag mus rau koj li ESP8266 nyob hauv koj lub tsev.
Hauv qhov no, qhov chaws tau loj thiab siv ESP cov haujlwm los ua haujlwm ua tus vev xaib nws tus kheej. Vim li cas nws thiaj li muaj txiaj ntsig? Zoo, koj tsis tas yuav teeb tsa ib daim ntawv thov ntawm koj lub smartphone. Nws ua haujlwm zoo kawg nkaus ntawm iOS, khoos phis tawj, Android, lossis yuav luag txhua yam uas muaj qhov browser.
Kauj Ruam 1: WiFi ESP8266 NodeMcu ESP-12E
Kauj ruam 2: DDNS
Ua ntej, nws yog qhov tsim nyog los tsim tus as khauj ntawm NO-IP lub vev xaib, https://www.noip.com/. Nov yog qhov kev pabcuam uas peb yuav siv. Tom qab teeb tsa tus ID nkag mus thiab tus password, nkag mus rau hauv koj tus lej nyiaj thiab teeb tsa "hostname" thiab "Domain." Sau hom thiab tawm nws raws li yog (A). Tom qab populating, nyem rau ntawm "Ntxiv hostname." Tom qab ntawd mus rau qhov teeb tsa tus account los txhaj rau "Account." Hauv qhov no, peb siv "automacaoesp.ddns.net."
Tom qab ntawd, teeb tsa "USERNAME" thiab txuag qhov chaw.
Tam sim no mus rau lub router thiab nyem "Dynamic DNS". Sau rau hauv cov teb nrog lub npe siv uas koj tau hais hauv kev teeb tsa tus as khauj, tus password, thiab Lub Npe Lub Npe, uas qhov no yog "automacaoesp.ddns.net". Pab kom "Enable DDNS" xaiv thiab nyem tseg. Tam sim no, nws yuav muab cov lus "Ua tiav!" yog nws ua haujlwm.
Rov qab mus rau NO-IP nplooj ntawv, nyem rau ntawm "Hostnames" sab ntawv qhia zaub mov, thiab tshawb xyuas yog tias koj lub router sau npe tau tshwm sim, raws li qhia hauv qab no. Tus IP sab nraud ntawm koj lub router yuav tsum tshwm sim.
Kauj ruam kawg yog txhawm rau hloov chaw nres nkoj router mus rau lub cuab yeej network sab hauv. Peb txhais tus IP ntawm ESP (192.168.1.111), yog li peb yuav nkag mus rau "Xa mus" -> "Virtual Servers" tshuaj ntsuam ntawm lub router thiab nyem rau "Ntxiv tshiab".
Sau rau hauv qhov chaw nres nkoj uas yuav hloov pauv thiab tus IP ntawm lub cuab yeej network sab hauv, thiab tom qab ntawv txheej txheem yuav qhia "TXHUA" (tshwj tsis yog koj ua haujlwm nrog tsuas yog ib qho tshwj xeeb) thiab khaws Cov xwm txheej li "Enabled" kom nquag.
Kauj Ruam 3: Daim duab
Thaum qhov no ua tiav, nws yuav ua haujlwm. Tsis hais tus IP chaw nyob sab nraud, thaum koj nkag mus rau "automacaoesp.ddns.net" ntawm qhov chaw nres nkoj 80, koj yuav poob ntawm qhov chaw nres nkoj 80 ntawm cov cuab yeej siv sab hauv, uas muaj IP ntawm 192.168.1.111.
Nco ntsoov khaws qhov chaw nyob ruaj khov.
Kauj Ruam 4: Hloov kho hauv Automacao.ino Cov Ntaub Ntawv
Ua cov teeb tsa hauv qab no hloov pauv rau koj lub network teeb tsa thiab nkag mus rau tus lej GPIO siab tshaj plaws ntawm koj + 1 daim npav ntawm MAX_PIN_COUNT.
// Mude para os dados da sua rede #define SSID "TesteESP" #define SENHA "87654321" #define IP "192.168.1.111" #define GATEWAY "192.168.1.1" #define SUBNET "255.255.255.0" // Quantidade máxima de pinos, lembrando que os gpios // geralmente começam em 0. // Se o gpio máximo for 16, por exemplo, coloque 17 #define MAX_PIN_COUNT 17
Hauv cov ntawv automacao.html, hloov kab 117 qhov URL uas koj tau sau npe hauv lub vev xaib ntawm ddns no-ip.
Kauj ruam 5: Plugin Sau Cov Ntaub Ntawv
Koj yuav tsum suav nrog lub plugin hauv Arduino IDE los sau cov ntawv rau esp8266 flash. Rub tawm lub plugin ntawm no. Unzip cov ntawv, thiab yog tias nws nyob hauv Windows, muab cov ntawv.jar tso rau hauv:
C: / Cov neeg siv Cov Ntaub Ntawv Arduino cov cuab yeej ESP8266FS / cuab yeej / esp8266fs.jar
Yog tias siv Mac, muab cov ntawv.jar tso rau hauv:
~ / Cov ntaub ntawv / Arduino / cov cuab yeej / ESP8266FS / cov cuab yeej / esp8266fs.jar
Rov pib dua Arduino IDE. Tam sim no qhov kev xaiv tshiab yuav tshwm sim hauv Cov Cuab Yeej. Qhov kev xaiv no, hu ua "ESP8266 Sketch Data Upload" yuav sau cov ntsiab lus ntawm "cov ntaub ntawv" nplaub tshev hauv ESP8266 nyem.
Daim ntawv "hnub" yuav tsum nyob hauv daim nplaub tshev ntawm cov ntaub ntawv.ino tam sim no.
Yog tias koj xav khaws cov ntaub ntawv html, piv txwv li:
~ / Automation / Automation
~ / Automation / data / automation.html
Kauj Ruam 6: Txuag Cov Ntaub Ntawv Html
Nyem qhov kev xaiv no xa cov ntawv automacao.html uas nyob hauv "cov ntaub ntawv" nplaub tshev mus rau ESP file system
Kauj Ruam 7: Xeem
1. Tseem nyob hauv Arduino IDE, nyem qhov xub kom sau thiab xa cov cai rau ESP. Tam sim no mus rau qhov browser thiab ntaus qhov URL hauv kab ntawv chaw nyob uas koj tau sau npe ntawm tus tsis-ip site. Qhov tshwm sim yuav tsum yog ntawm daim duab.
2. Nyem "Tus lej Tus lej" thiab xaiv tus lej tus lej los ntawm cov npe uas tshwm.
3. Sau lub npe khawm uas yuav phim tus pin uas tau xaiv thiab nyem "+".
4. Ib lub pob nrog lub npe xaiv yuav tshwm nyob rau hauv cov npe.
5. Thaum koj nyem lub pob, nws yuav tig xiav thiab tus pin nrog tus lej koj tau xaiv yuav yog HIGH.
6. Yog koj xav kom tus pin rov qab mus rau LOW, tsuas yog nyem lub pob dua. Txhawm rau tshem lub pob nyem "-"
Kauj ruam 8: Rub tawm Cov Ntaub Ntawv
Rub tawm cov ntawv:
INO
Pom zoo:
Yuav Ua Li Cas Vaum Thiab Kub Tiag Tiag Cov Ntaub Ntawv Teev Npe Nrog Arduino UNO thiab SD-Card - DHT11 Cov ntaub ntawv-logger Simulation hauv Proteus: 5 Cov Kauj Ruam
Yuav Ua Li Cas Vaum Thiab Kub Tiag Tiag Cov Ntaub Ntawv Teev Npe Nrog Arduino UNO thiab SD-Card | DHT11 Cov ntaub ntawv-logger Simulation hauv Proteus: Taw qhia: nyob zoo, qhov no yog Liono Maker, ntawm no yog YouTube txuas. Peb tab tom tsim txoj haujlwm muaj tswv yim nrog Arduino thiab ua haujlwm ntawm cov kab ke. Cov ntaub ntawv-Logger: Cov ntaub ntawv logger (tseem cov ntaub ntawv-logger lossis cov ntaub ntawv kaw) yog cov cuab yeej siv hluav taws xob uas sau cov ntaub ntawv dhau sijhawm
Qhov muag tsis pom kev Nrog ESP8266, Google Tsev thiab Openhab Kev Sib Koom thiab Kev Tswj Xyuas Web: 5 Cov Kauj Ruam (nrog Duab)
Qhov muag tsis pom kev Nrog ESP8266, Google Tsev thiab Openhab Kev Sib Koom thiab Kev Tswj Xyuas Web: Hauv Cov Lus Qhia no kuv qhia koj li cas kuv ntxiv kev siv tshuab rau kuv qhov muag tsis pom. Kuv xav kom muaj peev xwm ntxiv thiab tshem tawm qhov kev siv tshuab nws, yog li txhua qhov kev teeb tsa yog clip ntawm.Qhov tseem ceeb yog: Stepper motor Stepper tsav tswj bij ESP-01 Iav thiab teeb tsa
Raspberry Tank Nrog Web Interface thiab Video Streaming: 8 Cov Kauj Ruam (nrog Duab)
Raspberry Tank Nrog Lub Vev Xaib Interface thiab Video Streaming: Peb tab tom yuav pom li cas kuv tau pom me ntsis WiFi Tank, muaj peev xwm tswj tau lub Vev Xaib Chaw Tswj thiab Kev Tshaj Tawm Video. Vim li no kuv & tau xaiv
Kub thiab Vaum Zaub thiab Sau Cov Ntaub Ntawv Nrog Arduino thiab Ua: 13 Kauj Ruam (nrog Duab)
Kub thiab Vaum Zaub thiab Sau Cov Ntaub Ntawv Nrog Arduino thiab Ua: Intro: Qhov no yog Txoj Haujlwm uas siv Arduino board, Sensor (DHT11), lub khoos phis tawj Windows thiab Kev Ua Haujlwm (rub tawm dawb) program los tso saib Kub, Cov ntaub ntawv vaum hauv digital thiab bar kab ntawv, tso tawm lub sijhawm thiab hnub tim thiab suav lub sijhawm suav
Cov Cuab Yeej Siv Hluav Taws Xob thiab Cov Cuam Tshuam Xov: Ua LED Zaub thiab Npuag Hluav Taws Xob uas Rolls Up: 7 Cov Kauj Ruam (nrog Duab)
Cov Cuab Yeej Siv Hluav Taws Xob thiab Cov Cuam Tshuam: Ua kom pom LED thiab Cov Khoom Siv Hluav Taws Xob uas Rolls Up: Ua rau koj tus kheej cov ntaub ua hluav taws xob, xov, kua nplaum, thiab kab xev, thiab siv lawv los ua lub zog ntsuas hluav taws xob, tiv thaiv, hloov pauv, LED cov lus qhia thiab siv hluav taws xob. thiab cov xov hluav taws xob koj tuaj yeem ua cov lus qhia LED thiab cov kab hluav taws xob ntawm ib qho ntaub uas hloov pauv tau