以设备ID(864865062126413)为示例
topic(设备端 -> 平台端) : /yfkj/XCT/pub/864865062126413
topic(平台端 -> 设备端) : /yfkj/XCT/sub/864865062126413
数据上报示例(设备端 -> 平台端)无需回复
{
"cmd": "rtu_data",
"ext": {
"proj": "A7_RTU_V3",
"dver": "2.9.sqlite",
"cpu_tmp": "47570",
"imei": "864865062126413",
"iccid": " 50\r\n",
"csq": "8",
"dat_f": "",
"cam_type": "0",
"stamp": "20241025155043",
"lat": "0",
"lng": "0"
}
}
字段解析
"proj": "A7_RTU_V3", // RTU硬件版本号
"dver": "2.9.sqlite", // RTU软件版本号
"cpu_tmp": "47570", // 主控温度(放大1000倍)
"imei": "864865062126413", // 设备ID号
"iccid": " 50\r\n", // 物联网卡号(若有)
"csq": "8", // 4G信号强度
"dat_f": "", //数据上报间隔
"cam_type": "0", // 相机类型
"stamp": "20241025155043", // 时间戳
"lat": "0", // 经度
"lng": "0" // 纬度
数据上报示例(设备端 -> 平台端)无需回复
{
"cmd": "data",
"ext": {
"dver": "2.6.B_18-2.9.sqlite",
"proj": "A7_RTU_V3",
"dtype": "3",
"tt": "2",
"collstart": "5",
"collend": "10",
"ts": "0",
"tps": "0",
"tph": "50",
"tpl": "10",
"lps": "0",
"rps": "0",
"batStatus": "1",
"lamp": "0",
"lamp_down": "0",
"gps": "0",
"ds": "1",
"ah": "31",
"at": "-15",
"imei": "864865062126413",
"iccid": " 50\r\n",
"stamp": "20241025161230",
"lng": "0",
"lat": "0",
"rcnt": 59,
"current": "290.95",
"vbat": "11.84",
"dat_f": "20",
"csq": "8"
}
}
字段解析
"dver": "2.6.B_18-2.9.sqlite", // 设备版本号(以"-"为分隔符 -前为控制板版本号 -后为rtu版本号)
"proj": "A7_RTU_V3", // RTU硬件版本号
"dtype": "3", // 设备类型
"tt": "2", // 光控定时工作时长
"collstart": "5", // 时控定时起始时间
"collend": "10", // 时控定时结束时间
"ts": "0", // 定时模式(0-时控 1-光控)
"tps": "0", // 温控保护使能(0-失能 1-使能)
"tph": "50", // 温控保护上限(℃)
"tpl": "10", // 温控保护下限(℃)
"rps": "0", // 雨控开关(0-失能 1-使能)
"lps": "0", // 光控状态(0-正常 1-光控) light protect status
"nrps": "0", // 降雨(0-否 1-是) now rain protect status
"ntps": "0", // 温控状态(0-正常 1-温控上限 2-温控下限)now temp protect status
"batStatus": "1", // 当前电池状态(0-欠压 1-正常)
"lamp": "0", // 当前灯管状态(0-待机 1-开启)
"gps": "0", // gps定位状态(0-未定位 1-已定位)
"ds": "1", // 设备开关状态(0-已关闭 1-已开启)
"ah": "31", // 当前环境湿度(%)
"at": "-15", // 当前环境温度(℃)
"imei": "864865062126413", // 设备ID
"iccid": " 50\r\n", // 物联网卡卡号
"stamp": "20241025161230", // 时间戳
"lng": "0", // 经度
"lat": "0", // 纬度
"rcnt": 59, // 是否为上电开机(保留参数)
"current": "290.95", // 当前工作电流(mA)
"vbat": "11.84", // 当前电池电压
"dat_f": "20", // 设备数据上报间隔
"csq": "8" // 4G信号强度
"led_sta": "0", // 当前补光灯状态(0-待机 1-开启)
"fan_sta": "0", // 当前采集风机状态(0-待机 1-开启)
"lamp_down": "0", // 当前下灯管状态(0-待机 1-开启)
指令示例 {
"cmd": "paramconf",
"ext": {
"paraname": "para"
}
}
以下参数可同时下发可单独下发,单独修改某一参数时建议仅对当前修改参数做下发
{
"cmd": "paramconf",
"ext": {
"collstart": 5,
"collend": 5
}
}
collstart : 时控工作开始时间(整型 / 时) collend : 时控工作结束时间(整型 / 时)
{
"cmd": "paramconf",
"ext": {
"tt": 5
}
}
tt : 光控工作时长(整型 / 时)
{
"cmd": "paramconf",
"ext": {
"ts": 0
}
}
ts : 工作模式(整型 / 0-时控 1-光控)
{
"cmd": "paramconf",
"ext": {
"tpl": 9,
"tph": 36
}
}
tpl : 温控保护下限位(整型 / ℃) tph : 温控保护上限位(整型 / ℃)
{
"cmd": "paramconf",
"ext": {
"inr_data": 9,
"inr_photo": 36
}
}
inr_data : 数据上报间隔(整型 / min) inr_photo : 工作时拍照间隔(整型 / min)
{
"cmd": "paramconf",
"ext": {
"limit_temp": 0,
"limly_rain": 1
}
}
limit_temp : 设置温控开关(bool / 0-关闭 1-开启) limly_rain : 设置雨控开关(bool / 0-关闭 1-开启)
当需要一次性下发所有参数 参考以下格式
{
"cmd": "paramconf",
"ext": {
"tpl": 9,
"tph": 36,
"inr_data": 9,
"inr_photo": 36,
"limit_temp": 0,
"limly_rain": 1,
"tt": 5,
"ts": 0,
"collstart": 5,
"collend": 5
}
}
下发指令
{"cmd": "ctrl", "ext": {"RC": "Force_Reset"}}
设备回复
{"cmd": "data", "ext": "Force_Reset"}
安卓屏 > 控制板:
systest switchled touch
控制板 > 安卓屏 :
{
"cmd": "test",
"ext": {
"type": "switchled",
"status": "Turn OFF",
"info": "手动测试:补光已关闭"
}
}
安卓屏 > 控制板:
{
"cmd": "ReadEcodeInfo"
}
控制板 > 安卓屏 :
{
"cmd": "ecode",
"ext": {
"count": 58,
"pages": 10
}
}
安卓屏 > 控制板:
{
"cmd": "paramconf",
"ext": {
"ecode_pagenum": 5
}
}
控制板 > 安卓屏 :
{
"cmd": "ecode",
"ext": {
"count": 58,
"31 - 18/01/01 00:00:18 (19-0)": "一键测试开始",
"32 - 18/01/01 00:00:48 (3-0)": "风机预警",
"33 - 18/01/01 00:00:30 (28-1)": "30秒种前设备重启",
"34 - 18/01/01 00:02:21 (19-0)": "一键测试开始",
"35 - 18/01/01 00:02:24 (19-1)": "一键测试手动结束",
"36 - 18/01/01 00:00:17 (19-0)": "一键测试开始"
}
}