SinricPro Library
Loading...
Searching...
No Matches
SinricProWindowAC

Device to control Window Air Conditioner. More...

#include <SinricProWindowAC.h>

Inheritance diagram for SinricProWindowAC:

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)
 
void onThermostatMode (ThermostatModeCallback cb)
 Set callback function for setThermostatMode request.
 
void onTargetTemperature (SetTargetTemperatureCallback cb)
 Set callback function for targetTemperature request.
 
void onAdjustTargetTemperature (AdjustTargetTemperatureCallback cb)
 Set callback function for adjustTargetTemperature request.
 
bool sendThermostatModeEvent (String thermostatMode, String cause=FSTR_SINRICPRO_PHYSICAL_INTERACTION)
 Send thermostatMode event to report a the new mode the device has been set to.
 
bool sendTargetTemperatureEvent (float temperature, String cause=FSTR_SINRICPRO_PHYSICAL_INTERACTION)
 Send targetTemperature event to report target temperature change.
 

Detailed Description

Device to control Window Air Conditioner.

Support

  • Set / adjust target temperature
  • Set mode AUTO, COOL, HEAT
  • Set range value
  • Report target temperature
  • Report actual temperature

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

◆ onAdjustTargetTemperature()

void onAdjustTargetTemperature ( AdjustTargetTemperatureCallback  cb)
inherited

Set callback function for adjustTargetTemperature request.

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

◆ 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

◆ onTargetTemperature()

void onTargetTemperature ( SetTargetTemperatureCallback  cb)
inherited

Set callback function for targetTemperature request.

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

◆ onThermostatMode()

void onThermostatMode ( ThermostatModeCallback  cb)
inherited

Set callback function for setThermostatMode request.

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

◆ 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

◆ sendTargetTemperatureEvent()

bool sendTargetTemperatureEvent ( float  temperature,
String  cause = FSTR_SINRICPRO_PHYSICAL_INTERACTION 
)
inherited

Send targetTemperature event to report target temperature change.

Parameters
temperatureFloat with actual target temperature the device is set to
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

◆ sendThermostatModeEvent()

bool sendThermostatModeEvent ( String  thermostatMode,
String  cause = FSTR_SINRICPRO_PHYSICAL_INTERACTION 
)
inherited

Send thermostatMode event to report a the new mode the device has been set to.

Parameters
thermostatModeString with actual mode (AUTO, COOL, HEAT) the device is set to
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