From fe2276cffffdb9cce6d9793eb9fa604b43d7d7fc Mon Sep 17 00:00:00 2001 From: Maurice Makaay Date: Sat, 17 Dec 2022 12:57:12 +0100 Subject: [PATCH] Add fix for bricking for upgrades to ESPHome 2022.12.0 --- CHANGELOG.md | 18 ++++++++++++++++++ packages/core-dev.yaml | 20 ++++++++++++++++++-- packages/core.yaml | 7 +++++++ 3 files changed, 43 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e8ee29b..0aa19ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,24 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [2022.12.0] + +**Note**: This release requires ESPHome 2022.12.0 and Home Assistant 2021.8.0 or newer. + +### Changed +- Due to changes in the ESP-IDF framework, and ESPHome 2022.12.0 using the newer version + of the framework, flashing the lamp with ESPHome 2022.12.0 could result in a + failing device. It would not connect to WiFi anymore and serial logging showed a reboot + loop, crashing at the WiFi setup. + This release of the lamp firmware forces the use of the last known working version + of the ESP-IDF framework. This is not a final solution, because I don't want to be + stuck to old versions for dependencies, but for now this change at least should fix + the issue for users that flash their lamps. + +**If you already flashed your lamp and it ended up bricked**, then check out this +information from the related GitHub issue report: +[https://github.com/mmakaay/esphome-xiaomi_bslamp2/issues/104#issuecomment-1356182034](Fix recipe from issue #104) + ## [2021.10.0] **Note**: This release requires ESPHome 2021.10.0 and Home Assistant 2021.8.0 or newer. diff --git a/packages/core-dev.yaml b/packages/core-dev.yaml index d575760..655c80d 100644 --- a/packages/core-dev.yaml +++ b/packages/core-dev.yaml @@ -1,3 +1,12 @@ +# ========================================================================= +# *** If you are not developing the firmware, you can ignore this file *** +# +# This configuration package is used by Maurice for development purposes. +# The main difference with the regular core.yaml package, is that the +# source code for the bslamp2 component is not a remote GitHub repository, +# but a local checkout of that repository. +# ========================================================================== + # -------------------------------------------------------------------------- # Substitutions as used by the configuration packages # These can be overriden from the main device configuration file. @@ -25,9 +34,16 @@ esp32: CONFIG_FREERTOS_UNICORE: y advanced: ignore_efuse_mac_crc: true + # Bugfix for ESPHome 2022.12.0 and up: fallback to older platform + # version, to prevent bricked devices. ESPHome uses newer versions + # by default. + # See also: https://github.com/mmakaay/esphome-xiaomi_bslamp2/issues/104 + version: 4.3.2 + source: ~3.40302.0 + platform_version: platformio/espressif32 @ 3.5.0 # Retrieve the code for the xiaomi_bslamp2 platform from a local clone -# of the github repository, in the same directory as the config file. +# of the github repository, one directory up from the config file. external_components: - source: type: local @@ -47,7 +63,7 @@ api: # raising the log level, beware that you might see dropped connections from # Home Assistant and the network log viewer. logger: - level: WARN + level: INFO # ---------------------------------------------------------------------- # Hardware setup diff --git a/packages/core.yaml b/packages/core.yaml index 93e2839..dc19024 100644 --- a/packages/core.yaml +++ b/packages/core.yaml @@ -25,6 +25,13 @@ esp32: CONFIG_FREERTOS_UNICORE: y advanced: ignore_efuse_mac_crc: true + # Bugfix for ESPHome 2022.12.0 and up: fallback to older platform + # version, to prevent bricked devices. ESPHome uses newer versions + # by default. + # See also: https://github.com/mmakaay/esphome-xiaomi_bslamp2/issues/104 + version: 4.3.2 + source: ~3.40302.0 + platform_version: platformio/espressif32 @ 3.5.0 # Retrieve the code for the xiaomi_bslamp2 platform from GitHub. external_components: