首页 > 最新动态 > 晶控课堂 >

Uair智能空气魔盒云平台二次开发接口调用

2018-02-06 19:36
分享到:

UAir智能空气魔盒历史数据(公共)-- Designed By KinCony

 
● 接口描述:获取UAir空气魔盒历史数据的公共接口
● 接口类别:设备相关
● 接口版本:1.0
● 接口地址:/device/v1.0/fetchLastDays.action
● 接口参数:
○ deviceCode - 设备编号
○ intervalUnit - 间隔单位为周/天/小时,参数值(Week | Day | Hour)
○ intervalNum - 获取的历史数据时间长度
 
示例:
HTTP 请求:
#voice.hificat.com:8080/smarthome.IMCPlatform/device/v1.0/fetchLastDays.action?deviceCode=17304c4bda3d8e8b63f1403d&intervalUnit=Week&intervalNum=1
 
接口返回:
{
    "data": {
        "deviceCode": "17304c4bda3d8e8b63f1403d",
        "latest": {
            "PM25": 0,
            "humidity": 30,
            "reportDateTime": "2018-01-02T00:00:00",
            "temperature": 16.5
        },
        "records": [
            {
                "PM25": 0,
                "humidity": 35,
                "reportDateTime": "2017-12-30T00:00:00",
                "temperature": 18.078033
            },
            {
                "PM25": 0,
                "humidity": 31,
                "reportDateTime": "2017-12-31T00:00:00",
                "temperature": 18.314703
            },
            {
                "PM25": 0,
                "humidity": 28,
                "reportDateTime": "2018-01-01T00:00:00",
                "temperature": 18.58797
            },
            {
                "PM25": 0,
                "humidity": 28,
                "reportDateTime": "2018-01-02T00:00:00",
                "temperature": 18.459135
            }
        ]
    },
    "message": "",
    "page": 0,
    "success": true,
    "total": 0,
    "totalPages": 0
}
 
以下是PC端浏览器端同时采集并读取4台Uair空气魔盒产品,实时显示当前温度值、湿度值以及历史曲线的例子。如有问题,可以与我们取得联系,我们将技术研发级技术支持。
温湿度采集系统