智读表API文档

添加设备(已录入设备信息)

基本信息

API前缀:详见简介

Path: /manage/device/newCreateDevice

Method: POST

接口描述:

设备注册(添加设备)

Postman调用示例: 图中description必传参数

https://www.smartmetering.top/staticfile/files/pic/908FF16C-728B-478c-84AB-3B4C760E19E2.png

请求参数

Headers

参数名称 参数值 是否必须 示例 备注
Content-Type application/x-www-form-urlencoded

Body

参数名称 参数类型 是否必须 示例 备注
deviceName text zb14hjk23 设备名(UUID序列号)
productKey text jLLDihAeWre 产品KEY(二级目录)
deviceSecret text 设备密钥,为空是使用随机生成密钥
description text 测试 描述
deviceTypeCode text 37121 设备类型CODE,为空时使用上层产品的设备类型CODE
height text 高度
latitude text 纬度
longitude text 经度
networkType text 2 网络类型
newBattery text 1 旧电池0,新电池1,电源供电2,为空时默认1
powerSupply text 0 供电方式,false电池供电,true电源供电,为空时默认false
batteryCapacity text 8500 电池容量默认3800,电源供电0,为空时默认3800
meterNumber text 表计编号
houseNumber text 户号
access_token text fcb6211e-59c2-4511-a18b-7e12d550b5c5 访问令牌,获取步骤详见 获取或者刷新token
address text 测试地址
extraParams text 额外参数,json格式
dataFrom text 1 数据源,0云端,1本地
unit text 单位
magnification text 倍率

返回数据

{
    "code":200,
    "msg":"OK",
    "data":{
        "id":41583,                                              //设备id
        "deviceName":"kk1111193",                                //设备名(UUID序列号)
        "deviceTypeCode":300,                                    //设备类型CODE
        "productId":2732,                                        //产品id
        "deviceSecret":"jyBuCsaZwPomLU4L5Zjz3vsidkVjPvuy",       //密钥
        "productKey":"Z6dkVW06Bny",                              //产品key
        "gmtCreate":"2022-08-09 15:17:36",                       //创建时间
        "deviceStatus":4,                                        //设备状态:1运行中,2在线,3离线,4未激活
        "longitude":120.16858,                                   //经度
        "latitude":30.421602,                                    //维度
        "height":0,                                              //高度
        "networkType":2,                                         //网络类型
        "description":"xx",                                      //描述
        "sysVersion":null,                                       //固件版本号
        "electricity":null,                                      //智能读表器电量
        "requestId":null,                                        //请求id
        "periodId":null,                                         //周期id
        "lastTime":null,                                         
        "lastLogin":null,                                        //上次登录时间
        "signal":null,                                           //信号值
        "powerSupply":false,                                     //供电方式,0电池供电,1电源供电
        "newBattery":1,                                          //旧电池0,新电池1,电源供电2
        "batteryCapacity":8500,                                  //电池容量
        "meterNumber":"xx",                                      //表计编号
        "houseNumber":"测试3",                                   //户号                               
        "houseName":null,                                        //户名
        "caliber":null,                                          //口径
        "meterLocationNumber":null,                              //表计位号
        "address":"浙江省杭州市临平区崇贤街道木桥庄路5-2号",           //安装地址
        "maxCorrectValue":-1,
        "minCorrectValue":-1,
        "value":null,
        "cValue":null,
        "lightValue":null,
        "localIncrement":null,
        "cloudIncrement":null,
        "autoCorrecte":false,
        "repairStatus":"0",
        "dataServerIp":"0.0.0.0",
        "dataServerPort":0,
        "recentPicPath":null,
        "energyId":null,
        "functionCode":null,
        "buildingId":null,
        "dataFrom":0,                                           //数据源:0云端识别,1本地识别
        "unit":"m³",                                            //单位
        "magnification":"1",                                    //倍率
        "useCode":1,                                            //能源类型
        "fontCode":null,
        "paramList":null,
        "dataBeanList":null,
        "deviceMotor":null
    }
}