Cov txheej txheem:

Sonoff B1 Nrog Kua Apple Cov Khoom Siv Hauv Tsev Ua los ntawm Arduino: 6 Cov Kauj Ruam
Sonoff B1 Nrog Kua Apple Cov Khoom Siv Hauv Tsev Ua los ntawm Arduino: 6 Cov Kauj Ruam

Video: Sonoff B1 Nrog Kua Apple Cov Khoom Siv Hauv Tsev Ua los ntawm Arduino: 6 Cov Kauj Ruam

Video: Sonoff B1 Nrog Kua Apple Cov Khoom Siv Hauv Tsev Ua los ntawm Arduino: 6 Cov Kauj Ruam
Video: САМЫЙ ПОДРОБНЫЙ ОБЗОР лампы Sonoff B1 ► Умный Дом 2024, Kaum ib hlis
Anonim
Sonoff B1 Nrog Kua Kua Apple Cov Khoom Siv Hauv Tsev Ua los ntawm Arduino
Sonoff B1 Nrog Kua Kua Apple Cov Khoom Siv Hauv Tsev Ua los ntawm Arduino

Qhov tsis txaus ntseeg no muab txoj hauv kev yooj yim rau koj li cas los teeb Sonoff B1 teeb rau hauv koj li Apple cov khoom siv hauv tsev yam tsis muaj kev txuas ntxiv

Intro: Sonoff B1 yog qhov pheej yig heev tab sis muaj lub teeb uas muaj peb hom Led's

1. Dawb Coj "Sov"

2. Dawb Coj "Txias"

3. RGB Coj

Yog li ntawd lawv tuaj yeem siv los ntawm kev sib xyaw ua ke sib txawv thiab peb tuaj yeem tau txais hauv txoj kev xav txhua qhov ua tau los ntawm kev sib txuas ntawm qhov ci ntawm cov Led

Kauj Ruam 1: Npaj Teeb rau Hloov Kho Firmware

Npaj Teeb rau Firmware Update
Npaj Teeb rau Firmware Update

Txhawm rau hloov kho firmware peb xav tau kev txawj ntse me ntsis

Ok wb pib

Ntsia lub hau plastik thiab nrhiav kev sib cuag, peb yuav tsum tau muab cov hlua txuas lossis cov ntaub thaiv npog kom yooj yim txuas USB-UART hloov pauv.

Hauv kuv qhov xwm txheej kuv tau siv txiv neej lub taub hau, hovewer ib qho xov hlau yooj yim lossis xov hlau nrog tus pin tuaj yeem siv tau. Yog tias koj tab tom mus ua si ob peb zaug nrog cov teeb hluav taws xob yuav tsum luv kom ntseeg tau tias lub hau yas tau ntswj

Yog tag nrho. Tam sim no koj tuaj yeem hloov kho firmware yooj yim heev yuav tsuas yog ntswj lub hau

Kauj Ruam 2: Txuas Lub Teeb rau USB UART

Txuas lub Teeb rau USB UART
Txuas lub Teeb rau USB UART

Cov xov hlau yog yooj yim, tab sis thov paub txog ob yam:

1.! Lub teeb yuav tsum raug txiav tawm ntawm lub zog hluav taws xob 220 v

2.! Siv USB UART nrog teeb tsa 3.3 v, txwv tsis pub koj yuav ua rau lub cuab yeej puas tsuaj

Ok, wb txuas

USB UART LAMP

3.3V 3.3V

GND GND

RX TXI

TX RX na

Txog GPIO 0 ntawm lub teeb tsuas yog txuas cov xov hlau yooj yim. Tom ntej no yuav piav qhia qhov laj thawj

Kauj Ruam 3: Npaj Arduino IDE

Npaj Arduino IDE
Npaj Arduino IDE

1. Koj yuav tsum tau npaj ib puag ncig zoo rau kev ua haujlwm ESP8266 chips. Kuv yuav tsis nthuav tawm rau ntawd, vim tias muaj ntau ntawm kev tshaj tawm internet, saib zoo

2. Rub lub tsev qiv ntawv https://github.com/Yurik72/ESPHap thiab unzip nws mus rau hauv Arduino lub tsev qiv ntawv tais ceev tseg. Rau Windows, qhov no feem ntau yog C: / Users / Documents / Arduino / libraries

3. Los ntawm cov ntawv khaws tseg txuas https://github.com/Yurik72/ESPHap/tree/master/wol… unpack wolfSSL_3_13_0.rar rau hauv tib lub nplaub tshev ntawm Arduino cov tsev qiv ntawv. (C: / Users / Documents / Arduino / libraries / wolfssl). Thov nco ntsoov tias nws tsis yog duplicated hauv paus. Txhais tau tias cov ntaub ntawv yuav tsum yog nyob hauv (C: / Users / Documents / Arduino / libraries / wolfssl)

4 Rub tawm lossis teeb tsa lub tsev qiv ntawv

Tam sim no peb tau npaj los npaj koj li ESP8266

Qhib daim duab

Thiab teeb tsa lub rooj tsav xwm kom raug ntawm Arduino, saib cov duab nrog teeb tsa raug

Kauj ruam 4: Flashing Firmware

Flashing Firmware
Flashing Firmware

Txuas koj USB UART rau lub khoos phis tawj. koj lub teeb npaj rau nyem. Hauv Arduino IDE xaiv qhov chaw nres nkoj COM kom raug

Muaj qhov dag uas tau hais ua ntej. txhawm rau hloov nti mus rau hauv hom nyem GPIO 0 yuav tsum txuas nrog GND thaum lub zog qhib lossis rov pib dua

Nws tuaj yeem ua tiav los ntawm ob txoj hauv kev:

Yog USB UART nrog khawm rov pib dua, tom qab ntawd nyem lub pob rub tawm lub pob ntawm Arduino IDE, tos rau cov lus tshaj tawm thiab txuas cov xov hlau los ntawm GPIO 0 mus rau GND ntawm Sonoff dua li nias lub USB UART Pib dua khawm, tos kom rub tawm pib, tom qab ntawd xov hlau tuaj yeem txuas nrog Sonoff

Yog tias USB UART tsis muaj khawm rov pib dua, tom qab ntawd tshem lub USB ntawm lub khoos phis tawj, txuas xov tooj ntawm GPIO 0 mus rau GND Sonoff, ntxig USB thiab nyem "rub tawm". Tom qab rub tawm pib. Txhua yam no yog qhov tsim nyog los tso Sonoff hauv hom khau raj (GPIO0 ntawm GND thaum lub zog txhawb nqa)

Hauv kuv qhov xwm txheej kuv tsuas yog kov xov tooj yooj yim los ntawm GPIO 0 mus rau GND ntawm USB UART, thera yog chav txaus hauv GND

Ok, Upload yuav tsum tau pib thiab koj yuav tsum pom cov lus ua tiav

Koj Lub Teeb tau npaj siv, yog qhov zoo dua los pib dua tom qab flashing.

Kauj Ruam 5: Teeb Teeb thiab Pairing Nrog Apple

Teeb Teeb thiab Pairing Nrog Apple
Teeb Teeb thiab Pairing Nrog Apple
Teeb Teeb thiab Pairing Nrog Apple
Teeb Teeb thiab Pairing Nrog Apple
Teeb Teeb thiab Pairing Nrog Apple
Teeb Teeb thiab Pairing Nrog Apple

Hauv kuv qhov xwm txheej Kuv tau txuas ntxiv teeb tsa thiab ua ke txheej txheem los ntawm tseem txuas teeb rau USB UART txhawm rau tswj xyuas cov xwm txheej tshwm sim

Ua ntej peb yuav tsum txuas/teeb teeb rau koj lub tsev WiFi

Tom qab rebooting Teeb yuav pib hauv Access point Mode. Koj yuav tsum txuas koj lub khoos phis tawj rau WiFi network npe "ES". Tom qab kev sib txuas koj yuav raug xa mus rau qhov chaw raug ntes. Yog tias tsis yog, qhib qhov browser thiab tso https://192.168.4.1. koj yuav tsum pom lub teeb tsa portal

Xaiv koj lub tsev wifi hauv tsev lossis nkag mus rau tus kheej, sau tus password thiab paub meej tias. Teeb yuav rov pib dua thiab thaum ua tiav koj yuav tsum pom cov cav zoo li no

*WM: Cov txiaj ntsig kev sib txuas: *WM: 3 *WM: IP Chaw Nyob:

*WM: 192.168.0.93

WiFi txuas IP chaw nyob: 192.168.0.93

>> Kev Sib Koom Hauv Tsev: homekit_is_paired 0

……..

>> HomeKit: teeb tsa mDNS >>> HomeKit: MDNS.begin: ES-5AC5, IP: 192.168.0.93 >>> HomeKit: Init server dhau

>> HomeKit: Init server hla Web server tsis SET, tos ua khub

Teeb tau npaj ua khub! Cia ua

1 Qhib lub xov tooj -> Apple lub tsev -> ntxiv ntaus ntawv.

2. Ua tus xaiv kom ntxiv tus kheej thiab peb pom qee yam zoo li ES ……. muaj, 3 Xaiv qhov nws thiab pom zoo ntawm chav kawm uas nws tsis tau ntawv pov thawj, nkag mus tus lej nkag 11111111 thiab cia mus…..

Raws li txoj cai, txhua yam yuav dhau thawj zaug thiab koj yuav pom nws tam sim hauv cov khoom siv thiab koj tuaj yeem qhib thiab tua nws.

Hauv kev xav uas yog txhua yam, koj tuaj yeem sib dhos koj lub teeb txuas thiab ua si …

Yog tias tsis yog, saib ntu kev daws teeb meem

Kauj ruam 6: Troubleshooting

Teeb meem
Teeb meem

Yog tias muaj qee yam tsis raug, Cov txheej txheem Pairing yog qhov muaj peev xwm tshaj plaws, thiab kuv qhov kev sim thiab kev paub nws tuaj yeem siv sijhawm txog 3 zaug siab tshaj plaws.

Koj yuav tsum rov pib dua koj lub cuab yeej thiab sim dua, Yog tias lub cuab yeej tsis tshwm nyob rau hauv daim ntawv teev npe ua khub, tej zaum cov cuab yeej twb tau khaws cov ntaub ntawv ua ke tab sis Apple Tsis:(Peb yuav tsum tshem tawm cov ntaub ntawv ua khub los ntawm lub cuab yeej..

Pairing cov ntaub ntawv raug cawm ntawm SPIFFS cov ntaub ntawv kaw lus "/pair.dat". thiab koj xav tau qhib qhov browser

sau https:// ip/xauj thiab koj yuav nkag mus rau koj li SPIFFs cov ntaub ntawv kaw lus.

Qhov twg ip yog IP chaw nyob ntawm koj lub cuab yeej

Tsuas yog rho tawm cov ntaub ntawv pair.dat, rov pib dua lub cuab yeej thiab pib ua khub dua

Pom zoo: