Cov txheej txheem:

Muab cov ntaub ntawv los ntawm koj li cuab yeej siv: 10 Cov Kauj Ruam
Muab cov ntaub ntawv los ntawm koj li cuab yeej siv: 10 Cov Kauj Ruam

Video: Muab cov ntaub ntawv los ntawm koj li cuab yeej siv: 10 Cov Kauj Ruam

Video: Muab cov ntaub ntawv los ntawm koj li cuab yeej siv: 10 Cov Kauj Ruam
Video: Zaj dub - xaiv tsis tau los ua koj tug -nkauj tawm tshiab 2022 2024, Hlis ntuj nqeg
Anonim
Muab cov ntaub ntawv los ntawm koj li cuab yeej siv
Muab cov ntaub ntawv los ntawm koj li cuab yeej siv

Cov lus qhia no yuav qhia koj yuav ua li cas coj cov ntaub ntawv tawm los ntawm USB ntsuas ntsuas kub thiab sib koom nws hauv lub vev xaib siv syndicit.com. Thaum koj cov ntaub ntawv raug khaws tseg ntawm syndicit.com koj tuaj yeem faib nws hauv lub vev xaib ua daim ntawv nthuav dav, nyob hauv Google Ntiaj Teb pub, RSS pub, thiab ntau dua. USB ntsuas ntsuas kub: https://www.instructables.com/id/EV9KA88GBMEQZJJOR5/You tseem tuaj yeem koom nrog yog tias koj tsis muaj cov ntaub ntawv pub ntawm koj tus kheej. Koj tuaj yeem sib xyaw thiab phim cov khoom noj uas twb muaj lawm los tsim koj tus kheej cov khoom noj. Tag cov khoom ib yam li instructables.com & txaus siab rau txhua qhov ajaxy web2.0 qhov zoo.

Kauj Ruam 1: Cov Khoom Koj Yuav Tsum Tau

Yam Koj Yuav Tsum Tau
Yam Koj Yuav Tsum Tau

Cov ntaub ntawv qhov chaw: Tus ntsuas kub USB yuav siv rau hauv qhov kev qhia no, tab sis siv cov ntaub ntawv twg los siv tau. Cov ntaub ntawv ntawm USB ntsuas ntsuas kub muaj nyob ntawm no: https://www.instructables.com/id/EV9KA88GBMEQZJJOR5/SyndicitGATE: SyndicitGATE yog qhov yooj yim heev (Windows) Visual Basic program nrog 2 lub luag haujlwm. Nws suav nrog kev ua haujlwm ntawm cov qauv kev kawm suav nrog USB ntsuas lub ntsuas kub: nws siv MSCOM32. OCX los xa daim ntawv thov rau cov ntaub ntawv los ntawm USB chaw nres nkoj. Cov lus teb (ntsuas kub hauv qhov no) muab tso rau hauv HTTP POST thov thiab xa mus rau syndicit.com siv mswinsock. OCX. (Koj yuav xav tau ob qho tib si ntawm Windows cov ntaub ntawv no rau syndicitGATE los ua haujlwm. Koj yuav tsum muaj lawv, yog tias tsis yog, sab laj Google.) Cov peev txheej thiab suav ua tiav tau suav nrog hauv cov phiaj xwm khaws cia. *** Nco tseg: trialexsays: Koj hais txog koj xav tau cov ntaub ntawv "MSCOM32. OCX" - Kuv xav tias qhov no yuav tsum nyeem "MSCOMM32. OCX". Kuv kuj yuav tsum mus thiab nrhiav cov ntaub ntawv "COMDLG32. OCX" ***** Syndicit.com account: Mus rau syndicit.com thiab sau npe rau tus as khauj. Nov yog kuv qhov chaw sim rau teeb tsa cov ntaub ntawv sib koom ua ke. Pub dawb siv, txawm hais tias koj yuav tsum pom zoo tias txhua cov ntaub ntawv koj koom ua ke tau muab tso rau hauv pej xeem.

Kauj Ruam 2: Tsim Khoom Noj Tshiab ntawm Syndicit.com

Tsim Khoom Noj Tshiab ntawm Syndicit.com
Tsim Khoom Noj Tshiab ntawm Syndicit.com

Nkag mus ntawm https://www.syndicit.com/account/loginClick 'Tshiab Pub' nyob rau sab saum toj ntawv qhia zaub mov. Kev koom ua ke yuav tsim txoj hauv kev tshwj xeeb lub npe raws li koj lub npe piav qhia. (Nws siv txog thawj 3 lo lus lossis 20 tus cim, tom qab ntawv txuas ntxiv# ## mus rau qhov kawg kom txog thaum lub npe tshwj xeeb tau tsim). Piv txwv lub npe yog 'ntsuas cuab yeej', uas ua rau muaj txoj hauv kev tshwj xeeb 'test_device'.

Kauj Ruam 3: Sau Cov Lus Qhia rau Koj Pub

Sau Cov Lus Qhia rau Koj Pub
Sau Cov Lus Qhia rau Koj Pub

