Cov txheej txheem:

Node-RED Nrog IoT Long Range Kev co thiab Kub Sensor: 34 Cov Kauj Ruam
Node-RED Nrog IoT Long Range Kev co thiab Kub Sensor: 34 Cov Kauj Ruam

Video: Node-RED Nrog IoT Long Range Kev co thiab Kub Sensor: 34 Cov Kauj Ruam

Video: Node-RED Nrog IoT Long Range Kev co thiab Kub Sensor: 34 Cov Kauj Ruam
Video: Колыма - родина нашего страха / Kolyma - Birthplace of Our Fear 2024, Kaum ib hlis
Anonim
Node-RED Nrog IoT Ntev Ntau Yam Kev co thiab Kub Sensor
Node-RED Nrog IoT Ntev Ntau Yam Kev co thiab Kub Sensor

Qhia NCD qhov ntev-ntau wireless wireless ntsuas qhov ntsuas cua sov, khav theeb txog li 28 Mile ntau yam siv wireless network networking architecture. Kev koom tes nrog Honeywell HIH9130 qhov ntsuas kub qhov ntsuas qhov ntsuas tau ntsuas qhov ntsuas kub thiab qhov ntsuas tau zoo ntawm cov neeg siv txhais ua ntu zus.

Kauj ruam 1: Kho vajtse thiab Software xav tau

Kho vajtse thiab Software yuav tsum tau
Kho vajtse thiab Software yuav tsum tau
Kho vajtse thiab Software yuav tsum tau
Kho vajtse thiab Software yuav tsum tau

Kho vajtse:

NCD Ntev Ntau Yam Kev co thiab Kub Sensor

NCD Ntev Ntau Yam Wireless Mesh Modem nrog USB Interface

Software:

Node-Liab

Kauj Ruam 2: Teeb Node-liab

Tam sim no koj muaj cov ntsuas ntsuas ua haujlwm, peb xav tau txoj hauv kev los ua qee yam muaj txiaj ntsig nrog cov ntaub ntawv ntawd.

  • Ua ntej tshaj plaws, koj yuav tsum teeb tsa Node-Red.
  • Thaum ua tiav qhov no, koj yuav tsum nkag mus rau koj kab lus hais kom ua, lossis Lub Hwj Chim Lub Hwj Chim rau Windows cov neeg siv, taug kev mus rau cov npe Node-RED tau teeb tsa.
  • Tam sim no ntaus "npm i ncd-red-wireless node-red-dashboard". Qhov no yuav teeb tsa cov node xav tau kom tau txais cov ntaub ntawv los ntawm koj lub wireless sensors thiab koj tuaj yeem pib Node-RED thaum qhov no ua tiav.
  • Txhawm rau pib node server sau node-liab hauv qhov hais kom ua lossis davhlau ya nyob twg thiab nias nkag mus.

Kauj Ruam 3: Cov Kauj Ruam los Tsim Cov Dej

Cov Kauj Ruam Los Tsim Cov Dej
Cov Kauj Ruam Los Tsim Cov Dej

Txog ntawm qhov no koj yuav pom qhov khoob loj nrog cov npe ntev ntawm cov nodes nyob rau sab laug, sab tes no hu ua palette.

Kauj Ruam 4: Mus Ua Ntej thiab Luag Lub Wireless Gateway Node Tshaj rau Koj Cov Canvas Flow kom Pib

Mus Ua Ntej thiab Luag Lub Wireless Gateway Node Tshaj rau Koj Cov Canvas Flow kom Pib
Mus Ua Ntej thiab Luag Lub Wireless Gateway Node Tshaj rau Koj Cov Canvas Flow kom Pib

ncd-liab-wireless Muab cov nodes uas tswj kev sib txuas, txheeb xyuas cov ntaub ntawv khoom xa tuaj, lim nws los ntawm qhov tshwj xeeb, thiab tso cai rau koj teeb tsa lub wireless sensors.

Kauj Ruam 5: Nrhiav Koj Li Wireless Sensors

Nrhiav Koj Cov Wireless Sensors
Nrhiav Koj Cov Wireless Sensors

Thaum koj tau xa cov node koj yuav tuaj yeem pom cov ntaub ntawv tab, uas muaj cov ntaub ntawv hais txog ntawm lub peev xwm muaj peev xwm, lub tab no tau muaj neeg nyob zoo rau qhov siab tshaj plaws ntawm cov pob liab thiab muaj cov txheeb cais muaj txiaj ntsig, feem ntau koj yuav tam sim no tsis xav tau txhawm rau saib lwm cov ntaub ntawv sab nraum ntawm cov ntaub ntawv tab, yog li tuav nws hauv kev xav txawm tias koj tab tom tsim koj cov dej ntws thaum koj muaj lus nug kwv yees li cas ntawm cov node ua haujlwm. Lub ntsiab lus tom ntej peb xav ua yog teeb tsa lub node, thaum koj thawj zaug ntxiv nws koj yuav nco ntsoov tias muaj daim duab peb sab me me nyob rau ntawm kaum sab xis saum toj ntawm lub cim xiav, daim duab peb sab qhia tias lub hauv paus xav tau kev teeb tsa ntxiv, xiav dot qhia tias lub node tsis muaj lawm tab sis tau muab tso ua ib feem ntawm qhov ntws.

  • Nyem ob npaug rau ntawm qhov kom qhib qhov kev xaiv teeb tsa.
  • Nyem rau ntawm tus xaum cim nyob ib sab ntawm Serial Device teb txhawm rau teeb tsa koj lub USB router, qhov no yuav qhib lub rooj teeb tsa thib ob uas tsuas muaj qee qhov kev xaiv.

Kauj Ruam 6: Nyem rau ntawm lub iav tsom iav tom ntej mus rau Serial Port Field thiab Xaiv Chaw Nres Nkoj uas Sib Raug Zoo Nrog Koj Lub Router, Tom qab ntawd nyem rau "Ntxiv" Khawm rau saum

Nyem rau ntawm lub iav tsom iav tom ntej ntawm Serial Port Field thiab Xaiv Qhov Chaw Nkaum uas Sib Xws Nrog Koj Tus Router, Tom qab ntawd Nyem rau "Ntxiv" Khawm rau saum
Nyem rau ntawm lub iav tsom iav tom ntej ntawm Serial Port Field thiab Xaiv Qhov Chaw Nkaum uas Sib Xws Nrog Koj Tus Router, Tom qab ntawd Nyem rau "Ntxiv" Khawm rau saum

Kauj Ruam 7: Cov Khoom Siv Hauv Nroog Tam Sim No Yuav Poob Raws Li Qhov Kev Xaiv, thiab Koj tuaj yeem Nyem "Ua tiav", Tam sim no koj muaj kev nkag ncaj qha rau koj lub Wireless Sensors! los Saib Cov Ntaub Ntawv Los Hauv

Cov Khoom Siv Hauv Zos Tam Sim No Yuav Muaj Cov Neeg Raws Li Qhov Kev Xaiv, thiab Koj tuaj yeem Nyem "Ua tiav", Tam sim no koj muaj kev nkag tau ncaj qha rau koj lub Wireless Sensors! los Saib Cov Ntaub Ntawv Los Hauv
Cov Khoom Siv Hauv Zos Tam Sim No Yuav Muaj Cov Neeg Raws Li Qhov Kev Xaiv, thiab Koj tuaj yeem Nyem "Ua tiav", Tam sim no koj muaj kev nkag tau ncaj qha rau koj lub Wireless Sensors! los Saib Cov Ntaub Ntawv Los Hauv

Kauj Ruam 8: Tam sim no rov qab mus rau koj lub Palette thiab ntaus "debug" rau hauv Chaw Tshawb Nrhiav nyob rau sab saum toj, Lob Ib qho ntawm Cov Nodes no thiab Luag Nws mus rau sab xis ntawm Koj Lub Rooj vag Wireless

Tam sim no rov qab mus rau koj lub Palette thiab ntaus "debug" rau hauv Chaw Tshawb Nrhiav nyob rau sab saum toj, Lob Ib qho ntawm Cov Nodes no thiab Luag Nws mus rau sab xis ntawm Koj Lub Rooj vag Wireless
Tam sim no rov qab mus rau koj lub Palette thiab ntaus "debug" rau hauv Chaw Tshawb Nrhiav nyob rau sab saum toj, Lob Ib qho ntawm Cov Nodes no thiab Luag Nws mus rau sab xis ntawm Koj Lub Rooj vag Wireless

Kauj Ruam 9: Ob Nyem Nyem Rau Nws thiab Hloov "msg." kom "ua tiav Msg Object" Nyem Ua tiav

Nyem ob npaug rau nws thiab Hloov "msg." kom "ua tiav Msg Object" Nyem Ua tiav
Nyem ob npaug rau nws thiab Hloov "msg." kom "ua tiav Msg Object" Nyem Ua tiav

Kauj Ruam 10: Tam sim no Kos Kab Kab Ntawm Ob Lub Nodes, thiab Nyem "Deploy" nyob rau sab saum toj sab xis ntawm lub qhov rais

Tam sim no Kos Kab Kab Ntawm Ob Lub Nodes, thiab Nyem "Deploy" nyob rau sab saum toj sab xis ntawm lub qhov rais
Tam sim no Kos Kab Kab Ntawm Ob Lub Nodes, thiab Nyem "Deploy" nyob rau sab saum toj sab xis ntawm lub qhov rais

Kauj Ruam 11: Ua Haujlwm Nrog Cov Ntaub Ntawv

Ua hauj lwm nrog cov ntaub ntawv
Ua hauj lwm nrog cov ntaub ntawv

Tam sim no tawm ntawm koj cov wireless cov ntaub ntawv tau sib sau thiab nws tau tso tawm rau "debug" tab, qhov no "debug tab" tau muab tso rau hauv sab xis sab tom qab cov ntaub ntawv tab. Txhawm rau pom cov ntaub ntawv muaj nyob rau ntaus lub khawm pib dua. Hauv cov ntaub ntawv-liab cov ntaub ntawv tau dhau ntawm cov nodes hauv pob json. Thaum cov khoom msg tuaj rau hauv qhov debug tab koj tuaj yeem ua rau nws loj dua los saib cov npe tag nrho cov ntaub ntawv uas los nrog nws. Qhov no muaj txiaj ntsig tshwj xeeb hauv qhov xwm txheej koj yuav tsum tau pom sai sai uas cov sensors tau tshuaj xyuas hauv. ntawm lub node thiab cov cuab yeej yuav hloov mus rau lub network teeb tsa, ntaus nws ib zaug ntxiv kom rov qab mus rau hom mloog. Thaum peb tau txais cov cuab yeej wi-fi ntawm cov teeb tsa, lawv yuav raug teeb tsa ib txwm teeb tsa lub teeb tsa thaum nws nkag mus rau hauv kev teeb tsa hom, yog li nws ib txwm muaj los tswj xyuas cov rooj vag ntawm no tam sim no ntawm qhov nrawm rau teeb tsa lub cuab yeej.

Kauj Ruam 12: Ntxiv Cov Wireless Sensors:

Ntxiv Wireless Sensors
Ntxiv Wireless Sensors

Peb yuav tsum tau cais cov ntaub ntawv tsis siv lub tshuab hluav taws xob hauv tsev kom peb muaj peev xwm tso tawm nws, peb tuaj yeem siv qhov hloov pauv los cais tawm cov lus los ntawm lub qhov rooj raws li tag nrho ntawm mac chaw nyob nrog lossis hom sensor, tab sis raws li kuv hais txog, wireless nodes tiag tiag suav nrog kev ua haujlwm ntxiv rau teeb tsa cov cim, yog li peb yuav pib nrog lawv los muab koj cov duab ntxiv ntawm qhov uas cov qauv no tuaj yeem ua haujlwm li cas. Yog tias koj tseem tsis tau pom cov pob ntawv los ntawm ob qho ntawm koj lub ntsuas, hla ua ntej thiab ntaus lub pob pib dua ntawm qhov tsuas yog tsis tau pib. Thaum lub ntsuas ntsuas ntsuas los ntawm ib qho txheej txheem teeb tsa ntawm lub cuab yeej, qhov chaw nyob mac thiab hom kev ntsuas tau kaw rau hauv pas dej ua ke yog li peb tuaj yeem pom sai sai rau lub sijhawm ntawm cov kauj ruam tom ntej no.

Lob Wireless Node los ntawm lub palette thiab rub nws mus rau qhov ntws, ob npaug nias rau nws kom nws teeb tsa

Kauj Ruam 13: Xaiv Cov Khoom Siv Los Ntawm Qhov Tso Tawm Uas Koj Siv Rau Wireless Gateway, Tam sim no Nyem rau lub iav tsom iav tom ntej mus rau "Mac Chaw Nyob" thiab Xaiv Ib qho ntawm Cov Kev Xaiv Muaj

Xaiv Cov Khoom Siv Los Ntawm Qhov Tso Tawm Uas Koj Siv Rau Wireless Gateway, Tam sim no Nyem rau lub iav tsom iav tom ntej rau “Mac Chaw Nyob” thiab Xaiv Ib qho ntawm Cov Kev Xaiv Muaj
Xaiv Cov Khoom Siv Los Ntawm Qhov Tso Tawm Uas Koj Siv Rau Wireless Gateway, Tam sim no Nyem rau lub iav tsom iav tom ntej rau “Mac Chaw Nyob” thiab Xaiv Ib qho ntawm Cov Kev Xaiv Muaj

Kauj ruam 14: Nyem Ua tiav

Nyem Ua tiav
Nyem Ua tiav

Koj yuav pom qhov no cia li teeb tsa lub hom sensor rau koj, koj tseem tuaj yeem muab nws lub npe los ua kom yooj yim txheeb xyuas. Raws li tau sau tseg hauv cov ntaub ntawv tab, Serial Device for Config field yog nyob ntawm yeem, thiab peb yuav tsis txhawj txog nws tam sim no. Lub node koj nyuam qhuav ntxiv ua haujlwm tau zoo raws li lub lim ntawm cov ntaub ntawv sensor nkag, tsuas yog hla cov ntaub ntawv rau mac chaw nyob, lossis hom sensor yog tias tsis muaj mac chaw nyob.

Kauj Ruam 15: Tam sim no rov qab mus rau koj lub Palette thiab ntaus "debug" rau hauv Chaw Tshawb Nrhiav nyob rau sab saum toj, Lob Ib qho ntawm Cov Nodes no thiab Luag Nws mus rau sab xis ntawm Koj Lub Rooj vag Wireless

Tam sim no rov qab mus rau koj lub Palette thiab ntaus "debug" rau hauv Chaw Tshawb Nrhiav nyob rau sab saum toj, Lob Ib qho ntawm Cov Nodes no thiab Luag Nws mus rau sab xis ntawm Koj Lub Rooj vag Wireless
Tam sim no rov qab mus rau koj lub Palette thiab ntaus "debug" rau hauv Chaw Tshawb Nrhiav nyob rau sab saum toj, Lob Ib qho ntawm Cov Nodes no thiab Luag Nws mus rau sab xis ntawm Koj Lub Rooj vag Wireless

Kauj ruam 16: Nyem ob npaug rau nws thiab Nyem Ua Li Cas

Nyem ob npaug rau nws thiab Nyem Ua tiav
Nyem ob npaug rau nws thiab Nyem Ua tiav

Kauj Ruam 17: Tshaj Tawm Txog Kev Raug/Kub

Zam Kev Tshaj Tawm/Kub
Zam Kev Tshaj Tawm/Kub

Cov nodes no rau lub wireless sensor tso tawm cov khoom xav nrog txhua cov ntaub ntawv zoo ib yam li Wireless Gateway node, tsuas yog hauv hom sib txawv me ntsis, Cov Ntaub Ntawv Sensor nws tus kheej tau xa hauv msg.payload, uas yog dab tsi feem ntau cov nodes siv los cuam tshuam nrog nws tus kheej.

Lob tus "faib" ntawm lub palette, thiab tso nws mus rau sab xis ntawm Vib/Temp node

Kauj Ruam 18: Nyem ob npaug thiab khij lub npov nyob hauv Cov Phiaj Xwm uas Hais "Copy Key To", Qhov no yuav faib Msg rau ntau yam khoom, Ib qho rau txhua lub cuab yeej hauv kev them nyiaj, thiab teeb tsa Cov ncauj lus rau Cov Msgs Tshiab rau Cov Khoom Npe

Nyem ob npaug thiab khij lub npov nyob hauv Cov Phiaj Xwm uas Hais "Copy Key To", Qhov no yuav faib Msg rau hauv Ntau Lub Hom Phiaj, Ib qho rau txhua lub cuab yeej hauv kev them nyiaj, thiab teeb cov ntsiab lus rau Cov Msgs Tshiab rau Cov Khoom Npe
Nyem ob npaug thiab khij lub npov nyob hauv Cov Phiaj Xwm uas Hais "Copy Key To", Qhov no yuav faib Msg rau hauv Ntau Lub Hom Phiaj, Ib qho rau txhua lub cuab yeej hauv kev them nyiaj, thiab teeb cov ntsiab lus rau Cov Msgs Tshiab rau Cov Khoom Npe

Kauj Ruam 19: Tam sim no Ntxiv qhov "hloov" Node, Qhov no Yuav Tso Cai Peb Xa Txhua Msg rau Ib Ntus Tshwj Xeeb ntawm Ib Ntus, Ib Tus Kov RMS, thiab Ib Qhov rau Max, ib qho rau Min thiab Ib Qhov Kub

Tam sim no ntxiv qhov "hloov" ntawm, Qhov no Yuav Tso Cai Peb Xa Txhua Msg rau Ib Ntu Tshwj Xeeb ntawm Ntws, Ib Tus Kov RMS, thiab Ib Rau Max, ib qho rau Min thiab Ib Qhov Kub
Tam sim no ntxiv qhov "hloov" ntawm, Qhov no Yuav Tso Cai Peb Xa Txhua Msg rau Ib Ntu Tshwj Xeeb ntawm Ntws, Ib Tus Kov RMS, thiab Ib Rau Max, ib qho rau Min thiab Ib Qhov Kub

Kauj Ruam 20: Hauv Thawj Teb Hloov "them" rau "ncauj lus"

Hauv Thawj Qhov Kev Hloov pauv "them nyiaj" rau "ncauj lus"
Hauv Thawj Qhov Kev Hloov pauv "them nyiaj" rau "ncauj lus"

Nyem rau ntawm "==" thiab xaiv "ntais ntawv regex", hauv daim teb uas nyob ib sab nws hom "rms_.", Qhov no txhais tau tias "phim cov hlua uas muaj rms_ ua raws los ntawm ib tus cim (.) Ntau tus cim raws li muaj ()

Kauj Ruam 21: Nyem rau Ntxiv Button los Ntxiv Kab Tshiab

Nyem rau Ntxiv Button rau Ntxiv Kab Tshiab
Nyem rau Ntxiv Button rau Ntxiv Kab Tshiab

Ua raws cov kauj ruam kawg, hloov "rms" nrog "max", thiab tom qab ntawd ib zaug ntxiv nrog "min" thiab kawg ib kab ntxiv rau hom kub "kub" nyob ib sab ntawm "==". Qhov no yuav faib peb cov khoom xa khoom xa tuaj mus rau 4 ntu kom raug xa mus rau ui, txhua qhov uas muaj qhov tsim nyog rau txhua 3 qag thiab qhov kub thiab txias

Kauj Ruam 22: Tom ntej no Ntxiv "daim duab" Los ntawm Palette rau RMS, Luam Nws Ob Zaug rau MAX thiab MIN thiab Ntxiv Ntxiv "ntsuas" rau Qhov Kub

Tom ntej no Ntxiv Ntxiv "daim duab" Los ntawm Palette rau RMS, Luam Nws Ob zaug rau MAX thiab MIN thiab Ntxiv Ntxiv
Tom ntej no Ntxiv Ntxiv "daim duab" Los ntawm Palette rau RMS, Luam Nws Ob zaug rau MAX thiab MIN thiab Ntxiv Ntxiv

Kauj Ruam 23: Tam sim no Ob Nyem Nyem Rau Thawj Daim Duab Node

Tam sim no Ob Nyem Nyem Rau Thawj Daim Duab Node
Tam sim no Ob Nyem Nyem Rau Thawj Daim Duab Node

teeb Pab Pawg rau "[Tam sim no] Kev co" thiab teeb daim ntawv lo rau RMS raws li qhia hauv daim duab

Kauj Ruam 24: Tam sim no Ob Nyem Nyem Rau Daim Ntawv Teev Npe thib Ob

Tam sim no ob npaug nyem rau ntawm Daim Ntawv Teev Npe thib Ob
Tam sim no ob npaug nyem rau ntawm Daim Ntawv Teev Npe thib Ob

teeb Pab Pawg rau "[Tam sim no] Kev co" thiab teeb daim ntawv lo rau MAX raws li qhia hauv daim duab

Kauj Ruam 25: Tam sim no Ob Nyem Nyem Rau Daim Duab Peb Node

Tam sim no ob npaug nyem rau ntawm Peb Daim Duab Node
Tam sim no ob npaug nyem rau ntawm Peb Daim Duab Node
Tam sim no ob npaug nyem rau ntawm Peb Daim Duab Node
Tam sim no ob npaug nyem rau ntawm Peb Daim Duab Node

teeb Pab Pawg rau "[Tam sim no] Kev co" thiab teeb daim ntawv lo rau MIN raws li qhia hauv daim duab

Kauj Ruam 26: Tom ntej no rau Gauge Node

Tom ntej no rau Gauge Node
Tom ntej no rau Gauge Node

teeb daim ntawv lo rau "Kub", thiab Tus Qauv Hom rau "{{tus nqi | tus lej: 2}}”, thiab Chav Nyob rau“Celsius”koj tuaj yeem hloov kho qhov ntau yam mus rau qhov tsawg kawg thiab qhov siab tshaj qhov xav tau kub, Kuv siv 0 thiab 50

Kauj ruam 27: Tam sim no Kos Cov Xov

Tam sim no Kos Kab
Tam sim no Kos Kab

Kauj Ruam 28: Thaum Ua Li No Nyem Tso Tawm

Thaum Qhov No Ua tiav Nyem Tso
Thaum Qhov No Ua tiav Nyem Tso

Kauj Ruam 29: NODE-RED DASHBOARD

NODE-RED DASHBOARD
NODE-RED DASHBOARD

Muab lub peev xwm los tsim UI siv tus tsim kev ntws, muab kab kos, kab duab, thiab tus lej ntawm lwm yam kev pom uas peb tuaj yeem siv los tso saib cov ntaub ntawv, nrog rau cov nodes kom ua kom muaj dej ntws siv cov neeg siv tswv yim. Peb yuav siv qee qhov ntawm no los tso saib cov xov tooj cua los ntawm koj lub wireless sensors.

cia saib nws tawm! Muaj ib lub tab nyob rau sab xis saum toj uas hais tias "Dashboard"

Kauj ruam 30: Nyob rau sab xis saum toj ntawm lub Tab ntawd yog lub me me "Qhov rai tshiab" Icon, Nyem rau nws kom pom koj li UI

Nyob rau sab xis saum toj ntawm lub Tab ntawd yog lub me me "Qhov rai tshiab" Icon, Nyem rau nws kom pom koj li UI
Nyob rau sab xis saum toj ntawm lub Tab ntawd yog lub me me "Qhov rai tshiab" Icon, Nyem rau nws kom pom koj li UI

Nws yuav zoo li cov ntsuas tsis pom cov ntaub ntawv, vim tias tsis tau tshaj tawm cov ntaub ntawv sensor txij li koj tau xa tawm qhov ntws, nyem lub pob pib dua ntawm koj qhov ntsuas kub/av noo kom yuam nws mus txheeb xyuas thiab koj cov ntsuas yuav tsum dhia. Tam sim no koj yuav tsum muaj cov ntaub ntawv qhia lub sijhawm tiag tiag!

Kauj Ruam 31: NODE-RED DASHBOARD OUTPUT

NODE-RED DASHBOARD OUTPUT
NODE-RED DASHBOARD OUTPUT

Tam sim no raws li tus nqi ntawm kev co thiab kub nce thiab txo cov ntaub ntawv tshiab muaj nyob hauv ntau yam sib txawv.

Pom zoo: