From ec0bf013ad6c3d614747443ff501d5ab37a11bc3 Mon Sep 17 00:00:00 2001 From: Nikolay Vasilchuk Date: Mon, 23 Sep 2019 10:14:58 +0300 Subject: [PATCH] Add Delay before answer call --- esphome/README.md | 15 +++++++++++++++ esphome/domofon.yaml | 15 +++++++++------ 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/esphome/README.md b/esphome/README.md index 526e7eb..6edcd17 100644 --- a/esphome/README.md +++ b/esphome/README.md @@ -4,6 +4,21 @@ [Scheme and parts](https://github.com/Anonym-tsk/smart-domofon/blob/master/README.md) +## Button and LED +* Red LED blinks + * Incoming call +* Blue LED blinks + * Connecting to WiFi or Home Assistant +* Green LED blinks + * Single - "automatically open once" mode + * Double - "automatically open permanent" mode +* Short button click + * No call - enables automatically open door mode (once by first click and permanent by second click) + * Incoming call - accept call and open door +* Long button click + * No call - disables automatically open door mode + * Incoming call - reject call + ## Configuration and build 1. Fill in WiFi credentials in [domofon.yaml](https://github.com/Anonym-tsk/smart-domofon/blob/master/esphome/domofon.yaml#L18) 2. Use [ESPHome](https://esphome.io) to build and upload firmware diff --git a/esphome/domofon.yaml b/esphome/domofon.yaml index df231be..3d08135 100755 --- a/esphome/domofon.yaml +++ b/esphome/domofon.yaml @@ -26,12 +26,13 @@ substitutions: api_password: "esphome" # Software configuration - call_end_detect_delay: 3000ms - relay_answer_on_time: 1500ms - relay_open_on_time: 600ms - relay_after_open_delay: 500ms - short_click_time_from: 50ms - short_click_time_to: 1000ms + call_end_detect_delay: 3000ms # Interval between rings to detect incoming call + relay_before_answer_delay: 10ms # Delay before answer call + relay_answer_on_time: 1500ms # Delay between answer call and open/close door + relay_open_on_time: 600ms # How long the "open door button" will be pressed + relay_after_open_delay: 500ms # Delay in "answer" state after opening door + short_click_time_from: 50ms # Short button click min time + short_click_time_to: 1000ms # Long button click min time ########### End user configuration ########### @@ -92,6 +93,7 @@ script: then: - logger.log: "Accept call" - script.execute: state_no_call + - delay: $relay_before_answer_delay - output.turn_on: relay_answer - delay: $relay_answer_on_time - output.turn_on: relay_open @@ -105,6 +107,7 @@ script: then: - logger.log: "Reject call" - script.execute: state_no_call + - delay: $relay_before_answer_delay - output.turn_on: relay_answer - delay: $relay_answer_on_time - output.turn_off: relay_answer