SinricPro Library
Loading...
Searching...
No Matches
SinricProFanUS

Device to control a fan with on / off commands and its speed by a range value. More...

#include <SinricProFanUS.h>

Inheritance diagram for SinricProFanUS:

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 onRangeValue (SetRangeValueCallback cb)
 Set callback function for setRangeValue request.
 
void onRangeValue (const String &instance, GenericSetRangeValueCallback_int cb)
 Set callback function for setRangeValue request on a specific instance (custom device)
 
void onAdjustRangeValue (AdjustRangeValueCallback cb)
 Set callback function for adjustRangeValue request.
 
bool sendRangeValueEvent (int rangeValue, String cause=FSTR_SINRICPRO_PHYSICAL_INTERACTION)
 Send rangeValue event to report curent rangeValue to SinricPro server.
 
bool sendRangeValueEvent (const String &instance, int rangeValue, String cause=FSTR_SINRICPRO_PHYSICAL_INTERACTION)
 Send rangeValue event to report curent rangeValue to SinricPro server for a specific instance (custom device)
 

Detailed Description

Device to control a fan with on / off commands and its speed by a range value.

Member Function Documentation

◆ onAdjustRangeValue()

void onAdjustRangeValue ( AdjustRangeValueCallback  cb)
inherited

Set callback function for adjustRangeValue request.

Parameters
cbFunction pointer to a AdjustRangeValueCallback function
See also
AdjustRangeValueCallback

◆ onPowerState()

void onPowerState ( PowerStateCallback  cb)
inherited

Set callback function for powerState request.

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

◆ onRangeValue() [1/2]

void onRangeValue ( const String &  instance,
GenericSetRangeValueCallback_int  cb 
)
inherited

Set callback function for setRangeValue request on a specific instance (custom device)

Parameters
instanceString instance name (custom device)
cbFunction pointer to a GenericSetRangeValueCallback function
See also
GenericSetRangeValueCallback

◆ onRangeValue() [2/2]

void onRangeValue ( SetRangeValueCallback  cb)
inherited

Set callback function for setRangeValue request.

Parameters
cbFunction pointer to a SetRangeValueCallback function
See also
SetRangeValueCallback

◆ 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

◆ sendRangeValueEvent() [1/2]

bool sendRangeValueEvent ( const String &  instance,
int  rangeValue,
String  cause = FSTR_SINRICPRO_PHYSICAL_INTERACTION 
)
inherited

Send rangeValue event to report curent rangeValue to SinricPro server for a specific instance (custom device)

Parameters
instanceString instance name
rangeValueValue between 0..3
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

◆ sendRangeValueEvent() [2/2]

bool sendRangeValueEvent ( int  rangeValue,
String  cause = FSTR_SINRICPRO_PHYSICAL_INTERACTION 
)
inherited

Send rangeValue event to report curent rangeValue to SinricPro server.

Parameters
rangeValueValue between 0..3
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