Cov txheej txheem:

Raspberry Pi - Chaw Ua Haujlwm Ntse: 10 Kauj Ruam (nrog Duab)
Raspberry Pi - Chaw Ua Haujlwm Ntse: 10 Kauj Ruam (nrog Duab)

Video: Raspberry Pi - Chaw Ua Haujlwm Ntse: 10 Kauj Ruam (nrog Duab)

Video: Raspberry Pi - Chaw Ua Haujlwm Ntse: 10 Kauj Ruam (nrog Duab)
Video: Saib Mis paub Poj niam (hluas nkauj) tus yam ntxwv lub siab 2024, Kaum ib hlis
Anonim
Raspberry Pi - Chaw Ua Haujlwm Zoo
Raspberry Pi - Chaw Ua Haujlwm Zoo

Daim ntawv thov hais txog dab tsi?

OfficeHelperBOT yog daim ntawv thov tsom mus rau qhov chaw ua haujlwm ntse. 2 Raspberry Pi 3 Qauv B yuav teeb tsa rau qhov no.

Raspberry Pi 1 yuav yog lub tshuab tseem ceeb uas yuav suav nrog txhua qhov txiaj ntsig los ntawm cov ntsuas, tshaj tawm cov ntaub ntawv ntawm MQTT, khaws cov ntaub ntawv rau hauv huab database uas peb siv DynamoDB thiab khiav lub web portal server.

Raspberry Pi 2 yuav raug siv ntawm lub qhov rooj. Nws yuav xav kom tus neeg ua haujlwm txheeb xyuas lawv tus kheej ua ntej lawv raug tso cai nkag mus rau hauv chaw ua haujlwm. Muaj ob txoj hauv kev los ua qhov no uas yog los ntawm tus lej lej lej thiab QR code pov thawj. Hauv cov xwm txheej uas kev txheeb xyuas yuav raug siv tsis raug, peb yuav thaij duab ntawm leej twg uas tsis tau ua pov thawj tsis tiav thiab khaws tus neeg daim duab mus rau AWS S3 Bucket.

Lub vev xaib yuav tuaj yeem saib DHT, lub teeb, lub suab pom cov duab thiab yees duab ntawm lub chaw haujlwm. Lub vev xaib tseem tuaj yeem tuaj yeem tswj lub teeb chaw ua haujlwm thiab tseem saib lub kwj deg ntawm CCTV ntawm lub chaw haujlwm.

Tseem yuav muaj Telegram bot uas tso cai tswj rau lub teeb LED hauv chaw ua haujlwm, txheeb xyuas tus nqi ntawm lub ntsuas qhov ntsuas xws li ntsuas kub thiab tseem tso cai rau cov neeg ua haujlwm kom tau txais lawv daim QR code duab yog tias lawv tshwm sim poob lawv cov duab QR lossis tsis nco qab lawv tus pin los ntawm kev thov thiab tau txais lawv daim QR code duab los ntawm AWS S3 Bucket.

Kauj Ruam 1: Cia Peb Saib Cov Txheej Txheem

Cia Peb Saib Cov Txheej Txheem!
Cia Peb Saib Cov Txheej Txheem!
Cia Peb Saib Cov Txheej Txheem!
Cia Peb Saib Cov Txheej Txheem!
Cia Peb Saib Cov Txheej Txheem!
Cia Peb Saib Cov Txheej Txheem!

System Architecture Diagram

Yuav ua li cas cov tshuab yuav sib tham nrog ib leeg

Cov Khoom Kho Kom Zoo

Saib seb ob lub Raspberry Pi yuav zoo li cas thaum kawg

Qhov Web Portal

Saib lub vev xaib uas tau siv Python ntawm Flask

Telegram Bot

Nrhiav Bot peb tsim

Livestream

Siv 1 ntawm PiCam ua lub CCTV thiab tshaj tawm cov yeeb yaj kiab nyob

Yuav Tsum Tau Kho Vajtse

  • 2 x Raspberry Pi
  • 2 x GPIO Board
  • 1 x LDR
  • 1 x DHT11
  • 1x Tsab ntawv tsa suab Sensor
  • 4x LED ua
  • 7 x nub
  • 2x zoj
  • 2x LCD Zaub
  • 1 x Webcam

Kauj Ruam 2: Teeb Rau Raspberry Pi 1 (Chaw Ua Haujlwm)

  1. Tsim daim nplaub tshev khaws koj li html hu ua qauv
  2. Tsim daim nplaub tshev los khaws koj cov ntaub ntawv css/javascript hu ua zoo li qub
  3. Tsim daim nplaub tshev khaws koj lub koob yees duab cov ntaub ntawv hu ua lub koob yees duab nrog 3 daim nplaub tshev capture_photos, motion_photos, motion_videos

mkdir ~/ca2

mkdir ~/ca2/qauv

mkdir ~/ca2/zoo li qub

mkdir ~/ca2/zoo li qub/lub koob yees duab

mkdir ~/ca2/zoo li qub/lub koob yees duab/capture_photos

mkdir ~/ca2/zoo li qub/lub koob yees duab/motion_photos

