PowerSensorController.
More...
|
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...
|
|
◆ 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
-
voltage | voltage |
current | current |
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
-
true | event has been sent successfully |
false | event has not been sent, maybe you sent to much events in a short distance of time |