ccfe0d311b00e0617c341301a4c1b74ca7200dc1
边缘盒子
topic 中的 location 指景区编码, point 指景区内具体点位
1. 接收启动
Topic: server/${location}/${point}/play
Payload:
{
"timeout": 30, // 设备超时时长(s)
"power": true, // 是否需要整体电源控制
"bgm": "", // 游戏中背景音乐(file://本地文件地址、http://远程文件地址)
"volume": 0.5, // 整体设备音量(0-1)
"default-print": "", // 屏幕默认打印(设备待机时展示文本)
"tts": { // 文本转语音整体控制
"start": "", // 开始语音
"end": "", // 结束语音
"stop": "", // 终止语音
"timer": [ // 固定节点语音
{
"time": 10, // 时间节点(s)
"value": "" // 语音文字
}
]
},
"print": [ // 屏幕打印控制
{
"time": 10, // 时间节点(s)
"text": "", // 展示文字
"duration": 10 // 持续时长(s)
}
],
"game": {} // 根据具体游戏特定
}
例: 入口欢迎播报
{
"volume": 1,
"tts": {
"start": "欢迎前来挑战!"
}
}
2. 事件反馈
状态变更
Topic: device/${location}/${point}/status
Payload:
0 # 0 待机; 1 使用中; -1 状态异常
3. 接收指令
终止
Topic: server/${location}/${point}/command
Payload:
stop
查询状态
Topic: server/${location}/${point}/command
Payload:
status
设备接收到该指令会立即向 device/${location}/${point}/status 发送一次当前状态
Description