SinricPro Library
Loading...
Searching...
No Matches
SinricProLock

Device to control a smart lock. More...

#include <SinricProLock.h>

Inheritance diagram for SinricProLock:

Public Member Functions

bool sendPushNotification (String notification)
 Sending push notifications to SinricPro App.
 
void onLockState (LockStateCallback cb)
 Set callback function for setLockState request.
 
bool sendLockStateEvent (bool state, String cause=FSTR_SINRICPRO_PHYSICAL_INTERACTION)
 Send lockState event to SinricPro Server indicating actual lock state.
 

Detailed Description

Device to control a smart lock.

Supporting

  • on / off
  • lock / unlock

Member Function Documentation

◆ onLockState()

void onLockState ( LockStateCallback  cb)
inherited

Set callback function for setLockState request.

Parameters
cbFunction pointer to a LockStateCallback function
Returns
void
See also
LockStateCallback

◆ sendLockStateEvent()

bool sendLockStateEvent ( bool  state,
String  cause = FSTR_SINRICPRO_PHYSICAL_INTERACTION 
)
inherited

Send lockState event to SinricPro Server indicating actual lock state.

Parameters
statetrue = device is locked
false = device is unlocked
cause(optional) String reason why event is sent (default = "PHYSICAL_INTERACTION")
Returns
the success of sending the even
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