forked from konnected-io/konnected-esphome
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgdo-fcc-test.yaml
181 lines (155 loc) · 5.43 KB
/
gdo-fcc-test.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
substitutions:
garage_door_opener_momentary_duration: 10s
esphome:
on_boot:
priority: 200
then:
- lambda: !lambda |-
ESP_LOGI("Konnected-FCC-Test", "Disabling WiFi");
- script.execute: script_self_test_stop
- script.execute: script_fcc_test
packages:
remote_package:
url: http://github.com/konnected-io/konnected-esphome
ref: master
refresh: 5min
files:
####
# BASE
# This package is required and sets up core features.
- packages/garage-door-esp32-base.yaml
####
# GARAGE DOOR COVER
# The Garage Door Cover is the main user interface entity representing a garage door in Home Assistant.
# more: https://www.home-assistant.io/integrations/cover/
# CHOOSE ONE of the following cover packages depending on the sensors used to determine the open/closed state of the door.
#
# 1. RANGE SENSOR ONLY - Include this line and remove or comment out the garage_door_wired_sensor package below.
- packages/garage-door-cover-range.yaml
#
# 2. WIRED SENSOR ONLY - Include this line and remove or comment out the vl53l0x_range_sensor package below.
# - packages/garage-door-cover-wired.yaml
#
# 3. WIRED & RANGE SENSORS - Include this line.
# - packages/garage-door-cover-wired-and-range.yaml
####
# GARAGE DOOR WIRED SENSOR
# Enables a wired contact sensor for reporting the open or closed state of the garage door
# via the physical INPUT terminals.
- packages/garage-door-wired-sensor.yaml
####
# GARAGE DOOR RANGE SENSOR
# Enables the optical laser range sensor included with some Konnected Garage Door opener models to detect
# the open/closed state of an overhead garage door.
- packages/vl53l0x-range-sensor.yaml
####
# GARAGE DOOR OPENER BUTTON
# Enables the garage door opener relay labeled DOOR on the Konnected Garage Door Opener as a button entity. When
# pressed, the relay will close the dry contact, simulating a physical press of the garage door opener wall button.
- packages/garage-door-opener-button.yaml
####
# SWITCH
# Enables 12V switched output labeled STR on the Konnected Garage Door opener as a switch entity
# switch: !include packages/switch.yaml
- packages/switch.yaml
####
# WARNING LED
# Enables the onboard warning LED light, with strobe effect. Used to visually warn of garage door automatic closing.
# warning_led: !include packages/warning-led.yaml
- packages/warning-led.yaml
####
# WIFI
# Enables WiFi connectivity and diagnostics. Uncommet below to enable WiFi.
# wifi: !include packages/wifi.yaml
- packages/wifi.yaml
####
# PRE-CLOSE WARNING
# Enables a pleasant and customizable pre-close warning tone using the onboard piezo buzzer. Used to audibly
# warn of a garage door automatic closing.
- packages/buzzer-rtttl.yaml
- packages/pre-close-warning-tones.yaml
####
# STATUS LED
# Enables the onboard blue status LED as an activity/error indicator
# status_led: !include packages/status-led.yaml
- packages/status-led.yaml
####
# SELF-TEST
# Self test script used to validate the hardware post-assembly
- packages/gdo-self-test.yaml
esp32:
framework:
type: esp-idf
button:
- platform: template
id: button_fcc_test_start
name: ~FCC TEST STart
entity_category: diagnostic
internal: True
on_press:
then:
- script.execute: script_fcc_test
script:
# Script to put the device in non-transmission mode and cycle thru
# all device functions
- id: script_fcc_test
then:
- wifi.disable:
- repeat:
count: 10000
then:
- rtttl.play: $rtttl_scaleup
- delay: 1s
- rtttl.play: beep:d=8,o=6,b=100:d
- delay: 600ms
- lambda: ESP_LOGI("Konnected-FCC-Test", "Blinking Warning LED");
- light.turn_on:
id: warning_led
effect: strobe
- delay: 5s
- light.turn_off: warning_led
- delay: 500ms
- repeat:
count: 2
then:
- rtttl.play: beep:d=8,o=6,b=100:d
- delay: 600ms
- lambda: ESP_LOGI("Konnected-FCC-Test", "Activating GDO trigger relay");
- button.press: garage_door_opener_button
- delay: $garage_door_opener_momentary_duration
- repeat:
count: 3
then:
- rtttl.play: beep:d=8,o=6,b=100:d
- delay: 600ms
- lambda: ESP_LOGI("Konnected-FCC-Test", "Activating STR output");
- switch.turn_on: output_switch
- delay: 10s
- switch.turn_off: output_switch
- delay: 10s
####
# LOGGER
# more: https://esphome.io/components/logger.html
logger:
level: DEBUG
hardware_uart: UART0
logs:
ledc.output: INFO
vl53l0x: DEBUG
sensor: INFO
json: INFO
api: DEBUG
api:
reboot_timeout: 0s
services:
# Call the play_rtttl service to play any RTTTL song in the garage
- service: play_rtttl
variables:
song_str: string
then:
- rtttl.play:
rtttl: !lambda 'return song_str;'
ota:
improv_serial:
web_server:
include_internal: true