Skip to content

Commit 6b74057

Browse files
committed
add FCC test firmare for GDOv2-Q
1 parent 8f36cb8 commit 6b74057

File tree

3 files changed

+236
-24
lines changed

3 files changed

+236
-24
lines changed

test/.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Gitignore settings for ESPHome
2+
# This is an example and may include too much for your use-case.
3+
# You can modify this file to suit your needs.
4+
/.esphome/
5+
/secrets.yaml

test/gdov2-q-fcc-test.yaml

Lines changed: 215 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,215 @@
1+
substitutions:
2+
3+
####
4+
# NAME
5+
# By default, the name of the ESPHome device is "konnected-xxxxxx" where xxxxxx is a unique identifier. The device's
6+
# hostname on your network is also defined by the name, defaulting to "konnected-xxxxxx.local". Edit this variable to
7+
# customize the name and hostname. Note: only lowercase characters, numbers and hyphen(-) are allowed.
8+
name: konnected
9+
friendly_name: GDO blaQ [FCC TEST]
10+
project_name: konnected.garage-door-gdov2-q
11+
project_version: "1.3.1"
12+
garage_door_cover_name: Garage Door
13+
garage_light_name: Garage Light
14+
garage_openings_name: Garage Openings
15+
garage_lock_name: Lock
16+
garage_motion_name: Motion
17+
garage_obstruction_name: Obstruction
18+
garage_motor_name: Motor
19+
garage_button_name: Wall Button
20+
garage_sync_name: Synced
21+
22+
####
23+
# GARAGE DOOR CLOSE WARNING DURATION
24+
# Duration to blink the warning LED and beep the buzzer before the garage door closes.
25+
garage_door_close_warning_duration: 5s
26+
27+
####
28+
# ADDITIONAL SETTTINGS
29+
sensor_debounce_time: 200ms
30+
blink_on_state: "true"
31+
32+
####
33+
# INTERNAL MAPPINGS
34+
# DO NOT EDIT these when using Konnected hardware
35+
uart_tx_pin: GPIO1
36+
uart_rx_pin: GPIO2
37+
warning_beep_pin: GPIO4
38+
warning_leds_pin: GPIO3
39+
status_led: GPIO18
40+
input1_pin: GPIO5
41+
input2_pin: GPIO9
42+
43+
rtttl_boop: boop:d=32,o=5,b=100:d#
44+
rtttl_gotit: got_it:d=32,o=5,b=100:d#,a#,be
45+
rtttl_scaleup: scale_up:d=32,o=5,b=100:c,c#,d#,e,f#,g#,a#,b
46+
rtttl_success: success:d=4,o=6,b=160:8e6,16f6,16g6,8a6,8g6,8e6,8g6,8a6
47+
48+
external_components:
49+
- source: github://konnected-io/konnected-esphome@master
50+
components: [ mdns, secplus_gdo ]
51+
52+
packages:
53+
54+
remote_package:
55+
url: https://github.com/konnected-io/konnected-esphome
56+
ref: master
57+
refresh: 5min
58+
files:
59+
60+
####
61+
# CORE
62+
# This package is required and sets up core features.
63+
- packages/core-esp32-s3.yaml
64+
65+
66+
####
67+
# WARNING LED
68+
# Enables the onboard warning LED light, with strobe effect. Used to visually warn of garage door automatic closing.
69+
# warning_led: !include packages/warning-led.yaml
70+
- packages/warning-led.yaml
71+
72+
####
73+
# WIFI
74+
# Enables WiFi connectivity and diagnostics. Uncommet below to enable WiFi.
75+
# wifi: !include packages/wifi.yaml
76+
- packages/wifi.yaml
77+
78+
####
79+
# PRE-CLOSE WARNING
80+
# Enables a pleasant and customizable pre-close warning tone using the onboard piezo buzzer. Used to audibly
81+
# warn of a garage door automatic closing.
82+
- packages/buzzer-rtttl.yaml
83+
- packages/pre-close-warning-tones.yaml
84+
85+
####
86+
# STATUS LED
87+
# Enables the onboard blue status LED as an activity/error indicator
88+
# status_led: !include packages/status-led.yaml
89+
- packages/status-led.yaml
90+
91+
####
92+
# SECPLUS GDO
93+
# The logic and capabilities of the GDO communication
94+
- packages/secplus-gdo.yaml
95+
- packages/debug.yaml
96+
97+
button:
98+
- platform: template
99+
id: button_fcc_test_start
100+
name: ~FCC TEST Start
101+
entity_category: diagnostic
102+
internal: True
103+
on_press:
104+
then:
105+
- script.execute: script_fcc_test
106+
107+
switch:
108+
- platform: gpio
109+
id: input1
110+
pin: $input1_pin
111+
- platform: gpio
112+
id: input2
113+
pin: $input2_pin
114+
115+
script:
116+
# Script to put the device in non-transmission mode and cycle thru
117+
# all device functions
118+
- id: script_fcc_test
119+
then:
120+
- wifi.disable:
121+
- lambda: id(gdo_blaq).start_gdo();
122+
- repeat:
123+
count: 10000
124+
then:
125+
- rtttl.play: $rtttl_scaleup
126+
- delay: 1s
127+
- rtttl.play: beep:d=8,o=6,b=100:d
128+
- delay: 600ms
129+
130+
- lambda: ESP_LOGI("Konnected-FCC-Test", "Blinking Warning LED");
131+
- button.press: pre_close_warning
132+
- delay: $garage_door_close_warning_duration
133+
134+
- repeat:
135+
count: 2
136+
then:
137+
- rtttl.play: beep:d=8,o=6,b=100:d
138+
- delay: 600ms
139+
140+
- lambda: ESP_LOGI("Konnected-FCC-Test", "Sending GDO commands");
141+
- cover.open: gdo_door
142+
- delay: 1s
143+
- cover.close: gdo_door
144+
- delay: 1s
145+
146+
- repeat:
147+
count: 3
148+
then:
149+
- rtttl.play: beep:d=8,o=6,b=100:d
150+
- delay: 600ms
151+
152+
- lambda: ESP_LOGI("Konnected-FCC-Test", "Activating outputs");
153+
- switch.turn_on: input1
154+
- delay: 2s
155+
- switch.turn_off: input1
156+
- delay: 2s
157+
- switch.turn_on: input2
158+
- delay: 2s
159+
- switch.turn_off: input2
160+
- delay: 2s
161+
162+
163+
####
164+
# LOGGER
165+
# more: https://esphome.io/components/logger.html
166+
logger:
167+
level: VERY_VERBOSE
168+
logs:
169+
esp-idf: VERBOSE
170+
api: VERBOSE
171+
api.service: DEBUG
172+
esp32_ble: DEBUG
173+
esp32_ble_server: DEBUG
174+
scheduler: DEBUG
175+
esp32.preferences: DEBUG
176+
sensor.filter: DEBUG
177+
rtttl: DEBUG
178+
cover: DEBUG
179+
sensor: DEBUG
180+
ledc.output: INFO
181+
json: INFO
182+
183+
api:
184+
reboot_timeout: 0s
185+
services:
186+
187+
# Call the play_rtttl service to play any RTTTL song in the garage
188+
- service: play_rtttl
189+
variables:
190+
song_str: string
191+
then:
192+
- rtttl.play:
193+
rtttl: !lambda 'return song_str;'
194+
195+
ota:
196+
- platform: esphome
197+
198+
improv_serial:
199+
200+
web_server:
201+
include_internal: true
202+
203+
esphome:
204+
on_boot:
205+
priority: 200
206+
then:
207+
- lambda: !lambda |-
208+
ESP_LOGI("Konnected-FCC-Test", "Disabling WiFi");
209+
- script.execute: script_fcc_test
210+
platformio_options:
211+
lib_deps:
212+
- https://github.com/konnected-io/gdolib#76ba232
213+
build_flags:
214+
- -DUART_SCLK_DEFAULT=UART_SCLK_APB
215+
- -Wl,--wrap=esp_panic_handler

gdo-fcc-test.yaml renamed to test/gdov2-s-fcc-test.yaml

Lines changed: 16 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ substitutions:
88
name: konnected
99
friendly_name: GDOv2-S [FCC TEST]
1010
project_name: konnected.garage-door-gdov2-s
11-
project_version: "1.1.1"
11+
project_version: "1.2.2"
1212
garage_door_cover_name: Garage Door
1313
switch_name: STR output
1414

@@ -29,10 +29,6 @@ substitutions:
2929

3030
####
3131
# ADDITIONAL SETTTINGS
32-
warning_beep_pulse_time: 100ms
33-
warning_beep_pause_time: 130ms
34-
warning_beep_internal_only: "true"
35-
warning_beep_shared: "false"
3632
sensor_debounce_time: 200ms
3733
range_sensor_polling_time: 2500ms
3834
range_sensor_debounce_time: 3s
@@ -50,13 +46,17 @@ substitutions:
5046
sda: GPIO6
5147
scl: GPIO7
5248

49+
rtttl_boop: boop:d=32,o=5,b=100:d#
50+
rtttl_gotit: got_it:d=32,o=5,b=100:d#,a#,be
51+
rtttl_scaleup: scale_up:d=32,o=5,b=100:c,c#,d#,e,f#,g#,a#,b
52+
rtttl_success: success:d=4,o=6,b=160:8e6,16f6,16g6,8a6,8g6,8e6,8g6,8a6
53+
5354
esphome:
5455
on_boot:
5556
priority: 200
5657
then:
5758
- lambda: !lambda |-
5859
ESP_LOGI("Konnected-FCC-Test", "Disabling WiFi");
59-
- script.execute: script_self_test_stop
6060
- script.execute: script_fcc_test
6161

6262
packages:
@@ -68,10 +68,16 @@ packages:
6868
files:
6969

7070
####
71-
# BASE
71+
# CORE
7272
# This package is required and sets up core features.
7373
- packages/core-esp32-s3.yaml
7474

75+
####
76+
# GARAGE DOOR WIRED SENSOR
77+
# Enables a wired contact sensor for reporting the open or closed state of the garage door
78+
# via the physical INPUT terminals.
79+
- packages/garage-door-wired-sensor.yaml
80+
7581
####
7682
# GARAGE DOOR RANGE SENSOR
7783
# Enables the optical laser range sensor included with some Konnected Garage Door opener models to detect
@@ -93,12 +99,6 @@ packages:
9399
# 3. WIRED & RANGE SENSORS - Include this line.
94100
# - packages/garage-door-cover-wired-and-range.yaml
95101

96-
####
97-
# GARAGE DOOR WIRED SENSOR
98-
# Enables a wired contact sensor for reporting the open or closed state of the garage door
99-
# via the physical INPUT terminals.
100-
- packages/garage-door-wired-sensor.yaml
101-
102102
####
103103
# GARAGE DOOR OPENER BUTTON
104104
# Enables the garage door opener relay labeled DOOR on the Konnected Garage Door Opener as a button entity. When
@@ -136,11 +136,6 @@ packages:
136136
# status_led: !include packages/status-led.yaml
137137
- packages/status-led.yaml
138138

139-
####
140-
# SELF-TEST
141-
# Self test script used to validate the hardware post-assembly
142-
- packages/gdo-self-test.yaml
143-
144139
button:
145140
- platform: template
146141
id: button_fcc_test_start
@@ -166,12 +161,9 @@ script:
166161
- delay: 600ms
167162

168163
- lambda: ESP_LOGI("Konnected-FCC-Test", "Blinking Warning LED");
169-
- light.turn_on:
170-
id: warning_led
171-
effect: strobe
172-
- delay: 5s
173-
- light.turn_off: warning_led
174-
- delay: 500ms
164+
- button.press: pre_close_warning
165+
- delay: $garage_door_close_warning_duration
166+
175167
- repeat:
176168
count: 2
177169
then:

0 commit comments

Comments
 (0)