Cov txheej txheem:

Seroma: Tus Thawj Saib Xyuas Chav Hauv Tsev: 20 Kauj Ruam
Seroma: Tus Thawj Saib Xyuas Chav Hauv Tsev: 20 Kauj Ruam

Video: Seroma: Tus Thawj Saib Xyuas Chav Hauv Tsev: 20 Kauj Ruam

Video: Seroma: Tus Thawj Saib Xyuas Chav Hauv Tsev: 20 Kauj Ruam
Video: Plab Plab Ntswg..(Pluav Pluav Ntswg) Maiv Twm New Song 2023-2024 2024, Kaum ib hlis
Anonim
Seroma: Tus Thawj Saib Xyuas Haujlwm Hauv Chav
Seroma: Tus Thawj Saib Xyuas Haujlwm Hauv Chav

Seroma yog tus tswj xyuas chav nyob hauv ib tus neeg uas tso cai rau cov neeg siv tshuaj xyuas qhov xwm txheej ntawm cov servers (kub thiab av noo), nkag mus nkag ntawm chav server, nrog rau saib xyuas chav server nws tus kheej rau kev ua txhaum kev nyab xeeb.

Kauj ruam 1: Nkag Mus Rau Koj Tus Account AWS

Nkag mus rau Koj Tus Account AWS
Nkag mus rau Koj Tus Account AWS
Nkag mus rau Koj Tus Account AWS
Nkag mus rau Koj Tus Account AWS
Nkag mus rau Koj Tus Account AWS
Nkag mus rau Koj Tus Account AWS
Nkag mus rau Koj Tus Account AWS
Nkag mus rau Koj Tus Account AWS
  1. Rau peb tus kheej, peb tau nkag mus los ntawm AWS qhia cov tub ntxhais kawm lub qhov rooj raws li peb muaj cov tub ntxhais kawm aws nyiaj.
  2. Lub taub hau mus rau "AWS Account" tab ntawm cov ntawv qhia zaub mov ntawm sab xis saum toj.
  3. Nyem rau ntawm "Mus rau koj li AWS Educate Starter Account"
  4. Qhib Console txhawm rau nkag mus rau koj li AWS Management Console.

Kauj Ruam 2: Pib Nrog AWS IOT "yam"

AWS IOT
AWS IOT
AWS IOT
AWS IOT
  1. Tshawb nrhiav "AWS IoT" hauv AWS cov kev pabcuam tshawb fawb bar.
  2. Nyem rau "Pib" mus rau AWS IoT Console dashboard uas koj tuaj yeem saib tag nrho IoT cov cuab yeej sau npe hauv koj tus lej AWS.

Kauj Ruam 3: Sau npe rau AWS IOT "yam"

AWS IOT
AWS IOT
AWS IOT
AWS IOT
AWS IOT
AWS IOT
  1. Hauv kab ntawv taw qhia, taw qhia kom tswj hwm koj li IoT "Yam".
  2. Nyem rau ntawm "Sau npe ib yam" yog tias koj tseem tsis tau muaj dab tsi. (Yog tias koj twb muaj ib qho lawm ces nyem rau ntawm "Tsim" khawm nyob rau sab xis saum toj ntawm lub vijtsam tom ntej ntawm kev tshawb nrhiav tab.)
  3. Nyem rau ntawm thawj lub pob hu ua "Tsim ib yam nkaus".
  4. Ntaus "RaspberryPi" raws li lub npe ntawm yam khoom. Rau cov kauj ruam no, tsis xav tau lwm yam tshaj li "Lub Npe" xav tau. Tom qab ua li ntawd, nyem tom ntej.

Kauj Ruam 4: Qhib Ntawv Pov Thawj

Qhib daim ntawv pov thawj
Qhib daim ntawv pov thawj
Qhib daim ntawv pov thawj
Qhib daim ntawv pov thawj
  1. Nyob rau theem tom ntej, nyem rau ntawm "tsim daim ntawv pov thawj" khawm.
  2. Rub tawm thiab khaws 4 qhov txuas rub tawm hauv nplooj ntawv tom ntej mus rau hauv phau ntawv ua haujlwm lossis ntawv tais ceev tseg. Txhawm rau txuag lub hauv paus CA cov ntaub ntawv, nyem rau sab xis thiab txuag-li.
  3. Nyem rau ntawm "Qhib" thiab cov lus ua tiav yuav tsum tshwm sim.
  4. Siv cov npe phooj ywg rau cov ntaub ntawv los ntawm kev tshem tus lej nyob rau hauv pem hauv ntej ntawm txhua lub npe ntawv, thiab hloov pauv lub hauv paus CA cov ntaub ntawv rau "rootca.pem".
  5. Nyem rau ntawm "Txuas ib txoj cai" mus txuas ntxiv.

Kauj Ruam 5: Ntxiv Txoj Cai rau Koj Daim Ntawv Pov Thawj

Ntxiv Txoj Cai rau Koj Daim Ntawv Pov Thawj
Ntxiv Txoj Cai rau Koj Daim Ntawv Pov Thawj
Ntxiv Txoj Cai rau Koj Daim Ntawv Pov Thawj
Ntxiv Txoj Cai rau Koj Daim Ntawv Pov Thawj
Ntxiv Txoj Cai rau Koj Daim Ntawv Pov Thawj
Ntxiv Txoj Cai rau Koj Daim Ntawv Pov Thawj
  1. Hauv nplooj ntawv tom ntej, yog tias koj tsis muaj txoj cai, lawv yuav hais kom koj ua ib qho ntawm "Tsim Txoj Cai" khawm.
  2. Yog tias koj twb muaj txoj cai tam sim no, nyem rau ntawm “Tsim txoj cai tshiab” khawm hauv qab no.
  3. Ntxig cov ntaub ntawv hauv qab no rau hauv daim foos tsim txoj cai.

    Lub Npe: RaspberryPiSecurityPolicy

    Kev ua: iot:*

    Cov peev txheej ARN: *

    Cov nyhuv: Tso cai

  4. Koj txoj cai yuav tsum tshwm nyob rau hauv “Txoj Cai” tab hauv qab “Kev Ruaj Ntseg”.
  5. Tom ntej no, mus rau "Cov Ntawv Pov Thawj" tab uas tseem nyob hauv "Kev Ruaj Ntseg", thiab txuas koj txoj cai rau daim ntawv pov thawj uas koj tau tsim yav dhau los.
  6. Ntawm nplooj ntawv tom ntej, nyem rau ntawm koj txoj cai thiab tom qab ntawd nyem "Txuas".
  7. Hauv nplooj ntawv Cov ntsiab lus ntawm yam koj tau tsim, hauv qab "Sib cuam tshuam" tab, muaj REST API qhov kawg uas yuav tsum tau theej thiab khaws tseg.
  8. Tam sim no AWS yuav tsum muaj Ib Yam uas txuas nrog txoj cai thiab muaj daim ntawv pov thawj.

Kauj Ruam 6: Pib teeb tsa rau AWS SNS Topic

Pib teeb tsa rau AWS SNS Topic
Pib teeb tsa rau AWS SNS Topic
Pib teeb tsa rau AWS SNS Topic
Pib teeb tsa rau AWS SNS Topic

SSH rau hauv Raspberry Pi thiab teeb tsa AWS CLI siv cov lus hais hauv qab no:

sudo pip nruab awscli

AWS CLI suav nrog kev ua tiav qhov ua tiav tab sis nws tsis tau teeb tsa los ntawm lub neej ntawd. Siv cov lus txib hauv qab no txhawm rau teeb tsa kev ua tiav ntawm Raspberry Pi's CLI interface:

complete -C aws_completer aws

Configure AWS CLI with Access Key ID, Secret Access Key, AWS Region Name and Command Output format using the following command:

aws configure

Lub console yuav hais kom koj sau cov ntaub ntawv hauv qab no:

pi@raspberrypi: ~ $ aws configure

AWS Access Key ID [None]: "Muab koj Tus Neeg Siv Khoom Tus ID nkag mus rau ntawm no" AWS Secret Access Key [None]: "Muab koj Tus Neeg Siv Khoom Siv Tus Kheej Nkag Mus Nkag Nkag Ntawm No" Default cheeb tsam lub npe [Tsis muaj]: eu-central-1 Default output format [Tsis muaj]: json pi@raspberrypi: ~ $

Kauj Ruam 7: Tsim Iot-role.trust.json Cov Ntaub Ntawv

Tsim Iot-role.trust.json Cov Ntaub Ntawv
Tsim Iot-role.trust.json Cov Ntaub Ntawv
Tsim Iot-role.trust.json Cov Ntaub Ntawv
Tsim Iot-role.trust.json Cov Ntaub Ntawv
  1. Tsim JSON cov ntaub ntawv nrog txoj cai IAM saum toj no nrog cov ntaub ntawv npe iot-role.trust.json.
  2. Tsim lub luag haujlwm siv AWS CLI siv cov lus txib hauv qab no

aws iam create-role --role-name my-iot-role --assume-role-policy-document file: //iot-role-trust.json

Kauj Ruam 8: Tsim Iot-policy.json Cov Ntaub Ntawv

Tsim Iot-policy.json Cov Ntaub Ntawv
Tsim Iot-policy.json Cov Ntaub Ntawv
Tsim Iot-policy.json Cov Ntaub Ntawv
Tsim Iot-policy.json Cov Ntaub Ntawv
  1. Tsim JSON cov ntaub ntawv nrog txoj cai saum toj no nrog cov ntaub ntawv npe iot-policy.json.
  2. Tsim txoj cai txoj cai siv AWS CLI siv cov lus txib hauv qab no:

aws iam put-role-policy --role-name IoTRole --policy-name iot-policy --policy-document file: //iot-policy.json

Kauj Ruam 9: Tsim AWS SNS Topic (Ntu 1)

Tsim AWS SNS Topic (Ntu 1)
Tsim AWS SNS Topic (Ntu 1)
Tsim AWS SNS Topic (Ntu 1)
Tsim AWS SNS Topic (Ntu 1)
Tsim AWS SNS Topic (Ntu 1)
Tsim AWS SNS Topic (Ntu 1)
  1. Hauv AWS cov kev pabcuam tshawb nrhiav bar, Tshawb nrhiav "SNS" kev pabcuam lossis mus rau
  2. Raws li koj tsis muaj cov ncauj lus tam sim no, nyem "Tsim cov ncauj lus tshiab" los tsim cov ncauj lus.
  3. Ntaus koj lub npe lub npe thiab tso saib lub npe thiab nyem "Tsim cov ncauj lus" thiab cov ncauj lus tshiab yuav tshwm sim thaum txhua qib ua tiav.
  4. Nyem rau ntawm "Ua" khawm cia thiab "Kho cov ntsiab lus txoj cai".

Kauj Ruam 10: Tsim AWS SNS Topic (Ntu 2)

Tsim AWS SNS Topic (Ntu 2)
Tsim AWS SNS Topic (Ntu 2)
Tsim AWS SNS Topic (Ntu 2)
Tsim AWS SNS Topic (Ntu 2)
Tsim AWS SNS Topic (Ntu 2)
Tsim AWS SNS Topic (Ntu 2)
  1. Teem txoj cai kom tso cai rau txhua tus tshaj tawm thiab sau npe, vim qhov no yog kev txwv ntawm AWSEducate tus account.
  2. Sau npe yuav cov ncauj lus no kom tau txais cov hloov tshiab tshaj tawm rau lub ncauj lus no.
  3. Hloov cov txheej txheem rau "Email" thiab nkag mus rau koj tus email ntawm qhov kawg.

  4. Lub taub hau mus rau koj tus email uas koj tau sau koj qhov kawg, nyem rau kab ntawv txuas kom paub meej tias koj li email kev tso npe nkag rau npe.
  5. Nkag mus rau "AWS IoT" cov kev pabcuam, ntawm cov ntawv qhia zaub mov ntawm sab laug, nyem rau "Ua". Nplooj ntawv no yog qhov uas koj cov cai tau nthuav tawm thiab muaj rau koj saib thiab kho. Tam sim no, tsis muaj txoj cai rau koj li IoT, nyem rau "Tsim txoj cai".

Kauj Ruam 11: Tsim AWS SNS Topic (Ntu 3)

Tsim AWS SNS Topic (Ntu 3)
Tsim AWS SNS Topic (Ntu 3)
Tsim AWS SNS Topic (Ntu 3)
Tsim AWS SNS Topic (Ntu 3)
Tsim AWS SNS Topic (Ntu 3)
Tsim AWS SNS Topic (Ntu 3)
  1. Ntaus ib lub npe hauv Npe Npe rau koj txoj cai. Hauv Cov lus piav qhia teb, ntaus cov lus piav qhia rau koj txoj cai. Txuas ntxiv mus rau Tshooj lus ntawm ntu lus, peb yuav xaiv qhov hloov tshiab tshaj plaws SQL version hauv ntu "Siv SQL version". Ntaus * hauv tus cwj pwm los xaiv tag nrho MQTT cov lus los ntawm cov ncauj lus, hauv peb qhov xwm txheej peb lub ncauj lus yog "TempHumid".
  2. Tom qab ntawv ntxiv "SNS" ceeb toom rau koj txoj cai. Tom qab ntawd, nyem "Configure action".
  3. Hauv "Configure action" nplooj ntawv, xaiv SNS lub ncauj lus uas koj nyuam qhuav tsim thiab cov ntawv xov xwm raws li RAW. Tom qab ntawd, xaiv lub luag haujlwm koj nyuam qhuav tsim los siv AWS CLI thiab nyem "Ntxiv kev nqis tes ua".
  4. Koj qhov kev txiav txim yuav raug teeb tsa thiab rov qab mus rau "Tsim txoj cai".
  5. Nyem kho yog tias koj xav kho txoj cai.

Kauj Ruam 12: Tsim Lub thoob ntawm Amazon S3

Tsim lub thoob ntawm Amazon S3
Tsim lub thoob ntawm Amazon S3
Tsim lub thoob ntawm Amazon S3
Tsim lub thoob ntawm Amazon S3
Tsim lub thoob ntawm Amazon S3
Tsim lub thoob ntawm Amazon S3
  1. Tshawb nrhiav S3 hauv AWS tshawb fawb bar.
  2. Hauv Amazon S3 nplooj ntawv, nyem rau ntawm "Tsim thoob" khawm kom pib.
  3. Sau daim ntawv pop-up uas tshwm nrog cov ntaub ntawv hauv qab no:

    • Lub Npe Lub Npe: seroma-thoob (qhov no yuav tsum yog qhov tshwj xeeb thoob plaws txhua qhov Amazon S3 thoob)
    • Cheeb Tsam: Asmeskas Sab Hnub Poob (Oregon)
    • Luam Chaw: (Tsis quav ntsej)
  4. Rau cov kauj ruam 2 txog 3, tsuas yog hla nws los ntawm txhaj "Tom ntej" vim tias tsis muaj dab tsi hloov pauv. Hauv qib 4, nyem "Tsim lub thoob".
  5. Tom qab tsim, koj yuav tsum pom koj lub thoob rau ntawm qhov home page.

Kauj Ruam 13: Tsim Txoj Cai AWS (Ntu 1)

Tsim kom muaj txoj cai AWS (Ntu 1)
Tsim kom muaj txoj cai AWS (Ntu 1)
Tsim kom muaj txoj cai AWS (Ntu 1)
Tsim kom muaj txoj cai AWS (Ntu 1)
Tsim kom muaj txoj cai AWS (Ntu 1)
Tsim kom muaj txoj cai AWS (Ntu 1)
  1. Nyem rau ntawm lub thoob uas koj tsim los nkag rau nplooj ntawv saum toj no, tom qab ntawv mus rau "Txoj Cai Thoob" nyob rau hauv tab "Tso Cai".
  2. Tom ntej no, nyem rau ntawm "Txoj Cai Tsim Tus Qauv" txuas rau hauv qab ntawm nplooj ntawv los tsim koj li AWS txoj cai.
  3. Hauv daim ntawv, sau cov txiaj ntsig hauv qab no:

    • Hom Txoj Cai: S3 Thoob Txoj Cai
    • Cov nyhuv: Tso cai
    • Tus thawj xibfwb: *
    • AWS Service: Amazon S3
    • Kev Ua: GetObject
    • Amazon Resource Name (ARN): arn: aws: s3::: seroma-bucket
  4. Tom qab sau cov ntaub ntawv, nyem rau ntawm kab lus Ntxiv.
  5. Nyem rau ntawm "Tsim Txoj Cai" khawm.

Kauj Ruam 14: Tsim Txoj Cai AWS (Ntu 2)

Tsim kom muaj txoj cai AWS (Ntu 2)
Tsim kom muaj txoj cai AWS (Ntu 2)
Tsim kom muaj txoj cai AWS (Ntu 2)
Tsim kom muaj txoj cai AWS (Ntu 2)
Tsim kom muaj txoj cai AWS (Ntu 2)
Tsim kom muaj txoj cai AWS (Ntu 2)
Tsim kom muaj txoj cai AWS (Ntu 2)
Tsim kom muaj txoj cai AWS (Ntu 2)
  1. Luam cov lej tsim tawm thiab nyem kaw.
  2. Rov qab mus rau koj li Amazon S3 Bucket Policy editor thiab muab cov lej theej ua ntej.
  3. Ntxiv "/*" rau hauv cov cai nyob tom qab Cov Cai Cov Cai, zoo li hauv daim duab saum toj no, tom qab ntawd nyem txuag.
  4. Tom qab ua li ntawd, koj lub thoob yuav teeb tsa tau zoo thiab npaj rau siv.

Kauj Ruam 15: Tsim Cov Ntxhuav rau DynamoDB

Tsim Cov Ntxhuav rau DynamoDB
Tsim Cov Ntxhuav rau DynamoDB
Tsim Cov Ntxhuav rau DynamoDB
Tsim Cov Ntxhuav rau DynamoDB
  1. Tshawb nrhiav DynamoDB hauv AWS Services tshawb nrhiav bar
  2. Nyem rau ntawm "Tsim lub rooj" thiab tsim 3 lub rooj nrog cov ntaub ntawv hauv qab no: (Tsuas yog "lub npe rooj" thiab "tus yuam sij thawj" tau hloov)

    • accesslog, pk datetimevalue cov
    • roomstatus, pk datetimevalue tus nqi
    • staffdata, npe pk

Kauj ruam 16: Roomstatus.py

Roomstatus.py
Roomstatus.py
Roomstatus.py
Roomstatus.py
Roomstatus.py
Roomstatus.py
Roomstatus.py
Roomstatus.py

Tshooj lus no muaj cov cai rau roomstatus.py, uas sau tag nrho cov ntaub ntawv hais txog chav server hauv nws tus kheej txhua feeb. Qhov no suav nrog qhov kub thiab txias, suab nrov (duab thiab yeeb yaj kiab yog tias muaj tseeb), thiab nkag mus rau cav. Nws kuj tseem sau cov ntaub ntawv mus rau Google Spreadsheet, cov ntaub ntawv rau DynamoDB, cov duab thiab yeeb yaj kiab (yog tias muaj) rau S3, tso tawm cov ntaub ntawv ntawm lub vijtsam LCD, xa SMS thiab Email thaum muaj qhov xav tias ua txhaum cai, lossis thaum ntsuas kub lossis av noo tsis xwm yeem.

Txhawm rau khiav cov ntaub ntawv nab hab sej, hloov cov npe mus rau qhov twg cov ntaub ntawv nyob thiab ntaus hauv console: "sudo python"

Daim duab 2: Cov haujlwm tshaj tawm kom tso cai SMS thiab Email ceeb toom, thiab xa mus rau S3

Daim duab 3: Cov ntawv hloov pauv tau tshaj tawm rau kev ua haujlwm thiab RPi ua haujlwm

Daim duab 4: Pib ntawm lub voj uas tau txais qhov ntsuas kub thiab av noo los ntawm RPi. Nws tseem sau cov ntaub ntawv rau hauv Google daim ntawv nthuav qhia

Daim duab 5: Kev nyab xeeb ib feem ntawm lub voj. Nws yuav tsuas qhib txij thaum 7 teev tsaus ntuj txog 7 teev sawv ntxov (tsis teev). Nws yuav tshuaj xyuas kev txav mus los hauv ib feeb. Yog tias pom cov lus tsa suab, nws yuav thaij duab thiab yees duab, tso nws mus rau S3, thaum tseem sau cov ntaub ntawv mus rau DynamoDB rau kev siv tom qab. Tom qab ntawd, nws yuav xa SMS thiab Email yog tias muaj dab tsi tsis xwm yeem.

Image 6: Qhov kawg ntawm lub voj. Nws kuj tseem sau cov ntaub ntawv rau DynamoDB thiab xa ntawv ceeb toom raws li. Kab kawg ntawm lub voj yuav ua rau tsab ntawv pw kom txog thaum feeb tom ntej mus txog.

Kauj ruam 17: Rfid.py

Rfid.py
Rfid.py
Rfid.py
Rfid.py
Rfid.py
Rfid.py
Rfid.py
Rfid.py

Nqe lus no muaj cov cai rau rfid.py, uas ntxiv qhov ua haujlwm los taug qab thaum cov tswv cuab ntawm cov neeg ua haujlwm nkag mus rau chav server. Nws kuj tseem yog ib feem ntawm kev ruaj ntseg ntawm Seroma, qhov twg cov tswv cuab ntawm cov neeg ua haujlwm tsis raug tso cai nkag mus rau chav server tom qab cov sijhawm ua haujlwm, txhawm rau tiv thaiv cov ntaub ntawv ua txhaum cai. Nws tseem xa Email thiab SMSs txhua tus neeg ua haujlwm yog xav tias ua txhaum cai.

Daim duab 2: Pib ntawm RFID nyeem ntawv cov laj thawj. Thaum twg ib daim npav raug luam tawm tsam tus nyeem ntawv, tus cim tshwj xeeb (uid) ntawm daim npav raug coj mus. Tom qab ntawd, peb sim nrhiav tus lej uid ntawm daim npav hauv cov ntaub ntawv cov neeg ua haujlwm kom pom tias daim npav yog ib tus ntawm cov neeg ua haujlwm. Pic 3: Yog tias muaj daim npav uid nyob hauv lub hauv paus, nws yuav tshuaj xyuas seb nws puas yog thaum ua haujlwm cov sijhawm ua haujlwm. Yog tias yog, nws yuav ceeb toom rau cov neeg ua haujlwm tas li los ntawm SMS thiab Email rau npe email chaw nyob. Yog tias nws tseem yog lub sijhawm ua haujlwm, nws yuav sau kab mus rau lub rooj nkag nkag hauv lub database nrog cov ntaub ntawv cuam tshuam. Nws tseem yuav tso saib cov lus txais tos ntawm lub vijtsam LCD.

Kauj ruam 18: Server.py

Neeg rau zaub mov.py
Neeg rau zaub mov.py
Neeg rau zaub mov.py
Neeg rau zaub mov.py
Neeg rau zaub mov.py
Neeg rau zaub mov.py

Nov yog cov ntaub ntawv server.py. Peb yuav siv Flask lub moj khaum rau lub vev xaib. Cov ntaub ntawv HTML yuav tsum tau muab tso rau hauv /tus qauv raug txuas ib yam nkaus.

Daim duab 1: Thawj txoj hauv kev rau lub raj mis txhais. Nws yuav hloov tus neeg siv mus rau nplooj ntawv nkag mus yog tias lawv tsis nkag rau hauv, thiab nplooj ntawv dashboard yog tias lawv yog. Kuj tseem piav qhia lub luag haujlwm kom siv rau hauv cov yeeb yaj kiab livestream

Duab 2, 3, 4: Txoj Kev Rau Cov Yob Nws tau txais cov ntaub ntawv los ntawm DynamoDB cov lus thiab tom qab ntawd xa rov qab rau HTML cov ntaub ntawv kom lawv tuaj yeem siv tau rau ntawd.

Daim duab 5: 2 txoj hauv kev kawg rau lub hwj. Nws ua haujlwm cov haujlwm logout thiab kev ua haujlwm livestream. Nws tseem hais qhia qhov chaw nres nkoj lub vev xaib yuav khiav ntawm.

Kauj ruam 19: Telegram.py

Telegram.py
Telegram.py
Telegram.py
Telegram.py
Telegram.py
Telegram.py

Tshooj lus no suav nrog cov cai rau Seroma's telegram bot. Nws siv lub tsev qiv ntawv telepot txhawm rau siv Telegram's Bot API. Nws ua haujlwm los ntawm kev lees txais cov lus nug nws tau txais thiab nthuav tawm cov ntaub ntawv ntsig txog rau tus neeg siv. Tus neeg siv tuaj yeem ntaus 'pab' rau tag nrho cov npe ntawm cov lus txib.

Duab 1, 2: Txhawm rau teeb tsa tus lej xov tooj, koj yuav tsum siv BotFather. Tsuas yog ua raws cov lus qhia kom tau txais HTTP API uas peb xav tau hauv peb cov cai.

Daim duab 4: Piv txwv ntawm txoj haujlwm uas siv qee tus lej ntawm cov ntaub ntawv los ntawm cov ntaub ntawv khaws tseg raws li tus neeg siv thov

Daim duab 5: Yuav ua li cas peb coj tus neeg siv lub tswv yim thiab txiav txim siab yuav ua li cas thiaj li haum.

Kauj ruam 20: Livestream (camera_pi.py)

Livestream (lub koob yees duab_pi.py)
Livestream (lub koob yees duab_pi.py)
Livestream (lub koob yees duab_pi.py)
Livestream (lub koob yees duab_pi.py)
Livestream (lub koob yees duab_pi.py)
Livestream (lub koob yees duab_pi.py)

Peb tau siv tus yam ntxwv tshiab rau peb qhov chaw saib xyuas neeg rau zaub mov, muaj kwj nyob ntawm dab tsi tau tshwm sim hauv Server Room, qhov no tuaj yeem nkag mus rau txhua lub sijhawm, txhua qhov chaw. Yuav ua li cas cov dej nyob no ua haujlwm: Nws yog qhov tshwj xeeb uas tau ua hauv Flask, ua ke nrog Pi Lub Koob Yees Duab. Cov kab yeeb yaj kiab tau rub tawm raws li nws tau tshwm sim hauv lub neej tiag tiag, yog li koj tuaj yeem pom tseeb tias muaj qhov qeeb me ntsis (1-2 vib nas this) raws li cov kab ke video tau rub tawm thiab ua ke ua ke. Qhov no tsis tuaj yeem ua tiav yam tsis muaj xov, raws li cov keeb kwm yav dhau los nyeem ntas los ntawm lub koob yees duab thiab khaws cov thav duab tam sim no. Txiav tag nrho cov thav ntawv no ua ke yuav tso tawm cov kwj tawm.

Pic 2: Nov yog cov ntaub ntawv cais qhov twg tag nrho cov duab thav duab tau khaws cia thiab raws li koj tuaj yeem pom, peb tab tom siv picamera module txhawm rau nkag mus rau peb lub koob yees duab raspberry pi raws li qhov uas peb paub zoo tshaj plaws. Peb muaj chav kawm Lub Koob Yees Duab kom peb tuaj yeem ua lub luag haujlwm zoo li yog nws yog cov kwj tawm thiab tsis yog ntau cov duab sib dhos ua ke, yog li hauv daim ntawv thov tseem ceeb yuav coj nws mus ua kwj dej yam tsis tas yuav txhawj xeeb txog dab tsi tshwm sim tom qab.

Daim duab 3: Qhov no yog ib feem ntawm peb cov server.py cov ntaub ntawv qhov twg cov kwj dej nyob tau teev tseg. Cov chav kawm tseem ceeb uas peb tau xa tuaj rau qhov no yog Lub Koob Yees Duab los ntawm peb cov ntaub ntawv camera_pi.py nyob rau sab saum toj ntawm peb cov server.py cov ntaub ntawv. Peb tau piav qhia lub luag haujlwm ntawm peb cov npe hauv paus, gen, txawm li cas los xij nws tsuas yog siv rau thaum peb nkag mus rau /video_feed qhov twg peb cov kwj dej nyob ntawm, qhov twg nws yuav rov los ntawm txoj haujlwm no thiab xa rov qab cov kwj tawm ntawm lub vev xaib.

Pom zoo: