Cov txheej txheem:
- Khoom siv
- Kauj ruam 1: Format SD Card
- Kauj ruam 2: Download Operating System
- Kauj Ruam 3: Sau Cov Duab Duab rau MicroSD Card
- Kauj Ruam 4: Tsim Cov Hluav Taws Xob Hluav Taws Xob, Txuas Cov Hluav Taws Xob, thiab Fais Fab
- Kauj Ruam 5: Hloov Tus password, teeb tsa Wifi, Pab kom SSH, thiab Khiav Tshiab
- Kauj Ruam 6: Tsim Twilio Tus Kheej, Nruab Tsev Qiv Ntawv, Luam Cai Los Ntawm Github, thiab Xa Ntawv Xeem Ntawv
- Kauj Ruam 7: Hloov Kho Notifier.py & Crontab thiab Ua tiav Kev Txhim Kho
Video: Leak Detector With Text Message Notification: 7 Cov kauj ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:25
Phau ntawv qhia no qhia yuav ua li cas thiaj tsim tau lub tshuab nqus dej uas xa cov ntawv ceeb toom. Nws xa ntawv ceeb toom yog tias cov dej los ntawm cov yeeb nkab tawg lossis thim rov qab lub qhov dej tau hnov. Phau ntawv qhia no yog npaj rau txhua tus neeg xav paub txog Python 3, Raspberry Pi, Ruaj Ntseg Plhaub (SSH), Plhaub, crontab, kab hais kom ua, linux, thiab qhib qhov haujlwm ntsig txog cov haujlwm. Cov ntawv ceeb toom kev pabcuam (Twilio) ua haujlwm hauv Tebchaws Meskas. Nws yuav lossis tsis ua haujlwm hauv lwm lub tebchaws. Windows tau siv txawm tias Linux thiab Mac yuav tsum ua haujlwm ib yam nkaus.
Khoom siv
Raspberry Pi Zero WCase: Zebra Zero rau Raspberry Pi Zero3 Ib Micro USB Lub Hwj Huam Muaj 16 GB MicroSD Card nrog Adapter HDMI rau HDMI Cable Txiv neej Micro USB rau Poj Niam USBUSB Keyboard (feem ntau cov qauv yuav ua haujlwm, trackpad tsis tsim nyog) Lub ntsuas hluav taws xob ntsuas lub ntsuas hluav taws xob thiab ua ib qho kev daws teeb meem Saib xyuas nrog HDMI cov tswv yim
Kauj ruam 1: Format SD Card
Nruab SD Daim Npav Daim Npav Daim Npav Sau MicroSD Daim Npav thiab lub adapter rau hauv computer Txheeb xyuas daim npav raug yog xaiv (D: ntawm no) Hom Ntawv Yog OK Kaw
Kauj ruam 2: Download Operating System
Mus rau Raspbian Downloads PageDownload Raspbian Buster Lite ZIPUnzip cov ntaub ntawv
Kauj Ruam 3: Sau Cov Duab Duab rau MicroSD Card
Rub tawm Win32 Disk Imager (rub tawm pib tau) Khiav lub.exe rau nruab Nyem "Kuv lees txais kev pom zoo" Tom ntej Tom ntej Tom ntej Tom ntej Nruab uncheck Saib README.txt Ua tiav Win32 Disk Imager yuav tsum qhib Nyem rau lub cim xiav thiab mus rau qhov tshiab.img fileConfirm qhov tseeb Ntaus (D: ntawm no) Nyem Sau Yog. Qhov no yuav siv sijhawm ob peb feeb Kev nyab xeeb tshem daim npav SD Tshem tawm micro SD daim npav los ntawm SD daim npav adapter Tso micro SD daim npav rau hauv Raspberry Pi
Kauj Ruam 4: Tsim Cov Hluav Taws Xob Hluav Taws Xob, Txuas Cov Hluav Taws Xob, thiab Fais Fab
Tsim cov kab hluav taws xob ib daim duab Qhia kev sib txuas nrog cov cua sov ntsws thiab/lossis kab xev hluav taws xob Txuas cov xov hluav taws xob txuas mus rau Raspberry Pi ib daim duab pinout Txuas HDMI cable los saib xyuas thiab Raspberry PiConnect USB adapter thiab keyboard mus rau qhov chaw nruab nrab ntawm Raspberry PiConnect 5 v los ntawm lub zog xa hluav taws xob mus rau lub zog, xyuas kom lub zog txuas nrog lub chaw nres nkoj ntawm kaum ntawm Raspberry Pi thiab tsis yog qhov chaw nres nkoj nruab nrab.
Kauj Ruam 5: Hloov Tus password, teeb tsa Wifi, Pab kom SSH, thiab Khiav Tshiab
Ntawm 'raspberrypi ID nkag mus:' nkag mus
pi pib
Ntawm 'Password:' nkag mus
raspberry
Tus lej zais no tsis yog kev nyab xeeb yog li tom ntej hloov nws mus rau lwm yam
sudo raspi-teeb tsa
Nyem Sau rau '1 Hloov Tus Neeg Siv Tus Kheej'
Nyem Sau dua
Ntaus tus password tshiab ob zaug
Nyem sau / OK
Txhawm rau teeb tsa lub wifi, nyem qhov xub mus rau 2 Network Options Nkag mus rau tus xub nkag mus rau N2 Wi-fi xaiv lub tebchaws (nqis mus rau Asmeskas yog tias nyob hauv Tebchaws Meskas) Sau Ntaus Hom SSID Nkag mus rau hom kab lus nkag
Txhawm rau kom muaj Kev Ruaj Ntseg Ruaj Ntseg (SSH) uas yuav siv los nkag rau Raspberry Pi los ntawm lub khoos phis tawj Windows 5 Kev cuam tshuam kev xaiv Nkag mus rau P2 SSH Sab laug xub yuam sij Nkag Tau Yog Nkag Mus
Txhawm rau hloov cov keyboard rau Asmeskas hom 4 Kev Xaiv Hauv Zos I3 Hloov Keyboard Layout Generic 105-qhov tseem ceeb PC (intl.) Nkag Rau Lwm Yam Lus Askiv (Asmeskas) Sau Lus Askiv (Asmeskas) Nkag Mus Nkag Mus Rau Txoj Cai xub ob zaug Sau kom tiav ntawm kab hais kom ua tam sim no tuav Ua haujlwm thiab nias tus lej 2 koj yuav tsum pom tus cim @ tam sim no. Yog tias koj pom cim, cov keyboard tseem tau teeb tsa rau tebchaws Askiv.
Txhawm rau txheeb xyuas yog tias wifi tam sim no ua haujlwm, rho tawm tus cim @ thiab ntaus:
ifconfig
Hauv nruab nrab ntawm qhov tso tawm, saib rau qee yam uas qhia "wlan0:" thiab ntawm kab tom ntej "inet 192.168.86. XX" (koj tus IP chaw nyob sab hauv yuav muaj tus lej tshwj xeeb rau ntu XX). Nco tseg ntawm tus IP chaw nyob no rau siv hauv cov kauj ruam tom ntej.
Khiav tshiab (qhov no yuav siv ob peb feeb):
sudo apt-tau hloov tshiab && sudo apt-tau upgrade -y
Kauj Ruam 6: Tsim Twilio Tus Kheej, Nruab Tsev Qiv Ntawv, Luam Cai Los Ntawm Github, thiab Xa Ntawv Xeem Ntawv
Sau npe tus account ntawm https://www.twilio.com (lawv tsis yog tus txhawb nqa!)
Tsim txoj haujlwm tshiab (qhov haujlwm piv txwv no hu ua Lima Alpha).
Yuav ib tus lej uas yuav siv los xa ntawv xa xov thaum pom dej. Yuav tsum tau daim npav rho nyiaj txawm hais tias tus nqi tsawg heev ($ 1.00 rau tus lej xov tooj thiab nyiaj npib rau kev siv).
Nco tseg ACCOUNT SID & AUTH TOKEN.
Rub tawm thiab teeb tsa PuTTY los ntawm
Hauv PuTTY, hloov "Host Name (lossis IP address)" mus rau IP chaw nyob los ntawm cov kauj ruam kawg Nkag mus rau qhov kev piav qhia hauv "Saved Sessons" lub thawv Txuag Qhib Yog lawm lo lus zais tam sim no koj muaj kab hais kom ua nkag los ntawm koj lub computer loj yog li koj tuaj yeem txuas lub HDMI cable mus rau Raspberry Pi. Qhov zoo nyob ntawm no yog tias cov lus txib hauv qab no tuaj yeem theej thiab muab tso rau hauv PuTTY. Cias theej cov cai rau koj lub Windows ntawv xov xwm thiab nyem rau hauv PuTTY kom muab tshuaj txhuam.
Nruab pip kom lub tsev qiv ntawv Twilio tuaj yeem teeb tsa, luam qhov no rau hauv koj daim ntawv teev cia thiab nyem rau hauv PuTTY kom muab tshuaj txhuam
sudo apt-tau nruab python3-pip -y
Nruab Twilio lub tsev qiv ntawv
sudo pip3 nruab twilio
Nruab RPI. GPIO lub tsev qiv ntawv
sudo apt -tau nruab rpi.gpio -y
Txhawm rau luam cov cai los ntawm Github rau raspberry pi, thawj zaug teeb tsa lub tsev qiv ntawv git
sudo apt -tau nruab git -y
Luam cov npe/ntawv tais ceev tseg los ntawm git
git clone
Hloov cov npe los ntawm kev ntaus qhov no
cd Le (tom qab ntaus lub Tab qhov tseem ceeb uas yuav tsum tau sau tawm tag nrho cov npe npe):
Muaj qee tus lej thiab tus lej xov tooj uas yuav tsum tau kho los ntawm
sudo nano test.py
Hloov 'ADD_YOUR_SID_HERE' & 'ADD_YOUR_TOKEN_HERE' mus rau qhov muaj txiaj ntsig los ntawm koj tus lej Twilio
Hloov ob tus lej xov tooj thaum tawm ntawm cov cim cim ib leeg.
Txhawm rau txuag tsab ntawv nab nab no, tuav tswj nias tsab ntawv O Enter
Tom qab ntawd kom tawm mus, tuav tswj tuav tsab ntawv X.
Khiav cov ntawv xeem:
sudo python3 test.py
Yog tias txhua yam ua haujlwm raug, koj yuav tsum tau txais ntawv xov xwm los ntawm koj tus lej Twilio tshiab.
Yog tias koj tsis tau txais xov, txheeb xyuas ACCOUNT SID yog tias koj tau txais "/yuam kev/20404" tus lej hauv qab ntawm cov lus yuam kev. Kev ua yuam kev feem ntau muab tus lej kab rau kev daws teeb meem. Hauv nano, koj tuaj yeem tig kab lej los ntawm kev tuav Alt, tuav ua haujlwm, thiab nias 3 tus yuam sij.
Kauj Ruam 7: Hloov Kho Notifier.py & Crontab thiab Ua tiav Kev Txhim Kho
Ib yam li ua ntej, hloov kho plaub qhov txiaj ntsig hauv tsab ntawv no
sudo nano ceeb toom.py
Xeem tsab ntawv
sudo python3 ceeb toom.py
Koj yuav tsum pom "xwm txheej = 0" txhua thib ob. Tam sim no kov ob qhov kev sib cuag ntawm lub sensor kom ua kom pom qhov xau.
Koj yuav tsum pom "xwm txheej = 1" thiab tau txais cov ntawv xov xwm.
Txhawm rau cais qhov no los ntawm cov ntawv ib txwm muaj, thiab yog tias koj muaj iPhone, tsim kev sib cuag rau koj tus lej tshiab Kho Cov Ntawv Tone nqes mus rau hauv qab heev Classic Tswb.
Txhawm rau khiav kom muaj Raspberry Pi khiav cov ntawv sau cia ntawm khau raj, piv txwv li tom qab lub zog tsis ua haujlwm
sudo crontab -e
1 Nkag mus. Qhov no xaiv nano raws li koj cov ntawv sau hloov mus rau hauv qab ntawm cov ntawv ntxiv qhov no
@reboot sh /home/pi/Leak-Detector-with-Text-Message-Notification/launcher.sh>/tsev/pi/cav/cronlog 2> & 1
Txuag thiab kaw.
Tom qab ntawd reboot los ntawm kev ntaus ntawv
sudo reboot -h tam sim no
Tos li 30 vib nas this ces kov ob tus neeg sib tham kom sim dua. Yog tias nws tsis ua haujlwm, teeb meem los ntawm kev saib lub cav nrog
sudo nano cav/cronlog
Kaw Rapsberry Pi
sudo kaw -h tam sim no
Thaum kawg teeb tsa lub khoos phis tawj qee qhov chaw uas nws yuav tsis ntub. Kuv siv qee txoj hlua txuas los txuas nws mus rau cov yeeb nkab thiab tso lub sensor rau hauv av. Kuaj ib zaug ntxiv. Hnov cov xov hlau thiab cov tiv thaiv tom qab ob peb feeb kom paub tseeb tias lawv tsis kub ntau. Nrog koj zoo siab! Tam sim no koj ua tiav!
Pom zoo:
IoT RPi LED Message Board: 3 Cov Kauj Ruam (nrog Duab)
IoT RPi LED Message Board: Hauv Cov Lus Qhia no, Kuv tau ua wifi-txuas LED cov lus xov tooj siv Raspberry Pi (RPi). Cov neeg siv yuav txuas rau Raspberry Pi lub vev xaib siv lawv cov browser kom xa cov lus luv uas yuav tshwm rau ntawm 8x8 LED zaub. Txij li thaum interfa
QHOV TSEEB CAMERA HOUSING LEAK DETECTOR: 7 Kauj Ruam (nrog Duab)
Txhim Kho Lub Koob Yees Duab Nyob Hauv Qhov Chaw Xau DETECTOR: Ib qho ua ntej ntawm lub koob yees duab hauv qab lub tsev ntsuas lub tsev xau tau tshaj tawm ntawm Cov Lus Qhia xyoo tas los uas tsim raws li Atmel AVR raws AdaFruit Trinket. Qhov kev txhim kho no ua haujlwm ntawm Atmel SAMD M0 raws li AdaFruit Trinket. Qhov re
IOT Smoke Detector: Hloov Kho Cov Hluav Taws Xob Uas Muaj Cov IOT: 6 Cov Kauj Ruam (nrog Duab)
IOT Cov Ntsuas Hluav Taws Xob: Hloov Kho Cov Hluav Taws Xob Uas Muaj Cov IOT: Cov npe ntawm cov koom nrog, Tus tsim tawm: Tan Siew Chin, Tan Yit Peng, Tan Wee Heng Tus Thawj Saib Xyuas: Dr Chia Kim Seng Department of Mechatronic thiab Robotic Engineering, Kws qhia ntawv ntawm Hluav Taws Xob thiab Hluav Taws Xob, Universiti Tun Hussein Onn Malaysia Kev faib tawm
ESP8266/ESP-01 Arduino Powered SmartThings Leak Detector: 5 Cov Kauj Ruam (nrog Duab)
ESP8266/ESP-01 Arduino Powered SmartThings Leak Detector: Sooooo Muaj ntau lub tshuab xau los xaiv los ntawm, qhov twg yuav ua haujlwm zoo tshaj rau koj? Yog tias koj muaj Samsung SmartThings tswj hwm ib qho khoom siv hauv koj lub tsev, tom qab ntawv qhov no tsuas yog daim pib
ESP8266/ESP-01 Arduino Powered Leak Detector: 3 Cov Kauj Ruam (nrog Duab)
ESP8266/ESP-01 Arduino Powered Leak Detector: Dej yog cov khoom zoo heev? Tsis ntau npaum li cas thaum nws raug yuam kom tawm hauv nws lub tsev thiab pib ua luam dej nyob ib puag ncig koj lub tsev hauv av. Kuv paub qhov no yog qhov 'tom qab-qhov tseeb' txoj haujlwm, tab sis kuv vam tias nws tuaj yeem pab lwm tus kom tsis txhob muaj peev xwm