From f0fcf4aa3c361bb374c1bedb4e250bcce6146077 Mon Sep 17 00:00:00 2001 From: Nate Clark Date: Fri, 18 Oct 2024 16:05:51 -0400 Subject: [PATCH] Start secplus_gdo before MQTT so that state is initialized before MQTT reports initial state --- components/secplus_gdo/secplus_gdo.cpp | 4 ++-- components/secplus_gdo/secplus_gdo.h | 2 +- garage-door-GDOv2-Q.yaml | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/components/secplus_gdo/secplus_gdo.cpp b/components/secplus_gdo/secplus_gdo.cpp index 0caec85..091affa 100644 --- a/components/secplus_gdo/secplus_gdo.cpp +++ b/components/secplus_gdo/secplus_gdo.cpp @@ -101,11 +101,11 @@ namespace secplus_gdo { status->paired_devices.total_wall_controls, status->paired_devices.total_accessories, status->paired_devices.total_all); break; - case GDO_CB_EVENT_OPEN_DURATION_MEASURMENT: + case GDO_CB_EVENT_OPEN_DURATION_MEASUREMENT: ESP_LOGI(TAG, "Open duration: %d", status->open_ms); gdo->set_open_duration(status->open_ms); break; - case GDO_CB_EVENT_CLOSE_DURATION_MEASURMENT: + case GDO_CB_EVENT_CLOSE_DURATION_MEASUREMENT: ESP_LOGI(TAG, "Close duration: %d", status->close_ms); gdo->set_close_duration(status->close_ms); break; diff --git a/components/secplus_gdo/secplus_gdo.h b/components/secplus_gdo/secplus_gdo.h index e976b05..e4c162b 100644 --- a/components/secplus_gdo/secplus_gdo.h +++ b/components/secplus_gdo/secplus_gdo.h @@ -38,7 +38,7 @@ namespace secplus_gdo { void start_gdo() { start_gdo_ = true; } // Use Late priority so we do not start the GDO lib until all saved preferences are loaded - float get_setup_priority() const override { return setup_priority::LATE; } + float get_setup_priority() const override { return setup_priority::BEFORE_CONNECTION; } void register_protocol_select(GDOSelect *select) { this->protocol_select_ = select; } void set_protocol_state(gdo_protocol_type_t protocol) { if (this->protocol_select_) { diff --git a/garage-door-GDOv2-Q.yaml b/garage-door-GDOv2-Q.yaml index 6e9cfe4..3000b33 100644 --- a/garage-door-GDOv2-Q.yaml +++ b/garage-door-GDOv2-Q.yaml @@ -57,7 +57,7 @@ substitutions: name: konnected friendly_name: GDO blaQ project_name: konnected.garage-door-gdov2-q - project_version: "1.3.2" + project_version: "1.3.3" garage_door_cover_name: Garage Door garage_light_name: Garage Light garage_openings_name: Garage Openings @@ -186,7 +186,7 @@ web_server: esphome: platformio_options: lib_deps: - - https://github.com/konnected-io/gdolib#76ba232 + - https://github.com/konnected-io/gdolib#4a55112 build_flags: - -DUART_SCLK_DEFAULT=UART_SCLK_APB - -Wl,--wrap=esp_panic_handler \ No newline at end of file