SpeakerHub
1.SpeakerHub.getState
Get SpeakerHub's State
| Param | Value | Desc |
|---|---|---|
| method | SpeakerHub.getState | Get SpeakerHub's State |
| targetDevice | <String,Necessary> | DeviceId of the Hub you use; |
| token | <String,Necessary> | Net token of the Hub you use; |
| Param | Value | Desc |
|---|---|---|
| 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.
| Param | Value | Desc |
|---|---|---|
| method | SpeakerHub.setWiFi | Set 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; |
| Param | Value | Desc |
|---|
3.SpeakerHub.playAudio
Play audio right now
| Param | Value | Desc |
|---|---|---|
| method | SpeakerHub.playAudio | Play 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. |
| Param | Value | Desc |
|---|
4.SpeakerHub.setOption
Modify settings of device
| Param | Value | Desc |
|---|---|---|
| method | SpeakerHub.setOption | Modify 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 |
| Param | Value | Desc |
|---|