获取语音文件列表
getVoiceFileList
引入
使用该功能需要
@ray-js/ray
版本 1.6.6 及以上。
import { getVoiceFileList } from '@ray-js/ray';
参数
GetVoiceFileListParams
属性 | 类型 | 必填 | 说明 |
---|---|---|---|
devId | string | 是 | 设备ID |
返回
GetVoiceFileListResponse
Array<FileItem>
,包含语音文件列表项。
FileItem
属性 | 类型 | 说明 |
---|---|---|
fileType | number | 语言类型(0=简体中文、1=英文、2=日文、3=德文、4=西班牙语、5=拉丁语、6=法语、7=俄语、8=意大利语、9=繁体中文、10=韩语) |
describe | string | 描述 |
fileKey | string | 文件 key |
version | string | 版本 |
fileStatus | number | 文件状态(0:无 1:使用中) |
函数定义示例
/**
* 获取语音文件列表
*/
export function getVoiceFileList(params: GetVoiceFileListParams): Promise<GetVoiceFileListResponse>;
获取语音文件下载地址
getDownloadUrl
引入
使用该功能需要
@ray-js/ray
版本 1.6.6 及以上。
import { getDownloadUrl } from '@ray-js/ray';
参数
GetDownloadUrlParams
属性 | 类型 | 必填 | 说明 |
---|---|---|---|
devId | string | 是 | 设备ID |
fileKey | string | 是 | 文件key |
返回
GetDownloadUrlResponse
string
,表示语音文件的下载地址。
函数定义示例
/**
* 获取语音文件下载地址
*/
export function getDownloadUrl(params: GetDownloadUrlParams): Promise<GetDownloadUrlResponse>;
获取当前用户在设备下的地理围栏场景信息
getBleGeofenceList
引入
使用该功能需要
@ray-js/ray
版本 1.6.6 及以上。
import { getBleGeofenceList } from '@ray-js/ray';
参数
GetBleGeofenceListParams
属性 | 类型 | 必填 | 说明 |
---|---|---|---|
devId | string | 是 | 设备ID |
返回
GetBleGeofenceListResponse
表示当前用户在设备下的地理围栏场景信息。
属性 | 类型 | 说明 |
---|---|---|
code | string | 编号 |
title | string | 标题 |
description | string | 描述 |
displayColor | string | 风格-颜色 |
icon | string | 图标URL |
background | string | 背景图URL |
enable | boolean | 是否启用 |
ruleVO | RuleVO | 规则详细信息 |
RuleVO
属性 | 类型 | 说明 |
---|---|---|
id | number | 地理围栏Id |
name | string | rule的名称 |
devId | string | 设备ID |
ownerId | number | 家庭Id |
uid | string | 用户的uid |
status | boolean | 当前数据是否有效 |
module | string | 模块. APP用它来区分是公版还是OEM |
geoTitle | string | 地理围栏的title |
centerLng | string | 中心经度 |
centerLat | string | 中心纬度 |
radius | string | 半径 |
activeTime | number | 触发地理围栏之后,多久之内下发开门指令算有效.一般是秒当单位 |
rssi? | string | RSSI信号值(可选) |
displayColor? | string | 风格-颜色(可选) |
icon? | string | 场景规则中的 图标(可选) |
background? | string | 场景规则中的 背景图(可选) |
title? | string | 场景规则中的 标题(可选) |
函数定义示例
/**
* 获取当前用户在设备下的地理围栏场景信息
*/
export function getBleGeofenceList(params: GetBleGeofenceListParams): Promise<GetBleGeofenceListResponse>;
注册地理围栏
registerBleCloudGeofence
引入
使用该功能需要
@ray-js/ray
版本 1.6.6 及以上。
import { registerBleCloudGeofence } from '@ray-js/ray';
参数
RegisterBleCloudGeofenceParams
属性 | 类型 | 必填 | 说明 |
---|---|---|---|
devId | string | 是 | 设备ID |
ownerId | number | 是 | 家庭ID |
geoFenceInfo | GeoFenceInfo | 是 | 地理围栏信息 |
GeoFenceInfo
属性 | 类型 | 必填 | 说明 |
---|---|---|---|
module | string | 是 | 模块. APP用它来区分是公版还是OEM |
geoTitle? | string | 否 | 地理围栏的title |
centerLng | string | 是 | 中心经度 |
centerLat | string | 是 | 中心纬度 |
radius | string | 是 | 半径 |
activeTime | number | 是 | 触发地理围栏之后,多久之内下发开门指令算有效.一般是秒当单位 |
rssi? | string | 否 | RSSI信号值 |
displayColor? | string | 否 | 风格-颜色 |
icon? | string | 否 | 场景规则中的 图标 |
background? | string | 否 | 场景规则中的 背景图 |
title? | string | 否 | 场景规则中的 标题 |
返回
RegisterBleCloudGeofenceResponse
表示注册地理围栏的响应信息。
属性 | 类型 | 说明 |
---|---|---|
id | number | 地理围栏ID |
devId | string | 设备ID |
ownerId | number | 家庭ID |
uid | string | 用户ID |
status | boolean | 当前数据是否有效 |
module | string | 模块. APP用它来区分是公版还是OEM |
geoTitle? | string | 地理围栏的title |
centerLng | string | 中心经度 |
centerLat | string | 中心纬度 |
radius | string | 半径 |
activeTime | number | 触发地理围栏之后,多久之内下发开门指令算有效.一般是秒当单位 |
rssi? | string | RSSI信号值 |
displayColor? | string | 风格-颜色 |
icon? | string | 场景规则中的 图标 |
background? | string | 场景规则中的 背景图 |
title? | string | 场景规则中的 标题 |
函数定义示例
/**
* 注册地理围栏
*/
export function registerBleCloudGeofence(params: RegisterBleCloudGeofenceParams): Promise<RegisterBleCloudGeofenceResponse>;
修改地理围栏
editBleCloudGeofence
引入
使用该功能需要
@ray-js/ray
版本 1.6.6 及以上。
import { editBleCloudGeofence } from '@ray-js/ray';
参数
EditBleCloudGeofenceParams
属性 | 类型 | 必填 | 说明 |
---|---|---|---|
id | number | 是 | 地理围栏ID |
geoFenceInfo | GeoFenceInfo | 是 | 地理围栏信息 |
GeoFenceInfo
属性 | 类型 | 必填 | 说明 |
---|---|---|---|
module | string | 是 | 模块. APP用它来区分是公版还是OEM |
geoTitle? | string | 否 | 地理围栏的title |
centerLng | string | 是 | 中心经度 |
centerLat | string | 是 | 中心纬度 |
radius | string | 是 | 半径 |
activeTime | number | 是 | 触发地理围栏之后,多久之内下发开门指令算有效.一般是秒当单位 |
rssi? | string | 否 | RSSI信号值 |
displayColor? | string | 否 | 风格-颜色 |
icon? | string | 否 | 场景规则中的 图标 |
background? | string | 否 | 场景规则中的 背景图 |
title? | string | 否 | 场景规则中的 标题 |
返回
EditBleCloudGeofenceResponse
boolean
,表示操作是否成功。
函数定义示例
/**
* 修改地理围栏
*/
export function editBleCloudGeofence(params: EditBleCloudGeofenceParams): Promise<EditBleCloudGeofenceResponse>;
开启/关闭 地理围栏
handleBleCloudGeofence
引入
使用该功能需要
@ray-js/ray
版本 1.6.6 及以上。
import { handleBleCloudGeofence } from '@ray-js/ray';
参数
HandleBleCloudGeofenceParams
属性 | 类型 | 必填 | 说明 |
---|---|---|---|
id | number | 是 | 地理围栏ID |
targetStatus | boolean | 是 | 目标状态 |
id
: 需要开启或关闭的地理围栏的唯一标识符。targetStatus
: 目标状态,true
表示开启,false
表示关闭。
返回
HandleBleCloudGeofenceResponse
boolean
,表示操作是否成功。
函数定义示例
/**
* 开启/关闭 地理围栏
*/
export function handleBleCloudGeofence(params: HandleBleCloudGeofenceParams): Promise<HandleBleCloudGeofenceResponse>;
获取蓝牙开门密钥(用于地理围栏处)
getRemoteOpenKey
引入
使用该功能需要
@ray-js/ray
版本 1.6.6 及以上。
import { getRemoteOpenKey } from '@ray-js/ray';
参数
GetRemoteOpenKeyParams
属性 | 类型 | 必填 | 说明 |
---|---|---|---|
devId | string | 是 | 设备ID |
返回
GetRemoteOpenKeyResponse
表示蓝牙开门密钥的信息。
属性 | 类型 | 说明 |
---|---|---|
devUnlockId | string | 门锁在家庭里的ID,在dp协议中是从机ID |
dpId | number | 16进制的字符串。门锁初始化指令。 |
wakeUpIns | string | 16进制的字符串。门锁初始化指令。 |
distributed | boolean | 是否下发指令 |
ins | string | 16进制的字符串。随机数内容 |
函数定义示例
/**
* 获取蓝牙开门密钥(用于地理围栏处)
*/
export function getRemoteOpenKey(params: GetRemoteOpenKeyParams): Promise<GetRemoteOpenKeyResponse>;