Skip to main content

SpeakerHub

1.SpeakerHub.getState

Get SpeakerHub's State

BDDP

ParamValueDesc
methodSpeakerHub.getStateGet SpeakerHub's State
targetDevice<String,Necessary>DeviceId of the Hub you use;
token<String,Necessary>Net token of the Hub you use;

BUDP

ParamValueDesc
data.version<String,Necessary>Hub's Version;
data.wifi.enable<boolean,Necessary>Is WiFi Connected;
data.wifi.ssid<String,Necessary>Current connected Wi-Fi;
data.wifi.ip<String,Necessary>Current ip of Wi-Fi;
data.wifi.gateway<String,Necessary>Current Gateway of Wi-Fi;
data.wifi.mask<String,Necessary>Current Subnet Mask of Wi-Fi
data.eth.enable<boolean,Necessary>Is Ethernet Connected
data.options.volume<Integer,Necessary>Global volume of device
data.options.enableBeep<Boolean,Necessary>Is beep enabled, True means the device will make a beep when performing some actions, such as startup, modify settings
data.options.mute<Boolean,Necessary>Is mute mode enabled, True means device will not make any sound,Even if you receive a message

2.SpeakerHub.setWiFi

Set device's WiFi Info when it is online. Please check this to setup WiFi when device is offline.

BDDP

ParamValueDesc
methodSpeakerHub.setWiFiSet Hub's Wi-Fi Info
targetDevice<String,Necessary>DeviceId of the Hub you use;
token<String,Necessary>token of the Hub you use;
params.ssid<String,Necessary>The Wi-Fi's SSID you want to connect;
params.password<String,Necessary>The Wi-Fi's Password you want to connect;

BUDP

ParamValueDesc

3.SpeakerHub.playAudio

Play audio right now

BDDP

ParamValueDesc
methodSpeakerHub.playAudioPlay audio
targetDevice<String,Necessary>DeviceId of the Hub you use;
token<String,Necessary>token of the Hub you use;
params.tone<String,Optional>Play a tone,["Emergency","Alert","Warn","Tip"]
params.message<String,Optional>Play a tts message
params.volume<Integer,Optional>Use specified volume, the global volume will be used when not set.
params.repeat<Integer(0~10),Optional>Repeat times, 0 or null means not repeat.

BUDP

ParamValueDesc

4.SpeakerHub.setOption

Modify settings of device

BDDP

ParamValueDesc
methodSpeakerHub.setOptionModify settings of device
targetDevice<String,Necessary>DeviceId of the Hub you use;
token<String,Necessary>token of the Hub you use;
params.volume<Integer,Optional>Global volume of device
params.enableBeep<Boolean,Optional>Is beep enabled, True means the device will make a beep when performing some actions, such as startup, modify settings
params.mute<Boolean,Optional>Is mute mode enabled, True means device will not make any sound,Even if you receive a message

BUDP

ParamValueDesc