Cov txheej txheem:
- Kauj ruam 1: Tsim nplooj ntawv HTML
- Kauj Ruam 2: AJAX Thauj Cov Ntaub Ntawv Cov Ntaub Ntawv
- Kauj Ruam 3: Teem Kab Lus
- Kauj ruam 4: Nws yog! Ua tiav
Video: IoT Guru Huab - Piv Piv Piv Txwv: 4 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:26
IoT Guru Cloud tau muab cov kev pabcuam backend los ntawm REST API thiab koj tuaj yeem sib sau cov REST hu rau koj lub vev xaib yooj yim. Nrog Highcharts, koj tuaj yeem tso tawm kab kos ntawm koj qhov kev ntsuas yooj yim nrog AJAX hu.
Kauj ruam 1: Tsim nplooj ntawv HTML
Koj yuav tsum tsim cov ntaub ntawv HTML khoob nrog koj tus kws kho mob nyiam:
IoT Guru Cloud - Piv txwv daim ntawv yooj yim
Txuag nws: yooj yim -chart.html IoT Guru Huab - Piv txwv daim ntawv yooj yim
Kauj Ruam 2: AJAX Thauj Cov Ntaub Ntawv Cov Ntaub Ntawv
Koj yuav tsum tau ntxiv JQuery thiab hu rau AJAX rau hauv HTML cov ntaub ntawv, nws yuav raug thauj cov ntaub ntawv ntawm cov lus qhia tshwj xeeb thiab lub npe: IoT Guru Cloud - Piv txwv daim ntawv yooj yim
IoT Guru Cloud - Daim duab piv txwv piv txwv yooj yim ua haujlwm loadData (phiaj, npe npe, xAxisText, yAxisText, nodeId, fieldName, granulation) {rov $.ajax ({yam: "GET", url: 'https://api.iotguru.cloud/) ntsuas/loadByNodeId/' + nodeId +'/' + fieldName +'/' + granulation, dataType: "json", kev ua tiav: ua haujlwm (cov ntaub ntawv) {displayChart (lub hom phiaj, titleText, xAxisText, yAxisText, granulation, cov ntaub ntawv);}}); } muaj nuj nqi displayChart (phiaj, npe npe, xAxisText, yAxisText, granulation, cov ntaub ntawv) {} $ (ntawv). npaj txhij (muaj nuj nqi () {loadData ('graphAverage', 'Nruab nrab ncua ntawm cov tsheb ciav hlau (24 teev)', 'Hnub tim thiab sijhawm ',' min ',' ef39d670-70d9-11e9-be02-27e5a8e884a7 ',' nruab nrab ',' HNUB/288 ');}
Kauj Ruam 3: Teem Kab Lus
Ntxiv cov ntawv Highcharts JavaScript rau hauv HTML cov ntawv tom qab JQuery cov ntaub ntawv:
Ua kom tiav lub cev ntawm daim duab qhia ua haujlwm rau teeb tsa daim duab:
muaj nuj nqi displayChart (lub hom phiaj, titleText, xAxisText, yAxisText, granulation, data) {var options = {title: {text: titleText}, chart: {type: 'spline', renderTo: target,}, xAxis: {type: 'datetime ', title: {text: xAxisText}, gridLineWidth: 1, tickInterval: 3600 * 1000}, yAxis: {title: {text: yAxisText}}, series: [{}]}; rau (var i = 0; kuv <data.length; i ++) {options.series = {data: {}, name: {}}; options.series .name = data ["name"]; options.series .data = data ["data"]; } var chart = tshiab Highcharts. Chart (xaiv); }
Kauj ruam 4: Nws yog! Ua tiav
Koj ua tiav, thauj koj cov HTML hauv koj tus browser thiab tshawb xyuas daim duab!
Yog tias koj xav xa kev ntsuas, thov mus saib peb Tutorials nplooj ntawv lossis peb Lub Rooj Sib Tham Zej Zog!:)
Cov piv txwv tag nrho: GitHub - daim ntawv yooj yim
Pom zoo:
IOT Raws Li Huab Cua Huab Cua thiab Cua Ceev Saib Xyuas Qhov System: 8 Kauj Ruam
IOT Raws Li Huab Cua Huab Cua thiab Kev Saib Xyuas Cua Cua Cua: Tsim Los Ntawm - Nikhil Chudasma, Dhanashri Mudliar thiab Ashita Raj Cov huab cua yuav tsum tau saib xyuas txhawm rau txhawb nqa kev txhim kho hauv kev ua liaj ua teb, tsev ntsuab
Tsim kom muaj Lub Tsev IoT Huab Cua Zoo Sensor Tsis Muaj Huab Cua Xav Tau: 10 Kauj Ruam
Tsim kom muaj Lub Tsev IoT Huab Cua Zoo Tsis Xav Tau Huab Cua: Qhov zoo ntawm huab cua sab hauv lossis sab nraum zoov nyob ntawm ntau qhov chaw muaj kuab paug thiab kuj los ntawm huab cua. Kub Humidity PressureOrganic GasMicro
Huab Cua Huab Cua Huab Cua: 11 Kauj Ruam (nrog Duab)
Huab Cua Huab Cua Huab Cua: Txoj haujlwm no ua rau huab cua huab siv Raspberry Pi Zero W. Nws txuas rau Yahoo Huab Cua API thiab nyob ntawm qhov kev kwv yees rau hnub tom ntej hloov xim. Kuv tau tshoov siab los ntawm Wisconsin Gas Building uas muaj nplaim taws ntawm lub ru tsev uas hloov pauv
HRV (Lub Tsev Huab Cua Hloov Chaw) Arduino Tus Tswj Nrog Huab Cua Huab Cua: 7 Cov Kauj Ruam (nrog Duab)
HRV (Lub Tsev Huab Cua Hloov Chaw) Arduino Tus Tswj Nrog Air Economizer: HRV Arduino Tus Tswj Nrog Air Economizer Yog li kuv keeb kwm nrog txoj haujlwm no yog kuv nyob hauv Minnesota thiab kuv lub rooj tsav xwm hluav taws xob kib ntawm kuv LifeBreath 155Max HRV. Kuv tsis xav them $ 200 rau qhov tshiab Kuv ib txwm xav tau qee yam nrog kev lag luam huab cua kev ua txhaum
Tau Txais Txoj Cai Txwv Txwv Yav Dhau Los: 4 Cov Kauj Ruam
Tau Txais Cov Cai Txwv Yav Dhau Los: Cov tsev kawm ntawv uas muaj IT zoo (muaj FTP rau cov tub ntxhais kawm piv txwv) feem ntau yuav teeb tsa Txoj Cai Txwv Tsis Pub Siv Hauv computer kom txwv cov tub ntxhais kawm (hauv kev ua si, software phem lossis nyiag nkas). Qhov tseem ceeb uas cov tub ntxhais kawm tau npau taws ntawm