Cov txheej txheem:

Siv Homie Firmware los Tsav Sonoff Hloov Module (ESP8266 Raws): 5 Cov Kauj Ruam (nrog Duab)
Siv Homie Firmware los Tsav Sonoff Hloov Module (ESP8266 Raws): 5 Cov Kauj Ruam (nrog Duab)
Anonim
Lub cev txuas lub Rooj Tswjhwm Saib mus rau lub khoos phis tawj hla ntu
Lub cev txuas lub Rooj Tswjhwm Saib mus rau lub khoos phis tawj hla ntu
Lub cev txuas lub Rooj Tswjhwm Saib mus rau lub khoos phis tawj hla ntu
Lub cev txuas lub Rooj Tswjhwm Saib mus rau lub khoos phis tawj hla ntu
Lub cev txuas lub Rooj Tswjhwm Saib mus rau lub khoos phis tawj hla ntu
Lub cev txuas lub Rooj Tswjhwm Saib mus rau lub khoos phis tawj hla ntu

Ua ntej flashing Sonoff ntaus ntawv, koj yuav tsum txuas nws mus rau koj lub computer.

Thaum peb muaj cov kab ntawv txuas lub taub hau, lob:

  • Plaub lub xov tooj cua dupont (FR/DE), xaiv qhov txuas uas koj xav tau rau cov ntawv tshwj xeeb uas koj muaj (Sonoff sab thiab FTDI sab). Hauv kuv qhov no yog txiv neej (Sonoff) - poj niam (FTDI);
  • FTDI rau USB adapter (FR/DE);
  • USB cable haum rau koj lub adapter.

Txuas cov xov hluav taws xob rau Sonoff, txuas cov xov hluav taws xob rau FTDI, txuas FTDI rau USB, txuas USB rau lub khoos phis tawj.

Tom qab tau sim qhov no, Kuv tau txiav txim siab los ua kua nplaum ua ke cov txuas txuas ntawm lub xov tooj. Raws li muaj qhov sib txawv ntawm FTDI sab nruab nrab ntawm av thiab TX/RX/VCC, Kuv tau ntxiv cov yas dupont tus pin yam tsis muaj cable ua tus muab tub lim. Kuv kuj cim GND cable ntawm txhua sab kom tiv thaiv qhov ua yuam kev.

CEEB TOOM 1: Chaw nres nkoj ntawm Sonoff yog 3.3V, xyuas kom tseeb tias koj siv FTDI adapter kom raug thiab/lossis teeb tsa nws qhov hluav taws xob raws li.

CEEB TOOM 2: Tsis txhob txuas AC tib lub sijhawm zoo li FTDI

Kauj Ruam 3: Txhim kho thiab ua kom pom lub Firmware

Tsim thiab Flashing Firmware
Tsim thiab Flashing Firmware
Tsim thiab Flashing Firmware
Tsim thiab Flashing Firmware
Tsim thiab Flashing Firmware
Tsim thiab Flashing Firmware

Npaj

Txhawm rau sau thiab nyem lub firmware koj xav tau:

  • IDE, Kuv tab tom siv Platform IO zoo heev (saib Pib Pib);
  • Firmware cov peev txheej thiab kev vam khom (tau txais los ntawm kuv lub chaw cia khoom).

Kuv tau tsim kuv txoj haujlwm raws li Homie cov qauv kos duab IteadSonoffButton. Kuv tau hloov pauv me me, feem ntau yog cov tshuaj pleev ib ce (lus + logging) thiab IDE (PlatformIO IDE hloov chaw ntawm Arduino IDE).

Sau

Nco ntsoov tias koj tuaj yeem suav sau cov peev txheej. Nws yog qhov tseem ceeb tshwj xeeb kom paub tseeb tias koj siv lub hom phiaj tswj kom raug, rau Sonoff lub cuab yeej koj yuav tsum xaiv "Espressif Generic ESP8266 ESP-01 1M" (esp01_1m hauv platformio.ini).

Thaum muab tso ua ke mus zoo, peb tuaj yeem npaj mus rau qhov ua kom pom tseeb.

Nyem

Sonoff yuav tsis mloog koj zoo li, tshem nws, nias nws lub pob thiab tso nws tom qab koj ntsaws nws rov qab. Nws yuav tsum muaj lub pob nyem ua ntej txhawb nws kom nkag mus rau "hom nyem". Qhov no ua rau tsav GPIO 0 nqis los ntawm kev txuas nws mus rau GND.

Tam sim no uas Sonoff tos rau flashing, xa nws lub firmware.

Nws ciaj sia

Nrog koj zoo siab! Tam sim no koj yog tus tswv zoo siab ntawm hacked Sonoff ntaus ntawv nrog kev cai firmware!

Nco ntsoov nyeem Homie's Pib nplooj ntawv. Koj yuav tsum tau tsom mus rau yuav ua li cas teeb tsa WIFI thiab MQTT tus tswv lag luam, saib tawm Kev teeb tsa - HTTP JSON API (txuas ncaj qha rau mobile app thiab nplooj ntawv web).

Kauj Ruam 4: Kuaj Cov Ntaus

Kuaj Cov Ntaus
Kuaj Cov Ntaus
Kuaj Cov Ntaus
Kuaj Cov Ntaus
Kuaj Cov Ntaus
Kuaj Cov Ntaus

Kho vajtse

Txhawm rau kom ntseeg tau tias nws ua haujlwm:

  1. Tshem txhua yam, koj tsis xav kib Sonoff lossis koj tus kheej;
  2. Txuas tus AC cable mus rau cov khoom siv ntawm lub cuab yeej;
  3. Txuas lub cable rau hauv lub ntsiab.

Thaum qhov no ua tiav, Sonoff yuav tsum khau raj rau hauv "hom qub". Ntawd yog, nws yuav ua nws txoj haujlwm.

Software

Homie device yuav tshaj tawm nws tus kheej rau MQTT broker. Rau qhov no kuv nyiam heev rau:

  1. Siv homie-ota kom pom sai ntawm cov cuab yeej thiab lawv lub peev xwm. Txawm li cas los xij nws lub hom phiaj tseem ceeb los hloov kho OTA;
  2. siv MQTT.fx (Kuv nyob ntawm Windows) txhawm rau hnia cov lus ntawm tus broker. Kuv kuj siv nws los xa lus rau cov khoom siv.

Software: homie-ota

Nov yog sej tsab ntawv pib lub web server. Koj tuaj yeem los ntawm qhov ntawd nkag mus rau hauv lub vev xaib thiab nws yuav yaug cov ntsiab lus rau koj. Nco ntsoov koj nyeem nruab / readme thiab tsim koj tus kheej cov ntawv teeb tsa.

Software: MQTT.fx

Nov yog Windows daim ntawv thov qhia cov ncauj lus sau npe thiab muab lub peev xwm xa xov nrog rau cov khoom ntxiv.

Nws yuav yog ib yam ntawm cov ntawv tso tawm rau txhua yam khoom siv koj ib zaug. Raws li qhov no tuaj yeem hais lus zoo nkauj, koj tuaj yeem txwv ("sau npe") rau cov ncauj lus tshwj xeeb nkaus xwb.

Rau ntau qhov "hacker" cov cuab yeej pov thawj, saib mosquitto_pub thiab mosquitto_sub.

Kauj Ruam 5: Cov Lus Kawg

Lo Lus Kawg
Lo Lus Kawg

Peb tau npog ntau yam kev kawm rau "tsuas yog nyem lub firmware".

Txawm li cas los xij qhov no yog cov ntsiab lus tseem ceeb ntawm hom IoT li hacking. Koj yuav tsum txuas lawv txhua tus ua ke thiab txuas lawv mus rau lub ntiaj teb tiag.

Txij li kuv cov ntawv qhia yav dhau los txog "kev siv tshuab hauv tsev", qhov no yog thawj zaug uas lub ntiaj teb tau txais kev cuam tshuam. Zoo siab heev!

Nco ntsoov saib:

  • Npaj DIY Tsev Automation System
  • Tsim Homie Devices rau IoT lossis Tsev Automation
  • Yuav Ua Li Cas Txuas Homie Nodes rau PiDome Server?

Hmm, zoo li kuv yuav tsum sau PiDome (ntawm Twitter, ntau qhov hloov tshiab tshiab) qhia tam sim no:-)

Pom zoo: