DB36T1845-2023農(nóng)村人居環(huán)境長效管護(hù)平臺(tái)數(shù)據(jù)交換規(guī)范_第1頁
DB36T1845-2023農(nóng)村人居環(huán)境長效管護(hù)平臺(tái)數(shù)據(jù)交換規(guī)范_第2頁
DB36T1845-2023農(nóng)村人居環(huán)境長效管護(hù)平臺(tái)數(shù)據(jù)交換規(guī)范_第3頁
DB36T1845-2023農(nóng)村人居環(huán)境長效管護(hù)平臺(tái)數(shù)據(jù)交換規(guī)范_第4頁
DB36T1845-2023農(nóng)村人居環(huán)境長效管護(hù)平臺(tái)數(shù)據(jù)交換規(guī)范_第5頁
已閱讀5頁,還剩58頁未讀 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡介

ICS35.100.20CCSL72

DB36江 西 省 地 方 標(biāo) 準(zhǔn)DB36/T1845—2023農(nóng)村人居環(huán)境長效管護(hù)平臺(tái)數(shù)據(jù)交換規(guī)范Dataexchangespecificationforlong-termmanagementandprotectionplatformofrurallivingenvironment20232023091820240301江西省市場監(jiān)督管理局發(fā)布DB36/T1845DB36/T1845—2023DB36/T1845DB36/T1845—2023目??次前言 II引言 III范圍 1規(guī)范性引用文件 1術(shù)語和定義 1數(shù)據(jù)交換流程 1接口要求 2接口設(shè)計(jì) 3設(shè)備上報(bào)頻次 4設(shè)備離線存儲(chǔ)、斷點(diǎn)續(xù)傳 4附錄A(資料性)接口設(shè)計(jì)標(biāo)準(zhǔn) 5附錄B(資料性)返回接口示例 22II前??言本文件按照GB/T1.1-20201草。請(qǐng)注意本文件的某些內(nèi)容可能涉及專利。本文件的發(fā)布機(jī)構(gòu)不承擔(dān)識(shí)別專利的責(zé)任。本文件由江西省農(nóng)業(yè)農(nóng)村廳提出并歸口。IIII引??言IIIIIIDB36/T1845DB36/T1845—2023DB36/T1845DB36/T1845—2023農(nóng)村人居環(huán)境長效管護(hù)平臺(tái)數(shù)據(jù)交換規(guī)范范圍本文件適用于農(nóng)村人居環(huán)境長效管護(hù)平臺(tái)接口設(shè)計(jì)。規(guī)范性引用文件(包括所有的修改單適用于本文件。GB/T28168信息技術(shù)中間件消息中間件技術(shù)規(guī)范GB/T33745—2017物聯(lián)網(wǎng)術(shù)語GB/T36478.1—2018物聯(lián)網(wǎng)信息交換和共享第1部分:總體架構(gòu)3術(shù)語和定義3術(shù)語和定義GB/T33745—2017、GB/T36478.1—2018界定的以及下列術(shù)語和定義適用于本文件。3.1農(nóng)村人居環(huán)境長效管護(hù)平臺(tái)rurallivingenvironmentlong-termmanagementplatformAI3.2數(shù)據(jù)采集終端dataacquisitionterminal3.3物聯(lián)網(wǎng)監(jiān)測數(shù)據(jù)共享模塊/系統(tǒng)IoTmonitoringdatasharingmodule/system農(nóng)村人居環(huán)境長效管護(hù)平臺(tái)中采集物聯(lián)網(wǎng)動(dòng)態(tài)監(jiān)測數(shù)據(jù)并提供數(shù)據(jù)共享服務(wù)的模塊/系統(tǒng)。4數(shù)據(jù)交換流程1依據(jù)GB/T36478.1—2018/圖1數(shù)據(jù)交換示意圖圖1數(shù)據(jù)交換示意圖5接口要求約定RESTfulAPIJSON為便于提供方和需求方統(tǒng)一調(diào)用數(shù)據(jù),接口方法和參數(shù)宜采用英文單詞命名。協(xié)議使用HTTPS協(xié)議。消息格式請(qǐng)求頭不同的接口應(yīng)具有同一請(qǐng)求頭,請(qǐng)求頭的名稱和含義描述應(yīng)符合表1。2表1請(qǐng)求頭名稱描述必選Host指定請(qǐng)求的服務(wù)器的域名和端口號(hào)必選Connection表示是否需要持久連接必選Accept表示接受所接收的內(nèi)容類型必選Content-type請(qǐng)求的與實(shí)體對(duì)應(yīng)的MIME信息必選Content-Length請(qǐng)求的內(nèi)容長度必選CookieHTTP請(qǐng)求發(fā)送時(shí),會(huì)把保存在該請(qǐng)求域名下的所有cookie值一起發(fā)送給網(wǎng)站服務(wù)器可選User-agent內(nèi)容包含發(fā)出請(qǐng)求的用戶信息可選5.3.2請(qǐng)求參數(shù)不同接口功能,其請(qǐng)求參數(shù)存在差異。請(qǐng)求參數(shù)格式示例見表2。表2請(qǐng)求參數(shù)格式示例參數(shù)名必選類型說明給出字段所代表的參數(shù)名描述參數(shù)是否為必選描述數(shù)據(jù)的數(shù)據(jù)類型對(duì)參數(shù)的描述及補(bǔ)充說明————————5.4返回?cái)?shù)據(jù)格式5.4返回?cái)?shù)據(jù)格式返回?cái)?shù)據(jù)應(yīng)包含:返回狀態(tài)碼、返回狀態(tài)信息、具體數(shù)據(jù)。以json格式為例。{"code":"0","msg":"success","data":{//json格式的具體數(shù)據(jù)}}6接口設(shè)計(jì)6.1基本要求接口設(shè)計(jì)應(yīng)滿足如下要求:——接口地址:http://服務(wù)器地址:端口號(hào)/api/open/接口方法名?!涌趨f(xié)議:WebService?!幋a方式:UTF-8?!粨Q格式:JSON。接口設(shè)計(jì)參考附錄A,接口返回示例見附錄B。36.2返回狀態(tài)碼code接口返回狀態(tài)碼見表3。表3返回狀態(tài)碼code及描述參數(shù)名code值描述0成功999失敗1111正在處理7設(shè)備上報(bào)頻次設(shè)備主要數(shù)據(jù)上報(bào)頻次如下:——智能垃圾桶:1條/6小時(shí)?!|(zhì)監(jiān)測設(shè)備:1條/6小時(shí)?!?dú)馕短綔y器:1條/6小時(shí)?!囕d:1條/分鐘?!ㄅ疲?條/5分鐘?!h(huán)境探測器:1條/2小時(shí)。8設(shè)備離線存儲(chǔ)、斷點(diǎn)續(xù)傳8設(shè)備離線存儲(chǔ)、斷點(diǎn)續(xù)傳設(shè)備應(yīng)具備在網(wǎng)絡(luò)不佳時(shí)本地存儲(chǔ)數(shù)據(jù),待網(wǎng)絡(luò)通暢時(shí)上傳未上報(bào)數(shù)據(jù)的功能。消息機(jī)制應(yīng)符合GB/T28168的規(guī)定。4附錄A(資料性)服務(wù)調(diào)用步驟數(shù)據(jù)需求方將授權(quán)(appSecret)進(jìn)行SHA-2SHA-2加密算法的基礎(chǔ)數(shù)據(jù)提供方數(shù)據(jù)提供方應(yīng)滿足如下要求:——獲取請(qǐng)求數(shù)據(jù)進(jìn)行相關(guān)業(yè)務(wù)處理;——根據(jù)數(shù)據(jù)需求方的請(qǐng)求輸出數(shù)據(jù);——返回調(diào)用結(jié)果給數(shù)據(jù)需求方。獲取令牌接口應(yīng)滿足如下要求:——接口方法:getToken;——接口路徑:api/open/oauth/;——請(qǐng)求方式:POST。請(qǐng)求參數(shù)見表A.1。表A.1getToken獲取令牌接口應(yīng)滿足如下要求:——接口方法:getToken;——接口路徑:api/open/oauth/;——請(qǐng)求方式:POST。請(qǐng)求參數(shù)見表A.1。表A.1getToken返回示例見附錄B.1。設(shè)備管理產(chǎn)品列表獲取農(nóng)村人居環(huán)境長效管護(hù)平臺(tái)標(biāo)準(zhǔn)物聯(lián)網(wǎng)產(chǎn)品,接口要求如下:——接口方法:getProductList;——接口路徑:api/open/product/;——請(qǐng)求方式:POST。參數(shù)見表A.2。表A.2getProductList5參數(shù)名必選類型說明appId是String由平臺(tái)頒發(fā)appSecret是String由平臺(tái)頒發(fā)參數(shù)名必選類型說明token是String通信證keyproductName否String產(chǎn)品名稱productProtocol否integer產(chǎn)品協(xié)議:integer,產(chǎn)品協(xié)議:1.T-LINK2.MQTT3.LWM2M4.TUP5.HTTP7.TCP8TCP(網(wǎng)9UDP(網(wǎng)關(guān)子設(shè)備協(xié)議)10.網(wǎng)關(guān)產(chǎn)品MQTT(網(wǎng)關(guān)產(chǎn)品協(xié)議)11.南向云productId是int產(chǎn)品id返回示例見附錄B.2。A.3.2設(shè)備列表獲取農(nóng)村人居環(huán)境長效管護(hù)平臺(tái)設(shè)備列表的接口要求如下:——接口方法:getDeviceList;——接口路徑:api/open/device/;表A.3getDeviceList返回示例見附錄B.3表A.3getDeviceList返回示例見附錄B.3。A.3.3新建產(chǎn)品添加產(chǎn)品(產(chǎn)品為設(shè)備直連+非NB網(wǎng)關(guān)協(xié)議)的接口要求如下:——接口方法:createProduct;——接口路徑:api/open/product/;——請(qǐng)求方式:POST。請(qǐng)求參數(shù)見表A.4。6參數(shù)名必選類型說明token是String通信證keynetStatus否int設(shè)備狀態(tài)deviceNo否String設(shè)備編號(hào)productId是String產(chǎn)品idgridCode是String區(qū)域code(依據(jù)中國行政區(qū)域編碼劃分規(guī)則)表A.4createProduct參數(shù)名必選類型說明token是String通信證key請(qǐng)求body(數(shù)據(jù)類型application/json;charset=utf-8){"accessType":1,"authType":0,"dataEncryption":0,"deviceModel":"string","encryptionType":0,"endpointFormat":0,"lwm2mEdrxTime":null,"manufacturerId":"string","networkType":0,"nodeType":1,"payloadFormat":0,"powerModel":0,"productDesc":"string","productName":"string","productProtocol":0,"productType":"string","secondaryType":"string","thirdType":"string","tupIsThrough":0,"tupDeviceModel":"string"}描述:productName:產(chǎn)品名稱(必填):產(chǎn)品名稱最多64個(gè)字符,產(chǎn)品名稱必須包含數(shù)字或字母或漢字,產(chǎn)品名稱不能重復(fù)productType:產(chǎn)品分類(必填)secondaryType:二級(jí)分類(必填)thirdType:三級(jí)分類(必填)nodeType:節(jié)點(diǎn)類型(必填):1.設(shè)備,2.網(wǎng)關(guān)accessType:接入類型(必填):1.設(shè)備直連,2.網(wǎng)關(guān)接入,3.南向云接入(只支持1)networkType:網(wǎng)絡(luò)類型(必填):1.WIFI,2.移動(dòng)蜂窩數(shù)據(jù)3.NB-IoT,4.以太網(wǎng),5.藍(lán)牙,6.ZigBee(只支持1/2/3/4)productProtocol:產(chǎn)品協(xié)議(必填):只支持1.T-LINK協(xié)議2.MQTT協(xié)議3.LWM2M協(xié)議5.HTTP協(xié)議6.JT/T8087.TCP協(xié)議10.網(wǎng)關(guān)MQTT協(xié)議1:特征串認(rèn)證,2:SM9認(rèn)證,3:證書認(rèn)證,4:IMEI認(rèn)證,7:IPV6標(biāo)識(shí)認(rèn)證payloadFormat:消息格式1:json,2:緊湊二進(jìn)制7dataEncryptiondataEncryption:數(shù)據(jù)加密方式1:sm1,2:sm2,3:sm4,4:dtls,5:明文(只支持MQTT/LWM2M)encryptionType:安全類型(只支持MQTT,TCP協(xié)議)0:一機(jī)一密,1:一型一密tupIsThrough:是否透傳:0.透傳,1不透傳(JT/T808,tcp協(xié)議,只有透傳,消息格式必須只能傳null)deviceModel:JT/T808協(xié)議設(shè)備型號(hào)manufacturerId:JT/T808協(xié)議制造商IDendpointFormat:Endpoint 格式(LWM2M 協(xié)議填):1.IMEI2.URN:IMEI:###############3.URN:IMEI-IMSI:###############-###############4.URN:IMEI+SM9powerModel:省電模式(LWM2M協(xié)議必填):1.PSM2.DRX3.eDRXlwm2mEdrxTime:eDRX模式時(shí)間窗(LWM2M協(xié)議,當(dāng)省電模式為3時(shí),必填):20~10485.76間的值,精確到小數(shù)點(diǎn)后兩位productDesc:產(chǎn)品描述(選填):產(chǎn)品描述最多100個(gè)字符tupDeviceModel:設(shè)備型號(hào),選填,設(shè)備直連并且非JT/T808協(xié)議產(chǎn)品必填返回示例見附錄B.4。A.3.4刪除產(chǎn)品刪除產(chǎn)品數(shù)據(jù),如果產(chǎn)品下有設(shè)備數(shù)據(jù),則無法刪除產(chǎn)品。刪除產(chǎn)品的接口要求如下:——接口方法:deleteProduct;——請(qǐng)求方式:DELETE。請(qǐng)求參數(shù)見表A.5。表A.5deleteProduct——請(qǐng)求方式:DELETE。請(qǐng)求參數(shù)見表A.5。表A.5deleteProduct返回示例見附錄B.5A.3.5更新產(chǎn)品更新產(chǎn)品數(shù)據(jù)的接口要求如下:——接口方法:updateProduct;——接口路徑:api/open/product/;——請(qǐng)求方式:PUT。請(qǐng)求參數(shù)見表A.6。8參數(shù)名必選類型說明token是String通信證keymasterKey是StringmasterKey在該設(shè)備所屬產(chǎn)品的概況中可以查看productId是int產(chǎn)品idgridCode是String區(qū)域code(依據(jù)中國行政區(qū)域編碼劃分規(guī)則)返回示例見附錄B.6返回示例見附錄B.6。A.3.6創(chuàng)建設(shè)備增加設(shè)備的接口要求如下:——接口方法:createDevice;——接口路徑:api/open/device/;——請(qǐng)求方式:POST。請(qǐng)求參數(shù)見表A.7。表A.7createDevice9表A.6updateProduct參數(shù)名必選類型說明token是String通信證keygridCode是Stringcode(依據(jù)中國行政區(qū)域編碼劃分規(guī)則)請(qǐng)求body(數(shù)據(jù)類型application/json;charset=utf-8){{"endpointFormat":null,"powerModel":null,"productDesc":"string","productId":0,"productName":"string","lwm2mEdrxTime":null}描述:productId:產(chǎn)品ID,必填productName:產(chǎn)品名稱,產(chǎn)品名稱租戶內(nèi)不能重復(fù),必填productDesc:產(chǎn)品描述,選填endpointFormatendpoint類型(Lwm2m協(xié)議必填)1.IMEI2.URN:IMEI:###############3.URN:IMEI-IMSI:###############-###############4.URN:IMEI+SM9注:認(rèn)證方式為SM9認(rèn)證時(shí),endpoint類型為4認(rèn)證方式為IMEI認(rèn)證、sm2認(rèn)證時(shí),endpoint類型為1、2、3powerModel:省電模式(Lwm2m協(xié)議必填)1.PSM2.DRX3.eDRXlwm2mEdrxTime:eDRX3~10485.76間的值,精確到小數(shù)點(diǎn)后兩位參數(shù)名必選類型說明token是String通信證keymasterKey是StringmasterKey在該設(shè)備所屬產(chǎn)品的概況中可以查看gridCode是String區(qū)域code(依據(jù)中國行政區(qū)域編碼劃分規(guī)則)返回示例見附錄返回示例見附錄B.8。A.3.8更新設(shè)備更新設(shè)備數(shù)據(jù)的接口要求如下:——接口方法:updateDevice;——接口路徑:api/open/device/;——請(qǐng)求方式:PUT。請(qǐng)求參數(shù)見表A.9。表A.9updateDevicebody(application/json;charset=utf-8)10deviseName是String設(shè)備名稱deviceSn是String設(shè)備編號(hào)imei是String設(shè)備imei號(hào)productId是int產(chǎn)品idoperator是String操作人返回示例見附錄B.7。A.3.7刪除設(shè)備刪除設(shè)備數(shù)據(jù)的接口要求如下:——接口方法:deleteDevice;——接口路徑:api/open/device/;——請(qǐng)求方式:DELETE。請(qǐng)求參數(shù)見表A.8。表A.8deleteDevice參數(shù)名必選類型說明token是String通信證keyproductId是int產(chǎn)品iddeviceIds是String可以刪除多個(gè)設(shè)備(200idmasterKey是StringmasterKey在該設(shè)備所屬產(chǎn)品的概況中可以查看gridCode是String區(qū)域code(依據(jù)中國行政區(qū)域編碼劃分規(guī)則)參數(shù)名必選類型說明token是String通信證keymasterKey是StringmasterKey在該設(shè)備所屬產(chǎn)品的概況中可以查看gridCode是String區(qū)域code(依據(jù)中國行政區(qū)域編碼劃分規(guī)則)返回示例見附錄B.9。查詢屬性列表信息,獲取標(biāo)準(zhǔn)數(shù)據(jù)參數(shù)名稱及數(shù)據(jù)類型的接口要求如下:——接口方法:queryPropertyList;——接口路徑:api/open/model/properties/;——請(qǐng)求方式:GET。請(qǐng)求參數(shù)見表A.10。表A.10queryPropertyList查詢屬性列表信息,獲取標(biāo)準(zhǔn)數(shù)據(jù)參數(shù)名稱及數(shù)據(jù)類型的接口要求如下:——接口方法:queryPropertyList;——接口路徑:api/open/model/properties/;——請(qǐng)求方式:GET。請(qǐng)求參數(shù)見表A.10。表A.10queryPropertyListB.10。A.3.10標(biāo)準(zhǔn)農(nóng)村人居環(huán)境長效管護(hù)平臺(tái)標(biāo)準(zhǔn)物模型的接口要求如下:——接口方法:queryStandardModel;11參數(shù)名必選類型說明token是String通行證keymasterKey是StringmasterKey在該設(shè)備所屬產(chǎn)品的概況中可以查看productId是int產(chǎn)品IdsearchValue否String可填值:屬性名稱,屬性gridCode否String區(qū)域code(依據(jù)中國行政區(qū)域編碼劃分規(guī)則)pageNow否int當(dāng)前頁數(shù)pageSize否int每頁記錄數(shù)——接口路徑:api/open/standardModel/;——請(qǐng)求方式:GET。請(qǐng)求參數(shù)見表A.11。表A.11queryStandardModel參數(shù)名必選類型說明token是String通信證keymasterKey是StringmasterKey在該設(shè)備所屬產(chǎn)品的概況中可以查看standardVersion否String標(biāo)準(zhǔn)物模型版本號(hào)thirdType否int三級(jí)分類id返回示例見附錄B.11。A.3.11獲取服務(wù)列表信息獲取農(nóng)村人居環(huán)境長效管護(hù)平臺(tái)服務(wù)列表信息的接口要求如下:——接口方法:queryPropertyList;——接口路徑:api/open/model/properties/;表A.12queryPropertyListB.12表A.12queryPropertyListB.12。A.3.12智能垃圾桶設(shè)備上報(bào)數(shù)據(jù)的接口要求如下:——接口方法:uploadRubbishData;——接口路徑:api/open/uploadData/;——請(qǐng)求方式:POST。請(qǐng)求參數(shù)見表A.13。表A.13uploadRubbishData12參數(shù)名必選類型說明token是String通信證keymasterKey是StringmasterKey在該設(shè)備所屬產(chǎn)品的概況中可以查看productId是int產(chǎn)品IdsearchValue否String可填值:屬性名稱,屬性標(biāo)識(shí)符gridCode是String區(qū)域code(依據(jù)中國行政區(qū)域編碼劃分規(guī)則)pageNow否int當(dāng)前頁數(shù)pageSize否int每頁記錄數(shù)參數(shù)名必選類型說明token是String通信證keybody是String智能垃圾桶標(biāo)準(zhǔn)物模型請(qǐng)求Body(數(shù)據(jù)類型application/json;charset=utf-8){{"deviceId":"be04c3519c5740c1b82fe0fceb9d2e82","uploadTime":"2021-07-1916:29:41","latitude":"0.0","longitude":"0.0","errorCode":"0000","fireState":"0","tiltAngle":"0","powerState":"0","temperature":24,"deviceState":null,"batteryValue":0,"locationFlag":null,"fireThreshold":0,"fullThreshold":0,"tiltThreshold":null,"batteryVoltage":3.63,"powerThreshold":0,"fullState":"0","inclineState":"0","high":464,"deviceNo":null,"imei":null}返回示例見附錄返回示例見附錄B.13。A.3.13人員卡牌設(shè)備數(shù)據(jù)上報(bào)卡牌設(shè)備上報(bào)數(shù)據(jù)的接口要求如下:——接口方法:uploadCardData;——接口路徑:api/open/uploadData/;——請(qǐng)求方式:POST。請(qǐng)求參數(shù)見表A.14。表A.14uploadCardData13返回示例見附錄B.14返回示例見附錄B.14。A.3.14智慧廁改設(shè)備數(shù)據(jù)上報(bào)廁改設(shè)備上報(bào)數(shù)據(jù)的接口要求如下:——接口方法:uploadToiletData;——接口路徑:api/open/uploadData/;——請(qǐng)求方式:POST。請(qǐng)求參數(shù)見表A.15。表A.15uploadToiletDatabody14參數(shù)名必選類型說明token是String通信證keybody是String人員卡牌標(biāo)準(zhǔn)物模型請(qǐng)求body{{"deviceId":"e978A.35e8c6d4e9fbe9286cedc6aedcd","uploadTime":null,"longitude":"114.1700000","latitude":"26.4400000","speed":2,"direction":null,"signal":null,"battery":"31","gpsFlag":null,"receiveTime":"2021-07-2118:13:06.133","createTime":"2021-07-2209:55:54","heading":null,"valid":"0","imei":null}參數(shù)名必選類型說明token是String通信證keybody是String智慧廁改設(shè)備標(biāo)準(zhǔn)物模型{{"deviceId":,"deviceName":null,"uploadTime":"2021-08-2715:49:00","humWoman":null,"tempWoman":null,"h2sWoman":null,"nh3Woman":null,"tempWoman":null,"h2sWoman":null,"nh3Woman":null,"humMan":"81.108642578125","tempMan":"28.8987979888916","h2sMan":"0.0010200000833719969","nh3Man":"0.004118899814784527","squatIdleWoman":0,"squatIdleMan":0,"pfWoman":null,"pfMan":null,"createTime":null,"imei":null}返回示例見附錄B.15。污水監(jiān)測設(shè)備上報(bào)數(shù)據(jù)污水監(jiān)測設(shè)備上報(bào)數(shù)據(jù)的接口要求如下:——接口路徑:api/open/uploadData/;——請(qǐng)求方式:POST。請(qǐng)求參數(shù)見表A.16——接口路徑:api/open/uploadData/;——請(qǐng)求方式:POST。請(qǐng)求參數(shù)見表A.16。表A.16uploadWaterDatabodyB.16。15參數(shù)名必選類型說明token是String通信證keybody是String污水監(jiān)測設(shè)備標(biāo)準(zhǔn)物模型{{"deviceId":"15036215BK7201SN001625","uploadTime":"2021-08-0417:01:03","temperature":29,"conductivity":1,"turbidity":1348.2,"ph":7.31,"doxygen":5.670000076293945,"imei":null}B.17B.17。A.3.17空氣站設(shè)備上報(bào)數(shù)據(jù)的接口要求如下:——接口方法:uploadAirData;——接口路徑:api/open/uploadData/;——請(qǐng)求方式:POST。請(qǐng)求參數(shù)見表A.18。16車載設(shè)備數(shù)據(jù)上報(bào)車載設(shè)備上報(bào)數(shù)據(jù)的接口要求如下:——接口方法:uploadCarData;——接口路徑:api/open/uploadData/;——請(qǐng)求方式:POST。請(qǐng)求參數(shù)見表A.17。表A.17uploadCarData參數(shù)名必選類型說明token是String通信證keybody是String車載設(shè)備標(biāo)準(zhǔn)物模型請(qǐng)求body:{{"deviceId":"a6fdce27e9844ba5b0b9f97ae7d40136","uploadTime":"2021-04-0215:42:17","batteryVoltage":360,"batteryStatus":0,"reserved":0,"temperature":55,"speed":0,"latitude":29.384321,"longitude":117.23177,"height":15,"actualLevel":null,"dataSource":null,"syncStatus":0,"syncTime":null,"alarm":0,"mileage":0,"recorderSpeed":0,"gpsswitch":1,"imei":null}返回示例見附錄B.18返回示例見附錄B.18。設(shè)備數(shù)據(jù)管理獲取設(shè)備監(jiān)測數(shù)據(jù)Id設(shè)備類別獲取設(shè)備上報(bào)監(jiān)測數(shù)據(jù),獲取數(shù)據(jù)的接口要求如下:——接口方法:getDeviceDataById;——接口路徑:api/open/device/;——請(qǐng)求方式:POST。請(qǐng)求參數(shù)見表A.19。表A.19getDeviceDataByIdA.19getDeviceDataById(續(xù))17表A.18uploadAirData參數(shù)名必選類型說明token是String通信證keybody是String空氣站標(biāo)準(zhǔn)物模型請(qǐng)求body{{"deviceId":,"temperature":"0","humidity":"0","windSpeed":"0","windDirection":"0","pressure":"0","uploadTime":"2021-07-2211:38:10","rainfall":null,"dailyRainfall":null,"lightintensity":null,"no2":"4.253","so2":null,"pm10":"32.261","pm25":"6.425"}參數(shù)名必選類型說明token是String通行證keydeviceId是String設(shè)備IdfacilityCategory是String設(shè)備類別參數(shù)名必選類型說明startTime否String開始時(shí)間endTime否String結(jié)束時(shí)間返回示例見附錄B.19。A.4.2獲取設(shè)備原始上傳數(shù)據(jù)包獲取設(shè)備原始上傳數(shù)據(jù)格式的接口要求如下:——接口方法:getBasicDataList;——接口路徑:api/open/basicData/;——請(qǐng)求方式:POST。請(qǐng)求參數(shù)見表A.20。表A.20getBasicDataList參數(shù)名必選類型說明token是String通信證keydeviceName否String設(shè)備名稱deviceId是String設(shè)備idgridCode是String區(qū)域code(依據(jù)中國行政區(qū)域編碼劃分規(guī)則)A.4.3獲取設(shè)備上報(bào)事件信息獲取設(shè)備上報(bào)事件信息的接口要求如下:——接口方法:getEventBasicDataList;——接口路徑:api/open/events/;——請(qǐng)求方式:POST。請(qǐng)求參數(shù)見表A.4.3獲取設(shè)備上報(bào)事件信息獲取設(shè)備上報(bào)事件信息的接口要求如下:——接口方法:getEventBasicDataList;——接口路徑:api/open/events/;——請(qǐng)求方式:POST。請(qǐng)求參數(shù)見表A.21。表A.21getEventBasicDataList返回示例見附錄B.21。A.4.4獲取智能垃圾桶數(shù)據(jù)獲取智能垃圾桶設(shè)備上報(bào)數(shù)據(jù)的接口要求如下:——接口方法:getRubbishData;——接口路徑:api/open/deviceData/;18參數(shù)名必選類型說明token是String通信證keydeviceName否String設(shè)備名稱iotEventType否String事件類型deviceId是String設(shè)備idgridCode是String區(qū)域code(依據(jù)中國行政區(qū)域編碼劃分規(guī)則)——請(qǐng)求方式:POST。請(qǐng)求參數(shù)見表A.22。表A.22getRubbishData參數(shù)名必選類型說明token是String通信證keygridCode是String區(qū)域code(依據(jù)中國行政區(qū)域編碼劃分規(guī)則)deviceId是String設(shè)備Id返回示例見附錄B.22。A.4.5獲取人員卡牌設(shè)備數(shù)據(jù)獲取卡牌設(shè)備上報(bào)數(shù)據(jù)的接口要求如下:——接口方法:getCardData;——接口路徑:api/open/deviceData/;——請(qǐng)求方式:POST。請(qǐng)求參數(shù)見表A.23。返回示例見附錄B.23。返回示例見附錄B.23。A.4.6獲取污水監(jiān)測設(shè)備數(shù)據(jù)獲取污水監(jiān)測設(shè)備上報(bào)數(shù)據(jù)的接口要求如下:——接口方法:getWaterData;——接口路徑:api/open/deviceData/;——請(qǐng)求方式:POST。請(qǐng)求參數(shù)見表A.24。表A.24getWaterDataB.24。A.4.7獲取車載設(shè)備數(shù)據(jù)19參數(shù)名必選類型說明token是String通信證keygridCode是String區(qū)域code(依據(jù)中國行政區(qū)域編碼劃分規(guī)則)deviceId是String設(shè)備Id參數(shù)名必選類型說明token是String通信證keygridCode是String區(qū)域code(依據(jù)中國行政區(qū)域編碼劃分規(guī)則)deviceId是String設(shè)備Id獲取車載設(shè)備上報(bào)數(shù)據(jù)的接口要求如下:接口方法:getCarData;接口路徑:api/open/deviceData/;請(qǐng)求方式:POST。請(qǐng)求參數(shù)見表A.25。表A.25 getCarData參數(shù)名必選類型說明token是String通信證keygridCode是String區(qū)域code(依據(jù)中國行政區(qū)域編碼劃分規(guī)則)deviceId是String設(shè)備Id返回示例見附錄B.25。A.4.8獲取智慧廁改設(shè)備數(shù)據(jù)獲取廁改設(shè)備上報(bào)數(shù)據(jù)的接口要求如下:——接口方法:getToiletData;——接口路徑:api/open/deviceData/;表A.26getToiletData返回示例見附錄B.26。A.4.9獲取空氣站設(shè)備數(shù)據(jù)表A.26getToiletData返回示例見附錄B.26。A.4.9獲取空氣站設(shè)備數(shù)據(jù)獲取空氣站設(shè)備上報(bào)數(shù)據(jù)的接口要求如下:——接口方法:getAirData;——接口路徑:api/open/deviceData/;——請(qǐng)求方式:POST。請(qǐng)求參數(shù)見表A.27。表A.27getAirData20參數(shù)名必選類型說明token是String通信證keygridCode是String區(qū)域code(依據(jù)中國行政區(qū)域編碼劃分規(guī)則)deviceId是String設(shè)備Id參數(shù)名必選類型說明token是String通信證keygridCode是String區(qū)域code(依據(jù)中國行政區(qū)域編碼劃分規(guī)則)deviceId是String設(shè)備Id返回示例見附錄B.27。2121附錄B(資料性)B.1獲取令牌接口返回示例以JSON格式返回結(jié)果數(shù)據(jù),格式定義如下:{{"msg":"success","code":0,"data":{"expireTime":"2021-03-3010:24:28","expire":86400,"token":"eyJhbGciOiJIUzUxMiJ9.eyJhcHBTZWNyZXQiOiJudWxsIiwiZXhwIjoxNjI5NjgxNTA.3LCJjcmVhdGVkIjoxNjI5NjgwNjA.3ODM4LCJhcHBJZCI6Im51bGwifQ.l-OCLUw8TTEyngvpExaJ7Q-sBCZiVDVJxGDEEHCcrHxo9-rx_-8RbGVqT7IEjsFqMHAM_CJAfatYjaNfh0JZ7g"}}B.1B.2產(chǎn)品列表接口返回示例以JSON格式返回結(jié)果數(shù)據(jù),格式定義如下:B.1B.2產(chǎn)品列表接口返回示例以JSON格式返回結(jié)果數(shù)據(jù),格式定義如下:22參數(shù)名類型說明codeint當(dāng)code為0成功返回?cái)?shù)據(jù)msgString返回結(jié)果字符串data集合結(jié)果集合expireTimeString過期時(shí)間expireint過期(秒)tokenString令牌{{"code":"0","msg":"成功","data":[{“productId”:1532043"apiKey":"b0910dc269db472fb45823292e706f3e","authType":1,"createBy":"user",返回參數(shù)說明見表B.2。返回參數(shù)說明見表B.2。B.2B.2(續(xù))23"createTime":1535942487000,"createTime":1535942487000,"dataEncryption":5,"deviceCount":4,"endpointFormat":1,"lwm2mEdrxTime":25.2,"networkType":3,"nodeType":1,"payloadFormat":2,"powerModel":1,"productDesc":"","productId":307,“productName":"tup-test-zcj","productProtocol":4,"productType":1,"productTypeValue":"家電","rootCert":"","secondaryType":2,"secondaryTypeValue":"測試","tenantId":"10007905","thirdType":13,tanglv","tupIsThrough"1,"updateBy":"user","updateTime":1535943389000}],} }參數(shù)名類型說明codeint當(dāng)code為0成功返回?cái)?shù)據(jù)msgStringcode對(duì)應(yīng)描述信息productIdString產(chǎn)品iddeviceCountint產(chǎn)品下面設(shè)備總數(shù)powerModelint電源模式B.3設(shè)備列表接口返回示例以JSON格式返回結(jié)果數(shù)據(jù),格式定義如下:B.3設(shè)備列表接口返回示例以JSON格式返回結(jié)果數(shù)據(jù),格式定義如下:24參數(shù)名類型說明productProtocolString協(xié)議2.MQTT協(xié)議4.TUP5.HTTP協(xié)議6.JT/T8087.TCP8.TCP(網(wǎng)關(guān)子設(shè)備協(xié)議)9.UDP(網(wǎng)關(guān)子設(shè)備協(xié)議)10.MQTT(網(wǎng)關(guān)產(chǎn)品協(xié)議)11.南向云)payloadFormatint數(shù)據(jù)上報(bào)格式(integer,消息類型1:json,2:緊湊二進(jìn)制)powerModelStrString電源模式描述productProtocolStrString產(chǎn)品協(xié)議描述payloadFormatStrString數(shù)據(jù)上報(bào)格式描述endpointFormatStrStringendpoint格式描述authTypeStrString認(rèn)證方式描述networkTypeStrString網(wǎng)絡(luò)類型描述productNameString產(chǎn)品名稱描述productDescString產(chǎn)品描述endpointFormatintendpoint格式authTypeint雙向認(rèn)證,4:IMEI認(rèn)證,5:SIMID認(rèn)證,6:sm2認(rèn)證)apiKeyStringapikeycreateTimeString創(chuàng)建時(shí)間updateTimeString更新時(shí)間productTypeint產(chǎn)品類別secondaryTypeString二級(jí)類別thirdTypeString三級(jí)類別productTypeValueString產(chǎn)品類型值secondaryTypeValueString二級(jí)產(chǎn)品類型值thirdTypeValueString三級(jí)產(chǎn)品類型值tupDeviceModelStringtup設(shè)備模式{{"code":"0","msg":"成功","data":[返回參數(shù)說明見表B.3返回參數(shù)說明見表B.3。B.3B.3(續(xù))25{{"deviceSn":"006","deviceId":,"deviceName":"測試廁改設(shè)備","productId":null,"deviceStatus":0,"deviceStatusStr":"已激活","netStatus":0,"netStatusStr":"在線","productProtocol":7,"productProtocolStr":"TCP協(xié)議","createTime":"2021-07-2109:32:46","updateTime":null,"activeTime":null,"offlineAt":"2021-07-2409:06:35","onlineAt":"2021-07-2409:06:44","facilityCategory":"XXX","dataSource":null}],"count":159}參數(shù)名類型說明codeint當(dāng)code為0成功返回?cái)?shù)據(jù)msgStringcode對(duì)應(yīng)信息deviceSnString設(shè)備編號(hào)deviceIdString設(shè)備iddeviceNameString設(shè)備名稱productIdString產(chǎn)品名稱deviceStatusint設(shè)備激活狀態(tài)狀態(tài)(0:已注冊(cè)1:已激活2:已注銷)deviceStatusStrString設(shè)備狀態(tài)名稱netStatusint設(shè)備在線狀態(tài)(1:在線2:不在線)netStatusStrString設(shè)備在線狀態(tài)名稱productProtocolString設(shè)備通訊協(xié)議(integer,產(chǎn)品協(xié)議:1.T-LINK2.MQTT3.LWM2M5.HTTP6.JT/T8087.TCP8網(wǎng)關(guān)子設(shè)備協(xié)議)9.私有UDP(網(wǎng)關(guān)子設(shè)備協(xié)議)10.網(wǎng)關(guān)產(chǎn)品MQTT(網(wǎng)關(guān)產(chǎn)品協(xié)議)11.南向云)productProtocolStrString通訊協(xié)議名稱參數(shù)名類型說明createTimeString創(chuàng)建時(shí)間updateTimeString更新時(shí)間activeTimeString激活時(shí)間offlineAtString下線時(shí)間onlineAtString上線時(shí)間facilityCategoryString設(shè)備類別dataSourceString數(shù)據(jù)來源新建產(chǎn)品接口返回示例以JSON格式返回結(jié)果數(shù)據(jù),格式定義如下:{{"code":0,"msg":"ok","result":{"productId":10012761,"productName":"測試創(chuàng)建產(chǎn)品","tenantId":"300","productDesc":"創(chuàng)建產(chǎn)品","productType":10024,"secondaryType":10025,"thirdType":10026,"productProtocol":1,"authType":1,"payloadFormat":1,"createTime":1571402267678,"updateTime":1571402268678,"networkType":4,"endpointFormat":1,"powerModel":1,"apiKey":"67141cddbf2e4f62A.3ff458f1dd9ba8e","onlineDeviceCount":0,"deviceCount":3,"productTypeValue":"家電","secondaryTypeValue"測試",tanglv","rootCert":1,"createBy":"user","updateBy":"user","accessType":2,"nodeType":1,"tupIsThrough":1,"dataEncryption":5,2626"lwm2mEdrxTime":15.2"lwm2mEdrxTime":15.2}}返回參數(shù)說明見表B.4。表B.4新建產(chǎn)品接口返回示例參數(shù)名類型必選說明codeint否當(dāng)code為0成功返回?cái)?shù)據(jù)msgString否返回描述resultobject否返回結(jié)果productIdint否產(chǎn)品IDproductNameString否產(chǎn)品名稱tenantIdint否租戶IDproductDescString否產(chǎn)品描述productTypeint否產(chǎn)品類別secondaryTypeint否二級(jí)分類thirdTypeint否三級(jí)分類productProtocolint否itgitgr1TLK2MT3LMM協(xié)議4.TUP5.HTTP6.JT/T8087.TCP8.TCP(網(wǎng)關(guān)子設(shè)備協(xié)議)9.UDP(網(wǎng)關(guān)子設(shè)備協(xié)議)10MQTT(網(wǎng)關(guān)產(chǎn)品協(xié)議)11.南向云協(xié)議authTypeint否認(rèn)證,5:SIMID認(rèn)證,6:SM2認(rèn)證payloadFormatint否integer,消息類型1:json,2:緊湊二進(jìn)制createTimeint否創(chuàng)建時(shí)間updateTimeint否更新時(shí)間networkTypeint否integer,網(wǎng)絡(luò)類型:1.wifi2.移動(dòng)蜂窩數(shù)據(jù)3.NB-IoT4.以太網(wǎng)endpointFormatint否integer,Endpoint格式:1.IMEI2.URN:IMEI:###############3.URN:IMEI-IMSI:###############-###############4.URN:IMEI+SMpowerModelint否integer,省電模式:1.PSM2.DRX3.eDRXapiKeyString否masterKeyonlineDeviceCountint否在線設(shè)備數(shù)deviceCountint否設(shè)備總數(shù)productTypeValueString否產(chǎn)品分類名稱secondaryTypeValueString否二級(jí)分類名稱thirdTypeValueString否三級(jí)分類名稱rootCertint否T-Link證書認(rèn)證根證書B.4(續(xù))27參數(shù)名類型必選說明createByString否創(chuàng)建者updateByString否更新者nodeTypeint否節(jié)點(diǎn)類型:1.設(shè)備,2.網(wǎng)關(guān)accessTypeint否接入類型:1.設(shè)備直連,2.網(wǎng)關(guān)接入,3.南向云接入,4.視圖云接入tupIsThroughint否是否透傳:0.透傳,1不透傳(JT/T808,只有透傳,消息格式必須只能傳null)dataEncryptionint否數(shù)據(jù)加密方式1:sm1,2:sm2,3:sm4,4:dtls,5:明文lwm2mEdrxTimeint否eDRX模式時(shí)間窗刪除產(chǎn)品接口返回示例以JSON格式返回結(jié)果數(shù)據(jù),格式定義如下:{{"code":0,"msg":"string"}返回參數(shù)說明見表B.5。B.6更新產(chǎn)品接口返回示例以JSON格式返回結(jié)果數(shù)據(jù),格式定義如下:返回參數(shù)說明見表B.6。B.6更新產(chǎn)品接口返回示例以JSON格式返回結(jié)果數(shù)據(jù),格式定義如下:返回參數(shù)說明見表B.6。B.6B.7創(chuàng)建設(shè)備接口返回示例以JSON格式返回結(jié)果數(shù)據(jù),格式定義如下:28參數(shù)名類型說明codeint當(dāng)code為0成功返回?cái)?shù)據(jù)msgStringcode描述{{"code":0,"msg":"ok"}參數(shù)名類型說明codeint當(dāng)code為0成功返回?cái)?shù)據(jù)msgStringcode描述{{"code":0,B.8刪除設(shè)備接口返回示例以JSON格式返回結(jié)果數(shù)據(jù),格式定義如下:B.8刪除設(shè)備接口返回示例以JSON格式返回結(jié)果數(shù)據(jù),格式定義如下:返回參數(shù)說明見表B.8:B.8B.9更新設(shè)備接口返回示例以JSON格式返回結(jié)果數(shù)據(jù),格式定義如下:29"msg":"ok","result":{"msg":"ok","result":{"deviceId":"89e920fa0eda47a89f04f52a88b17146","deviceName":"test003","tenantId":"300","productId":10003304,"imei":"125658789874565","deviceSn":"","token":"Tyhp7mYXm1k_upy44j32vw8GlKGH8gwvgdayOX27_2E"}}返回參數(shù)說明見表B.7。表B.7創(chuàng)建設(shè)備接口返回示例參數(shù)名類型說明codeint0表示返回成功msgString返回結(jié)果描述productIdint產(chǎn)品idtenantIdint租戶idimeiint設(shè)備imei號(hào)deviceIdString設(shè)備iddeviceNameString設(shè)備名稱deviceSnString設(shè)備sn號(hào)tokenString設(shè)備token{{"code":0,"msg":"string"}參數(shù)名類型說明codeint當(dāng)code為0成功返回?cái)?shù)據(jù)msgStringcode描述{{"code":0,"msg":"string"}返回參數(shù)說明表B.9。表B.9更新設(shè)備接口返回示例參數(shù)名類型說明codeint當(dāng)code為0成功返回?cái)?shù)據(jù)msgStringcode描述B.10獲取物模型接口返回示例以JSON格式返回結(jié)果數(shù)據(jù),格式定義如下:{{"code":0,"msg":"ok","result":{"pageNum":1,"pageSize":1,"total":1,"list":[{"propertyId":1,"propertyFlag":"asdggg","propertyName":"屬性1","dataType":"fix-string","unit":"g","len":1,"unitName":"克每毫升","description":""},{"propertyId":2,"propertyFlag":"a1","propertyName":"a1","dataType":"enum","enumDetail":{"1":"2","3":"4","5":"6"},"len":1,3030返回參數(shù)說明見表B.10返回參數(shù)說明見表B.10。B.10B.10(續(xù))31"description":"test""description":"test"},{"propertyId":3,"propertyFlag":"A.3","propertyName":"A.3","dataType":"float","unit":"ppm","min":"1","len":4,"unitName":"百萬分率","max":"2","step":"1","description":"1"},{"propertyId":4,"propertyFlag":"a3","propertyName":"a3","dataType":"bool","boolDetail":{"false":"關(guān)","true":"開"},"len":1,"description":"test"}]}}參數(shù)名類型說明msgString返回結(jié)果描述resultint結(jié)果集totalint總數(shù)unitNameString單位名稱propertyFlagString屬性標(biāo)識(shí)符propertyNameString屬性名稱B.11獲取標(biāo)準(zhǔn)產(chǎn)品物模型接口返回示例以JSON格式返回結(jié)果數(shù)據(jù),格式定義如下:B.11獲取標(biāo)準(zhǔn)產(chǎn)品物模型接口返回示例以JSON格式返回結(jié)果數(shù)據(jù),格式定義如下:32參數(shù)名類型說明dataTypeStringfix-string,binaryfix-binaryunsigned-integervary-string,變binaryvary-binary,doubledouble,floatfloattimestamp,enum。json格式數(shù)據(jù)類型及對(duì)應(yīng)枚舉值:int32int32,floatfloat,doubledouble,枚舉型enum,boolean類型bool,字符串string,時(shí)間戳dateunitString單位lenint長度descriptionString描述stepint步長propertyIdint屬性idpageSizeint每頁條數(shù)pageNumint當(dāng)前頁數(shù)maxint最大值codeint返回狀態(tài)碼{{"code":0,"msg":"ok","result":{"properties":[{"propertyFlag":"a1","propertyName":"a1","dataType":"enum","enumDetail":{"1":"2","3":"4","5":"6"},"len":1,"description":"test"},{"propertyFlag":"A.3","propertyName":"A.3","dataType":"float","unit":"ppm","unit":"ppm","min":"1","len":4,"unitName":"百萬分率","max":"2","step":"1","description":"1"}],"services":[{"serviceId":8001,"serviceFlag":"a3","serviceName":"a3","serviceType":2,"eventType":1,"description":"a","properties":[{"propertyFlag":"A.3","serial":2}],"parameters":[{"parameterFlag":"c1","parameterName":"c1","dataType":"int32","unit":"g","min":"1","len":4,"unitName":"克每毫升","max":"2","step":"1","description":"1","serial":1}]}]}}返回參數(shù)說明見表返回參數(shù)說明見表B.11。B.1133{"code":0,{"code":0,參數(shù)名類型說明msgString返回結(jié)果描述resultint結(jié)果集totalint總數(shù)serviceTypeintinteger服務(wù)類型1.數(shù)據(jù)上報(bào)2.事件上報(bào)3.數(shù)據(jù)獲取4.參數(shù)查詢5.參數(shù)配置6.指令下發(fā)7.指令下發(fā)響應(yīng)8.無線參數(shù)上報(bào)serviceFlagString服務(wù)標(biāo)識(shí)serviceIdStringinteger服務(wù)IdserviceNameString服務(wù)名稱eventTypeintinteger事件類型只有事件上報(bào)才有值1:信息2:警告3:故障unitString單位lenint長度minint最小值stepint步長propertyFlagString屬性標(biāo)識(shí)unitNameString單位名稱serialint序號(hào)propertyNameString屬性名稱dataTypeString數(shù)據(jù)類型:二進(jìn)制數(shù)據(jù)類型及對(duì)應(yīng)枚舉值:整型integer,定長字符串fix-string,定長binaryfix-binaryunsigned-integer,變長字符串vary-stringbinaryvary-binary,doubledouble,floatfloat,timestampenum。json格式數(shù)據(jù)類型及對(duì)應(yīng)枚舉值:int32int32,floatfloat,doubledoubleenum,booleanbool,字符串stringdateparameterFlagString參數(shù)標(biāo)識(shí)descriptionString描述parameterNameString參數(shù)名稱maxint最大值codeint返回狀態(tài)碼B.12獲取服務(wù)列表信息接口返回示例B.12獲取服務(wù)列表信息接口返回示例以JSON格式返回結(jié)果數(shù)據(jù),格式定義如下:34"msg":"ok","result":{"pageNum":1,"pageSize":20,"total":1,"list":[{"serviceId":1,"serviceFlag":"asdg","serviceName阿薩德剛","serviceType2,"eventType":1,"description":"properties":[{"propertyId":1,"propertyFlag":"asdggg","propertyName":"屬性1","dataType":"fix-string","unit":"g","len":1,"unitName":"克每毫升","description":""},{"propertyId":2,"propertyFlag":"a1","propertyName":"a1","dataType":"enum","enumDetail":{"1":"2","3":"4","5":"6"},{

},"len":1,"description":"test""propertyId":4,"propertyFlag":"a3","propertyName":"a3","dataType":"bool","boolDetail":{"false":"關(guān)","true":"開"},35"len":1,"description":"test""len":1,"description":"test"}],"parameters":[{"parameterId":17,"parameterFlag":"cellId","parameterName":"cellId","dataType":"integer","unit":"null","min":-2147483648,"len":4,"unitName":"","max":2147483647,"description":""}]}]}}返回參數(shù)說明見表B.12。表B.12獲取服務(wù)列表信息接口返回示例參數(shù)名類型說明msgString返回結(jié)果描述resultint結(jié)果集totalint總數(shù)serviceTypeintinteger12.事件上報(bào)34.參數(shù)查詢5.參數(shù)配6.指令下發(fā)78.無線參數(shù)上報(bào)pageNumintinteger當(dāng)前頁數(shù)serviceFlagString服務(wù)標(biāo)識(shí)符descriptionString描述eventTypeStringinteger事件類型只有事件上報(bào)才有值1:信息2:警告3:故障serviceIdintinteger服務(wù)IdunitString單位minint最小值parameterIdintinteger參數(shù)IdB.12(續(xù))36參數(shù)名類型說明lenintinteger長度unitNameint單位名稱dataTypeint數(shù)據(jù)類型:二進(jìn)制數(shù)據(jù)類型及對(duì)應(yīng)枚舉值:整型integer,定長字符串fix-stringbinaryfix-binaryunsigned-integer,變長vary-stringbinaryvary-binary,doubledouble,floatfloattimestampenum。jsonint32,floatfloat,doubledoubleenum,boolean類型boolstring,時(shí)間戳dateparameterFlagint參數(shù)標(biāo)識(shí)propertyFlagString屬性標(biāo)識(shí)propertyNameString屬性名稱B.13智能垃圾桶數(shù)據(jù)上報(bào)接口返回示例以JSON格式返回結(jié)果數(shù)據(jù),格式定義如下:{{"code":0,"msg":"ok","result":{{"deviceId":"be04c3519c5740c1b82fe0fceb9d2e82","uploadTime":"2021-07-1916:29:41","latitude":"0.0","longitude":"0.0","errorCode":"0000","fireState":"0","tiltAngle":"0","powerState":"0","temperature":24,"deviceState":null,"batteryValue":0,"locationFlag":null,"fireThreshold":0,"fullThreshold":0,"tiltThreshold":null,"batteryVoltage":3.63,"powerThreshold":0,"fullState":"0","inclineState":"0","high":464,3737"deviceNo":null,"imei":null"deviceNo":null,"imei":null}}參數(shù)說明見表B.13。表B.13智能垃圾桶數(shù)據(jù)上報(bào)接口返回示例參數(shù)名類型必選說明codeint否當(dāng)code為0成功返回?cái)?shù)據(jù)msgString否code描述deviceIdString是設(shè)備iduploadTimeString是上報(bào)時(shí)間latitudeString是緯度longitudeString是經(jīng)度errorCodeString是錯(cuò)誤碼fireStateString否火災(zāi)狀態(tài)tiltAngleString否傾角powerStateString否電量狀態(tài)temperatureint否溫度deviceStateString否設(shè)備模式batteryValueint否電池電量locationFlagString否經(jīng)緯度標(biāo)識(shí)fireThresholdint否火災(zāi)閾值fullThresholdint否滿溢閾值tiltThresholdString否傾倒閾值batteryVoltagefloat否電池電壓powerThresholdOnt否電量閾值fullStateString否滿空狀態(tài)inclineStateString否傾倒?fàn)顟B(tài)highint否高度deviceNoString是設(shè)備編號(hào)imeiString是設(shè)備imei號(hào)B.14人員卡牌設(shè)備數(shù)據(jù)上報(bào)接口返回示例B.14人員卡牌設(shè)備數(shù)據(jù)上報(bào)接口返回示例38參數(shù)說明見表B.14。參數(shù)說明見表B.14。B.1439以JSON格式返回結(jié)果數(shù)據(jù),格式定義如下:{{"code":"0","msg":"成功","data":[{"deviceId":"e978A.35e8c6d4e9fbe9286cedc6aedcd","uploadTime":null,"longitude":"114.1700000","latitude":"26.4400000","speed":2,"direction":null,"signal":null,"battery":"31","gpsFlag":null,"receiveTime":"2021-07-2118:13:06.133","createTime":"2021-07-2209:55:54","valid":"0","sosAlarm":"0","imei":null} ]}參數(shù)名類型是否必填說明codeint否當(dāng)code為0成功返回?cái)?shù)據(jù)msgString否code描述deviceIdString是設(shè)備iduploadTimeString否上報(bào)時(shí)間latitudeString是緯度longitudeString是經(jīng)度speedint否速度directionString否方向signalString否信號(hào)表B.14人員卡牌設(shè)備數(shù)據(jù)上報(bào)接口返回示例(續(xù))參數(shù)名類型是否必填說明batteryString否電池電量gpsFlagString否GPS標(biāo)識(shí)imeiString否設(shè)備imei號(hào)sosAlarmString否報(bào)警標(biāo)記validString否有效性receiveTimeString否接收時(shí)間B.15智慧廁改設(shè)備數(shù)據(jù)上報(bào)接口返回示例以JSON格式返回結(jié)果數(shù)據(jù),格式定義如下:{{"code":0,"msg":"ok","result":{{"deviceId":,"deviceName":null,"uploadTime":"2021-08-2715:49:00","humWoman":null,"tempWoman":null,"h2sWoman":null,"nh3Woman":null,"humMan":"81.108642578125","tempMan":"28.8987979888916","h2sMan":"0.0010200000833719969","nh3Man":"0.004118899814784527","squatIdleWoman":0,"squatIdleMan":0,"pfWoman":null,"pfMan":null,"createTime":null,"imei":null}}參數(shù)說明見表B.15。參數(shù)說明見表B.15。40B.16污水監(jiān)測設(shè)備上報(bào)數(shù)據(jù)接口返回示例以JSON格式返回結(jié)果數(shù)據(jù),格式定義如下:B.16污水監(jiān)測設(shè)備上報(bào)數(shù)據(jù)接口返回示例以JSON格式返回結(jié)果數(shù)據(jù),格式定義如下:41表B.15智慧廁改設(shè)備數(shù)據(jù)上報(bào)接口返回示例參數(shù)名類型必選說明codeint否當(dāng)code為0成功返回?cái)?shù)據(jù)msgString否code描述deviceIdString是設(shè)備iddeviceNameString否設(shè)備名稱uploadTimeString是上報(bào)時(shí)間humWomanString否女廁濕度tempWomanString否女廁溫度h2sWomanString否女廁硫化氫nh3WomanString否女廁氨氣humManString否男廁濕度tempManString否男廁溫度h2sManString否男廁硫化氫nh3ManString否男廁氨氣squatIdleWomanint否女廁蹲位空閑數(shù)量squatIdleManint否男廁蹲位空閑數(shù)量pfWomanString否女廁客流量pfManString否男廁客流量imeiString是設(shè)備imei號(hào){{"code":0,"msg":"ok","result":{{"deviceId":"15036215BK7201SN001625","uploadTime":"2021-08-0417:01:03","temperature":29,"conductivity":1,"turbidity":1348.2,"ph":7.31,B.17車載設(shè)備數(shù)據(jù)上報(bào)接口返回示例以JSON格式返回結(jié)果數(shù)據(jù),格式定義如下:B.17車載設(shè)備數(shù)據(jù)上報(bào)接口返回示例以JSON格式返回結(jié)果數(shù)據(jù),格式定義如下:42"doxygen":5.670000076293945,"doxygen":5.670000076293945,"imei":null}}參數(shù)說明見表B.16。表B.16污水監(jiān)測設(shè)備上報(bào)數(shù)據(jù)接口返回示例參數(shù)名類型必選說明codeint否當(dāng)code為0成功返回?cái)?shù)據(jù)msgSt

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

評(píng)論

0/150

提交評(píng)論