SinricPro Library
|
Device to control a smart speaker. More...
#include <SinricProSpeaker.h>
Public Member Functions | |
bool | sendPushNotification (String notification) |
Sending push notifications to SinricPro App. | |
void | onPowerState (PowerStateCallback cb) |
Set callback function for powerState request. | |
bool | sendPowerStateEvent (bool state, String cause=FSTR_SINRICPRO_PHYSICAL_INTERACTION) |
Send setPowerState event to SinricPro Server indicating actual power state. | |
void | onMute (MuteCallback cb) |
Set callback function for setMute request. | |
bool | sendMuteEvent (bool mute, String cause=FSTR_SINRICPRO_PHYSICAL_INTERACTION) |
Send setMute event to SinricPro Server indicating actual mute state. | |
void | onSetVolume (SetVolumeCallback cb) |
Set callback function for setVolume request. | |
void | onAdjustVolume (AdjustVolumeCallback cb) |
Set callback function for adjustVolume request. | |
bool | sendVolumeEvent (int volume, String cause=FSTR_SINRICPRO_PHYSICAL_INTERACTION) |
Send setVolume event to SinricPro Server indicating actual volume has changed. | |
void | onMediaControl (MediaControlCallback cb) |
Set callback function for mediaControl request. | |
bool | sendMediaControlEvent (String mediaControl, String cause=FSTR_SINRICPRO_PHYSICAL_INTERACTION) |
Send mediaControl event to SinricPro Server indicating devices media control state. | |
void | onSelectInput (SelectInputCallback cb) |
Set callback function for selectInput request. | |
bool | sendSelectInputEvent (String intput, String cause=FSTR_SINRICPRO_PHYSICAL_INTERACTION) |
Send selectInput event to SinricPro Server to report selected input. | |
void | onSetBands (SetBandsCallback cb) |
Set callback function for setBands request. | |
void | onAdjustBands (AdjustBandsCallback cb) |
Set callback function for adjustBands request. | |
void | onResetBands (ResetBandsCallback cb) |
Set callback function for resetBands request. | |
bool | sendBandsEvent (String bands, int level, String cause="PHYSICAL_INTERACTION") |
Send setBands event to SinricPro Server indicating bands level has changed. | |
void | onSetMode (ModeCallback cb) |
Set callback function for setMode request. | |
void | onSetMode (const String &instance, GenericModeCallback cb) |
Set callback function for setMode request on a specific instance. | |
bool | sendModeEvent (String mode, String cause=FSTR_SINRICPRO_PHYSICAL_INTERACTION) |
Send setMode event to SinricPro Server indicating the mode has changed. | |
bool | sendModeEvent (String instance, String mode, String cause=FSTR_SINRICPRO_PHYSICAL_INTERACTION) |
Send setMode event to SinricPro Server indicating the mode on a specific instance has changed. | |
Device to control a smart speaker.
Supporting:
|
inherited |
Set callback function for adjustBands
request.
cb | Function pointer to a AdjustBandsCallback function |
|
inherited |
Set callback function for adjustVolume
request.
cb | Function pointer to a AdjustVolumeCallback function |
|
inherited |
Set callback function for mediaControl
request.
cb | Function pointer to a MediaControlCallback function |
|
inherited |
Set callback function for setMute
request.
cb | Function pointer to a MuteCallback function |
|
inherited |
Set callback function for powerState
request.
cb | Function pointer to a PowerStateCallback function |
|
inherited |
Set callback function for resetBands
request.
cb | Function pointer to a ResetBandsCallback function |
|
inherited |
Set callback function for selectInput
request.
cb | Function pointer to a SelectInputCallback function |
|
inherited |
Set callback function for setBands
request.
cb | Function pointer to a SetBandsCallback function |
|
inherited |
Set callback function for setMode
request on a specific instance.
instance | String with instance name |
cb | Function pointer to a ModeCallback function |
|
inherited |
Set callback function for setMode
request.
cb | Function pointer to a ModeCallback function |
|
inherited |
Set callback function for setVolume
request.
cb | Function pointer to a SetVolumeCallback function |
|
inherited |
Send setBands
event to SinricPro Server indicating bands level has changed.
bands | String which bands has changed BASS , MIDRANGE , TREBBLE |
level | Integer with changed bands level |
cause | (optional) String reason why event is sent (default = "PHYSICAL_INTERACTION" ) |
true | event has been sent successfully |
false | event has not been sent, maybe you sent to much events in a short distance of time |
|
inherited |
Send mediaControl
event to SinricPro Server indicating devices media control state.
mediaControl | String with actual media control FastForward , Next , Pause , Play , Previous , Rewind , StartOver , Stop |
cause | (optional) String reason why event is sent (default = "PHYSICAL_INTERACTION" ) |
true | event has been sent successfully |
false | event has not been sent, maybe you sent to much events in a short distance of time |
|
inherited |
Send setMode
event to SinricPro Server indicating the mode on a specific instance has changed.
instance | String instance name |
mode | String with actual mode device is set to MOVIE , MUSIC , NIGHT , SPORT , TV |
cause | (optional) String reason why event is sent (default = FSTR_SINRICPRO_PHYSICAL_INTERACTION ) |
true | event has been sent successfully |
false | event has not been sent, maybe you sent to much events in a short distance of time |
|
inherited |
Send setMode
event to SinricPro Server indicating the mode has changed.
mode | String with actual mode device is set to MOVIE , MUSIC , NIGHT , SPORT , TV |
cause | (optional) String reason why event is sent (default = FSTR_SINRICPRO_PHYSICAL_INTERACTION ) |
true | event has been sent successfully |
false | event has not been sent, maybe you sent to much events in a short distance of time |
|
inherited |
Send setMute
event to SinricPro Server indicating actual mute state.
mute | true = device is muted on false = device is unmuted |
cause | (optional) String reason why event is sent (default = "PHYSICAL_INTERACTION" ) |
true | event has been sent successfully |
false | event has not been sent, maybe you sent to much events in a short distance of time |
|
inherited |
Send setPowerState
event to SinricPro Server indicating actual power state.
state | true = device turned on false = device turned off |
cause | (optional) String reason why event is sent (default = "PHYSICAL_INTERACTION" ) |
true | event has been sent successfully |
false | event has not been sent, maybe you sent to much events in a short distance of time |
|
inherited |
Sending push notifications to SinricPro App.
notification | String with the notification |
true | event has been sent successfully |
false | event has not been sent, maybe you sent to much events in a short distance of time |
|
inherited |
Send selectInput
event to SinricPro Server to report selected input.
input | String with actual media control AUX 1 ..AUX 7 , BLURAY , CABLE , CD , COAX 1 ,COAX 2 , COMPOSITE 1 , DVD , GAME , HD RADIO , HDMI 1 .. HDMI 10 , HDMI ARC , INPUT 1 ..INPUT 10 , IPOD , LINE 1 ..LINE 7 , MEDIA PLAYER , OPTICAL 1 , OPTICAL 2 , PHONO , PLAYSTATION , PLAYSTATION 3 , PLAYSTATION 4 , SATELLITE , SMARTCAST , TUNER , TV , USB DAC , VIDEO 1 ..VIDEO 3 , XBOX |
cause | (optional) String reason why event is sent (default = "PHYSICAL_INTERACTION" ) |
true | event has been sent successfully |
false | event has not been sent, maybe you sent to much events in a short distance of time |
|
inherited |
Send setVolume
event to SinricPro Server indicating actual volume has changed.
volume | Integer reporting the volume that the device have been set to |
cause | (optional) Reason why event is sent (default = "PHYSICAL_INTERACTION" ) |
true | event has been sent successfully |
false | event has not been sent, maybe you sent to much events in a short distance of time |