-本api适用于序列号开头为W732的设备,appid和appsecret请到wdev.wmj.com.cn 填写手机号登录获取。

1.注册设备

  • 将设备和appid、appsecret绑定

请求URL

  • https://wdev.wmj.com.cn/deviceApi/register

请求方式

  • POST

请求格式

  • json

参数

{
	"app_id": "",
	"app_secret": "",
	"device_sn": ""
}
参数名必选类型说明
app_idstring用户app_id
app_secretstring用户app_secret
device_snstring设备序列号

返回示例

{
	"code": 0,
	"msg": "注册成功"
}
{
	"code": 1005,
	"msg": "设备已注册"
}

返回参数说明

参数名类型说明
codeint错误码 0成功其他异常
msgint描述

备注

  • 更多返回错误代码请看首页的错误代码描述


2.设备控制卷匝门开、关、停

请求URL
  • https://wdev.wmj.com.cn/deviceApi/send

请求方式
  • POST

请求格式
  • json

参数

 

{
	"app_id":"",
	"app_secret":"",
	"device_sn": "W7329766718",
	"data": {
		"cmd_type": "open",
		"info": {
			"tts":"开门",
			"volume":6
		}
	}
}
参数名必选类型说明
app_idstring用户app_id
app_secretstring用户app_secret
device_snstring设备序列号
data.cmd_typestringopen: 开门
close: 关门
pause: 暂停
data.info.ttsstring开门提示语音,不传的情况下使用默认语音
data.info.volumeint开门提示语音音量1-7
返回示例
//成功
{
	"code": 0,
	"data": {
		"cmd_type": "open",
		"info": {
			"code": 0,
			"msg": ""
		}
	}
}
//失败
{
	"code": 1001,
	"msg": "网络超时"
}
返回参数说明
参数名类型说明
codeint调用接口错误码 0成功其他异常
data.info.codeint业务错误码,0成功其他异常
data.info.msgstring业务错误信息

 

3.播放语音

接口状态

已完成

接口URL

wdev.wmj.com.cn/devi...

请求方式

POST
Body-Json

Content-Type

json

请求Body参数

{
	"app_id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx5",
	"app_secret": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx5",
	"device_sn": "W7329766718",
	"data":{
	    "cmd_type":"play",
    	"info": {
            "tts":"请注意关门",
			"volume": 5 // 0-7
        }
    }
}
参数名示例值参数类型是否必填参数描述
app_idxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx5String硬件云appid
app_secretxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx5String硬件云appsecret
device_snW7329766718String序列号
data-Object数据标签
data.cmd_typeplayString命令字
data.info-Object数据信息
data.info.tts您的订单还有15分钟结束,请及时续费,以免断电影响使用,谢谢String要播放的文本
data.info.volume5Int播报音量

 

成功响应示例

{
	"code": 0,
	"data": {
		"device_sn": "W7329766718",
		"cmd_type": "play",
		"info": {
			"code": 0,
			"msg": ""
		}
	}
}
参数名示例值参数类型参数描述
code0Integer响应成功
data-Object数据标签
data.device_snW7329766718String序列号
data.cmd_typeplayString命令类型
data.info-Object数据信息
data.info.code0Integer响应代码
data.info.msg-String响应消息

4.语音设置

暂无描述

接口状态

已完成

接口URL

wdev.wmj.com.cn/devi...

请求方式

POST

Content-Type

json

请求Body参数

{
	"app_id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx5",
	"app_secret": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx5",
	"device_sn": "W7329766718",
	"data":{
	    "cmd_type":"setting",
    	"info": {
            "detected_tts":"检测到有人,门即将打开",
		    "no_detected_tts":"检测到无人,门即将关闭",
		    "launch_tts":"连接成功",
		    "volume":7,   //播报音量调节 1-7
			"launch_tts":" " // 网络连接成功后播报
        }
    }
}
参数名示例值参数类型是否必填参数描述
app_idxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx5String硬件云appid
app_secretxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx5String硬件云appsecret
device_snW7329766718String序列号
data-Object数据标签
data.cmd_typesettingString命令字
data.info-Object数据信息
data.info.volume4Integer0-7,音量由小到大,默认为中间值
data.info.detected_tts""String人体感应雷达检测到有人时播报
data.info.no_detected_tts""String人体感应雷达检测到无人时播报
data.info.launch_tts" " / "需要播放的文字"String网络连接成功后播报,为" "时为静默启动

成功响应示例

{
	"code": 0,
	"data": {
		"device_sn": "W7329766718",
		"cmd_type": "setting",
		"info": {
			"code": 0,
			"msg": ""
		}
	}
}
参数名示例值参数类型参数描述
code0Integer响应成功
data-Object数据标签
data.device_snW7329766718String序列号
data.cmd_typesettingString命令字
data.info-Object数据信息
data.info.code0Integer响应成功
data.info.msg-String响应消息

5.重启

暂无描述

接口状态

已完成

接口URL

wdev.wmj.com.cn/devi...

请求方式

POST

Content-Type

json

请求Body参数

{
	"app_id":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx5",
	"app_secret":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx5",
	"device_sn": "W7329766718",
	"data": {
		"cmd_type":"restart",
		"info":{}
	}
}
参数名示例值参数类型是否必填参数描述
app_idxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx5String硬件云appid
app_secretxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx5String硬件云appsecret
device_snW7329766718String设备序列号
data-Object数据标签
data.cmd_typerestartString命令字
data.info-Object数据信息

成功响应示例

{
	"code": 0,
	"data": {
		"device_sn": "W7329766718",
		"cmd_type": "restart",
		"info": {
			"code": 0,
			"msg": ""
		}
	}
}
参数名示例值参数类型参数描述
code0Integer响应状态0为正常
data-Object数据标签
data.device_snW7329766718String设备序列号
data.cmd_typerestartString命令字
data.info-Object返回数据信息
data.info.code0Integer响应成功
data.info.msg-String响应消息

错误响应示例

{
	"code": 1000,
	"msg": "没有操作此设备的权限"
}
参数名示例值参数类型参数描述
code1000Integer响应状态0为正常
msg没有操作此设备的权限String消息描述

6.查询设备信息

暂无描述

接口状态

已完成

接口URL

wdev.wmj.com.cn/devi...

请求方式

POST

Content-Type

json

请求Body参数

{
	"app_id":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx5",
	"app_secret":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx5",
	"device_sn": "W7329766718",
	"data": {
		"cmd_type":"getdevinfo",
		"info":{
		}
	}
}
参数名示例值参数类型是否必填参数描述
app_idxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx5String硬件云appid
app_secretxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx5String硬件云appsecret
device_snW7329766718String设备序列号
data-Object数据标签
data.cmd_typegetdevinfoString命令字

成功响应示例

{
	"code": 0,
	"data": {
		"device_sn": "W7329766718",
		"cmd_type": "getdevinfo",
		"info": {
			"code": 0,
			"iccid": "53521B3B1655B175",
			"imei": "6055F9766718",
			"msg": "",
			"project": "W767",
			"rssi": -40,
			"version": "1.0.0",
			"volume": 9
		}
	}
}
参数名示例值参数类型参数描述
code0Integer响应状态0为正常
data-Object数据标签
data.device_snW7329766718String设备序列号
data.cmd_typegetdevinfoString命令字
data.info-Object返回数据信息
data.info.code0Integer响应成功
data.info.iccid53521B3B1655B175String物理地址
data.info.imei6055F9766718String芯片号
data.info.msg-String响应消息
data.info.projectW767XXXString项目名称
data.info.rssi-40Integer信号值
data.info.version1.0.0String版本
data.info.volume9Integer0-9,音量由小到大,默认为中间值

错误响应示例

{
	"code": 1000,
	"msg": "没有操作此设备的权限"
}
参数名示例值参数类型参数描述
code1000Integer响应状态0为正常
msg没有操作此设备的权限String消息描述
作者:极客师傅  创建时间:2025-03-10 14:41
最后编辑:极客师傅  更新时间:2025-04-27 12:41