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

下載本文檔

版權說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權,請進行舉報或認領

文檔簡介

ICS35.100.20CCSL72DB36Dataexchangespecificationforlong-termmanagementandprotectionplatformofrurallivingenvironm江西省市場監(jiān)督管理局發(fā)布IDB36/T1845—2023前言 2規(guī)范性引用文件 3術語和定義 4數(shù)據(jù)交換流程 5接口要求 6接口設計 7設備上報頻次 8設備離線存儲、斷點續(xù)傳 附錄A(資料性)接口設計標準 5附錄B(資料性)返回接口示例 22DB36/T1845—2023本文件按照GB/T1.1-2020《標準化工作導則第1部分:標準化文件的結構和起草規(guī)則》的規(guī)定起請注意本文件的某些內(nèi)容可能涉及專利。本文件的發(fā)布機構不承擔識別專利的責任。本文件由江西省農(nóng)業(yè)農(nóng)村廳提出并歸口。本文件起草單位:江西省農(nóng)業(yè)技術推廣中心、江西電信信息產(chǎn)業(yè)有限公司、江西省數(shù)字鄉(xiāng)村研究院。本文件主要起草人:陳勛洪、鐘志宏、楊眉、黃建昌、張敏、徐軍亮、姜凱文、鄧碧巖、官文峰。DB36/T1845—2023當前農(nóng)村人居環(huán)境長效管護平臺接入的物聯(lián)網(wǎng)監(jiān)測平臺較多,涉及設備品牌繁多,各廠家平臺及設備數(shù)據(jù)標準不一,從而導致對接成本、維護成本、運營成本的增加,制約了平臺的快速建設推廣。為有效加強全省農(nóng)村人居環(huán)境長效管護平臺建設的統(tǒng)一規(guī)劃、統(tǒng)一管理、協(xié)調(diào)運行和維護服務,建立健全全省農(nóng)村人居環(huán)境長效管護平臺的數(shù)據(jù)交換標準,推動農(nóng)村人居環(huán)境長效管護平臺的建設運營有序發(fā)展,提升各級政府及其部門的農(nóng)村人居環(huán)境治理水平,現(xiàn)根據(jù)國家、地方相關文件要求和標準,結合我省農(nóng)村人居環(huán)境治理現(xiàn)狀和發(fā)展要求,制定本文件。1DB36/T1845—2023農(nóng)村人居環(huán)境長效管護平臺數(shù)據(jù)交換規(guī)范本文件規(guī)定了農(nóng)村人居環(huán)境長效管護平臺接口數(shù)據(jù)交換的相關術語和定義、數(shù)據(jù)交換流程、接口要求、接口設計、設備數(shù)據(jù)上報頻次、設備數(shù)據(jù)斷點續(xù)傳。本文件適用于農(nóng)村人居環(huán)境長效管護平臺接口設計。2規(guī)范性引用文件下列文件中的內(nèi)容通過文中的規(guī)范性引用而構成本文件必不可少的條款。其中,注日期的引用文件,僅該日期對應的版本適用于本文件;不注日期的引用文件,其最新版本(包括所有的修改單)適用于本文件。GB/T28168信息技術中間件消息中間件技術規(guī)范GB/T33745—2017物聯(lián)網(wǎng)術語GB/T36478.1—2018物聯(lián)網(wǎng)信息交換和共享第1部分:總體架構3術語和定義GB/T33745—2017、GB/T36478.1—2018界定的以及下列術語和定義適用于本文件。3.1農(nóng)村人居環(huán)境長效管護平臺rurallivingenvironmentlong-termmanagementplatform采用物聯(lián)網(wǎng)、云計算、大數(shù)據(jù)、AI等新一代信息技術建設的農(nóng)村人居環(huán)境長效管護信息平臺。包含物聯(lián)云判、管護調(diào)度、鄉(xiāng)村大腦、四大治理、“萬村碼上通”小程序等模塊,具有針對農(nóng)村人居環(huán)境事件“投訴、整改、反饋、監(jiān)督”和人、車、事、物、情“一圖統(tǒng)攬、一網(wǎng)統(tǒng)調(diào)”等功能。3.2數(shù)據(jù)采集終端dataacquisitionterminal用于監(jiān)測農(nóng)村人居環(huán)境的設備,如垃圾桶滿溢監(jiān)測設備、人員作業(yè)跟蹤定位卡牌、廁所氣味探測設備、污水水質(zhì)檢測設備、車載跟蹤定位設備。3.3物聯(lián)網(wǎng)監(jiān)測數(shù)據(jù)共享模塊/系統(tǒng)IoTmonitoringdatasharingmodule/system農(nóng)村人居環(huán)境長效管護平臺中采集物聯(lián)網(wǎng)動態(tài)監(jiān)測數(shù)據(jù)并提供數(shù)據(jù)共享服務的模塊/系統(tǒng)。4數(shù)據(jù)交換流程2DB36/T1845—2023依據(jù)GB/T36478.1—2018中的規(guī)定,通過數(shù)據(jù)接口方式,數(shù)據(jù)提供方通過物聯(lián)網(wǎng)系統(tǒng)將交換和共享的數(shù)據(jù)導入到對應的模塊/系統(tǒng);數(shù)據(jù)需求方從物聯(lián)網(wǎng)相應模塊/系統(tǒng)獲取物聯(lián)網(wǎng)數(shù)據(jù),數(shù)據(jù)交換流程如圖1所示。圖1數(shù)據(jù)交換示意圖5接口要求5.1約定5.1.1數(shù)據(jù)交換基于RESTfulAPI,采用標準JSON數(shù)據(jù)格式。5.1.2為便于提供方和需求方統(tǒng)一調(diào)用數(shù)據(jù),接口方法和參數(shù)宜采用英文單詞命名。5.2協(xié)議使用HTTPS協(xié)議。5.3消息格式5.3.1請求頭不同的接口應具有同一請求頭,請求頭的名稱和含義描述應符合表1。3DB36/T1845—2023表1請求頭5.3.2請求參數(shù)不同接口功能,其請求參數(shù)存在差異。請求參數(shù)格式示例見表2。表2請求參數(shù)格式示例————————5.4返回數(shù)據(jù)格式返回數(shù)據(jù)應包含:返回狀態(tài)碼、返回狀態(tài)信息、具體數(shù)據(jù)。以json格式為例。{"code":"0","msg":"success","data":{//json格式的具體數(shù)據(jù)}6接口設計6.1基本要求接口設計應滿足如下要求:——接口地址:http://服務器地址:端口號/api/open/接口方法名?!涌趨f(xié)議:WebService?!幋a方式:UTF-8。——交換格式:JSON。接口設計參考附錄A,接口返回示例見附錄B。4DB36/T1845—20236.2返回狀態(tài)碼code接口返回狀態(tài)碼見表3。表3返回狀態(tài)碼code及描述07設備上報頻次設備主要數(shù)據(jù)上報頻次如下:——智能垃圾桶:1條/6小時?!|(zhì)監(jiān)測設備:1條/6小時?!獨馕短綔y器:1條/6小時?!囕d:1條/分鐘?!ㄅ疲?條/5分鐘?!h(huán)境探測器:1條/2小時。8設備離線存儲、斷點續(xù)傳設備應具備在網(wǎng)絡不佳時本地存儲數(shù)據(jù),待網(wǎng)絡通暢時上傳未上報數(shù)據(jù)的功能。消息機制應符合GB/T28168的規(guī)定。5DB36/T1845—2023接口設計標準A.1服務調(diào)用步驟A.1.1數(shù)據(jù)需求方將授權Id(appId)和密鑰(appSecret)進行SHA-2加密傳輸,數(shù)據(jù)提供方在SHA-2加密算法的基礎上進行了加鹽操作。鹽是隨機生成的字符串。我們將鹽與原始數(shù)據(jù)連接在一起,然后將連接后的字符串加密處理返回token令牌。后續(xù)在調(diào)用設備管理和設備數(shù)據(jù)管理相關接口時需使用該令牌。獲取令牌接口參考A.2.1。A.1.2數(shù)據(jù)提供方數(shù)據(jù)提供方應滿足如下要求:——獲取請求數(shù)據(jù)進行相關業(yè)務處理;——根據(jù)數(shù)據(jù)需求方的請求輸出數(shù)據(jù);——返回調(diào)用結果給數(shù)據(jù)需求方。A.2身份認證獲取令牌接口應滿足如下要求:——接口方法:getToken;——接口路徑:api/open/oauth/;——請求方式:POST。請求參數(shù)見表A.1。表A.1getToken是是返回示例見附錄B.1。A.3設備管理A.3.1產(chǎn)品列表獲取農(nóng)村人居環(huán)境長效管護平臺標準物聯(lián)網(wǎng)產(chǎn)品,接口要求如下:——接口方法:getProductList;——接口路徑:api/open/product/;——請求方式:POST。參數(shù)見表A.2。表A.2getProductList6DB36/T1845—2023是否productProtocol否productId是返回示例見附錄B.2。A.3.2設備列表獲取農(nóng)村人居環(huán)境長效管護平臺設備列表的接口要求如下:——接口方法:getDeviceList;——接口路徑:api/open/device/;——請求方式:POST。請求參數(shù)見表A.3。表A.3getDeviceList是netStatus否否productId是是區(qū)域code(依據(jù)中國行政區(qū)域編碼劃分規(guī)則)返回示例見附錄B.3。A.3.3新建產(chǎn)品添加產(chǎn)品(產(chǎn)品為設備直連+非NB網(wǎng)關協(xié)議)的接口要求如下:——接口方法:createProduct;——接口路徑:api/open/product/;——請求方式:POST。請求參數(shù)見表A.4。7DB36/T1845—2023表A.4createProduct參數(shù)名必選類型說明token是String通信證key請求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個字符,產(chǎn)品名稱必須包含數(shù)字或字母或漢字,產(chǎn)品名稱不能重復productType:產(chǎn)品分類(必填)secondaryType:二級分類(必填)thirdType:三級分類(必填)nodeType:節(jié)點類型(必填):1.設備,2.網(wǎng)關accessType:接入類型(必填):1.設備直連,2.網(wǎng)關接入,3.南向云接入(只支持1)networkType:網(wǎng)絡類型(必填):1.WIFI,2.移動蜂窩數(shù)據(jù)3.NB-IoT,4.以太網(wǎng),5.藍牙,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)關MQTT協(xié)議authType:認證方式1:特征串認證,2:SM9認證,3:證書認證,4:IMEI認證,5:SIMID認證,6:SM2認證,7:IPV6標識認證payloadFormat:消息格式1:json,2:緊湊二進制8DB36/T1845—2023dataEncryption:數(shù)據(jù)加密方式1:sm1,2:sm2,3:sm4,4:dtls,5:明文(只支持MQTT/LWM2M)encryptionType:安全類型(只支持MQTT,TCP協(xié)議)0:一機一密,1:一型一密tupIsThrough:是否透傳:0.透傳,1不透傳(JT/T808,tcp協(xié)議,只有透傳,消息格式必須只能傳null)deviceModel:JT/T808協(xié)議設備型號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模式時間窗(LWM2M協(xié)議,當省電模式為3時,必填):20~10485.76間的值,精確到小數(shù)點后兩位productDesc:產(chǎn)品描述(選填):產(chǎn)品描述最多100個字符tupDeviceModel:設備型號,選填,設備直連并且非JT/T808協(xié)議產(chǎn)品必填返回示例見附錄B.4。A.3.4刪除產(chǎn)品刪除產(chǎn)品數(shù)據(jù),如果產(chǎn)品下有設備數(shù)據(jù),則無法刪除產(chǎn)品。刪除產(chǎn)品的接口要求如下:——接口方法:deleteProduct;——接口路徑:api/open/product/;——請求方式:DELETE。請求參數(shù)見表A.5。表A.5deleteProduct是是productId是是返回示例見附錄B.5A.3.5更新產(chǎn)品更新產(chǎn)品數(shù)據(jù)的接口要求如下:——接口方法:updateProduct;——接口路徑:api/open/product/;——請求方式:PUT。請求參數(shù)見表A.6。9DB36/T1845—2023表A.6updateProduct參數(shù)名必選類型說明token是String通信證keygridCode是String區(qū)域code(依據(jù)中國行政區(qū)域編碼劃分規(guī)則)請求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)不能重復,必填productDesc:產(chǎn)品描述,選填endpointFormat:endpoint類型(Lwm2m協(xié)議必填)1.IMEI2.URN:IMEI:###############3.URN:IMEI-IMSI:###############-###############4.URN:IMEI+SM9注:認證方式為SM9認證時,endpoint類型為4認證方式為IMEI認證、sm2認證時,endpoint類型為1、2、3powerModel:省電模式(Lwm2m協(xié)議必填)1.PSM2.DRX3.eDRXlwm2mEdrxTime:eDRX模式時間窗(LWM2M協(xié)議,當省電模式為3時,必填):20~10485.76間的值,精確到小數(shù)點后兩位返回示例見附錄B.6。A.3.6創(chuàng)建設備增加設備的接口要求如下:——接口方法:createDevice;——接口路徑:api/open/device/;——請求方式:POST。請求參數(shù)見表A.7。表A.7createDevice是是是DB36/T1845—2023是是是productId是是返回示例見附錄B.7。A.3.7刪除設備刪除設備數(shù)據(jù)的接口要求如下:——接口方法:deleteDevice;——接口路徑:api/open/device/;——請求方式:DELETE。請求參數(shù)見表A.8。表A.8deleteDevice是productId是是是是返回示例見附錄B.8。A.3.8更新設備更新設備數(shù)據(jù)的接口要求如下:——接口方法:updateDevice;——接口路徑:api/open/device/;——請求方式:PUT。請求參數(shù)見表A.9。表A.9updateDevice是是是請求body(數(shù)據(jù)類型application/json;charset=utf-8)DB36/T1845—2023返回示例見附錄B.9。A.3.9獲取物模型查詢屬性列表信息,獲取標準數(shù)據(jù)參數(shù)名稱及數(shù)據(jù)類型的接口要求如下:——接口方法:queryPropertyList;——接口路徑:api/open/model/properties/;——請求方式:GET。請求參數(shù)見表A.10。表A.10queryPropertyList是是productId是否否否否返回示例見附錄B.10。A.3.10獲取標準產(chǎn)品物模型標準農(nóng)村人居環(huán)境長效管護平臺標準物模型的接口要求如下:——接口方法:queryStandardModel;DB36/T1845—2023——接口路徑:api/open/standardModel/;——請求方式:GET。請求參數(shù)見表A.11。表A.11queryStandardModel是是否否返回示例見附錄B.11。A.3.11獲取服務列表信息獲取農(nóng)村人居環(huán)境長效管護平臺服務列表信息的接口要求如下:——接口方法:queryPropertyList;——接口路徑:api/open/model/properties/;——請求方式:GET。請求參數(shù)見表A.12。表A.12queryPropertyList是是productId是否是否否返回示例見附錄B.12。A.3.12智能垃圾桶數(shù)據(jù)上報智能垃圾桶設備上報數(shù)據(jù)的接口要求如下:——接口方法:uploadRubbishData;——接口路徑:api/open/uploadData/;——請求方式:POST。請求參數(shù)見表A.13。表A.13uploadRubbishDataDB36/T1845—2023是body是請求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ù)據(jù)上報卡牌設備上報數(shù)據(jù)的接口要求如下:——接口方法:uploadCardData;——接口路徑:api/open/uploadData/;——請求方式:POST。請求參數(shù)見表A.14。表A.14uploadCardDataDB36/T1845—2023是body是請求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}返回示例見附錄B.14。A.3.14智慧廁改設備數(shù)據(jù)上報廁改設備上報數(shù)據(jù)的接口要求如下:——接口方法:uploadToiletData;——接口路徑:api/open/uploadData/;——請求方式:POST。請求參數(shù)見表A.15。表A.15uploadToiletData是body是請求body{"deviceId":,"deviceName":null,"uploadTime":"2021-08-2715:49:00","humWoman":null,DB36/T1845—2023"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。A.3.15污水監(jiān)測設備上報數(shù)據(jù)污水監(jiān)測設備上報數(shù)據(jù)的接口要求如下:——接口方法:uploadWaterData;——接口路徑:api/open/uploadData/;——請求方式:POST。請求參數(shù)見表A.16。表A.16uploadWaterData是body是請求body{"deviceId":"15036215BK7201SN001625","uploadTime":"2021-08-0417:01:03","temperature":29,"conductivity":1,"turbidity":1348.2,"ph":7.31,"doxygen":5.670000076293945,"imei":null}返回示例見附錄B.16。DB36/T1845—2023A.3.16車載設備數(shù)據(jù)上報車載設備上報數(shù)據(jù)的接口要求如下:——接口方法:uploadCarData;——接口路徑:api/open/uploadData/;——請求方式:POST。請求參數(shù)見表A.17。表A.17uploadCarData是body是請求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.17。A.3.17空氣站設備數(shù)據(jù)上報空氣站設備上報數(shù)據(jù)的接口要求如下:——接口方法:uploadAirData;——接口路徑:api/open/uploadData/;——請求方式:POST。請求參數(shù)見表A.18。DB36/T1845—2023表A.18uploadAirData是body是請求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"}返回示例見附錄B.18。A.4設備數(shù)據(jù)管理A.4.1獲取設備監(jiān)測數(shù)據(jù)根據(jù)設備Id設備類別獲取設備上報監(jiān)測數(shù)據(jù),獲取數(shù)據(jù)的接口要求如下:——接口方法:getDeviceDataById;——接口路徑:api/open/device/;——請求方式:POST。請求參數(shù)見表A.19。表A.19getDeviceDataById是是是表A.19getDeviceDataById(續(xù))DB36/T1845—2023否否返回示例見附錄B.19。A.4.2獲取設備原始上傳數(shù)據(jù)包獲取設備原始上傳數(shù)據(jù)格式的接口要求如下:——接口方法:getBasicDataList;——接口路徑:api/open/basicData/;——請求方式:POST。請求參數(shù)見表A.20。表A.20getBasicDataList是否是是返回示例見附錄B.20。A.4.3獲取設備上報事件信息獲取設備上報事件信息的接口要求如下:——接口方法:getEventBasicDataList;——接口路徑:api/open/events/;——請求方式:POST。請求參數(shù)見表A.21。表A.21getEventBasicDataList是否否是是返回示例見附錄B.21。A.4.4獲取智能垃圾桶數(shù)據(jù)獲取智能垃圾桶設備上報數(shù)據(jù)的接口要求如下:——接口方法:getRubbishData;——接口路徑:api/open/deviceData/;DB36/T1845—2023——請求方式:POST。請求參數(shù)見表A.22。表A.22getRubbishData是是是返回示例見附錄B.22。A.4.5獲取人員卡牌設備數(shù)據(jù)獲取卡牌設備上報數(shù)據(jù)的接口要求如下:——接口方法:getCardData;——接口路徑:api/open/deviceData/;——請求方式:POST。請求參數(shù)見表A.23。表A.23getCardData是是區(qū)域code(依據(jù)中國行政區(qū)域編碼劃分規(guī)則)是返回示例見附錄B.23。A.4.6獲取污水監(jiān)測設備數(shù)據(jù)獲取污水監(jiān)測設備上報數(shù)據(jù)的接口要求如下:——接口方法:getWaterData;——接口路徑:api/open/deviceData/;——請求方式:POST。請求參數(shù)見表A.24。表A.24getWaterData是是是返回示例見附錄B.24。A.4.7獲取車載設備數(shù)據(jù)DB36/T1845—2023獲取車載設備上報數(shù)據(jù)的接口要求如下:接口方法:getCarData;接口路徑:api/open/deviceData/;請求方式:POST。請求參數(shù)見表A.25。表A.25getCarData是是是返回示例見附錄B.25。A.4.8獲取智慧廁改設備數(shù)據(jù)獲取廁改設備上報數(shù)據(jù)的接口要求如下:——接口方法:getToiletData;——接口路徑:api/open/deviceData/;——請求方式:POST。請求參數(shù)見表A.26。表A.26getToiletData是是是返回示例見附錄B.26。A.4.9獲取空氣站設備數(shù)據(jù)獲取空氣站設備上報數(shù)據(jù)的接口要求如下:——接口方法:getAirData;——接口路徑:api/open/deviceData/;——請求方式:POST。請求參數(shù)見表A.27。表A.27getAirDataDB36/T1845—2023是是是返回示例見附錄B.27。DB36/T1845—2023返回接口示例B.1獲取令牌接口返回示例以JSON格式返回結果數(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"返回參數(shù)說明見表B.1:表B.1獲取令牌接口返回示例B.2產(chǎn)品列表接口返回示例以JSON格式返回結果數(shù)據(jù),格式定義如下:{"code":"0","msg":"成功","data":[{“productId”:1532043"apiKey":"b0910dc269db472fb45823292e706f3e","authType":1,"createBy":"user",DB36/T1845—2023"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,"thirdTypeValue":"測試tanglv","tupIsThrough":1,"updateBy":"user","updateTime":1535943389000}返回參數(shù)說明見表B.2。表B.2產(chǎn)品列表接口返回示例productIdpowerModel表B.2產(chǎn)品列表接口返回示例(續(xù))DB36/T1845—2023productProtocolpowerModelStrproductProtocolStrpayloadFormatStr認證,4:IMEI認證,5:SIMID認證,B.3設備列表接口返回示例以JSON格式返回結果數(shù)據(jù),格式定義如下:{"code":"0","msg":"成功","data":[DB36/T1845—2023{"deviceSn":"006","deviceId":,"deviceName":"測試廁改設備","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ù)說明見表B.3。表B.3設備列表接口返回示例productIdnetStatusnetStatusStrproductProtocol設備通訊協(xié)議(integer,產(chǎn)品協(xié)議:1.T-LINK協(xié)議2.MQTT協(xié)議3.LWM2M協(xié)議私有UDP(網(wǎng)關子設備協(xié)議)10.網(wǎng)關產(chǎn)品MQTT(網(wǎng)關產(chǎn)品productProtocolStr表B.3設備列表接口返回示例(續(xù))DB36/T1845—2023B.4新建產(chǎn)品接口返回示例以JSON格式返回結果數(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":"測試","thirdTypeValue":"測試tanglv","rootCert":1,"createBy":"user","updateBy":"user","accessType":2,"nodeType":1,"tupIsThrough":1,"dataEncryption":5,DB36/T1845—2023"lwm2mEdrxTime":15.2}}返回參數(shù)說明見表B.4。表B.4新建產(chǎn)品接口返回示例否否否productId否否tenantId否否否否否productProtocol否協(xié)議4.TUP協(xié)議5.HTTP協(xié)議6.JT/T8087.TCP協(xié)議8.私有TCP(網(wǎng)關子設備協(xié)議)9.私有UDP(網(wǎng)關子設備協(xié)議)10.網(wǎng)關產(chǎn)品MQTT(網(wǎng)關產(chǎn)品否否否否否否1.IMEI2.URN:IMEI:#########################-###############4.URN:IMpowerModel否否否否否否否否表B.4新建產(chǎn)品接口返回示例(續(xù))DB36/T1845—2023否否否否接入類型:1.設備直連,2.網(wǎng)關接入,3.南向云接否是否透傳:0.透傳,1不透傳(JT/T808,只有透傳,消息格式必須只能傳否數(shù)據(jù)加密方式1:sm1,2:sm2,3:sm4,否B.5刪除產(chǎn)品接口返回示例以JSON格式返回結果數(shù)據(jù),格式定義如下:{"code":0,"msg":"string"}返回參數(shù)說明見表B.5。表B.5刪除產(chǎn)品接口返回示例B.6更新產(chǎn)品接口返回示例以JSON格式返回結果數(shù)據(jù),格式定義如下:{"code":0,"msg":"ok"}返回參數(shù)說明見表B.6。表B.6更新產(chǎn)品接口返回示例B.7創(chuàng)建設備接口返回示例以JSON格式返回結果數(shù)據(jù),格式定義如下:{"code":0,DB36/T1845—2023"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)建設備接口返回示例productIdtenantIdB.8刪除設備接口返回示例以JSON格式返回結果數(shù)據(jù),格式定義如下:{"code":0,"msg":"string"}返回參數(shù)說明見表B.8:表B.8刪除設備接口返回示例B.9更新設備接口返回示例以JSON格式返回結果數(shù)據(jù),格式定義如下:DB36/T1845—2023{"code":0,"msg":"string"}返回參數(shù)說明表B.9。表B.9更新設備接口返回示例參數(shù)名類型說明codeint當code為0成功返回數(shù)據(jù)msgStringcode描述B.10獲取物模型接口返回示例以JSON格式返回結果數(shù)據(jù),格式定義如下:{"code":0,"msg":"ok","result":{"pageNum":1,"pageSize":1,"propertyId":1,"propertyFlag":"asdggg","propertyName":"屬性1","dataType":"fix-string","unit":"g","unitName":"克每毫升","description":"""propertyId":2,"propertyFlag":"a1","propertyName":"a1","dataType":"enum","enumDetail":{"3":"4",DB36/T1845—2023"description":"test""propertyId":3,"propertyFlag":"A.3","propertyName":"A.3","dataType":"float","unit":"ppm","len":4,"unitName":"百萬分率","max":"2","description":"1""propertyId":4,"propertyFlag":"a3","propertyName":"a3","dataType":"bool","boolDetail":{"false":"關","true":"開""description":"test"}返回參數(shù)說明見表B.10。表B.10獲取物模型接口返回示例propertyFlag表B.10獲取物模型接口返回示例(續(xù))DB36/T1845—2023枚舉值enum。json格式數(shù)據(jù)類型及對應枚舉值:int32int32,floatunitB.11獲取標準產(chǎn)品物模型接口返回示例以JSON格式返回結果數(shù)據(jù),格式定義如下:{"code":0,"msg":"ok","result":{"properties":[{"propertyFlag":"a1","propertyName":"a1","dataType":"enum","enumDetail":{"3":"4","description":"test"{"propertyFlag":"A.3","propertyName":"A.3","dataType":"float",DB36/T1845—2023"unit":"ppm","len":4,"unitName":"百萬分率","max":"2","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","len":4,"unitName":"克每毫升","max":"2","description":"1","serial":1}返回參數(shù)說明見表B.11。表B.11獲取標準產(chǎn)品物模型接口返回示例DB36/T1845—2023integer事件類型只有事件上報才有unitpropertyFlag時間戳timestamp,枚舉值enuB.12獲取服務列表信息接口返回示例以JSON格式返回結果數(shù)據(jù),格式定義如下:{"code":0,DB36/T1845—2023"msg":"ok","result":{"pageNum":1,"pageSize":20,"serviceId":1,"serviceFlag":"asdg","serviceName":"阿薩德剛","serviceType":2,"eventType":1,"description":"","properties":[{"propertyId":1,"propertyFlag":"asdggg","propertyName":"屬性1","dataType":"fix-string","unit":"g","unitName":"克每毫升","description":"""propertyId":2,"propertyFlag":"a1","propertyName":"a1","dataType":"enum","enumDetail":{"3":"4","description":"test""propertyId":4,"propertyFlag":"a3","propertyName":"a3","dataType":"bool","boolDetail":{"false":"關","true":"開"DB36/T1845—2023"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獲取服務列表信息接口返回示例unit表B.12獲取服務列表信息接口返回示例(續(xù))DB36/T1845—2023fix-string,定長binaryfix-binary,無符字符串vary-string,變長binaryv浮點型float,時間戳timestamp,枚舉值enum枚舉值:int32int32,floatfloat,doubledouble,枚舉型enpropertyFlagB.13智能垃圾桶數(shù)據(jù)上報接口返回示例以JSON格式返回結果數(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,DB36/T1845—2023"deviceNo":null,"imei":null}參數(shù)說明見表B.13。表B.13智能垃圾桶數(shù)據(jù)上報接口返回示例否否是是是是是否否否否否否否否否tiltThreshold否否powerThreshold否否否否是是B.14人員卡牌設備數(shù)據(jù)上報接口返回示例DB36/T1845—2023以JSON格式返回結果數(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ù)說明見表B.14。表B.14人員卡牌設備數(shù)據(jù)上報接口返回示例否否是否是是否否否DB36/T1845—2023表B.14人員卡牌設備數(shù)據(jù)上報接口返回示例(續(xù))battery否否否否否否B.15智慧廁改設備數(shù)據(jù)上報接口返回示例以JSON格式返回結果數(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。DB36/T1845—2023表B.15智慧廁改設備數(shù)據(jù)上報接口返回示例否否是否是否否否否否否否nh3Man否否否否否是B.16污水監(jiān)測設備上報數(shù)據(jù)接口返回示例以JSON格式返回結果數(shù)據(jù),格式定義如下:{"code":0,"msg":"ok","result":{{"deviceId":"15036215BK7201SN001625","uploadTime":"2021-08-0417:01:03","temperature":29,"conductivity":1,"turbidity":1348.2,"ph":7.31,DB36/T1845—2023"doxygen":5.670000076293945,"imei":null}參數(shù)說明見表B.16。表B.16污水監(jiān)測設備上報數(shù)據(jù)接口返回示例否否是是否否否ph否pH值否是B.17車載設備數(shù)據(jù)上報接口返回示例以JSON格式返回結果數(shù)據(jù),格式定義如下:{"code":0,"msg":"ok","result":{{"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,DB36/T1845—2023"dataSource":null,"syncStatus":0,"syncTime":null,"alarm":0,"mileage":0,"recorderSpeed":0,"gpsswitch":1,"imei":null}參數(shù)說明表B.17。表B.17車載設備數(shù)據(jù)上報接口返回示例否否是是batteryStatus否否否否否是是否是B.18空氣站設備數(shù)據(jù)上報接口返回示例以JSON格式返回結果數(shù)據(jù),格式定義如下:{"code":0,"msg":"ok","result":{{DB36/T1845—2023"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ù)說明見表B.18。表B.18空氣站設備數(shù)據(jù)上報接口返回示例否否是是否humidity否否否pressure否否否否no2否否否否DB36/T1845—2023B.19獲取設備監(jiān)測數(shù)據(jù)接口返回示例以JSON格式返回結果數(shù)據(jù),格式定義如下:{"code":"0","msg":"成功","data":[{"deviceId":"6f27fd0ad99d43bbb50a3adc1de4cada","uploadTime":"2021-07-1112:35:09","latitude":"0.0","longitude":"0.0","errorCode":"0000","fireState":"0","tiltAngle":"0","powerState":"0","temperature":40,"deviceState":null,"batteryValue":0,"locationFlag":null,"fireThreshold":0,"fullThreshold":0,"tiltThreshold":null,"batteryVoltage":3.62,"powerThreshold":0,"fullState":"0","inclineState":"0","high":9999,"deviceNo":null,"imei":null"count":38}參數(shù)說明見表B.19。表B.19獲取設備監(jiān)測數(shù)據(jù)接口返回示例DB36/T1845—2023表B.19獲取設備監(jiān)測數(shù)據(jù)接口返回示例(續(xù))pcipcitiltThresholdpowerThresholdhighDB36/T1845—2023B.20獲取設備原始上傳數(shù)據(jù)包接口返回示例以JSON格式返回結果數(shù)據(jù),格式定義如下:{"code":"0","msg":"成功","data":[{"deviceType":null,"productId":null,"deviceId":null,"deviceName":"古田村-井岡山","protocol":"tcp","messageType":null,"messageTypeStr":"數(shù)據(jù)上報","assocAssetId":null,"topic":null,"upDataSN":0,"serviceId":null,"serviceName":null,"payload":"{\"hum_man\":73.8302001953125,\"H2S_man\":0.0010200000833719969,\"temp_man\":29.156200408935547,\"NH3_man\":0.0014188999775797129}","timestamp":null,"syncTime":"2021-08-2409:52:39","uploadTime":null,"syncStatus":0,"imei":null"count":77412}返回參數(shù)說明見表B.20。表B.20獲取設備原始上傳數(shù)據(jù)包接口返回示例DB36/T1845—2023表B.20獲取設備原始上傳數(shù)據(jù)包接口返回示例(續(xù))protocolpayloadB.21獲取設備上報事件信息接口返回示例以JSON格式返回結果數(shù)據(jù),格式定義如下:{"code":"0","msg":"成功","data":[{"deviceType":null,"productId":"15042251","deviceId":"4b349c049800421f8479f45f94b63a3f","deviceName":"尹仁生","protocol":"lwm2m","messageType":null,"messageTypeStr":"設備上下線狀態(tài)上報","serviceId":null,"serviceName":null,"payload":null,"timestamp":null,"syncTime":"2021-08-1317:50:12","uploadTime":null,"syncStatus":0,"eventContent":null,"eventType":1,DB36/T1845—2023"eventTypeStr":"信息","imei":null"count":652}返回參數(shù)說明見表B.21。表B.21獲取設備上報事件信息接口返回示例productIdprotocolpayloadB.22獲取智能垃圾桶數(shù)據(jù)接口返回示例以JSON格式返回結果數(shù)據(jù),格式定義如下:{"code":"0",DB36/T1845—2023"msg":"成功","data":[{"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":

溫馨提示

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

評論

0/150

提交評論