Cov txheej txheem:

Huab Cua Ceeb Toom Teeb Pom Kev: 6 Kauj Ruam
Huab Cua Ceeb Toom Teeb Pom Kev: 6 Kauj Ruam

Video: Huab Cua Ceeb Toom Teeb Pom Kev: 6 Kauj Ruam

Video: Huab Cua Ceeb Toom Teeb Pom Kev: 6 Kauj Ruam
Video: Tseem Ev Lub Kawm - Koos Loos 2024, Hlis ntuj nqeg
Anonim
Huab Cua Ceeb Toom Teeb System
Huab Cua Ceeb Toom Teeb System
Huab Cua Ceeb Toom Teeb System
Huab Cua Ceeb Toom Teeb System
Huab Cua Ceeb Toom Teeb System
Huab Cua Ceeb Toom Teeb System

Kev ceeb toom huab cua teeb pom kev zoo hloov pauv teeb pom kev ceeb toom huab cua sib txawv lossis saib. Cov kab ke no siv cov ntaub ntawv huab cua nkag tau dawb kom hloov pauv teeb pom kev zoo los qhia txog huab cua. Raspberry pi (ntawm qhov liab-liab) tshuaj xyuas cov ntaub ntawv huab cua tsis tu ncua thiab tig lub teeb liab thaum muaj huab cua hnyav (ceeb toom), lub teeb daj los qhia txog huab cua txaus ntshai (saib), daus daus rau lub caij los daus, thiab teeb ib txwm los qhia lub ntuj ntshiab.

Khoom siv

1- Raspberry pi - 3 lossis ntau dua - yuav tsum muaj GPIO pins

2 - Txheem qhov hluav taws xob

1 - 4 pab pawg hluav taws xob lub thawv

1 - Lub ntsej muag phaj rau lub thawv hluav taws xob

4-Solid State Relays (SSR-25DA Solid State Relay Ib Qho Ib Nrab Tus Kheej Tus Kheej Tus Kheej Txuas 3-32V DC Tso Tawm 24-380V AC)

Heavy gauge hlau rau 110V daim ntawv thov.

5 - Dhia xov hlau txuas mus rau raspberry pi pins.

4 teeb ntawm cov style sib txawv lossis xim.

Kauj Ruam 1: Nruab thiab teeb Raspberry Pi

Nruab thiab teeb Raspberry Pi
Nruab thiab teeb Raspberry Pi

Teem koj li raspberry pi los ntawm kev teeb tsa pob noobs thiab raspbian kev ua haujlwm

www.raspberrypi.org/downloads/noobs/

Ua raws cov lus qhia kom tau txais OS teeb tsa los npaj rau qib tom ntej.

Kauj Ruam 2: Nruab Nodejs thiab Node Red ntawm Pi

Node liab muaj cov lus qhia zoo rau teeb tsa node-liab ntawm koj raspberry pi.

nodered.org/docs/getting-started/raspberry…

Koj yuav xav khiav cov lus txib kom muaj qhov program pib thauj khoom ntawm khau raj. Muaj qee qhov qauv piv txwv rau qhov program liab-liab nyob rau theem tom ntej.

NCO TSEG: Node-liab yog tus thawj coj siv los txhuam txhua daim ua ke. Node-red yog lub platform phiaj xwm uas nug cov ntaub ntawv hauv online. Node-liab tig ntawm GPIO tus pin ntawm tus pi kom lub hwj chim hluav taws xob ntsaws uas tig peb lub teeb rau thiab tua. Node-liab ntws tswj txhua txoj haujlwm xav tau.

Kauj Ruam 3: Tshaj Tawm Cov Hluav Taws Xob Hluav Taws Xob thiab Cov Hluav Taws Xob

Txhim Kho Cov Hluav Taws Xob Hluav Taws Xob thiab Cov Hluav Taws Xob
Txhim Kho Cov Hluav Taws Xob Hluav Taws Xob thiab Cov Hluav Taws Xob
Txhim Kho Cov Hluav Taws Xob Hluav Taws Xob thiab Cov Hluav Taws Xob
Txhim Kho Cov Hluav Taws Xob Hluav Taws Xob thiab Cov Hluav Taws Xob
Txhim Kho Cov Hluav Taws Xob Hluav Taws Xob thiab Cov Hluav Taws Xob
Txhim Kho Cov Hluav Taws Xob Hluav Taws Xob thiab Cov Hluav Taws Xob

Raspberry pi ua rau xa rov qab tso cai rau hluav taws xob ntws mus rau ib ntawm 4 qhov hluav taws xob. Pib los ntawm kev ceeb toom qhov qis hluav taws xob thiab qhov hluav taws xob siab ntawm qhov txuas. (Nco tseg: Koj tuaj yeem siv lwm hom kev xa tawm, tab sis kuv nyiam lub xeev cov khoom sib txuas.)

Cov hluav taws xob siab dhau los ntawm txhua qhov kev xa tawm thiab mus rau ib sab ntawm txhua 4 plugs.

Ntawm qhov qis hluav taws xob sab ntawm txhua qhov xa tawm khiav ib lub xaim mus rau raspberry pi tus pin. Khiav ib txoj xov hlau hauv av los ntawm sab hauv av ntawm qhov qis hluav taws xob ib feem ntawm kev xa mus rau hauv av ntawm raspberry pi.

YUAV TSUM MUAJ KEV RUAJ NTSEG KEV NYUAJ SIAB. Khaws lub thawv thaiv tsis tau ntsaws kom txog thaum txhua txoj kab muaj kev nyab xeeb sab hauv thiab tsuas yog tom qab ntawd ntsaws rau hauv lub teeb ceeb toom.

Kauj Ruam 4: Ua Haujlwm Pi Nrog Rode-liab

Program Pi nrog Rode-liab
Program Pi nrog Rode-liab
Program Pi nrog Rode-liab
Program Pi nrog Rode-liab
Program Pi nrog Rode-liab
Program Pi nrog Rode-liab
Program Pi nrog Rode-liab
Program Pi nrog Rode-liab

Qhov no yuav yog qhov nyuaj tshaj plaws / tseem yog qhov txaus siab tshaj plaws.

Cov txheej txheem logic yog raws li hauv qab no.

  1. Teem lub ntsuas kom khiav cov dej ntws txhua 5 feeb.
  2. Nug lub vev xaib cov ntaub ntawv thiab xa cov lus xa mus rau kauj ruam tom ntej.
  3. Parse los ntawm cov lus (javascript) thiab txiav txim siab yog tias muaj lus ceeb toom, saib, lossis daus tam sim no.
  4. Teeb GPIO tus pin kom siab (rau) rau cov lus qhia huab cua tsim nyog teeb tsa GPIO tus pin kom qis (tawm) rau teeb uas yuav tsum tau muab tua.

Txuas nrog yog qee qhov qauv piv txwv (ntws.txt) uas koj tuaj yeem nkag mus rau ntawm qhov liab. Qee qhov kev hloov pauv rau cov dej ntws yuav tsum tau ua, suav nrog xaiv cov ntaub ntawv hauv lub xeev tsim nyog thiab nkag mus rau lub nroog lub npe xav tau. (Thov txim kuv tsis muaj tus lej txhawb nqa qhov chaw tsis yog Asmeskas.)

Nrhiav huab cua ceeb toom ntawm https://alerts.weather.gov/ rau koj lub xeev, thiab nkag mus rau qhov url rau rss pub ntawm koj lub xeev.

Cov dej ntws uas txheeb xyuas qhov daus yog ib feem ntawm daim ntawv qhia huab cua qhib. https://openweathermap.org/ Txhawm rau nug cov ntaub ntawv, koj yuav tsum tau thov rau tus lej API. (https://openweathermap.org/api)

Openweathermap thiab NWS ceeb toom tau siv dawb.

Rau kev ua haujlwm hauv node-liab cov lus hauv paus yog javascript. Cov ntaub ntawv nyob ntawm no. https://nodered.org/ Cov txheej txheem ntws raws li txhais tau tias koj tsis tas yuav yog tus tswv javascript kom siv tau cov node-liab.

Qhib tus node-red flow editor siv qhov browser ntawm koj tus pi ntawm https://127.0.0.1:1880 Tus kws kho qhov dej ntws muaj tus yam ntxwv ntshuam los thauj tus qauv piv txwv.

Cov kab ntawv txuas nrog cov ntsiab lus rau cov GPIO hauv qab no. Nws siv 35-38, thiab cov av nyob ib sab ntawm lawv. Koj tuaj yeem pom qhov no hauv cov duab thaiv. Tus Pin 36 yog qib ceeb toom Kuv muaj lub teeb liab ntsaws rau ntawd. Tus Pin 35 yog saib qib, thiab kuv muaj lub teeb txiv kab ntxwv ntsaws rau ntawd. Tus Pin 38 yog tus taw qhia daus, thiab Tus Pin 37 yog txhua qhov chaw tso tawm kom pom tseeb. Yog tias koj siv tus lej sib txawv, koj yuav tsum hloov kho qhov liab ntws los hloov cov ntawd.

Kauj Ruam 5: Teeb Teeb Rau Hauv Qhov System thiab Kuaj

Plug Teeb rau Hauv Qhov System thiab Kuaj
Plug Teeb rau Hauv Qhov System thiab Kuaj
Plug Teeb Rau Hauv Qhov System thiab Kuaj
Plug Teeb Rau Hauv Qhov System thiab Kuaj
Plug Teeb Rau Hauv Qhov System thiab Kuaj
Plug Teeb Rau Hauv Qhov System thiab Kuaj

Yuav luag muaj. Muaj kev lom zem nrhiav teeb uas yuav pab teeb tsa lub suab ceeb toom thiab ceeb toom. Kuv pom qee qhov lom zem Christmas teeb qub, thiab lub teeb liab liab txawv ntawm lub khw muag khoom. Kuv muab lub teeb txiv kab ntxwv tso rau hauv lub teeb qub.

Kuv yuav tsum tau kho me ntsis ntawm kuv tus GPIO pins vim tias kuv ua rau lawv teeb pom kev tsis raug, tab sis hloov tus pin ntawm tus pi tau yooj yim los kho kuv qhov ua yuam kev.

Lub node liab ntws lub zog txhua lub ntsaws thaum pib ua ntej, yog li koj tuaj yeem qhia tau yog tias txoj hlua txuas raug yog tsis muaj cua daj cua dub.

Kauj Ruam 6: Lwm Yam Siv Rau Lub Teeb Pom Kev Ceeb Toom

Lub teeb ceeb toom system yog kev lom zem rau cov ntaub ntawv huab cua, tab sis muaj ntau qhov chaw koj yuav txiav txim siab siv qhov twg koj yuav nyiam ceeb toom. Cov ntaub ntawv av qeeg, cov ntaub ntawv tsheb, cov ntaub ntawv NASA, cov ntaub ntawv xwm txheej txheej txheem, yog qee qhov piv txwv ua tau. Node-red ua haujlwm tau zoo ntawm kev nug cov ntaub ntawv muaj nyob hauv lub vev xaib thiab ncaws tawm qhov kev cuam tshuam rau qhov nws pom. Ntawm kuv txoj haujlwm kuv muaj cov kab ke taw qhia rau peb cov txheej txheem tshuaj xyuas API, yog li kuv paub thaum lub kaw lus tseem ceeb muaj teeb meem.

Leverageing koj muaj tswv yim thiab cov ntaub ntawv web muaj ntau txoj hauv kev nthuav dav ntawm lub tswv yim no.

Muaj kev lom zem!

Pom zoo: