Cov txheej txheem:

Qhov Rooj Tswb Laub thiab Kub Sensor: 6 Kauj Ruam
Qhov Rooj Tswb Laub thiab Kub Sensor: 6 Kauj Ruam

Video: Qhov Rooj Tswb Laub thiab Kub Sensor: 6 Kauj Ruam

Video: Qhov Rooj Tswb Laub thiab Kub Sensor: 6 Kauj Ruam
Video: Koos loos 2024, Kaum ib hlis
Anonim
Qhov Rooj Tswb Laub thiab Kub Sensor
Qhov Rooj Tswb Laub thiab Kub Sensor

Qhov no txhim kho tus txheej txheem nyuaj wired qhov rooj tswb nrog tus qauv esp-12F (esp8266).

Nws teeb tsa hauv chav tswb nws tus kheej kom tsis txhob muaj kev hloov pauv mus rau xov hlau. Nws muab cov haujlwm hauv qab no

  • Tshawb xyuas lub tswb qhov rooj thawb
  • Xa cov ntawv ceeb toom rau xov tooj ntawm IFTTT
  • Khaws qhov rooj tswb ua haujlwm hauv easyIOT server (xaiv tau)
  • Ua lwm yam haujlwm ntawm URL thaum lub tswb nrov lub qhov rooj raug thawb

    Kuv ntes lub snapshot ntawm lub webcam los ntawm lub qhov rooj thiab tuaj yeem pom lub qhov rooj kaw tsis ntev los no hauv kuv lub xov tooj

  • Yeem xaiv qhov ntsuas kub (DS18B20) uas yog ib feem ntawm kuv qhov ntsuas kub hauv tsev

Kauj Ruam 1: Kho vajtse thiab Khoom siv

Kho vajtse thiab khoom siv
Kho vajtse thiab khoom siv
Kho vajtse thiab khoom siv
Kho vajtse thiab khoom siv

Cov ntaub ntawv hauv qab no xav tau

  • ESP-12F (ESP8266) wifi / cpu module
  • DC Buck converter rau 3.3V muab khoom
  • Rectifier diode (piv txwv li 1N4001)
  • Electrolytic capacitor 220uF 35V
  • Electrolytic capacitor 220uF 16V
  • Zener diode 3.3 lossis 2.6V
  • Resistors
  • Daim ntawv ntawm lub rooj tsavxwm
  • Cov txuas yog xav tau
  • DS18B20 digital temp sensor yog xav tau

Schematic qhia txog kev siv Circuit. Nws xav tias lub zog hluav taws xob qis AC siv lub tswb uas yog hom kab uas yooj yim tshaj plaws tswb. Qhov tsev tswb tau txais lub zog los ntawm lub tswb sab nraud hloov pauv ib puag ncig 10V AC. Qhov no tsis yog qhov tseem ceeb nrog qhov kev txwv tsuas yog qhov siab tshaj plaws rau hauv qhov hloov pauv phaw. Qhov kuv siv yog MP2307 raws qhov siab tshaj plaws ntawm 23V dc (~ 16V AC).

Feem ntau muaj 3 lub davhlau ya nyob twg. Nrog lub tswb thawb ua qhov sib txuas los ntawm ib sab ntawm AC muab rau lub tswb solenoid. Tus qauv siv ob lub davhlau ya nyob twg AC los tsim DC lub zog los ntawm kev hloov pauv ib nrab yoj yooj yim. Lub tswb ntsuas pom yog los ntawm kev saib xyuas qhov hluav taws xob hla qhov tseeb solenoid. Qhov no yuav tsis yog hauv av, tab sis thaum lub tswb tau qhib yuav yog AC tag nrho. Tus tiv thaiv / zener diode kaw qhov no yog li 0 - 3.3V 50 Hz mem tes tau pub rau hauv GPIO tus pin. Cov txheej txheem software ua qhov no los muab kev qhib ua haujlwm ib zaug rau tswb nias.

Kuv tsim lub Circuit Court ntawm me ntsis ntawm lub rooj tsav nkoj thiab qhov no me me txaus kom haum tau yooj yim rau hauv chav tswb. Kuv siv cov jumper txuas yooj yim los ua kom yooj yim rau nruab thiab suav nrog tshwj xeeb hauv kab nrog cov khoom siv AC tseem ceeb kom nws tuaj yeem rov pib dua lub zog tau yooj yim yog xav tau.

Cov txheej txheem raws li pom muaj DS18B20 qhov ntsuas kub. Qhov no yog nyob ntawm yeem. Kuv siv nws ua ib feem ntawm lub network saib xyuas feem ntau ntawm kuv lub tsev. Yog tias suav nrog nws yog qhov zoo los txuas lub ntsuas cua nrog ob peb centimeters ntawm kab ntawv kom nws raug cais los ntawm cov cua sov hauv cheeb tsam.

Kauj ruam 2: Software

Lub qhov rooj thawb tsev siv Arduino kos duab muaj nyob ntawm github

Qhov no xav tau hloov kho kom haum rau cov xwm txheej hauv cheeb tsam thiab tom qab ntawv suav ua ib qho esp8266 Arduino ib puag ncig. Cov tsev qiv ntawv hauv qab no xav tau, lawv yog tus qauv lossis tuaj yeem muab ntxiv.

  • ESP8266WiFi
  • WifiClient
  • ESP8266WebServer
  • ESP8266mDNS
  • ESP8266HTTPUpdateServer
  • ArduinoJson
  • WifiClientSecure
  • IFTTTMaker
  • DNSServer
  • WiFiManager (xaiv siv)
  • OneWire
  • DallasTemperature

Cov khoom hauv daim duab yuav raug hloov pauv suav nrog

  • Cov ntsiab lus nkag hauv wifi hauv zos (ssid, password) yog tias tsis siv WifiManager
  • Cov cai tso cai rau nkag mus rau hauv web AP_AUTHID. Nws yog qhov zoo los ua qhov no kom tsim nyog. Nws tuaj yeem muaj cov lej lej.
  • firmware OTA password hloov tshiab_password
  • WifiManager password WM_PASSWORD

    Wifi tuaj yeem teeb tsa tus kheej los ntawm kev tawm tswv yim tawm WM_NAME

  • IFTTT tus yuam sij tsim (saib cov lus ceeb toom)

Yeem hloov pauv suav nrog

  • Hloov pauv tus lej nkag rau lub tswb ntsuas qhov rooj
  • Hloov tus pin rau qhov ntsuas kub
  • Hloov Chaw Nkag Nkag Web los ntawm lub neej ntawd 80

Thaum qhov no ua tiav lawm nws yuav tsum xub muab tso ua ke thiab rub tawm siv cov ntawv xa mus ib txwm. Kev hloov pauv tom ntej tuaj yeem ua tiav los ntawm kev suav sau xa tawm binary hauv Arduino ib puag ncig thiab tom qab ntawd nkag mus rau OTA interface ntawm ip/firmware.

Lub qhov rooj tswb tswb raug kuaj pom hauv software los ntawm kev cuam tshuam cuam tshuam txog qhov nce ntawm thawj qhov mem tes los ntawm lub ntsuas hluav taws xob. Txhua qhov cuam tshuam tom ntej raug tsis quav ntsej. Lub sijhawm siv tau rov qhib lub ntsuas tom qab BELL_MIN_INTERVAL uas tau teeb tsa 10 vib nas this.

Lwm yam dej num yuav nkag tau rau ntawm esp8266 web server

  • ip/tsis ntev los no qhia txog lub tswb qhov rooj tsis ntev los no
  • ip/reloadConfig rov ua dua espConfig
  • ip/tswbPush simulates lub tswb nrov

Kauj ruam 3: Kev teeb tsa

Raws li tsim kho lub software tau txais nws cov teeb tsa los ntawm lub web server hauv zos. Tus qauv thauj cov ntaub ntawv teeb tsa raws nws Mac Chaw Nyob. Qhov no ua rau nws yooj yim heev los khiav ntau tus qauv siv tib lub binary, thiab tseem ua rau nws yooj yim dua los hloov kho qhov teeb meem yam tsis rov ua dua. Nws yuav tuaj yeem hla qhov no thiab muab cov ntaub ntawv teeb tsa ncaj qha rau hauv txoj cai.

Kuv khaws cov ntaub ntawv teeb tsa ntawm kuv tus neeg rau zaub mov EasyIOT uas muaj daim nplaub tshev ntawm easyIOT/html qhov chaw teeb tsa cov ntaub ntawv tuaj yeem khaws tau yooj yim.

Cov ntaub ntawv hu ua espConfig thiab yog cov ntawv yooj yooj yim khaws ntau tus lej (12) rau txhua qhov chaw nyob Mac. Ib qho qauv tsuas yog thauj cov kev teeb tsa rau nws qhov chaw nyob Mac.

Piv txwv los ntawm cov ntaub ntawv yog

#Hlub

#Mac chaw nyob 123456ABCDEF

#module npe

esp8266-chav

#server hom daim npog ntsej muag (1 = kev nkag siab temp, 4 = boilermode, 4 = doorbell)

9

#EIOT ntawm qhov ntsuas kub

N9S0

#tsis siv

-1

# qhov kub thiab txias tsawg kawg hauv vib nas this

60

#muaj qhov kub thiab txias nyob hauv vib nas this

300

#lub zog hluav taws xob ncua sijhawm

0

#EasyIOT boiler zog ntawm

-1

#EasyIOT tswb tswb nias

N10S0

# IFTTT ceeb toom tus nqi

pem hauv ntej

#IFTTT ceeb toom lub npe txheej xwm

tswb qhov rooj

#kev ua haujlwm URL

192.168.0.2/snap.php

Txhua kab pib nrog # tsis quav ntsej. Txhua kab yuav tsum muaj tam sim no. -1 yog siv rau qhov ntsuas kom tsis quav ntsej.

Cov ntaub ntawv teeb tsa tau nyeem thaum tus qauv pib ua ntej. Nws kuj tseem yuav rov muab tso rau hauv cov kab ke ua haujlwm (thaum teeb tsa tau hloov pauv) los ntawm kev nkag mus rau ip/reloadConfig

Hom boiler ib feem ntawm kev teeb tsa tsis muaj feem cuam tshuam ntawm no tab sis siv hauv kuv qhov ntsuas cua sov txuas rau hauv nruab nrab cov cua sov tso tawm cov yeeb nkab raws li nws pom thaum lub rhaub dej kub thiab tuaj yeem suav qhov nruab nrab siv hluav taws xob.

Kauj ruam 4: Cov ntawv ceeb toom

Thaum lub qhov rooj tsoo lub tswb raug kuaj pom ces nws sim ceeb toom qhov no los ntawm IFTTT lossis PushOver. Kuv tam sim no PushOver raws li nws muab kev teb sai dua.

Txog IFTTT koj xav tau tus as khauj thiab qhib Maker WebHoooks channel. MakerKey los ntawm cov channel no yuav tsum tau suav ua tus lej.

Teeb tsa qhov kev nqis tes ua IF siv Maker WebHooks thiab siv cov xwm txheej lub npe zoo ib yam li hauv kev teeb tsa (piv txwv li lub qhov rooj). THEN qhov kev ua yuav tsum yog IFTTT ceeb toom. Koj tuaj yeem ntxiv tus nqi 1 rau kev ceeb toom uas yuav nyob hauv cov ntawv teeb tsa. Qhov no tuaj yeem muaj txiaj ntsig yog tias koj muaj 2 lossis ntau lub ntsuas.

Koj yuav tsum tau teeb tsa IFTTT app ntawm koj lub xov tooj thiab tom qab ntawv ceeb toom yuav tshwm sim thaum twg lub tswb qhov rooj tau tshwm sim.

Rau PushOver koj xav tau PushOver tus account thiab ua raws cov lus qhia kom tau txais API ceeb toom. Koj yuav tsum teeb tsa NOTIFICATION_APP thiab NOTIFICATION_USER tokens hauv software nrog tus nqi los ntawm koj tus lej PushOver.

Koj yuav tsum teeb tsa PushOver App ntawm koj lub xov tooj thiab them tus nqi qis ib yam kom tau txais cov ntawv ceeb toom. Qhov no tsim nyog nws hauv kuv qhov kev xav kom tau txais cov lus teb sai dua.

Kauj Ruam 5: Kev koom ua ke EasyIOT

Lub software tuaj yeem xa qhov ntsuas kub thiab lub qhov rooj thawb ceeb toom qhia rau EasyIOT server. EasyIOT kev siv lub tshuab tuaj yeem siv los nqis tes ua ntxiv raws li cov ntawv ceeb toom no.

Teeb tsa EasyIOT server (piv txwv li ntawm Raspberry Pi). Kho tus IP chaw nyob thiab tus username password rau hauv esp8266 software thiab suav sau.

Tam sim no ntxiv tus tsav tsheb Virtual hauv EASYIOT teeb tsa. Xaiv Qhov Kub Tshaj Tawm Analog thiab ceeb toom lub npe EasyIOT. Qhov no yuav tsum tau muab tso rau qhov ntsuas kub lub npe ib feem ntawm espConfig cov ntaub ntawv.

Ntxiv tus tsav tsheb thib ob virtual. Xaiv Qhov Rooj digital cov tswv yim, nco lub npe ntawm lub npe thiab muab tso rau hauv espConfig file.

Kauj Ruam 6: Lwm Yam Tswb Tswb Ua

Lub software muaj qhov niaj hnub hu ua actionBellOn. Raws li sau qhov no tuaj yeem ua 3 yam

  • IFTTT ceeb toom
  • EasyIOT qhia
  • Ua qhov kev txiav txim URL

Qhov URL tuaj yeem siv los ua lwm yam haujlwm los ntawm lwm lub vev xaib. Qhov URL siv yog hauv cov ntawv espConfig.

Yog tias tus neeg rau zaub mov ntawm URL raug lees paub ces tus username thiab password yuav tsum tau teeb tsa thiab muab tso ua ke rau hauv tus lej.

Kuv siv qhov no txhawm rau nkag mus rau qhov URL hu ua snap.php ntawm lub koob yees duab nyob ib sab ntawm lub qhov rooj. Qhov no yuav siv-j.webp

Kuv siv raspberry Pi raws lub koob yees duab uas txiv neej ua haujlwm no yooj yim heev. lub koob yees duab

Pom zoo: