[TOC=2]
>[info] 彩云8000
## 数据返回
~~~[api]
get:/53/0
*string:sn=748000000001#测试 sn
*string:method=get#请求方法
*int:offset=1#页码
*int:count=10#每页条数
<<<
success
{
"code": 0,
"data": {
"fault_sum": 3,
"devices": [
{
"is_heat": true,
"is_load_mode": false,
"k_close": false,
"run_state": 0,
"viewType": 3,
"mode": 4,
"uncertainOffline": 0,
"address": 1,
"load_stop_heat": false,
"name": "温控器01",
"current_temp": "19.3",
"target_temp": 27,
"power": 50000,
"is_lock": false,
"probe_temp": "0.0",
"request_heat": false
},
{
"power": 50000,
"run_state": 6,
"viewType": 1,
"address": 4,
"name": "温控器04",
"uncertainOffline": 3
}
],
"sum": 4,
"sn": "748000000001",
"code": 0
}
}
<<<
success
{
"code": 0,
"data": {
"fault_sum": 4, // 故障数
"devices": [
{
"power": 50000,
"run_state": 6,
"viewType": 1,
"address": 1,
"name": "温控器01",
"uncertainOffline": 3
}
],
"sum": 4, // 总数
"sn": "748000000001", // sn
"code": 0
}
}
<<<
offline
{
"code": 0,
"data": {
"offline": true, //是否离线
"code": 0
}
}
<<<
error
{
"code": -1,
"msg": "参数错误"
}
~~~
## 获取历史记录
~~~[api]
get:/53/0
*string:sn=748000000001#测试 sn
*string:method=get_temp_history#请求方法
*int:year=2018#年份
*int:month=1#月份
*int:day=10#天数
*int:address=1#设备地址
<<<
success
{
"code":0,
"data": {
"target_temp":[38, 38, 38],
"temp":[30.20, 30.20, 30.20],
"sn":"748000000001",
"time":[0, 1, 2],
"address":1,
"code":0
}
}
<<<
info
address // 设备地址
temp // 设置温度
target_temp // 执行温度
time // 记录时间
<<<
error
{
"code": -1,
"msg": "参数错误"
}
~~~
>[danger] 参数里面的月份,应该用实际的月数减一
## 设备锁定
~~~[api]
get:/53/0
*string:sn=748000000001#设备序列号
*string:method=set_lock_info#方法
*boolean:power_off_and_lock=false#是否锁定关机 true 锁定关机 false 解锁
*timestamp:due_date=125011222554#锁定时间的时间戳 大于当前时间
*string:dev_pwd=123456#锁定密码
<<<
success
{
"code": 0
}
<<<
error
{
"code": -1,
"msg": "参数错误"
}
~~~
>[info] 上锁设置为 true 锁定时间设置
> 解锁选择否,选择任意时间
## 设备配置
~~~[api]
post:/53/0
*string:sn=7480000000001#设备序列号
*string:method=set#配置方法
*array:address=[1,2]#设备地址
*json:data={}#对应配置参数
<<<
succsee
<<<
error
~~~
## 获取电量
### 可选参数 key 说明
| 参数 | 可选值 |
| --- | --- |
| E | 电量 |
| P | 功率 |
| T | 加热时间 |
设备地址 0 表示所有的设备
年、月筛选查询
查询年 month 传参 -1 或者不传 day 传参 -1 或者不传
查询月 day 传参 -1 或者不传
~~~[api]
get:/url
*string:sn=7480000000001#设备序列号
*string:method=get_device_stats#配置方法
*integet:address=2#设备地址
*integer:year=2020#年
*integer:month=12#月
*integer:day=31#日
*string:key=E# 电量
<<<
success
{
"code":0,
"data":{
"value":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
"address":1,
"sn":"748000003170",
"x":["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23"],
"code":0
}
}
<<<
error
~~~
## 获取周程、日程数据
~~~[api]
get:/url
*string:sn=7480000000001#设备序列号
*string:method=get_smart_config#配置方法
*integet:address=2#设备地址
*integer:day=0# 0 日程 1-7 周程
<<<
success
<<<
error
~~~