SinricPro Library
Loading...
Searching...
No Matches
SinricProTV

Device to control a TV. More...

#include <SinricProTV.h>

Inheritance diagram for SinricProTV:

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 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 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 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 onChangeChannel (ChangeChannelCallback cb)
 Set callback function for changeChannel request.
 
void onChangeChannelNumber (ChangeChannelNumberCallback cb)
 Set callback function for changeChannel request.
 
void onSkipChannels (SkipChannelsCallback cb)
 Set callback function for skipChannels request.
 
bool sendChangeChannelEvent (String channelName, String cause=FSTR_SINRICPRO_PHYSICAL_INTERACTION)
 Send changeChannel event to SinricPro Server to report selected channel.
 

Detailed Description

Device to control a TV.

Supporting:

  • setVolume / adjustVolume
  • mute / unmute
  • media controls:
    • FastForward, Next, Pause, Play, Previous, Rewind, StartOver, Stop
  • select input
    • 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
  • Change channel by number
  • Change channel by name
  • Skip channels

Member Function Documentation

◆ onAdjustVolume()

void onAdjustVolume ( AdjustVolumeCallback  cb)
inherited

Set callback function for adjustVolume request.

Parameters
cbFunction pointer to a AdjustVolumeCallback function
Returns
void
See also
AdjustVolumeCallback

◆ onChangeChannel()

void onChangeChannel ( ChangeChannelCallback  cb)
inherited

Set callback function for changeChannel request.

Parameters
cbFunction pointer to a ChangeChannelCallback function
Returns
void
See also
ChangeChannelCallback

◆ onChangeChannelNumber()

void onChangeChannelNumber ( ChangeChannelNumberCallback  cb)
inherited

Set callback function for changeChannel request.

Parameters
cbFunction pointer to a ChangeChannelNumberCallback function
Returns
void
See also
ChangeChannelNumberCallback

◆ onMediaControl()

void onMediaControl ( MediaControlCallback  cb)
inherited

Set callback function for mediaControl request.

Parameters
cbFunction pointer to a MediaControlCallback function
Returns
void
See also
MediaControlCallback

◆ onMute()

void onMute ( MuteCallback  cb)
inherited

Set callback function for setMute request.

Parameters
cbFunction pointer to a MuteCallback function
Returns
void
See also
MuteCallback

◆ onPowerState()

void onPowerState ( PowerStateCallback  cb)
inherited

Set callback function for powerState request.

Parameters
cbFunction pointer to a PowerStateCallback function
Returns
void
See also
PowerStateCallback

◆ onSelectInput()

void onSelectInput ( SelectInputCallback  cb)
inherited

Set callback function for selectInput request.

Parameters
cbFunction pointer to a SelectInputCallback function
Returns
void
See also
SelectInputCallback

◆ onSetVolume()

void onSetVolume ( SetVolumeCallback  cb)
inherited

Set callback function for setVolume request.

Parameters
cbFunction pointer to a SetVolumeCallback function
Returns
void
See also
SetVolumeCallback

◆ onSkipChannels()

void onSkipChannels ( SkipChannelsCallback  cb)
inherited

Set callback function for skipChannels request.

Parameters
cbFunction pointer to a SkipChannelsCallback function
Returns
void
See also
SkipChannelsCallback

◆ sendChangeChannelEvent()

bool sendChangeChannelEvent ( String  channelName,
String  cause = FSTR_SINRICPRO_PHYSICAL_INTERACTION 
)
inherited

Send changeChannel event to SinricPro Server to report selected channel.

Parameters
channelNameString with actual channel
cause(optional) String reason why event is sent (default = "PHYSICAL_INTERACTION")
Returns
the success of sending the even
Return values
trueevent has been sent successfully
falseevent has not been sent, maybe you sent to much events in a short distance of time

◆ sendMediaControlEvent()

bool sendMediaControlEvent ( String  mediaControl,
String  cause = FSTR_SINRICPRO_PHYSICAL_INTERACTION 
)
inherited

Send mediaControl event to SinricPro Server indicating devices media control state.

Parameters
mediaControlString with actual media control
FastForward, Next, Pause, Play, Previous, Rewind, StartOver, Stop
cause(optional) String reason why event is sent (default = "PHYSICAL_INTERACTION")
Returns
the success of sending the even
Return values
trueevent has been sent successfully
falseevent has not been sent, maybe you sent to much events in a short distance of time

◆ sendMuteEvent()

bool sendMuteEvent ( bool  mute,
String  cause = FSTR_SINRICPRO_PHYSICAL_INTERACTION 
)
inherited

Send setMute event to SinricPro Server indicating actual mute state.

Parameters
mutetrue = device is muted on
false = device is unmuted
cause(optional) String reason why event is sent (default = "PHYSICAL_INTERACTION")
Returns
the success of sending the even
Return values
trueevent has been sent successfully
falseevent has not been sent, maybe you sent to much events in a short distance of time

◆ sendPowerStateEvent()

bool sendPowerStateEvent ( bool  state,
String  cause = FSTR_SINRICPRO_PHYSICAL_INTERACTION 
)
inherited

Send setPowerState event to SinricPro Server indicating actual power state.

Parameters
statetrue = device turned on
false = device turned off
cause(optional) String reason why event is sent (default = "PHYSICAL_INTERACTION")
Returns
the success of sending the even
Return values
trueevent has been sent successfully
falseevent has not been sent, maybe you sent to much events in a short distance of time

◆ sendPushNotification()

bool sendPushNotification ( String  notification)
inherited

Sending push notifications to SinricPro App.

Parameters
notificationString with the notification
Returns
the success of sending the event
Return values
trueevent has been sent successfully
falseevent has not been sent, maybe you sent to much events in a short distance of time

◆ sendSelectInputEvent()

bool sendSelectInputEvent ( String  input,
String  cause = FSTR_SINRICPRO_PHYSICAL_INTERACTION 
)
inherited

Send selectInput event to SinricPro Server to report selected input.

Parameters
inputString 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")
Returns
the success of sending the even
Return values
trueevent has been sent successfully
falseevent has not been sent, maybe you sent to much events in a short distance of time

◆ sendVolumeEvent()

bool sendVolumeEvent ( int  volume,
String  cause = FSTR_SINRICPRO_PHYSICAL_INTERACTION 
)
inherited

Send setVolume event to SinricPro Server indicating actual volume has changed.

Parameters
volumeInteger reporting the volume that the device have been set to
cause(optional) Reason why event is sent (default = "PHYSICAL_INTERACTION")
Returns
the success of sending the event
Return values
trueevent has been sent successfully
falseevent has not been sent, maybe you sent to much events in a short distance of time