Tom qab npe cov khoom noj koj yuav raug xa rov mus rau nplooj ntawv uas koj tuaj yeem nkag tau cov ntsiab lus thiab ntxiv cov hloov pauv.

Nyem 'kho' kom nkag mus rau cov ntaub ntawv piav qhia txog koj cov khoom noj. Koj yuav xav tau ob daim ntaub ntawv los ntawm nplooj ntawv no kom pib. Ua ntej, nco ntsoov txoj hauv kev ntaus ntawv hauv koj tus browser (qhov no, 'test_device'). Qhov thib ob, teeb tus password rov qab hauv ntu kev tswj hwm. Txoj hauv kev ntaus ntawv ('test_device') thiab rov qab lo lus zais ('testpassword' hauv qhov piv txwv) xav tau nkag mus rau backend (khaws cov ntaub ntawv). Rau kev nyab xeeb ntxiv koj tuaj yeem kaw lub backend rau IP chaw nyob. Nyem 'pab' kom paub meej ntxiv yog tias muaj dab tsi tsis meej.

Kauj Ruam 4: Ntxiv Qee Qhov Qub

Ntxiv Qee Qhov Hloov Pauv
Ntxiv Qee Qhov Hloov Pauv

Tom ntej no, peb ntxiv qee qhov hloov pauv rau qhov pub. Tus ntsuas ntsuas ntsuas ntsuas kub hauv tsev/sab nraum zoov yog li peb xav tau ob qhov sib txawv.

Nyem rau ntawm '+ ntxiv qhov sib txawv'. Sau lub npe piav qhia rau qhov hloov pauv tshiab. Txoj hauv kev tshwj xeeb yuav raug tsim los siv tib cov txheej txheem uas tau piav yav dhau los. Hauv qhov piv txwv kuv tsim 2 qhov sib txawv hu ua 'kub hauv tsev' thiab 'kub sab nraum zoov'.

Kauj Ruam 5: Teeb tsa Cov Hloov Pauv

Teeb cov Variables
Teeb cov Variables

Nyem qhov 'cov ntsiab lus' txuas ib sab ntawm koj qhov kev hloov pauv tshiab. Hauv nplooj ntawv no koj tuaj yeem sau cov ntsiab lus hais txog tus neeg sib txawv.

Vim tias cov ntaub ntawv yog ntsuas kub, hom sib txawv tau teeb tsa rau 'tus lej' thiab chav rau 'degrees'. Nco ntsoov cov npe tshwj xeeb txoj hauv kev muab rau koj qhov kev hloov pauv. Cov no yuav raug siv los ua cov npe sib txawv thaum tso cov ntaub ntawv rau hauv backend. Hauv qhov piv txwv, txoj hauv kev yog 'sab hauv_temperature' thiab 'sab nraum zoov_temperature'.

Kauj Ruam 6: Teeb tsa SyndicitGATE

Teeb tsa SyndicitGATE
Teeb tsa SyndicitGATE

SyndicitGATE yog qhov yooj yim VB program uas qhia tau tias yuav cuam tshuam nrog syndicit.com backend li cas. Lub hauv paus thiab suav ua EXE suav nrog hauv qhov phiaj xwm khaws cia. Qhib syndicitGATE. Nkag mus rau cov ntaub ntawv hauv qab no hauv 'syndicit.com kev teeb tsa kev sib txuas' thaj chaw: Backend: https://www.syndicit.com/backendMember Sign-in: koj syndicit.com username (ian hauv qhov piv txwv) Pub txoj hauv kev: txoj hauv kev tshwj xeeb rau koj pub (test_device) Pub tus password: tus password uas koj tau muab rau koj pub (testpassword) Teeb koj cov lej lossis USB ntaus ntawv hauv 'teeb tsa lub cuab yeej'. Cov ntsiab lus teeb tsa ntxiv muaj nyob hauv cov ntawv qhia zaub mov pab.

Kauj Ruam 7: Teeb Cov Hloov Pauv hauv SyndicitGATE

Teeb Teeb Meem hauv SyndicitGATE
Teeb Teeb Meem hauv SyndicitGATE

Nyem 'teeb tsa hloov pauv' thiab lub qhov rai tshiab yuav qhib.

Nkag mus rau txoj hauv kev tshwj xeeb lub npe uas tau muab rau koj qhov kev hloov pauv hauv qhov kev txiav txim uas lawv tuaj tawm ntawm lub cuab yeej. Tus ntsuas kub hauv USB tso tawm qhov kub hauv tsev ua raws qhov ntsuas kub sab nraum, lawv tau nkag mus rau hauv qhov kev txiav txim no. Nyem 'Siv' tom ntej ntawm qhov sib txawv (s) uas yuav tsum tau txais los ntawm lub cuab yeej, tom qab ntawv nyem 'OK'.

Kauj Ruam 8: Pib Loggin 'Cov Ntaub Ntawv

Pib Loggin 'Cov Ntaub Ntawv
Pib Loggin 'Cov Ntaub Ntawv

Yog tias koj xav sim koj qhov kev sib txuas rau syndicit.com backend nyem 'sim' Lub qhov rai debug yuav qhib thiab koj yuav tsum pom '***** kev sib txuas ua tiav *****' cov lus teb los ntawm lub backend.

Nyem 'Pib' pib sau cov ntaub ntawv. Yog tias lub qhov rais debug qhib qhov kev sib tham sib tham ntawm syndicitGATE, syndicit.com, thiab koj lub cuab yeej yuav tshwm sim.

Kauj Ruam 9: Qhov tob: Qhov SyndicitGATE Ua Dab Tsi?

Hauv qhov tob: Qhov Tseeb Puas Yog SyndicitGATE Ua?
Hauv qhov tob: Qhov Tseeb Puas Yog SyndicitGATE Ua?

SyndicitGATE yog qhov yooj yim Visual Basic program uas tsim HTTP POST thiab xa nws los ntawm winsock32.dll. Hauv kev debug hom koj tuaj yeem pom tseeb tias HTTP ncej zoo li cas. Paub meej txog ntawm syndicit.com backend ua raws. Qhov chaw nyob tom qab yog https://www.syndicit.com/backend. Txhawm rau nkag mus rau lub hauv paus koj yuav tsum muaj koj li syndicit.com lub npe siv, lub npe pub zaub mov, tus lej pub nkag, thiab ib lossis ntau qhov kev hloov pauv teeb tsa rau pub. Cov ntaub ntawv tuaj yeem txuas ntxiv siv HTTP GET thiab HTTP POST. Us npe, txoj hauv kev pub, thiab pub tus lej nkag mus yuav tsum nkag mus rau lub backend. Cov no yuav tsum raug xa raws li qhov hloov pauv lub npe 'tus siv', 'pub', thiab 'feedpassword' feem. Piv txwv pub nyob ntawm 'syndicit.com/stream/ian/test_device/':'user' - koj syndicit.com username (user = ian). 'pub' - txoj hauv kev muab rau koj lub cuab yeej (pub = test_device) 'feedpassword' - tus password koj muab rau koj pub rau ntawm nplooj ntawv teeb tsa (piv txwv li feedpassword = testpassword) yog tias pub muaj ob qhov sib txawv nyob ntawm cov kab hauv qab no: stream/ian/test_device/outdoor_temperaturestream/ian/test_device/indoor_temperature cov ntaub ntawv qhov tseem ceeb tau siv los ntawm kev siv lub npe lub npe raws li lub npe sib txawv: outdoor_temperature = 24.5indoor_temperature = 23.2GET yog qhov yooj yim tshaj plaws los ua qhov ntxig, tab sis tsis nyab xeeb heev. Cias ntxiv qhov xav tau hloov pauv rau lub vev xaib chaw nyob. Txhawm rau ntxig qhov tseem ceeb hauv qhov piv txwv nrog tus password 'testpassword', peb ua cov hauv qab no: https://www.syndicit.com/backend/? User = ian & feed = test_device & feedpassword = testpassword & outdoor_temperature = 24.5 & indoor_temperature = 23.2POST muaj kev nyab xeeb tab sis ntau dua nyuab. Txhawm rau xa cov ntaub ntawv los ntawm POST txoj kev koj yuav tsum ua raws li qhov ua ntawm nias lub pob xa ntawm nplooj ntawv HTML. Variables tuaj yeem xa los ntawm ob qho POST thiab GET ua ke. POSTed variables ALWAYS override GET variables. I have 2 variables in a feed, kuv puas yuav tsum xa ob qho tib si txhua lub sijhawm? cov lej txhais tau tias? Nov yog lawv txhais li cas: 0 - tus neeg siv, pub, lossis feedpassword tsis tau teeb tsa. 1 - tus neeg siv, pub, pub tus lej nkag, lossis tus IP chaw nyob (yog tias xauv tau qhib) tsis raug2 - N/A3 - ua tiav kev lees paub, muaj kev hloov pauv tau txais kev cawmdim.

Kauj ruam 10: Txheeb Xyuas Koj Cov Ntaub Ntawv Pub Dawb

Txheeb Xyuas Koj Cov Ntaub Ntawv Pub Dawb
Txheeb Xyuas Koj Cov Ntaub Ntawv Pub Dawb
Txheeb Xyuas Koj Cov Ntaub Ntawv Pub Dawb
Txheeb Xyuas Koj Cov Ntaub Ntawv Pub Dawb

Tam sim no nws yog lub sijhawm los tshuaj xyuas cov txiaj ntsig.

Nkag mus rau nplooj ntawv sib txawv. (/test_device/indoor_temperature) Nyem rau ntawm ntau qhov kev pub khoom noj kom sib koom ua ke koj cov ntaub ntawv hauv ntau yam qauv: html ntxhuav, ntawv nthuav tawm, RSS, Google Earth, thiab ntau dua. Suav nrog cov duab thiab pub rau ntawm koj tus kheej lub vev xaib.

Pom zoo: