Cov txheej txheem:

Google Assistant ntawm DragonBoard ™ 410c: 57 Cov Kauj Ruam
Google Assistant ntawm DragonBoard ™ 410c: 57 Cov Kauj Ruam

Video: Google Assistant ntawm DragonBoard ™ 410c: 57 Cov Kauj Ruam

Video: Google Assistant ntawm DragonBoard ™ 410c: 57 Cov Kauj Ruam
Video: QUALCOMM ha Creado una BESTIA (Y llega Pronto) 2024, Kaum ib hlis
Anonim
Google Assistant ntawm DragonBoard ™ 410c
Google Assistant ntawm DragonBoard ™ 410c

Cov Lus Qhia no yuav qhia koj kom khiav Google Assistant hauv DragonBoard thiab teeb tsa ib puag ncig smarthome nrog qee yam khoom siv.

Yuav tsum tau:

-DragonBoard ™ 410c (w/ kev teeb tsa tshiab ntawm linaro-alip);

-12V/1A 5.5mm nkaus fais fab mov;

-CC2531 zigbee module;

-HDMI saib;

-USB nas thiab keyboard;

-OSRAM LIGHTFY ™ Tunable Dawb 60 teeb;

-FLC BLE teeb;

-Yale Real Living deadbolt ntse ntsuas phoo (w/ zigbee module);

-Host PC (nrog Windows)

Kauj ruam 1: Google Cloud Log In

Google Cloud Log In
Google Cloud Log In

Hauv tus tswv tsev PC, mus rau Google Cloud nplooj ntawv thiab nkag mus.

Kauj ruam 2: PubSub - Console

PubSub - Console
PubSub - Console

Hauv cov ntawv qhia zaub mov sab laug nas hla "PubSub" thiab nyem rau "Cov ncauj lus".

Kauj Ruam 3: PubSub - Tsim Google Cloud Project

PubSub - Tsim Google Cloud Project
PubSub - Tsim Google Cloud Project

Ntxig lub npe project thiab nyem rau ntawm "CREATE".

Kauj Ruam 4: PubSub - Pab kom API

PubSub - Pab kom API
PubSub - Pab kom API

Nyem rau ntawm "Enable API".

Kauj Ruam 5: PubSub - Tsim Xai:

PubSub - Tsim cov ncauj lus
PubSub - Tsim cov ncauj lus

Nyem rau ntawm "Tsim lub ncauj lus".

Kauj Ruam 6: PubSub - Npe Lub Npe:

PubSub - Npe Lub Npe
PubSub - Npe Lub Npe

Ntxig lub npe rau lub ncauj lus thiab nyem rau "CREATE".

Kauj Ruam 7: PubSub - Tsim Kev Sau Npe:

PubSub - Tsim Kev Sau Npe
PubSub - Tsim Kev Sau Npe

Nyem rau "CREATE SUBSCRIPTION".

Kauj Ruam 8: PubSub - Kev teeb tsa npe:

PubSub - Kev teeb tsa npe
PubSub - Kev teeb tsa npe

Ntxig ib lub npe rau kev ua npe thiab sau qhov seem raws li cov duab saum toj no qhia.

Kauj Ruam 9: PubSub - Cov ncauj lus xav tau/Cov ntawv sau:

Ua raws li qhov piv txwv, tsim cov ncauj lus no nrog cov ntawv sau npe:

  1. BluDevCtl

    1. DashBluDevSub
    2. BluDevSub
  2. ZigCtl

    1. DashZigSub
    2. ZigCtlSub

Kauj ruam 10: Ua hauv Google - Nkag Mus Rau:

Mus rau Kev Ua Haujlwm nplooj ntawv nplooj ntawv thiab nkag mus nrog tib tus as khauj siv ua ntej.

Kauj Ruam 11: Kev nqis tes ua hauv Google - Ntshuam Txoj Haujlwm:

Kev nqis tes ua hauv Google - Ntshuam Txoj Haujlwm
Kev nqis tes ua hauv Google - Ntshuam Txoj Haujlwm

Nyem rau ntawm "Ntxiv/ntshuam qhov project".

Kauj Ruam 12: Kev nqis tes ua hauv Google - Xaiv Txoj Haujlwm:

Kev nqis tes ua hauv Google - Xaiv Txoj Haujlwm
Kev nqis tes ua hauv Google - Xaiv Txoj Haujlwm

Xaiv qhov haujlwm yav dhau los tsim los ntshuam thiab nyem rau "IMPORT PROJECT".

Kauj Ruam 13: Kev nqis tes ua hauv Google - Kev Sau Npe Ntaus Ntawv:

Kev nqis tes ua hauv Google - Kev Sau Npe Ntaus Ntawv
Kev nqis tes ua hauv Google - Kev Sau Npe Ntaus Ntawv

Ntawm qhov project console nyem rau ntawm "Device registration".

Kauj Ruam 14: Ua hauv Google - Sau Tus Qauv:

Kev nqis tes ua hauv Google - Sau Tus Qauv
Kev nqis tes ua hauv Google - Sau Tus Qauv

Nyem rau ntawm "REGISTER MODEL".

Kauj Ruam 15: Kev nqis tes ua hauv Google - Teeb Qauv:

Kev nqis tes ua hauv Google - Teeb Qauv
Kev nqis tes ua hauv Google - Teeb Qauv

Ntxig lub npe rau lub cuab yeej, chaw tsim khoom thiab hom ntaus ntawv ua Tus Hais Lus thiab nyem rau ntawm "REGISTER MODEL".

Kauj Ruam 16: Ua hauv Google - Client Secret JSON:

Kev nqis tes ua hauv Google - Client Secret JSON
Kev nqis tes ua hauv Google - Client Secret JSON
Kev nqis tes ua hauv Google - Client Secret JSON
Kev nqis tes ua hauv Google - Client Secret JSON

Nyem rau ntawm "Rub tawm OAuth 2.0 daim ntawv pov thawj" txhawm rau rub tus neeg siv khoom zais JSON uas yuav siv tom qab thiab nyem rau "Tom ntej".

Kauj Ruam 17: Kev nqis tes ua hauv Google - Qhia tus yam ntxwv:

Kev ua hauv Google - Qhia tus yam ntxwv
Kev ua hauv Google - Qhia tus yam ntxwv

Tsuas yog nyem rau "SKIP".

Kauj Ruam 18: Kev Tswj Xyuas Nyiaj Txiag:

Mus rau Google Kev tswj hwm nplooj ntawv, nkag mus nrog tus as khauj qub ib yam li ua ntej thiab xyuas kom cov kev hloov pauv hauv qab no tau qhib (xiav):

  • Web & App Ua Haujlwm. Ib qho ntxiv, nco ntsoov xaiv Qhov suav nrog Chrome keeb kwm thiab kev ua haujlwm los ntawm cov xaib, apps, thiab khoom siv uas siv Google cov kev pabcuam khij lub npov;
  • Cov Ntaub Ntawv Qhia Txog;
  • Suab & Kev Ua Si.

Kauj Ruam 19: Cov Nyiaj Pov Thawj Pov Thawj - Tsim Cov Ntawv Pov Thawj:

Cov Ntaub Ntawv Pov Thawj Kev Pabcuam - Tsim Cov Ntawv Pov Thawj
Cov Ntaub Ntawv Pov Thawj Kev Pabcuam - Tsim Cov Ntawv Pov Thawj

Mus rau Google Cloud Credentials console, nkag mus nrog tib tus as khauj ua ntej thiab nyem rau "Tsim daim ntawv pov thawj".

Kauj Ruam 20: Cov Ntaub Ntawv Pov Thawj Cov Nyiaj Pab - Teeb tsa:

Cov Ntawv Pov Thawj Ua Haujlwm Tus Account - Teeb
Cov Ntawv Pov Thawj Ua Haujlwm Tus Account - Teeb

Xaiv "Tus lej pabcuam tshiab" hauv "Tus lej pabcuam", ntxig lub npe rau nws, xaiv "Tus tswv" raws li "Lub luag haujlwm", xaiv JSON raws li "Hom Tseem Ceeb" thiab nyem rau "Tsim".

Kauj Ruam 21: Cov Ntaub Ntawv Pov Thawj Cov Nyiaj Pab - Rub Tawm Cov Ntawv Pov Thawj:

Cov Ntaub Ntawv Pov Thawj Kev Pabcuam - Rub tawm daim ntawv pov thawj
Cov Ntaub Ntawv Pov Thawj Kev Pabcuam - Rub tawm daim ntawv pov thawj

Raws li yuav nyem rau "Tsim", ib daim ntawv JSON yuav rub tawm. Txuag raws li koj xav tau cov ntawv no ua ntej.

Kauj Ruam 22: Google Huab Cia - Tsim Thoob:

Google Huab Cia - Tsim Thoob
Google Huab Cia - Tsim Thoob

Mus rau Google Cloud Storage page, nkag mus thiab nyem rau "CREATE BUCKET".

Kauj Ruam 23: Google Huab Cia - Kev sim pub dawb:

Google Cloud Storage - Kev sim pub dawb
Google Cloud Storage - Kev sim pub dawb

Kev Cia Khoom yog qhov kev pabcuam them nyiaj, tab sis Google muab kev sim pub dawb uas muaj ntau dua qhov xav tau. Txhawm rau teeb tsa kev sim pub dawb nyem rau "Sau npe rau kev sim dawb".

Kauj Ruam 24: Google Huab Cia - Sim Dawb - Kauj Ruam 1:

Google Huab Cia - Kev sim pub dawb - Kauj Ruam 1
Google Huab Cia - Kev sim pub dawb - Kauj Ruam 1

Xaiv lub tebchaws, lees txais cov nqe lus ntawm kev pabcuam thiab nyem rau "AGREE AND CONTINUE".

Kauj Ruam 25: Google Huab Cia - Sim Dawb - Kauj Ruam 2:

Txij ntawm no koj yuav tsum nkag mus rau qee cov ntaub ntawv qhia chaw (uas txawv lub tebchaws rau ib lub tebchaws) thiab daim npav rho nyiaj kom tuaj yeem nkag mus rau qhov chaw khaws khoom

Kauj Ruam 26: Google Huab Cia - Tsim Thoob W/ Kev sim pub dawb:

Google Huab Cia - Tsim Thoob W/ Kev sim pub dawb
Google Huab Cia - Tsim Thoob W/ Kev sim pub dawb

Nyem dua ntawm "CREATE BUCKET".

Kauj Ruam 27: Google Huab Cia - Teeb Thoob:

Google Huab Cia - Teeb Thoob
Google Huab Cia - Teeb Thoob

Sau lub npe rau lub thoob thiab sau qhov seem raws li cov duab saum toj no qhia.

Kauj Ruam 28: Google Huab Cia - Cov Ntaub Ntawv:

Google Huab Cia - Cov Ntaub Ntawv
Google Huab Cia - Cov Ntaub Ntawv

Tsim 3 cov ntaub ntawv nrog cov npe no:

  • xwm txheej.txt;
  • xwm txheej.txt;
  • statuszgb.txt

Kauj Ruam 29: Google Huab Cia - Upload Cov Ntaub Ntawv:

Google Cloud Storage - Upload Cov Ntaub Ntawv
Google Cloud Storage - Upload Cov Ntaub Ntawv

Rub cov ntawv rub tawm mus rau lub thoob.

Kauj Ruam 30: Google Huab Cia - Txheeb xyuas qhov Upload:

Google Cloud Storage - Txheeb xyuas qhov Upload
Google Cloud Storage - Txheeb xyuas qhov Upload

Tos kom txog thaum txhua cov ntaub ntawv raug xa tawm.

Kauj Ruam 31: Google Cloud Functions - Tsim Ua Haujlwm:

Google Cloud Functions - Tsim Ua Haujlwm
Google Cloud Functions - Tsim Ua Haujlwm

Mus rau Google Cloud Functions page thiab nkag mus. Koj YUAV TSUM tau ua raws cov lus qhia rau kev sim pub dawb hauv Kauj Ruam 22 kom muaj peev xwm tsim tau txoj haujlwm.

Kauj Ruam 32: Google Cloud Functions - Teeb Ua Haujlwm:

Google Cloud Functions - Teeb Ua Haujlwm
Google Cloud Functions - Teeb Ua Haujlwm

Sau qhov teeb tsa raws li cov duab saum toj no qhia. Cov ntaub ntawv.zip muaj rau rub tawm hauv qab no.

Kauj Ruam 33: Google Cloud Functions - Inline Editor:

Google Cloud Functions - Inline Editor
Google Cloud Functions - Inline Editor

Hauv Function Console nyem rau ntawm lub cim nthuav dav ntawm tus kho kab hauv kab.

Kauj Ruam 34: Google Cloud Functions - Kho qhov txawv:

Google Cloud Functions - Kho qhov txawv txav
Google Cloud Functions - Kho qhov txawv txav
Google Cloud Functions - Kho qhov txawv txav
Google Cloud Functions - Kho qhov txawv txav

Teem lub thoob sib txawv rau lub npe ntawm Cov thoob tau teev tseg hauv Kauj Ruam 26 thiab nyem rau "OK".

Kauj Ruam 35: Google Cloud Functions - Txuag Hloov:

Google Cloud Functions - Txuag Hloov
Google Cloud Functions - Txuag Hloov

Nyem rau ntawm "Deploy" kom txuag tau qhov hloov pauv. Tos qhov funciton raug xa mus, thiab yog tias muaj qhov ua yuam kev tshwm sim, rov ua cov txheej txheem dua.

Kauj Ruam 36: Dialogflow - Console:

Dialogflow - Console
Dialogflow - Console

Mus rau nplooj ntawv Dialogflow thiab nyem rau ntawm "Mus rau console".

Kauj ruam 37: Dialogflow - Nkag Mus Rau:

Dialogflow - Nkag Mus Hauv
Dialogflow - Nkag Mus Hauv

Nkag mus siv tib tus lej Google zoo li ua ntej.

Kauj Ruam 38: Dialogflow - Chaw Teeb:

Dialogflow - Cov Chaw Teev Npe
Dialogflow - Cov Chaw Teev Npe

Xaiv lub tebchaws, lees txais cov nqe lus ntawm kev pabcuam thiab nyem rau "ACCEPT".

Kauj Ruam 39: Dialogflow - Tus Neeg Sawv Cev Teeb:

Dialogflow - Tus Neeg Sawv Cev Teeb
Dialogflow - Tus Neeg Sawv Cev Teeb

Xaiv cov lus, thaj tsam sijhawm thiab Cloud project (Kauj Ruam 3) thiab nyem o "CREATE".

Kauj ruam 40: Dialogflow - Kev teeb tsa:

Dialogflow - Kev teeb tsa
Dialogflow - Kev teeb tsa

Hauv tus neeg sawv cev console nyem rau ntawm lub cim teeb tsa.

Kauj ruam 41: Dialogflow - Ntshuam:

Dialogflow - Ntshuam
Dialogflow - Ntshuam

Nyem rau ntawm "Export thiab import".

Kauj ruam 42: Dialogflow - Rov Los Ntawm ZIP:

Dialogflow - Rov Los Ntawm ZIP
Dialogflow - Rov Los Ntawm ZIP

Nyem rau ntawm "RESTORE FROM ZIP".

Kauj Ruam 43: Dialogflow - Xaiv Cov Ntaub Ntawv:

Dialogflow - Xaiv Cov Ntaub Ntawv
Dialogflow - Xaiv Cov Ntaub Ntawv

Nyem rau "SELECT FILE".

Kauj Ruam 44: Dialogflow - Upload ZIP File:

Dialogflow - Upload ZIP Cov Ntaub Ntawv
Dialogflow - Upload ZIP Cov Ntaub Ntawv

Xaiv cov ntaub ntawv.zip muaj los rub tawm hauv qab no, ntaus RESTORE qhov nws hais rau thiab nyem rau hauv "RESTORE".

Kauj Ruam 45: Dialogflow - Txuag Hloov:

Dialogflow - Txuag Hloov
Dialogflow - Txuag Hloov

Ntawm tus neeg sawv cev console nyem rau "SAVE".

Kauj Ruam 46: Dialogflow - Ua tiav:

Dialogflow - Ua tiav
Dialogflow - Ua tiav

Nyem rau "Ua tiav" hauv cov ntawv qhia zaub mov sab laug.

Kauj Ruam 47: Dialogflow - Cloud Function Console

Dialogflow - Cloud Function Console
Dialogflow - Cloud Function Console

Hauv lwm lub tab mus rau lub console ntawm kev ua haujlwm yav dhau los thiab nyem rau ntawm "Trigger".

Kauj Ruam 48: Dialogflow - Huab Ua Haujlwm URL

Dialogflow - Huab Ua Haujlwm URL
Dialogflow - Huab Ua Haujlwm URL
Dialogflow - Huab Ua Haujlwm URL
Dialogflow - Huab Ua Haujlwm URL

Luam qhov URL thiab muab tshuaj txhuam ua Webhook URL hauv Dialogflow ua tiav kev teeb tsa.

Kauj Ruam 49: Teeb Dragonboard - Nkag mus rau DB Terminal:

Dragonboard Teeb - Nkag mus rau DB Terminal
Dragonboard Teeb - Nkag mus rau DB Terminal

Txhawm rau ua cov theem no koj xav tau daim ntawv nkag mus rau lub davhlau ya nyob twg ntawm DragonBoard. Hauv qhov piv txwv, PuTTY tau siv rau ntawm Windows kom nkag mus tau los ntawm UART serial. Tsis txhob khiav ib qho hais kom ua uas qhia qhia ua ROOT! Yog tias nkag mus rau lub davhlau ya nyob twg ntawm serial UART hloov mus rau cov neeg siv linaro raws li daim duab qhia.

Hais kom ua:

$ su lawm

Kauj ruam 50: Dragonboard Teeb - Rub Tawm Txoj Cai:

Rub tawm.zip hauv cov kauj ruam no thiab rho tawm.

Kauj Ruam 51: Dragonboard Teeb - Txuas Ntawm SFTP:

Dragonboard Teeb - Txuas Ntawm SFTP
Dragonboard Teeb - Txuas Ntawm SFTP
Dragonboard Teeb - Txuas Ntawm SFTP
Dragonboard Teeb - Txuas Ntawm SFTP

Tam sim no nws yog lub sijhawm hloov pauv daim ntawv pov thawj tsim tawm hauv Google Cloud rau Dragonboard. Nws tuaj yeem ua tiav hauv ntau txoj kev. Qhov piv txwv no yuav siv FileZila ntawm lub tshuab tshuab xa cov ntawv mus rau Dragonboard lub cim xeeb sab hauv.

Hauv "Tus Tswv" ntxig rau DB lub network IP*, tus siv tsis raug thiab tus lej nkag yog "linaro" thiab "Port" yog 22.

*Khiav ifconfig hauv lub davhlau ya nyob twg kom pom IP hauv zos.

$ ifconfig

Kauj Ruam 52: Dragonboard Teeb - Hloov Txoj Cai rau DB:

Hloov DB_GA nplaub tshev rau Dragonboard hauv/ home/ linaro/ folder.

Kauj Ruam 53: Teeb Dragonboard - Hloov Cov Ntawv Pov Thawj:

Dragonboard Teeb - Hloov Cov Ntawv Pov Thawj
Dragonboard Teeb - Hloov Cov Ntawv Pov Thawj
Dragonboard Teeb - Hloov Cov Ntawv Pov Thawj
Dragonboard Teeb - Hloov Cov Ntawv Pov Thawj

Tam sim no hloov cov ntaub ntawv pov thawj rau hauv paus ntawm DB_GA nplaub tshev thiab hloov npe "client_secret_XXX.json" rau "client_secret.json" thiab lwm qhov rau "service_account_key.json".

Kauj Ruam 54: Teeb Dragonboard - Txhim Kho Kev Ntseeg Siab:

Khiav apt hloov tshiab;

$ sudo apt hloov tshiab

Nruab cov pob khoom no ntawm apt: sej-pip, libglib2.0-dev, swig, portaudio19-dev, libpulse-dev;

$ sudo apt nruab sej-pip libglib2.0-dev swig portaudio19-dev libpulse-dev

Mus rau "DB" nplaub tshev hauv "DB_GA" thiab khiav cov lus txib no rau nruab pob ntim khoom;

$ sudo pip nruab requirementsr requirements.txt

Nruab NodeJS 8.x;

$ sudo curl -sL https://deb.nodesource.com/setup_8.x | sudo tsoo -

$ sudo apt install -y nodejs = 8.15.1-1nodesource1

Mus rau "DB_GA/DB/zbserver" nplaub tshev thiab khiav npm nruab

sudo npm nruab

Kauj Ruam 55: Kev teeb tsa Dragonboard - Kev lees paub qhov tseeb:

Dragonboard Teeb - Cov Ntawv Pov Thawj Muaj Peev Xwm
Dragonboard Teeb - Cov Ntawv Pov Thawj Muaj Peev Xwm

Tam sim no nws yog lub sijhawm los txuas lub HDMI saib, keyboard thiab nas rau DB.

Hauv DB Desktop nkag Ctrl+Alt+T qhib lub davhlau ya nyob twg.

Mus rau DB_GA nplaub tshev:

$ cd/tsev/linaro/DB_GA/

Khiav cov lus txib no:

$ sudo google-oauthlib-tool -client-secrets client_secret.json --credentials /root/.config/google-oauthlib-tool/credentials.json --scope https://www.googleapis.com/auth/assistant- sdk-tsab ntawv --save

Kauj Ruam 56: Kev teeb Dragonboard - Nkag Nkag Nkag Nkag:

Dragonboard Teeb - Credential ID nkag mus
Dragonboard Teeb - Credential ID nkag mus

Luam qhov URL uas cov lus txib kawg tso tawm thiab muab tshuaj txhuam rau hauv DB browser thiab nkag mus nrog tib tus lej Google siv hauv kev qhia tag nrho.

Kauj ruam 57: Khiav Google Assistant

Mus rau DB_GA/DB/syswatch_dev/nplaub tshev:

$ cd/tsev/linaro/DB_GA/DB/syswatch_dev/

Txuas Zigbee Module rau DB;

Khiav cov ntaub ntawv watch.py:

$ sudo nab hab sej watch.py

Pom zoo: