Cov txheej txheem:
- Kauj Ruam 1: Yam Khoom Siv Hauv Txoj Haujlwm no
- Kauj ruam 2: Zaj dab neeg
- Kauj Ruam 3: Kev Kho Vajtse Txuas
- Kauj ruam 4: Huab Configure
- Kauj ruam 5: Software Programming
Video: Pom IoTea LoRa Tshuaj (nrog Azure, Hloov Kho 1812): 5 Cov Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:27
Microsoft Azure yog kev pabcuam huab uas muab lub zog muaj zog thiab ruaj khov dua. Lub sijhawm no peb tau sim xa peb cov ntaub ntawv IoTea rau nws.
Kauj Ruam 1: Yam Khoom Siv Hauv Txoj Haujlwm no
Cov khoom siv kho vajtse
- Grove - Cov pa roj carbon dioxide (MH -Z16)
- Grove - Digital Lub Teeb Sensor
- Grove - Plua Plav Sensor (PPD42NS)
- Grove-Pa Pa Sensor (ME2-O2-Ф20)
- Av noo & Kub Sensor
- LoRa LoRaWAN Gateway - 868MHz Cov Khoom Siv nrog Raspberry Pi 3
- Grove - Temp & Humi & Barometer Sensor (BME280)
Software apps thiab cov kev pabcuam online
- Microsoft Visual Studio 2015
- Microsoft Azure
Kauj ruam 2: Zaj dab neeg
Ntawm Mengding Roob sab qaum teb sab hnub tuaj ntawm Ya'an, Sichuan, lub roob toj siab khiav sab hnub poob mus rau sab hnub tuaj hauv hiav txwv ntsuab. Qhov no yog qhov pom tshaj plaws rau Deng uas muaj hnub nyoog 36 xyoos, yog ib tus neeg ua haujlwm Mengding tshuaj yej tsawg heev ntawm nws tiam, nrog rau kev cog 50mu (= 3.3 hectares) nyob ntawm 1100m saum hiav txwv. Deng los ntawm tsev neeg ua cov tshuaj yej, tab sis nqa hauv tsev neeg cov keeb kwm tsis yog ib txoj haujlwm yooj yim. "Peb cov tshuaj yej tau loj hlob ntawm qhov siab nyob hauv ib puag ncig cov organic kom ntseeg tau tias nws muaj txiaj ntsig zoo. Tab sis nyob rau tib lub sijhawm, kev loj hlob ntom ntom yog qis, tus nqi siab thiab tawg paj tsis sib xws, ua tshuaj yej nyuaj rau sau. Tias yog vim li cas cov tshuaj yej saum toj roob hauv pes feem ntau yog sau me me thiab lawv qhov txiaj ntsig tsis tau xav txog ntawm kev ua lag luam. "Tau ob xyoos dhau los, Deng tau sim ua kom cov neeg siv khoom paub txog cov tshuaj yej toj siab los txhawb lawv tus nqi. Thiab thaum nws ntsib Fan, uas tab tom nrhiav kev cog ntoo los siv Seeed's IoTea thev naus laus zis, kev sib tw zoo tshaj plaws rau kev daws teeb meem tau ua.
Kauj Ruam 3: Kev Kho Vajtse Txuas
Thov ua raws Tutorial Yav dhau los txhawm rau txuas koj lub cuab yeej.
Kauj ruam 4: Huab Configure
Kauj Ruam 1. Tsim Pab Pawg
Nyem rau qhov no txhawm rau nkag mus rau Microsoft Azure. Thiab tom qab ntawd, nkag mus rau Pab Pawg Pabcuam hauv cov npe ntawm sab laug ntawm lub dashboard, nyem Ntxiv rau ntxiv Pawg Pab Pawg.
Pawg Pab Pawg tau siv los tswj hwm tag nrho cov peev txheej hauv txoj haujlwm, tom qab siv cov peev txheej huab, tshem tawm pab pawg pab pawg kom tshem tawm tag nrho cov peev txheej kom tsis txhob raug nqi. Hauv nplooj ntawv qhib, sau Cov Pab Pawg Npe lub npe (xws li iotea), xaiv Kev Sau Npe thiab Pab Pawg Pab Pawg qhov chaw yog xav tau, nyem Tsim los tsim Pawg Pab Pawg.
Kauj Ruam 2. Tsim Iot Hub
Tam sim no koj tuaj yeem tsim cov peev txheej huab, nyem Tsim qhov rov ua dua ntawm sab laug, xaiv Internet ntawm Yam - Iot Hub, nws yuav qhib nplooj ntawv tshiab.
Hauv Bas tab, xaiv Pawg Pabcuam uas koj nyuam qhuav tsim, thiab sau Iot Hub Lub Npe (xws li iotea), xaiv Kev Sau Npe thiab Cheeb Tsam yog xav tau, thiab tom qab ntawd tig mus rau Loj thiab scle tab.
Hauv Qhov Loj thiab ntsuas tab, xaiv F1: Qib dawb lossis B1: Qib theem pib hauv Tus Nqi thiab ntsuas qib sib xyaw, Qib Qib yuav siv 10.00 USD hauv ib hlis. Thaum kawg, tig mus Txheeb Xyuas + tsim tab txheeb xyuas koj cov tswv yim thiab nyem Tsim los tsim Iot Hub.
Kauj Ruam 3. Kho LORIOT
Nkag mus rau Iot Hub koj nyuam qhuav tsim, nyem Sib koom kev cai - ntaus ntawv, luam thawj qhov tseem ceeb hauv nplooj ntawv ntawm sab xis.
Qhib lub qhov rai tshiab tshiab (lossis tab), nkag mus rau koj LORIOT Tswj Vaj Huam Sib Luag, tig rau Daim Ntawv Thov - SampleApp, nyem cov ntaub ntawv tso tawm hauv Pawg tswj hwm - Hloov. Hauv Hloov pauv hom pawg, xaiv Azure Iot Hub, sau koj Iot Hub Lub Npe thiab tus lej tseem ceeb, thiab nyem lees paub hloov pauv khawm hauv qab.
Kauj Ruam 4. Ntxiv Iot ntaus ntawv
Nyem Devices hauv cov npe ntawm sab laug hauv LORIOT, theej koj li Device EUI.
Rov qab mus rau Azure Iot Hub, nyem Iot cov cuab yeej hauv cov npe ntawm sab laug ntawm Iot Hub. Nyem Ntxiv, sau Ntaus EUI rau Ntaus Tus ID hauv nplooj ntawv qhib.
TSEEM CEEB: Rho tawm txhua tus neeg tsim khoom hauv DEVICE EUI, cia nws zoo li 1122334455557777.
Nyem Txuag, txhua yam ua tiav.
Kauj Ruam 5. Txais D2C (Device to Cloud) Messages
Koj tuaj yeem ua raws Microsoft Docs los nyeem D2C Cov Lus.
Kauj ruam 5: Software Programming
Software Programming tau muab faib ua 3 ntu: Node, Gateway thiab Website, thov ua raws Tutorial yav dhau los rau program Node Part thiab Gateway Part. Kauj Ruam 1 txog 8 ntawm Lub Vev Xaib Tshooj kuj zoo ib yam li Tutorial Yav dhau los.
Yog tias koj twb tau teeb tsa Microsoft Azure, qhib lub davhlau ya nyob twg, nkag mus rau koj lub vev xaib lub hauv paus nplaub tshev, qhib qhov chaw virtual:
cd ~/iotea-hb
qhov chaw hauv/qhib
nruab Azure Event Hub module ntawm pip, thiab tsim cov ntawv tshiab.py (xws li iothub_recv.py):
pip nruab azure-eventhub
kov iothub_recv.py
thiab tom qab ntawd sau cov lej hauv qab no rau nws:
# --------------------------------------------------------------------------------------------
# Cai (c) Microsoft Corporation. Txhua txoj cai qhaib. # Muaj ntawv tso cai raws li MIT Daim Ntawv Tso Cai. Saib License.txt hauv txoj haujlwm hauv paus rau cov ntaub ntawv tso cai. # ------------------------------------------------------- ------------------------------------------- los ntawm azure ntshuam eventhub los ntawm azure. eventhub ntshuam EventData, EventHubClient, Offset import logging logger = logging.getLogger ('azure.eventhub') ntshuam db, json, sijhawm, datetime def get_time (): cntime = datetime.datetime.now () + datetime.timedelta (teev = +8) hnub tim = cntime.strftime ('%Y-{}-{}'). Hom ntawv (cntime.strftime ('%m'). Zfill (2), cntime.strftime ('%d'). Zfill (2)) teev = cntime.strftime ('%H'). Zfill (2) feeb = cntime.strftime ('%M'). Zfill (2) thib ob = cntime.strftime ('%S'). Zfill (2)) rov qab [hnub, teev, feeb, thib ob] def get_iothub_data (): daim ntawv = ['0'] * 11 tus neeg siv = EventHubClient.from_iothub_connection_string ('', debug = True) tus txais = client.add_receiver ("$ default", " 3 ", kev ua haujlwm = '/lus/xwm txheej', offset = Offset (datetime.datetime.utcnow ())) sim: client.run () eh_info = client.get_eventhub_info () print (eh_info) tau txais = receiver.receive (sijhawm tas = 5) luam tawm (tau txais) rau cov khoom hauv tau txais: kuv ssage = json.loads (str (item.message)) print (message) yog 'data' hauv xov: data = message ['data'] air_temp = str (int (data [0: 2], 16)) air_hum = str (int (cov ntaub ntawv [2: 4], 16)) siab = str (int ((cov ntaub ntawv [4: 8]), 16)) co2 = str (int (cov ntaub ntawv [8:12], 16)) hmoov av = str (int (cov ntaub ntawv [12:16], 16)) illumination = str (int (cov ntaub ntawv [16:20], 16)) o2 = str (puag ncig (int (cov ntaub ntawv [20:22], 16) / 10, 1)) av_temp = str (int (cov ntaub ntawv [22:24], 16)) av_hum = str (int (cov ntaub ntawv [24:26], 16)) voltage = str (puag ncig (int (cov ntaub ntawv [26:28]), 16) / int ('ff', 16) * 5, 1)) error = str (int (data [28:], 16)) list = [air_temp, air_hum, siab, co2, hmoov av, teeb pom kev zoo, o2, av_temp, av_hum, qhov hluav taws xob, yuam kev] thaum kawg: tus neeg siv khoom.stop () rov qab cov npe thaum Muaj tseeb: daim ntawv = tau txais sijhawm () + tau_iothub_data () db.insert (daim ntawv) luam tawm (npe)
Ua ntej koj pib qhov program, hloov koj txoj hlua txuas hauv
tus neeg siv = EventHubClient.from_iothub_connection_string ('', debug = Tseeb)
koj tuaj yeem tau txais koj txoj hlua sib txuas los ntawm kev nyem Sib koom kev cai - iotowner hauv Iot Hub, Kev sib txuas txoj hlua -tus lej tseem ceeb hauv nplooj ntawv qhib yog txoj hlua sib txuas.
Tom qab ntawd, koj tuaj yeem pib qhov program:
gunicorn iothub_recv: app
Pom zoo:
Pom IoTea LoRa Tshuaj (Hloov Kho Xyoo 1811): 5 Kauj Ruam
Pom IoTea LoRa Tshuaj (Hloov Kho Xyoo 1811): Internet+ yog lub tswv yim nrov tam sim no. Lub sijhawm no peb tau sim Internet ntxiv rau kev ua liaj ua teb kom ua kom cov tshuaj yej vaj loj hlob tuaj hauv Internet Tshuaj yej
Txhim Kho Cov Hloov Pauv Hloov Rau Hauv Ntse Kov Hloov Nrog Temp Monitoring: 4 Cov Kauj Ruam
Txhim Kho Qhov Hloov Pauv Hloov Mus Rau Ntse Kov Hloov Nrog Lub Sijhawm Saib Xyuas: Kuv paub txhua tus ntawm koj ntsib qhov teeb meem no tsawg kawg ib qho hauv koj lub neej lub rooj hloov pauv tau tawg los ntawm kev siv tas mus li. ntau lub sijhawm yog lub caij nplooj ntoo hlav sab hauv hloov pauv los yog m
Pom Qhov Pom Pom Pom Pom Lub Koob Yees Duab (TfCD): 15 Kauj Ruam (nrog Duab)
Pom Qhov Pom Pom Pom Pom Lub Koob Yees Duab (TfCD): Cov kev pabcuam paub uas tuaj yeem paub txog kev xav, ntsej muag ntawm tib neeg lossis cov khoom yooj yim tam sim no tseem nyob rau theem pib ntawm kev txhim kho, tab sis nrog kev kawm tshuab, thev naus laus zis no tau nce zuj zus. Peb tuaj yeem cia siab tias yuav pom ntau ntxiv ntawm cov khawv koob no hauv
Universal (tub sab) Kev tiv thaiv rau Cov Khoom Siv Hluav Taws Xob lossis Tsheb Nrog Pom Pom Hloov: 4 Cov Kauj Ruam (nrog Duab)
Universal (tub sab) Kev Tiv Thaiv rau Cov Khoom Siv Hluav Taws Xob lossis Tsheb Nrog Pom Tsis Pom: Kuv yuav qhia koj li cas koj tuaj yeem siv lub reed hloov los ua kev tiv thaiv thoob ntiaj teb rau cov khoom siv hluav taws xob lossis tsheb. Txhua yam koj xav tau yog tus pas nrig hloov thiab hlau nplaum. Rau lub tsheb koj yuav xav tau lub zog txuas mus ntxiv kom muaj peev xwm hloov pauv ntawm lub reed switch.A daim duab
Kev Sib Hloov Hloov Kho Hloov Kho rau Qub Guitar Amps: 11 Cov Kauj Ruam (nrog Duab)
Kev Sib Hloov Hloov Kho Hloov Kho rau Qub Guitar Amps: Txuag koj cov tawv nqaij! Txhim kho qhov kev txaus ntshai qub amp nrog kev hloov pauv cais. Muaj ob peb lub suab nrov qub (thiab xov tooj cua) rov qab nyob rau hauv ib hnub rub lub zog los ntawm kev kho tsev neeg ncaj qha " lub ntsiab " xov hlau Qhov no yog kev xyaum tsis nyab xeeb. Feem ntau