mkdir ~/ca2/zoo li qub/yees/motion_Videos

Kauj Ruam 3: Teeb Rau Raspberry Pi 2 (Qhov Rooj)

  1. Tsim daim nplaub tshev los khaws koj cov ntaub ntawv hu ua qhov rooj
  2. Tsim daim nplaub tshev khaws koj li QR Code cov duab hu ua qr_code

mkdir ~/qhov rooj

mkdir ~/qhov rooj/qr_code

Kauj Ruam 4: Teeb Telegram Bot

Teeb Telegram Bot
Teeb Telegram Bot
Teeb Telegram Bot
Teeb Telegram Bot
Teeb Telegram Bot
Teeb Telegram Bot
Teeb Telegram Bot
Teeb Telegram Bot
  1. Qhib Telegram
  2. Nrhiav "BotFather"
  3. Hom "/pib"
  4. Hom "/newbot"
  5. Ua raws li cov lus qhia, lub npe rau bot, lub npe siv rau bot, sau rau bot kev txheeb xyuas tus lej cim

Kauj ruam 5: Teeb DynamoDB

Teeb tsa DynamoDB
Teeb tsa DynamoDB
Teeb tsa DynamoDB
Teeb tsa DynamoDB
Teeb tsa DynamoDB
Teeb tsa DynamoDB
  1. Sign up for AWS
  2. Nrhiav DynamoDB hauv AWS Kev Pabcuam
  3. Nyem "Tsim cov lus"
  4. Sau lub npe lub npe
  5. Teem muab faib qhov tseem ceeb ua 'id' (Txoj hlua) thiab Ntxiv Ntxiv Qhov Tseem Ceeb ua 'datetime' (String)
  6. Ua rau 4 lub rooj, dht, teeb, duab, neeg ua haujlwm

Saib ua ntej ntawm 4 Cov Ntxhuav

Kauj Ruam 6: Teeb AWS S3 Bucket

Set Up AWS S3 Bucket
Set Up AWS S3 Bucket
Set Up AWS S3 Bucket
Set Up AWS S3 Bucket
Set Up AWS S3 Bucket
Set Up AWS S3 Bucket
  1. Search AWS S3
  2. Nyem rau ntawm "Tsim thoob"
  3. Ua raws li cov cai teev npe lub thoob
  4. Ua raws cov screenshots
  5. Tsim Thoob

Kuv yuav ua li cas thiaj li upload rau hauv S3 thoob?

Peb tsis muaj tus thawj tswj hwm lub portal yog li peb yuav ua tus kheej ntshuam QR Code duab los ntawm AWS nraaj tus neeg siv-interface. Ua raws cov screenshots los tsim lub thoob. Cov ntawv luv ntawm cov cai yog cov laj thawj xav tau txhawm rau rub cov duab mus rau S3 Thoob

Kauj Ruam 7: Teeb tsa AWS SNS

  1. Search AWS SNS
  2. Ua raws li Topic Tag
  3. Tsim cov ncauj lus tshiab
  4. Teem lub npe lub npe thiab tso saib lub npe
  5. Kho txoj cai kom txhua tus tshaj tawm
  6. Sau npe yuav mus rau lub ncauj lus uas tau tsim
  7. Teem email hauv kab lus kawg kom tau txais email thaum tus nqi nce mus txog tus nqi tshwj xeeb

Kauj Ruam 8: Tsim Txoj Cai

  1. Nyem rau ntawm "Tsim txoj cai"
  2. Sau lub npe thiab piav qhia luv luv
  3. Xaiv qhov tseeb SQL version xa tag nrho MQTT lus
  4. Txoj cai cav siv lub ntsiab lus lim los txiav txim cov cai twg kom ua thaum MQTT cov lus tau txais
  5. Nyem rau ntawm "Add action"
  6. Xaiv xa cov lus ntawm SNS thawb ceeb toom

Kauj Ruam 9: Tsim Web Interface

Tsim cov ntaub ntawv html tshiab hu ua

  • taub hau
  • tus ID nkag mus
  • cav
  • ua dht
  • lub teeb
  • duab
  • tsab ntawv tsa suab
  • coj

Luam thiab muab tshuaj txhuam los ntawm Google Drive cov ntaub ntawv mus rau qhov sib xws html.

drive.google.com/file/d/1zd-x21G7P5JeZyPGZp1mdUJsfjoclYJ_/view?usp=sharing

Kauj ruam 10: Cov ntawv tseem ceeb

Muaj 3 tsab ntawv tseem ceeb

  • server.py - Tsim Web Portal
  • working.py - Logic rau Raspberry Pi 1 (Chaw Haujlwm)
  • door.py Logic rau Raspberry Pi 2 (Qhov Rooj)

Peb tsuas yog siv tag nrho 3 tus lej kom tau txais qhov txiaj ntsig peb xav tau

Peb tuaj yeem tau txais nws los ntawm Google tsav hauv qab Main.zip

drive.google.com/open?id=1xZRjqvFi7Ntna9_KzLzhroyEs8Wryp7g

Pom zoo: