SinricPro Library
PowerSensorController

PowerSensorController. More...

Inheritance diagram for PowerSensorController:
SinricProPowerSensor

Public Member Functions

bool sendPowerSensorEvent (float voltage, float current, float power=-1.0f, float apparentPower=-1.0f, float reactivePower=-1.0f, float factor=-1.0f, String cause="PERIODIC_POLL")
 Send PowerSensor event to SinricPro Server. More...
 

Detailed Description

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 = "PERIODIC_POLL" 
)

Send PowerSensor event to SinricPro Server.

Parameters
voltagevoltage
currentcurrent
power(optional) if not provided, it is calculated automaticly (power = voltage * current)
apparentPower(optional) if not provided it is set to -1
reactivePower(optional) if not provided it is set to -1
factor(optional) if not provided it is set to -1
if apparentPower is provided, factor is calculated automaticly (factor = power / apparentPower)
cause(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