|
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319 |
- # 鼎鼎开放平台
-
- 鼎鼎开放平台旨在集成物联网设备,赋能合作第三方或内部开发人员,使之可以进行围绕设备、与业务无关的开发。第一版的开放平台开始于2021年1月,对接了深圳曼顿公司物联网空开的`HTTP`和`UDP`协议。
-
- # 版本历史
-
- | 版本 | 修订内容 | 修订人 | 发布日期 |
- | ----- | ------------------------------------------------------------ | ------ | --------- |
- | 1.0.0 | 第一次发布。功能包括:合闸、分断、获取实时数据。 | 季建新 | 2021.1.12 |
- | 1.0.1 | 兼容`UDP`协议 | 季建新 | 2021.2.21 |
- | 1.0.2 | `HTTP`协议电量查询,实现按月、按天、按小时查询。 | 季建新 | 2021.2.21 |
- | 1.0.3 | `UDP`协议电量查询,实现按月、按天、按小时查询。 | 季建新 | 2021.2.21 |
- | 1.0.4 | 获取`HTTP`协议模块是否在线; 模块和项目绑定;模块和项目解除绑定;获取60分钟内负荷; 获取任意多开关任意时间段内的电量。 | 季建新 | 2021.3.19 |
- | 1.0.5 | 获取项目下的模块;获取项目下的所有模块及线路;获取任意多个线路的累积负荷;获取任意多开关任意时间段内的按小时、按天、按月电量;获取任意多开关任意时间段内的电量。 | 季建新 | 2021.3.22 |
-
-
-
- # 空气开关
-
- ## 获取实时数据
-
- 请求
-
- ```
- POST http://47.103.61.198:5008/api/breaker/data
-
- Headers:
-
- Content-Type: application/json
- DD-Open-Key: d2ca79f1-4666-4ad5-953b-7ba5ee480fe0
-
- Body:
-
- {
- "mac":"187ED53338C4"
- }
- ```
-
- 响应
-
- ```
- {
- "data": {
- "serverinfo": {
- "port": "12345",
- "hardware": "T25",
- "execleakcheck": "false",
- "protocol_ver": "19",
- "mac": "187ED53338C4",
- "loginid": "187ED53338C4",
- "gate": "",
- "ip": "192.168.8.134",
- "version": "1.3.08",
- "loginpwd": "7a57a5a743894ae4",
- "ssidpwd": "2803f88db851c67a",
- "ssid": "DDINGW",
- "timezoneId": "Asia/Shanghai",
- "ServerProtocol": "2",
- "server": "47.103.61.198:5008/ebx-bishop/data/carry",
- "datetime": "2021-01-25 14:24:56",
- "leakcheckdate": "3,13,33",
- "lastleakcheckdate": "2017-01-01 10:00:00"
- },
- "distributbox": {
- "breakers": {
- "1": {
- "version": "1.03",
- "title": "总路",
- "model": "JZK2L100-BL6523",
- "alarm": 0,
- "enableNetCtrl": true,
- "mxdw": 0,
- "mxgg": 14080,
- "mxgl": 96,
- "mxgw": 90,
- "mxgy": 260,
- "mxld": 30,
- "mxqy": 0,
- "openClose": true,
- "addr": 1,
- "power": 0,
- "specification": "64",
- "control": 1,
- "visibility": 1,
- "totalChannelId": -1,
- "lineType": "220",
- "a_A": 0,
- "a_T": 32.1,
- "a_V": 226,
- "a_WP": 0,
- "a_LD": 0.5,
- "a_PF": 0,
- "g_A": 0,
- "g_T": 0,
- "g_V": 0,
- "g_WP": 0,
- "g_LD": 0,
- "g_PF": 0,
- "b_A": 0,
- "b_T": 0,
- "b_V": 0,
- "b_WP": 0,
- "b_PF": 0,
- "c_A": 0,
- "c_T": 0,
- "c_V": 0,
- "c_WP": 0,
- "c_PF": 0,
- "n_A": 0,
- "n_T": 0
- },
- "2": {
- "version": "1.03",
- "title": "线路1",
- "model": "JZK2L100-BL6523",
- "alarm": 0,
- "enableNetCtrl": true,
- "mxdw": 0,
- "mxgg": 100,
- "mxgl": 30,
- "mxgw": 90,
- "mxgy": 260,
- "mxld": 30,
- "mxqy": 175,
- "openClose": true,
- "addr": 2,
- "power": 0,
- "specification": "20",
- "control": 1,
- "visibility": 1,
- "totalChannelId": 1,
- "lineType": "220",
- "a_A": 0,
- "a_T": 35,
- "a_V": 226,
- "a_WP": 0,
- "a_LD": 0,
- "a_PF": 0,
- "g_A": 0,
- "g_T": 0,
- "g_V": 0,
- "g_WP": 0,
- "g_LD": 0,
- "g_PF": 0,
- "b_A": 0,
- "b_T": 0,
- "b_V": 0,
- "b_WP": 0,
- "b_PF": 0,
- "c_A": 0,
- "c_T": 0,
- "c_V": 0,
- "c_WP": 0,
- "c_PF": 0,
- "n_A": 0,
- "n_T": 0
- },
- "3": {
- "version": "1.03",
- "title": "线路2",
- "model": "JZK2L100-BL6523",
- "alarm": 0,
- "enableNetCtrl": true,
- "mxdw": 0,
- "mxgg": 4400,
- "mxgl": 30,
- "mxgw": 90,
- "mxgy": 260,
- "mxld": 30,
- "mxqy": 175,
- "openClose": true,
- "addr": 3,
- "power": 0,
- "specification": "20",
- "control": 1,
- "visibility": 1,
- "totalChannelId": 1,
- "lineType": "220",
- "a_A": 0,
- "a_T": 35,
- "a_V": 226,
- "a_WP": 0,
- "a_LD": 0,
- "a_PF": 0,
- "g_A": 0,
- "g_T": 0,
- "g_V": 0,
- "g_WP": 0,
- "g_LD": 0,
- "g_PF": 0,
- "b_A": 0,
- "b_T": 0,
- "b_V": 0,
- "b_WP": 0,
- "b_PF": 0,
- "c_A": 0,
- "c_T": 0,
- "c_V": 0,
- "c_WP": 0,
- "c_PF": 0,
- "n_A": 0,
- "n_T": 0
- }
- },
- "change": null
- }
- },
- "isError": false,
- "message": "success",
- "code": 200
- }
- ```
-
-
-
- ## 合闸分断
-
- 请求
-
- ```
- POST http://47.103.61.198:5008/api/breaker/oc
-
- Headers:
-
- Content-Type: application/json
- DD-Open-Key: d2ca79f1-4666-4ad5-953b-7ba5ee480fe0
-
- Body:
-
- {
- "cmd":"OCSWITCH",
- "value1":"open",
- "value2":"1,2,3",
- "mac":"187ED53338C4",
- "extra":""
- }
- ```
-
-
-
- ## 批量获取模块是否在线
-
- 当总部运营后台展示模块是否在线时使用本接口。
-
-
-
- 请求
-
- ```
- POST http://47.103.61.198:5008/api/hd/macs
-
- Headers:
-
- Content-Type: application/json
- DD-Open-Key: bde2d876-993d-440d-aba1-3a06007a25a3
-
- Body:
-
- {
- "Macs":["187ED5311111","187ED5322222"]
- }
- ```
-
- 响应
-
- ```
- {
- "data": {
- "macs": {
- "187ED5311111": "0",
- "187ED5322222": "0"
- }
- },
- "isError": false,
- "message": "success",
- "code": 200
- }
- ```
-
-
-
- ## 模块和项目绑定
-
- 当总部运营后台绑定模块和项目时使用本接口。
-
-
-
- 请求
-
- ```
- POST http://47.103.61.198:5008/api/hd/mac/bind
-
- Headers:
-
- Content-Type: application/json
- DD-Open-Key: bde2d876-993d-440d-aba1-3a06007a25a3
-
- Body:
-
- {
- "Mac":"187ED5377777",
- "ProjectId":"1000",
- "ProjectName":"DEMO",
- "NSpace":"DEMO",
- "Protocol":0,
- "IsThirdParty":false,
- "APIKey":""
- }
- ```
-
- 以上,`Protocol=2`表示模块是`HTTP`通讯,`Protocol=1`表示模块是`UDP`通讯。如果在项目运营后台的组织属于第三方合作方,必须设置`IsThirdParty=true`,并且`APIKey`不能为空。
-
-
-
- 响应
-
- ```
- {
- "isError": false,
- "message": "success",
- "code": 200
- }
- ```
-
-
-
- ## 模块和项目解除绑定
-
- 当总部运营后台模块和项目解除绑定时使用本接口。
-
- 请求
-
- ```
- POST http://47.103.61.198:5008/api/hd/mac/unbind
-
- Headers:
-
- Content-Type: application/json
- DD-Open-Key: bde2d876-993d-440d-aba1-3a06007a25a3
-
- Body:
-
- {
- "Mac":"187ED5377777"
- }
- ```
-
-
-
- 响应
-
- ```
- {
- "isError": false,
- "message": "success",
- "code": 200
- }
- ```
-
-
-
- ## 获取项目下的模块
-
- 请求
-
- ```
- POST http://47.103.61.198:5008/api/hd/macs/byproject
-
- Headers:
-
- Content-Type: application/json
- DD-Open-Key: bde2d876-993d-440d-aba1-3a06007a25a3
-
- Body:
-
- {
- "ProjectId":"2"
- }
- ```
-
-
-
- 响应
-
- ```
- {
- "data": {
- "macs": [
- "187ED53338C4",
- "187ED5311111",
- "187ED5322222",
- "187ED5333333",
- "187ED5344444",
- "187ED5355555",
- "187ED5366666"
- ],
- "projectId": "2"
- },
- "isError": false,
- "message": "success",
- "code": 200
- }
- ```
-
-
-
- ## 获取项目下的所有模块及线路
-
- 请求
-
- ```
- POST http://47.103.61.198:5008/api/hd/addrs/byprojectmac
-
- Headers:
-
- Content-Type: application/json
- DD-Open-Key: bde2d876-993d-440d-aba1-3a06007a25a3
-
- Body:
-
- {
- "ProjectId":"2"
- }
- ```
-
-
-
- 响应
-
- ```
- {
- "data": {
- "projectId": "2",
- "macs": {
- "187ED53338C4": [
- "1",
- "2",
- "3"
- ],
- "187ED5311111": [
- "1",
- "2",
- "3",
- "4",
- "5",
- "6",
- "7",
- "8",
- "9",
- "10"
- ],
- "187ED5322222": [
- "1",
- "2",
- "3",
- "4",
- "5",
- "6",
- "7",
- "8",
- "9",
- "10"
- ],
- "187ED5333333": [
- "1",
- "2",
- "3",
- "4",
- "5",
- "6",
- "7",
- "8",
- "9",
- "10"
- ],
- "187ED5344444": [
- "1",
- "2",
- "3",
- "4",
- "5",
- "6",
- "7",
- "8",
- "9",
- "10"
- ],
- "187ED5355555": [
- "1",
- "2",
- "3",
- "4",
- "5",
- "6",
- "7",
- "8",
- "9",
- "10"
- ],
- "187ED5366666": [
- "1",
- "2",
- "3",
- "4",
- "5",
- "6",
- "7",
- "8",
- "9",
- "10"
- ]
- }
- },
- "isError": false,
- "message": "success",
- "code": 200
- }
- ```
-
-
-
-
-
- ## 获取最近60分钟的负荷
-
- 当需要统计某个项目、公司、位置下的某些开关最近60分钟内负荷时调用本接口。
-
-
-
- 请求
-
- ```
- POST http://47.103.61.198:5008/api/breaker/fuhe
-
- Headers:
-
- Content-Type: application/json
- DD-Open-Key: bde2d876-993d-440d-aba1-3a06007a25a3
-
- Body:
-
- {
- "Macs":["187ED5311111_1,2","187ED5322222_1,2,3"]
- }
- ```
-
-
-
- 响应
-
- ```
- {
- "data": {
- "fuHes": [
- {
- "dt": "2021-03-19T14:27:00",
- "wp": "400"
- },
- {
- "dt": "2021-03-19T14:28:00",
- "wp": "400"
- },
- {
- "dt": "2021-03-19T14:29:00",
- "wp": "400"
- },
- {
- "dt": "2021-03-19T14:30:00",
- "wp": "400"
- },
- {
- "dt": "2021-03-19T14:31:00",
- "wp": "400"
- },
- {
- "dt": "2021-03-19T14:32:00",
- "wp": "400"
- },
- {
- "dt": "2021-03-19T14:33:00",
- "wp": "400"
- },
- {
- "dt": "2021-03-19T14:34:00",
- "wp": "400"
- },
- {
- "dt": "2021-03-19T14:35:00",
- "wp": "400"
- },
- {
- "dt": "2021-03-19T14:36:00",
- "wp": "400"
- },
- {
- "dt": "2021-03-19T14:37:00",
- "wp": "400"
- },
- {
- "dt": "2021-03-19T14:38:00",
- "wp": "400"
- },
- {
- "dt": "2021-03-19T14:39:00",
- "wp": "400"
- },
- {
- "dt": "2021-03-19T14:40:00",
- "wp": "400"
- },
- {
- "dt": "2021-03-19T14:41:00",
- "wp": "400"
- },
- {
- "dt": "2021-03-19T14:42:00",
- "wp": "400"
- },
- {
- "dt": "2021-03-19T14:43:00",
- "wp": "400"
- },
- {
- "dt": "2021-03-19T14:44:00",
- "wp": "400"
- },
- {
- "dt": "2021-03-19T14:45:00",
- "wp": "400"
- },
- {
- "dt": "2021-03-19T14:46:00",
- "wp": "400"
- },
- {
- "dt": "2021-03-19T14:47:00",
- "wp": "400"
- },
- {
- "dt": "2021-03-19T14:48:00",
- "wp": "400"
- },
- {
- "dt": "2021-03-19T14:49:00",
- "wp": "400"
- },
- {
- "dt": "2021-03-19T14:50:00",
- "wp": "400"
- },
- {
- "dt": "2021-03-19T14:51:00",
- "wp": "400"
- },
- {
- "dt": "2021-03-19T14:52:00",
- "wp": "400"
- },
- {
- "dt": "2021-03-19T14:53:00",
- "wp": "400"
- },
- {
- "dt": "2021-03-19T14:54:00",
- "wp": "400"
- },
- {
- "dt": "2021-03-19T14:55:00",
- "wp": "400"
- },
- {
- "dt": "2021-03-19T14:56:00",
- "wp": "400"
- },
- {
- "dt": "2021-03-19T14:57:00",
- "wp": "400"
- },
- {
- "dt": "2021-03-19T14:58:00",
- "wp": "400"
- },
- {
- "dt": "2021-03-19T14:59:00",
- "wp": "400"
- },
- {
- "dt": "2021-03-19T15:00:00",
- "wp": "400"
- },
- {
- "dt": "2021-03-19T15:01:00",
- "wp": "400"
- },
- {
- "dt": "2021-03-19T15:02:00",
- "wp": "400"
- },
- {
- "dt": "2021-03-19T15:03:00",
- "wp": "400"
- },
- {
- "dt": "2021-03-19T15:04:00",
- "wp": "400"
- },
- {
- "dt": "2021-03-19T15:05:00",
- "wp": "400"
- },
- {
- "dt": "2021-03-19T15:06:00",
- "wp": "400"
- },
- {
- "dt": "2021-03-19T15:07:00",
- "wp": "400"
- },
- {
- "dt": "2021-03-19T15:08:00",
- "wp": "400"
- },
- {
- "dt": "2021-03-19T15:09:00",
- "wp": "400"
- },
- {
- "dt": "2021-03-19T15:10:00",
- "wp": "400"
- },
- {
- "dt": "2021-03-19T15:11:00",
- "wp": "400"
- },
- {
- "dt": "2021-03-19T15:12:00",
- "wp": "400"
- },
- {
- "dt": "2021-03-19T15:13:00",
- "wp": "400"
- },
- {
- "dt": "2021-03-19T15:14:00",
- "wp": "400"
- },
- {
- "dt": "2021-03-19T15:15:00",
- "wp": "400"
- },
- {
- "dt": "2021-03-19T15:16:00",
- "wp": "400"
- },
- {
- "dt": "2021-03-19T15:17:00",
- "wp": "400"
- },
- {
- "dt": "2021-03-19T15:18:00",
- "wp": "400"
- },
- {
- "dt": "2021-03-19T15:19:00",
- "wp": "400"
- },
- {
- "dt": "2021-03-19T15:20:00",
- "wp": "400"
- },
- {
- "dt": "2021-03-19T15:21:00",
- "wp": "400"
- },
- {
- "dt": "2021-03-19T15:22:00",
- "wp": "400"
- },
- {
- "dt": "2021-03-19T15:23:00",
- "wp": "400"
- },
- {
- "dt": "2021-03-19T15:24:00",
- "wp": "400"
- },
- {
- "dt": "2021-03-19T15:25:00",
- "wp": "400"
- },
- {
- "dt": "2021-03-19T15:26:00",
- "wp": "400"
- },
- {
- "dt": "2021-03-19T15:28:00",
- "wp": "400"
- },
- {
- "dt": "2021-03-19T15:29:00",
- "wp": "400"
- },
- {
- "dt": "2021-03-19T15:30:00",
- "wp": "400"
- },
- {
- "dt": "2021-03-19T15:31:00",
- "wp": "400"
- }
- ]
- },
- "isError": false,
- "message": "success",
- "code": 200
- }
- ```
-
-
-
- ## 获取任意多个线路的累积负荷
-
-
-
- 请求
-
- ```
- POST http://47.103.61.198:5008/api/breaker/fuhe/byaddr
-
- Headers:
-
- Content-Type: application/json
- DD-Open-Key: bde2d876-993d-440d-aba1-3a06007a25a3
-
- Body:
-
- {
- "Macs":["187ED5311111_1", "187ED5322222_2"]//一个元素就代表一个开关,不能是187ED5311111_1,2
- }
- ```
-
-
-
- 响应
-
- ```
- {
- "data": {
- "macs": {
- "187ED5311111_1": 48.9,
- "187ED5322222_2": 123.8
- }
- },
- "isError": false,
- "message": "success",
- "code": 200
- }
- ```
-
-
-
-
-
- ## 统计任意多开关任意时间段内的总电量
-
-
-
- 请求
-
- ```
- POST http://47.103.61.198:5008/api/breaker/power/random
-
- Headers:
-
- Content-Type: application/json
- DD-Open-Key: bde2d876-993d-440d-aba1-3a06007a25a3
-
- Body:
-
- {
- "MacAddrs":["187ED5311111_1", "187ED5322222_2"],
- "StartYear":2021,
- "StartMonth":3,
- "StartDay":1,
- "StartHour":0,
- "EndYear":2021,
- "EndMonth":3,
- "EndDay":15,
- "EndHour":0
- }
- ```
-
-
-
- 响应:
-
- ```
- {
- "data": {
- "total": "242.64"
- },
- "isError": false,
- "message": "success",
- "code": 200
- }
- ```
-
-
-
- ## 获取任意多开关任意时间段内的按小时、按天、按月电量
-
-
-
- 请求, 按小时
-
- ```
- POST http://47.103.61.198:5008/api/breaker/power/random/by
-
- Headers:
-
- Content-Type: application/json
- DD-Open-Key: bde2d876-993d-440d-aba1-3a06007a25a3
-
- Body:
-
- {
- "MacAddrs":["187ED5311111_1", "187ED5322222_2"],
- "StartYear":2021,
- "StartMonth":3,
- "StartDay":1,
- "StartHour":0,
- "EndYear":2021,
- "EndMonth":3,
- "EndDay":5,
- "EndHour":0,
- "PType":"HOURS"
- }
-
- ```
-
- 响应, 按小时
-
- ```
- {
- "data": {
- "pType": "HOURS",
- "powers": {
- "2021-03-01 00:00:00.000": 0.72,
- "2021-03-01 01:00:00.000": 0.72,
- "2021-03-01 02:00:00.000": 0.72,
- "2021-03-01 03:00:00.000": 0.72,
- "2021-03-01 04:00:00.000": 0.72,
- "2021-03-01 05:00:00.000": 0.72,
- "2021-03-01 06:00:00.000": 0.72,
- "2021-03-01 07:00:00.000": 0.72,
- "2021-03-01 08:00:00.000": 0.72,
- "2021-03-01 09:00:00.000": 0.72,
- "2021-03-01 10:00:00.000": 0.72,
- "2021-03-01 11:00:00.000": 0.72,
- "2021-03-01 12:00:00.000": 0.72,
- "2021-03-01 13:00:00.000": 0.72,
- "2021-03-01 14:00:00.000": 0.72,
- "2021-03-01 15:00:00.000": 0.72,
- "2021-03-01 16:00:00.000": 0.72,
- "2021-03-01 17:00:00.000": 0.72,
- "2021-03-01 18:00:00.000": 0.72,
- "2021-03-01 19:00:00.000": 0.72,
- "2021-03-01 20:00:00.000": 0.72,
- "2021-03-01 21:00:00.000": 0.72,
- "2021-03-01 22:00:00.000": 0.72,
- "2021-03-01 23:00:00.000": 0.72,
- "2021-03-02 00:00:00.000": 0.72,
- "2021-03-02 01:00:00.000": 0.72,
- "2021-03-02 02:00:00.000": 0.72,
- "2021-03-02 03:00:00.000": 0.72,
- "2021-03-02 04:00:00.000": 0.72,
- "2021-03-02 05:00:00.000": 0.72,
- "2021-03-02 06:00:00.000": 0.72,
- "2021-03-02 07:00:00.000": 0.72,
- "2021-03-02 08:00:00.000": 0.72,
- "2021-03-02 09:00:00.000": 0.72,
- "2021-03-02 10:00:00.000": 0.72,
- "2021-03-02 11:00:00.000": 0.72,
- "2021-03-02 12:00:00.000": 0.72,
- "2021-03-02 13:00:00.000": 0.72,
- "2021-03-02 14:00:00.000": 0.72,
- "2021-03-02 15:00:00.000": 0.72,
- "2021-03-02 16:00:00.000": 0.72,
- "2021-03-02 17:00:00.000": 0.72,
- "2021-03-02 18:00:00.000": 0.72,
- "2021-03-02 19:00:00.000": 0.72,
- "2021-03-02 20:00:00.000": 0.72,
- "2021-03-02 21:00:00.000": 0.72,
- "2021-03-02 22:00:00.000": 0.72,
- "2021-03-02 23:00:00.000": 0.72,
- "2021-03-03 00:00:00.000": 0.72,
- "2021-03-03 01:00:00.000": 0.72,
- "2021-03-03 02:00:00.000": 0.72,
- "2021-03-03 03:00:00.000": 0.72,
- "2021-03-03 04:00:00.000": 0.72,
- "2021-03-03 05:00:00.000": 0.72,
- "2021-03-03 06:00:00.000": 0.72,
- "2021-03-03 07:00:00.000": 0.72,
- "2021-03-03 08:00:00.000": 0.72,
- "2021-03-03 09:00:00.000": 0.72,
- "2021-03-03 10:00:00.000": 0.72,
- "2021-03-03 11:00:00.000": 0.72,
- "2021-03-03 12:00:00.000": 0.72,
- "2021-03-03 13:00:00.000": 0.72,
- "2021-03-03 14:00:00.000": 0.72,
- "2021-03-03 15:00:00.000": 0.72,
- "2021-03-03 16:00:00.000": 0.72,
- "2021-03-03 17:00:00.000": 0.72,
- "2021-03-03 18:00:00.000": 0.72,
- "2021-03-03 19:00:00.000": 0.72,
- "2021-03-03 20:00:00.000": 0.72,
- "2021-03-03 21:00:00.000": 0.72,
- "2021-03-03 22:00:00.000": 0.72,
- "2021-03-03 23:00:00.000": 0.72,
- "2021-03-04 00:00:00.000": 0.72,
- "2021-03-04 01:00:00.000": 0.72,
- "2021-03-04 02:00:00.000": 0.72,
- "2021-03-04 03:00:00.000": 0.72,
- "2021-03-04 04:00:00.000": 0.72,
- "2021-03-04 05:00:00.000": 0.72,
- "2021-03-04 06:00:00.000": 0.72,
- "2021-03-04 07:00:00.000": 0.72,
- "2021-03-04 08:00:00.000": 0.72,
- "2021-03-04 09:00:00.000": 0.72,
- "2021-03-04 10:00:00.000": 0.72,
- "2021-03-04 11:00:00.000": 0.72,
- "2021-03-04 12:00:00.000": 0.72,
- "2021-03-04 13:00:00.000": 0.72,
- "2021-03-04 14:00:00.000": 0.72,
- "2021-03-04 15:00:00.000": 0.72,
- "2021-03-04 16:00:00.000": 0.72,
- "2021-03-04 17:00:00.000": 0.72,
- "2021-03-04 18:00:00.000": 0.72,
- "2021-03-04 19:00:00.000": 0.72,
- "2021-03-04 20:00:00.000": 0.72,
- "2021-03-04 21:00:00.000": 0.72,
- "2021-03-04 22:00:00.000": 0.72,
- "2021-03-04 23:00:00.000": 0.72,
- "2021-03-05 00:00:00.000": 0.72
- }
- },
- "isError": false,
- "message": "success",
- "code": 200
- }
- ```
-
-
-
- 请求, 按天
-
- ```
- POST http://47.103.61.198:5008/api/breaker/power/random/by
-
- Headers:
-
- Content-Type: application/json
- DD-Open-Key: bde2d876-993d-440d-aba1-3a06007a25a3
-
- Body:
-
- {
- "MacAddrs":["187ED5311111_1", "187ED5322222_2"],
- "StartYear":2021,
- "StartMonth":3,
- "StartDay":1,
- "StartHour":0,
- "EndYear":2021,
- "EndMonth":3,
- "EndDay":5,
- "EndHour":0,
- "PType":"DAY"
- }
-
- ```
-
- 响应, 按天
-
- ```
- {
- "data": {
- "pType": "DAY",
- "powers": {
- "2021-03-01 00:00:00.000": 42.5,
- "2021-03-02 00:00:00.000": 42.5,
- "2021-03-03 00:00:00.000": 42.5,
- "2021-03-04 00:00:00.000": 42.5,
- "2021-03-05 00:00:00.000": 42.5
- }
- },
- "isError": false,
- "message": "success",
- "code": 200
- }
- ```
-
- 请求,按月
-
- ```
- POST http://47.103.61.198:5008/api/breaker/power/random/by
-
- Headers:
-
- Content-Type: application/json
- DD-Open-Key: bde2d876-993d-440d-aba1-3a06007a25a3
-
- {
- "MacAddrs":["187ED5311111_1", "187ED5322222_2"],
- "StartYear":2021,
- "StartMonth":1,
- "StartDay":1,
- "StartHour":0,
- "EndYear":2021,
- "EndMonth":3,
- "EndDay":5,
- "EndHour":0,
- "PType":"MONTH"
- }
- ```
-
- 响应,按月
-
- ```
- {
- "data": {
- "pType": "MONTH",
- "powers": {
- "2021-01-01 00:00:00.000": 356,
- "2021-02-01 00:00:00.000": 347,
- "2021-03-01 00:00:00.000": 359
- }
- },
- "isError": false,
- "message": "success",
- "code": 200
- }
- ```
-
-
-
- ## 获取任意多开关任意时间段内的电量
-
-
-
- 请求
-
- ```
- POST http://47.103.61.198:5008/api/breaker/power/random/byaddr
-
- Headers:
-
- Content-Type: application/json
- DD-Open-Key: bde2d876-993d-440d-aba1-3a06007a25a3
-
- {
- "MacAddrs":["187ED5311111_1", "187ED5322222_2"],
- "StartYear":2021,
- "StartMonth":1,
- "StartDay":1,
- "StartHour":0,
- "EndYear":2021,
- "EndMonth":3,
- "EndDay":5,
- "EndHour":0
- }
- ```
-
-
-
- 响应
-
- ```
- {
- "data": {
- "powers": {
- "187ED5311111_1": 641.15,
- "187ED5322222_2": 398.77
- }
- },
- "isError": false,
- "message": "success",
- "code": 200
- }
- ```
-
-
-
- ## 获取任意多模块任意线路的报警
-
- 请求
-
- ```
- POST http://47.103.61.198:5008/api/breaker/warning/bymacs
-
- Headers:
-
- Content-Type: application/json
- DD-Open-Key: bde2d876-993d-440d-aba1-3a06007a25a3
-
- {
- "Macs":["187ED5311111_2","187ED53338C4_1"],
- "StartYear":2021,
- "StartMonth":3,
- "StartDay":1,
- "StartHour":0,
- "EndYear":2021,
- "EndMonth":3,
- "EndDay":2,
- "EndHour":0
- }
- ```
-
- 响应
-
- ```
- {
- "data": {
- "warnings": [
- {
- "addr": 2,
- "start": "2021-03-01 04:04:00.000",
- "end": "2021-03-01 05:04:00.000",
- "wtype": "0",
- "level": 3,
- "val": "265 v",
- "limit": "260 V",
- "mac": "187ed5311111",
- "ts": "2021-03-18 15:26:10.724"
- },
- {
- "addr": 2,
- "start": "2021-03-01 05:05:00.000",
- "end": "2021-03-01 06:05:00.000",
- "wtype": "0",
- "level": 3,
- "val": "100 V",
- "limit": "175 V",
- "mac": "187ed5311111",
- "ts": "2021-03-18 15:26:26.468"
- },
- ......
- ]
- },
- "isError": false,
- "message": "success",
- "code": 200
- }
- ```
-
-
-
- ## 获取某个线路的报警
-
- 请求
-
- ```
- POST http://47.103.61.198:5008/api/breaker/power/random/byaddr
-
- Headers:
-
- Content-Type: application/json
- DD-Open-Key: bde2d876-993d-440d-aba1-3a06007a25a3
-
- {
- "Mac":"187ED5311111",
- "Addr":2,
- "StartYear":2021,
- "StartMonth":3,
- "StartDay":1,
- "StartHour":0,
- "EndYear":2021,
- "EndMonth":3,
- "EndDay":2,
- "EndHour":0
- }
- ```
-
- 响应
-
- ```
- {
- "data": {
- "warnings": [
- {
- "addr": 2,
- "start": "2021-03-01 04:04:00.000",
- "end": "2021-03-01 05:04:00.000",
- "wtype": "0",
- "level": 3,
- "val": "265 v",
- "limit": "260 V",
- "mac": "187ed5311111",
- "ts": "2021-03-18 15:26:10.724"
- },
- {
- "addr": 2,
- "start": "2021-03-01 05:05:00.000",
- "end": "2021-03-01 06:05:00.000",
- "wtype": "0",
- "level": 3,
- "val": "100 V",
- "limit": "175 V",
- "mac": "187ed5311111",
- "ts": "2021-03-18 15:26:26.468"
- },
- ......
- ]
- },
- "isError": false,
- "message": "success",
- "code": 200
- }
- ```
-
|