鼎鼎知识库
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

鼎鼎开放平台

鼎鼎开放平台旨在集成物联网设备,赋能合作第三方或内部开发人员,使之可以进行围绕设备、与业务无关的开发。第一版的开放平台开始于2021年1月,对接了深圳曼顿公司物联网空开的HTTPUDP协议。

版本历史

版本 修订内容 修订人 发布日期
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
1.0.5 获取任意多模块任意线路任意时间段内的电压或负荷;获取任意多模块任意线路最近24小时内的电压或负荷 季建新 2021.4.1

空气开关

获取实时数据

请求

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
}

获取任意多模块任意线路任意时间段内的电压或负荷

请求

POST http://47.103.61.198:5008/api/breaker/real/random

Headers:

Content-Type: application/json
DD-Open-Key: bde2d876-993d-440d-aba1-3a06007a25a3

{
	"StartYear":2021,
	"StartMonth":3,
	"StartDay":1,
	"StartHour":2,
	"EndYear":2021,
	"EndMonth":3,
	"EndDay":5,
	"EndHour":2,
	"MacAddrs":["187ED5311111_1", "187ED5322222_2"],
	"Type":1 //Type为0表示请求负荷,为1表示请求电压
}

响应

{
    "data": {
        "total": "221.495"
    },
    "isError": false,
    "message": "success",
    "code": 200
}

获取任意多模块任意线路最近24小时内的电压或负荷

请求

POST http://47.103.61.198:5008/api/breaker/real/latest

Headers:

Content-Type: application/json
DD-Open-Key: bde2d876-993d-440d-aba1-3a06007a25a3

{
	"MacAddrs":["187ED5311111_1", "187ED5322222_2"],
	"Type":0 //Type为0表示请求负荷,为1表示请求电压
}

响应

{
    "data": {
        "total": "1.162"
    },
    "isError": false,
    "message": "success",
    "code": 200
}