SinricPro Library
|
Device to control a light. More...
#include <SinricProLight.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 | onBrightness (BrightnessCallback cb) |
Set callback function for setBrightness request. | |
void | onAdjustBrightness (AdjustBrightnessCallback cb) |
Set callback function for adjustBrightness request. | |
bool | sendBrightnessEvent (int brightness, String cause=FSTR_SINRICPRO_PHYSICAL_INTERACTION) |
Send setBrightness event to SinricPro Server indicating actual brightness. | |
void | onColor (ColorCallback cb) |
Set callback function for setColor request. | |
bool | sendColorEvent (byte r, byte g, byte b, String cause=FSTR_SINRICPRO_PHYSICAL_INTERACTION) |
Send setColor event to SinricPro Server indicating actual color. | |
void | onColorTemperature (ColorTemperatureCallback cb) |
Set callback function for setColorTemperature request. | |
void | onIncreaseColorTemperature (IncreaseColorTemperatureCallback cb) |
Set callback function for increaseColorTemperature request. | |
void | onDecreaseColorTemperature (DecreaseColorTemperatureCallback cb) |
Set callback function for decreaseColorTemperature request. | |
bool | sendColorTemperatureEvent (int colorTemperature, String cause=FSTR_SINRICPRO_PHYSICAL_INTERACTION) |
Send setColorTemperature event to SinricPro Server indicating actual color temperature. | |
Device to control a light.
Supporting
|
inherited |
Set callback function for adjustBrightness
request.
cb | Function pointer to a AdjustBrightnessCallback function |
|
inherited |
Set callback function for setBrightness
request.
cb | Function pointer to a BrightnessCallback function |
|
inherited |
Set callback function for setColor
request.
cb | Function pointer to a ColorCallback function |
|
inherited |
Set callback function for setColorTemperature
request.
cb | Function pointer to a ColorTemperatureCallback function |
|
inherited |
Set callback function for decreaseColorTemperature
request.
cb | Function pointer to a DecreaseColorTemperatureCallback function |
|
inherited |
Set callback function for increaseColorTemperature
request.
cb | Function pointer to a IncreaseColorTemperatureCallback function |
|
inherited |
Set callback function for powerState
request.
cb | Function pointer to a PowerStateCallback function |
|
inherited |
Send setBrightness
event to SinricPro Server indicating actual brightness.
brightness | Integer value with actual brightness the device is set to |
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 setColor
event to SinricPro Server indicating actual color.
r | Byte value for red |
g | Byte value for green |
b | Byte value for blue |
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 setColorTemperature
event to SinricPro Server indicating actual color temperature.
colorTemperature | Integer with new color temperature the device is set to 2200 = warm white 2700 = soft white 4000 = white 5500 = daylight white 7000 = cool white |
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 |