From e7263389d6a66e82fa2dbc3990398d2abcd7407e Mon Sep 17 00:00:00 2001 From: dentra Date: Sat, 8 Oct 2022 18:45:50 +0000 Subject: [PATCH] prepare to release --- .gitignore | 1 + README.md | 6 ++--- README_ru.md | 6 ++--- packages/common.yaml | 6 ++--- packages/crash_info.yaml | 29 ++++++++++++++++++++++ packages/idf.yaml | 4 --- packages/restart.yaml | 1 + tion-3s.yaml | 53 ++++++++++++++++++++++++++-------------- tion-4s.yaml | 31 ++++++++++++++++------- tion-lt.yaml | 31 ++++++++++++++++------- 10 files changed, 117 insertions(+), 51 deletions(-) create mode 100644 packages/crash_info.yaml diff --git a/.gitignore b/.gitignore index 851448d..dcc12c8 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,7 @@ secrets.yaml /partitions.csv CMakeListsPrivate.txt CMakeLists.txt +Doxygen /compile_commands.json /.clang_complete diff --git a/README.md b/README.md index 8eb293e..674ba26 100644 --- a/README.md +++ b/README.md @@ -6,13 +6,13 @@ [![Support author][donate-me-shield]][donate-me] [![PayPal.Me][paypal-me-shield]][paypal-me] -[version-shield]: https://img.shields.io/static/v1?label=Version&message=2022.7.0&color=green +[version-shield]: https://img.shields.io/static/v1?label=Version&message=2022.10.0&color=green [version]: https://github.com/dentra/esphome-tion/releases/ [license-shield]: https://img.shields.io/static/v1?label=License&message=MIT&color=orange&logo=license [license]: https://opensource.org/licenses/MIT -[esphome-release-shield]: https://img.shields.io/static/v1?label=ESPHome&message=2022.6&color=green&logo=esphome +[esphome-release-shield]: https://img.shields.io/static/v1?label=ESPHome&message=2022.9&color=green&logo=esphome [esphome-release]: https://github.com/esphome/esphome/releases/ [open-in-vscode-shield]: https://img.shields.io/static/v1?label=+&message=Open+in+VSCode&color=blue&logo=visualstudiocode @@ -31,7 +31,7 @@ Версия на русском языке доступна [здесь](README_ru.md). -This is a ESPHome component to control `Tion 4S`, `Tion Lite` and `Tion 3S` Breezers from ESP32 via BLE protocol. +This is a ESPHome component to control `Tion 4S`, `Tion Lite` and `Tion 3S` Breezers from ESP32 via BLE protocol and `Tion 4S` breezer via ingergation port with any ESP32/ESP8266 dongle. At this moment the componet is build using climate platform and allows to control: diff --git a/README_ru.md b/README_ru.md index ed3db7c..86c8588 100644 --- a/README_ru.md +++ b/README_ru.md @@ -6,13 +6,13 @@ [![Support author][donate-me-shield]][donate-me] [![PayPal.Me][paypal-me-shield]][paypal-me] -[version-shield]: https://img.shields.io/static/v1?label=Version&message=2022.7.0&color=green +[version-shield]: https://img.shields.io/static/v1?label=Version&message=2022.10.0&color=green [version]: https://github.com/dentra/esphome-tion/releases/ [license-shield]: https://img.shields.io/static/v1?label=License&message=MIT&color=orange&logo=license [license]: https://opensource.org/licenses/MIT -[esphome-release-shield]: https://img.shields.io/static/v1?label=ESPHome&message=2022.6&color=green&logo=esphome +[esphome-release-shield]: https://img.shields.io/static/v1?label=ESPHome&message=2022.9&color=green&logo=esphome [esphome-release]: https://github.com/esphome/esphome/releases/ [open-in-vscode-shield]: https://img.shields.io/static/v1?label=+&message=Open+in+VSCode&color=blue&logo=visualstudiocode @@ -31,7 +31,7 @@ English version of this page is available [here](README.md). -Компонет ESPHome для управления бризерами `Tion 4S`, `Tion Lite` и `Tion 3S` с помощью ESP32 через BLE протокол. +Компонет ESPHome для управления бризерами `Tion 4S`, `Tion Lite` и `Tion 3S` с помощью ESP32 через BLE протокол и бризером `Tion 4S` посредсвом прямого подключения через интеграционный разъем с помощью стика ESP32/ESP8266 (как уточняйте в чате [Telegram][telegram]). На текущий момент компонент построен на платформе `climate` и позволяет контролировать: diff --git a/packages/common.yaml b/packages/common.yaml index 304c8bc..cba7ff4 100644 --- a/packages/common.yaml +++ b/packages/common.yaml @@ -39,8 +39,6 @@ logger: esp32_ble_tracker: external_components: + - source: github://dentra/esphome-components + components: [crash_info, etl] - source: $tion_source - -ble_client: - mac_address: $tion_mac_address - id: tion_ble_client diff --git a/packages/crash_info.yaml b/packages/crash_info.yaml new file mode 100644 index 0000000..6f0e882 --- /dev/null +++ b/packages/crash_info.yaml @@ -0,0 +1,29 @@ +crash_info: + id: crash_info_ptr + indicator: + id: crash_info_state_ptr + name: $name Crash state + store_in_flash: false # test save in flash, may lead to not to save because of using dynamic memory + store_free_heap: false + max_stack_frames_size: 40 + +text_sensor: + - platform: template + id: crash_info_stack_frames_ptr + name: $name Crash stack frames + lambda: |- + if (!id(crash_info_stack_frames_ptr).has_state()) { + if (id(crash_info_state_ptr).state) { + return {id(crash_info_ptr).get_stack_frames()}; + } + } + return {}; + entity_category: diagnostic + update_interval: 60min + +button: + - platform: template + name: $name Reset crash state + on_press: + lambda: id(crash_info_ptr).reset(); + entity_category: diagnostic diff --git a/packages/idf.yaml b/packages/idf.yaml index 8364d19..62e485d 100644 --- a/packages/idf.yaml +++ b/packages/idf.yaml @@ -1,6 +1,2 @@ substitutions: framework_type: esp-idf - -external_components: - - source: github://pr#3594 - components: ["esp32_ble_tracker"] diff --git a/packages/restart.yaml b/packages/restart.yaml index e11a9c2..6d359aa 100644 --- a/packages/restart.yaml +++ b/packages/restart.yaml @@ -1,3 +1,4 @@ button: - platform: restart name: $name Restart + entity_category: diagnostic diff --git a/tion-3s.yaml b/tion-3s.yaml index 8afb451..06a4d92 100644 --- a/tion-3s.yaml +++ b/tion-3s.yaml @@ -39,23 +39,31 @@ wifi: ssid: $wifi_ssid password: $wifi_password -button: - - platform: template - name: "$name Pair" - on_press: - lambda: id(tion_climate).pair(); - entity_category: config - ## Uncomment next 5 lines to enable switch for enable reset pair functionality. - # - platform: template - # name: "$name Reset Pair" - # on_press: - # lambda: id(tion_climate).reset_pair(); - # entity_category: config +ble_client: + mac_address: $tion_mac_address + id: tion_ble_client + +# Virtual port configuration +vport: + - platform: tion_ble_3s + id: tion3s_ble_vport + ble_client_id: tion_ble_client + # Optional, How often query device state. Default: 60s. + update_interval: 60s + # Optional, Do not disconnect after receiving state. Default: false. + persistent_connection: false + # Optional, Timeout to reconnect if no state answer received. Default: 15s. + state_timeout: 15s + # Optional, Sena a pair command after every connect (experimental feature) + #experimental_always_pair: false + # Optional, Allow to disable other BLE device scanning when breezer is already connected. + disable_scan: false +# Main component configuration. climate: - platform: tion_3s id: tion_climate - ble_client_id: tion_ble_client + vport_id: tion3s_ble_vport name: "$name" # Optional, Buzzer control switch. buzzer: @@ -75,12 +83,6 @@ climate: # Optional, Tion firmware version. version: name: "$name Version" - # Optional, Timeout to reconnect if no state answer received. Default: 15s. - state_timeout: 15s - # Optional, How often query device state. Default: 60s. - update_interval: 60s - # Optional, Do not disconnect after receiving state. Default: false. - persistent_connection: false # Optional, Enable presets. Default: # Awailable configurable presets: home, away, boost, comfort, eco, sleep, activity. # Defaults: @@ -107,3 +109,16 @@ climate: # Optional, display remaining boost time boost_time_left: name: $name Boost Time Left + +button: + - platform: template + name: "$name Pair" + on_press: + lambda: id(tion3s_ble_vport).pair(); + entity_category: config + ## Uncomment next 5 lines to enable switch for enable reset pair functionality. + # - platform: template + # name: "$name Reset Pair" + # on_press: + # lambda: id(tion3s_ble_vport).reset_pair(); + # entity_category: config diff --git a/tion-4s.yaml b/tion-4s.yaml index 5b6468c..b146b6a 100644 --- a/tion-4s.yaml +++ b/tion-4s.yaml @@ -39,11 +39,30 @@ wifi: ssid: $wifi_ssid password: $wifi_password +ble_client: + mac_address: $tion_mac_address + id: tion_ble_client + +# Virtual port configuration +vport: + - platform: tion_ble + id: tion4s_ble_vport + ble_client_id: tion_ble_client + # Optional, How often query device state. Default: 60s. + update_interval: 60s + # Optional, Do not disconnect after receiving state. Default: false. + persistent_connection: false + # Optional, Timeout to reconnect if no state answer received. Default: 15s. + state_timeout: 15s + # Optional, Allow to disable other BLE device scanning when breezer is already connected. + disable_scan: false + # Main component configuration. climate: - platform: tion_4s - ble_client_id: tion_ble_client name: "$name" + # Optional, virtual port id. Default: autodetect + vport_id: tion4s_ble_vport # Optional, Buzzer control switch. buzzer: name: "$name Buzzer" @@ -71,12 +90,6 @@ climate: # Optional, Tion firmware version. version: name: "$name Version" - # Optional, Timeout to reconnect if no state answer received. Default: 15s. - state_timeout: 15s - # Optional, How often query device state. Default: 60s. - update_interval: 60s - # Optional, Do not disconnect after receiving state. Default: false. - persistent_connection: false # Optional, Enable presets. Default: # Awailable configurable presets: home, away, boost, comfort, eco, sleep, activity. # Defaults: @@ -90,13 +103,13 @@ climate: # Boost is a special preset that runs for a period defined by boost_time and then switches back to the previous preset. presets: # enable and override "home" preset - home: { fan_speed: 2, target_temperature: 15, mode: heat } + home: { fan_speed: 2, target_temperature: 16, mode: heat } # enable "away" preset away: # enable "boost" preset boost: # enable and override "sleep" preset - sleep: { fan_speed: 1, target_temperature: 15, mode: heat } + sleep: { fan_speed: 1, target_temperature: 18, mode: heat } # Optional, configure boost time boost_time: name: $name Boost Time diff --git a/tion-lt.yaml b/tion-lt.yaml index 40f60a2..93b1a25 100644 --- a/tion-lt.yaml +++ b/tion-lt.yaml @@ -39,11 +39,30 @@ wifi: ssid: $wifi_ssid password: $wifi_password +ble_client: + mac_address: $tion_mac_address + id: tion_ble_client + +# Virtual port configuration +vport: + - platform: tion_ble + id: tionLt_ble_vport + ble_client_id: tion_ble_client + # Optional, How often query device state. Default: 60s. + update_interval: 60s + # Optional, Do not disconnect after receiving state. Default: false. + persistent_connection: false + # Optional, Timeout to reconnect if no state answer received. Default: 15s. + state_timeout: 15s + # Optional, Allow to disable other BLE device scanning when breezer is already connected. Default: false. + disable_scan: false + # Main climate component configuration. climate: - platform: tion_lt - ble_client_id: tion_ble_client name: "$name" + # Optional, virtual port id. Default: autodetect + vport_id: tionLt_ble_vport # Optional, Buzzer control switch. buzzer: name: "$name Buzzer" @@ -68,12 +87,6 @@ climate: # Optional, Tion firmware version. version: name: "$name Version" - # Optional, Timeout to reconnect if no state answer received. Default: 15s. - state_timeout: 15s - # Optional, How often query device state. Default: 60s. - update_interval: 60s - # Optional, Do not disconnect after receiving state. Default: false. - persistent_connection: false # Optional, Enable presets. Default: # Awailable configurable presets: home, away, boost, comfort, eco, sleep, activity. # Defaults: @@ -87,13 +100,13 @@ climate: # Boost is a special preset that runs for a period defined by boost_time and then switches back to the previous preset. presets: # enable and override "home" preset - home: { fan_speed: 2, target_temperature: 15, mode: heat } + home: { fan_speed: 2, target_temperature: 16, mode: heat } # enable "away" preset away: # enable "boost" preset boost: # enable and override "sleep" preset - sleep: { fan_speed: 1, target_temperature: 15, mode: heat } + sleep: { fan_speed: 1, target_temperature: 18, mode: heat } # Optional, configure boost time boost_time: name: $name Boost Time