SinricPro Library
Loading...
Searching...
No Matches
SinricProPowerSensor

Device to report power usage. More...

#include <SinricProPowerSensor.h>

Inheritance diagram for SinricProPowerSensor:

Public Member Functions

bool sendPushNotification (String notification)
 Sending push notifications to SinricPro App.
 
bool sendPowerSensorEvent (float voltage, float current, float power=-1.0f, float apparentPower=-1.0f, float reactivePower=-1.0f, float factor=-1.0f, String cause=FSTR_SINRICPRO_PERIODIC_POLL)
 Send PowerSensor event to SinricPro Server.
 

Detailed Description

Device to report power usage.

Member Function Documentation

◆ sendPowerSensorEvent()

bool sendPowerSensorEvent ( float  voltage,
float  current,
float  power = -1.0f,
float  apparentPower = -1.0f,
float  reactivePower = -1.0f,
float  factor = -1.0f,
String  cause = FSTR_SINRICPRO_PERIODIC_POLL 
)
inherited

Send PowerSensor event to SinricPro Server.

Parameters
voltagefloat voltage
currentfloat current
powerfloat (optional) if not provided, it is calculated automaticly (power = voltage * current)
apparentPowerfloat (optional) if not provided it is set to -1
reactivePowerfloat (optional) if not provided it is set to -1
factorfloat (optional) if not provided it is set to -1
if apparentPower is provided, factor is calculated automaticly (factor = power / apparentPower)
causeString (optional) Reason why event is sent (default = "PERIODIC_POLL")
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

◆ 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