SinricPro Library
Loading...
Searching...
No Matches
SinricProThermostat

Device to control Thermostat. More...

#include <SinricProThermostat.h>

Inheritance diagram for SinricProThermostat:

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 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.
 
bool sendTemperatureEvent (float temperature, float humidity=-1, String cause=FSTR_SINRICPRO_PERIODIC_POLL)
 Send currentTemperature event to report actual temperature (measured by a sensor)
 

Detailed Description

Device to control Thermostat.

Support

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

Member Function Documentation

◆ 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

◆ 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

◆ 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

◆ sendTemperatureEvent()

bool sendTemperatureEvent ( float  temperature,
float  humidity = -1,
String  cause = FSTR_SINRICPRO_PERIODIC_POLL 
)
inherited

Send currentTemperature event to report actual temperature (measured by a sensor)

Parameters
temperaturefloat actual temperature measured by a sensor
humidityfloat (optional) actual humidity measured by a sensor (default=-1.0f means not supported)
cause(optional) String reason why event is sent (default = "PERIODIC_POLL")
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