SinricPro Library
Loading...
Searching...
No Matches
SinricProContactsensor

Device to report contact sensor events. More...

#include <SinricProContactsensor.h>

Inheritance diagram for SinricProContactsensor:

Public Member Functions

bool sendPushNotification (String notification)
 Sending push notifications to SinricPro App.
 
bool sendContactEvent (bool detected, String cause=FSTR_SINRICPRO_PHYSICAL_INTERACTION)
 Send setContactState event to SinricPro Server indicating actual power state.
 

Detailed Description

Device to report contact sensor events.

Member Function Documentation

◆ sendContactEvent()

bool sendContactEvent ( bool  detected,
String  cause = FSTR_SINRICPRO_PHYSICAL_INTERACTION 
)
inherited

Send setContactState event to SinricPro Server indicating actual power state.

Parameters
detected[in] booltrue = contact is closed
[in] false = contact is open
cause[in] String reason why event is sent (default = "PHYSICAL_INTERACTION")
Returns
true event has been sent successfully
false event 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