right order
This commit is contained in:
parent
4eadaa84a6
commit
2c73bbc1eb
1 changed files with 22 additions and 23 deletions
|
@ -9,16 +9,6 @@ void unlockDoor(bool silent) {
|
|||
if (!silent) {
|
||||
granted_beep();
|
||||
}
|
||||
#ifdef WIFI
|
||||
#ifdef WEBHOOKS
|
||||
#ifdef WEBHOOK_UNLOCK
|
||||
ExecuteHTTPRequest(String(webhook_unlock_url));
|
||||
#endif
|
||||
#endif
|
||||
#ifdef TINANCE2_BACKEND
|
||||
tinance2logrequest("Door Unlocked");
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#ifdef RELAY1
|
||||
#ifdef RELAY1_REVERSED
|
||||
|
@ -35,6 +25,17 @@ void unlockDoor(bool silent) {
|
|||
digitalWrite(LEDCTL_PIN,LOW);
|
||||
#endif
|
||||
|
||||
#ifdef WIFI
|
||||
#ifdef WEBHOOKS
|
||||
#ifdef WEBHOOK_UNLOCK
|
||||
ExecuteHTTPRequest(String(webhook_unlock_url));
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef TINANCE2_BACKEND
|
||||
tinance2logrequest("Door Unlocked");
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
void lockDoor(bool silent) {
|
||||
|
@ -42,19 +43,6 @@ void lockDoor(bool silent) {
|
|||
if (!silent) {
|
||||
short_beep();
|
||||
}
|
||||
|
||||
#ifdef WIFI
|
||||
#ifdef WEBHOOKS
|
||||
#ifdef WEBHOOK_LOCK
|
||||
ExecuteHTTPRequest(String(webhook_lock_url));
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef TINANCE2_BACKEND
|
||||
tinance2logrequest("Door Locked");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#ifdef RELAY1
|
||||
#ifdef RELAY1_REVERSED
|
||||
|
@ -70,6 +58,17 @@ void lockDoor(bool silent) {
|
|||
#ifdef LEDCTL_PIN
|
||||
digitalWrite(LEDCTL_PIN,HIGH);
|
||||
#endif
|
||||
|
||||
#ifdef WIFI
|
||||
#ifdef WEBHOOKS
|
||||
#ifdef WEBHOOK_LOCK
|
||||
ExecuteHTTPRequest(String(webhook_lock_url));
|
||||
#endif
|
||||
#endif
|
||||
#ifdef TINANCE2_BACKEND
|
||||
tinance2logrequest("Door Locked");
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue