From 23bdf0818b9a7de3ea22417f276fea82c325db6f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 8 Sep 2025 08:36:13 +0000 Subject: [PATCH 1/4] Initial plan From 16dae5133cec221546bf51bd2efa57655b9d105e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 8 Sep 2025 08:41:06 +0000 Subject: [PATCH 2/4] Add ESP-IDF 8MB configuration variant Co-authored-by: the78mole <7723396+the78mole@users.noreply.github.com> --- ...rus-km271-writable-espidf-8MB.factory.yaml | 21 +++ buderus-km271-writable-espidf-8MB.yaml | 166 ++++++++++++++++++ firmware-files.txt | 1 + 3 files changed, 188 insertions(+) create mode 100644 buderus-km271-writable-espidf-8MB.factory.yaml create mode 100644 buderus-km271-writable-espidf-8MB.yaml diff --git a/buderus-km271-writable-espidf-8MB.factory.yaml b/buderus-km271-writable-espidf-8MB.factory.yaml new file mode 100644 index 0000000..c6ae30c --- /dev/null +++ b/buderus-km271-writable-espidf-8MB.factory.yaml @@ -0,0 +1,21 @@ +packages: + # Include all of the core configuration + core: !include buderus-km271-writable-espidf-8MB.yaml + +esphome: + # This will allow for project identification, + # configuration and updates. + project: + #name: esphome.project-template + name: esphome.km271-wifi + version: dev # This will be replaced by the github workflows with the `release` version + +# This should point to the public location of the yaml file that will be adopted. +# In this case it is the core yaml file that does not contain the extra things +# that are provided by this factory yaml file as the user does not need these once adopted. +dashboard_import: + package_import_url: github://the78mole/esphome_components/buderus-km271-writable-espidf-8MB.yaml@main + +# Sets up the improv via serial client for Wi-Fi provisioning. +# Handy if your device has a usb port for the user to add credentials when they first get it. +improv_serial: \ No newline at end of file diff --git a/buderus-km271-writable-espidf-8MB.yaml b/buderus-km271-writable-espidf-8MB.yaml new file mode 100644 index 0000000..45b7c1b --- /dev/null +++ b/buderus-km271-writable-espidf-8MB.yaml @@ -0,0 +1,166 @@ +substitutions: + name: "km271-wr-espidf-8mb" + +esphome: + name: "${name}" + # Automatically add the mac address to the name + # so you can use a single firmware for all devices + name_add_mac_suffix: true + + platformio_options: + upload_speed: 921600 + + # This will allow for (future) project identification, + # configuration and updates. + project: + name: the78mole.km271-wifi + version: "1.0" + +# This YAML is for testing with the esp-idf framework and 8MB flash +esp32: + board: esp32dev + framework: + type: esp-idf + flash_size: 8MB # ESP-IDF specific flash size configuration + +# Enable logging +logger: + +# Enable Home Assistant API +api: + +ota: + platform: esphome +# password: "xxx" + +wifi: +# ssid: "test" +# password: "testtest" + + # Enable fallback hotspot (captive portal) in case wifi connection fails + ap: + ssid: "Fallback Hotspot" + password: "Z8zfajgxVvNw" + +dashboard_import: + package_import_url: github://the78mole/esphome_components/components/km271_wifi/km271-for-friends.yaml@main + +captive_portal: +# keep_user_credentials: true + +uart: + id: uart_bus + tx_pin: GPIO2 + rx_pin: GPIO4 + baud_rate: 2400 + +external_components: +# - source: +# type: local +# path: my_components/components +# components: [ km271_wifi ] + - source: github://the78mole/esphome_components@main + components: [ km271_wifi ] + +esp32_improv: + authorizer: improvble + authorized_duration: 120s + status_indicator: led3 + identify_duration: 60s + +improv_serial: + +status_led: + id: ledgn1 + pin: + number: GPIO21 + inverted: true + +km271_wifi: + - id: budoil + uart_id: uart_bus + +binary_sensor: + - platform: gpio + id: improvble + name: "USER 2" + pin: + number: GPIO27 + inverted: true + mode: + input: true + pullup: true + +output: + - platform: gpio + id: led3 + #name: LED3_Yellow + pin: + number: 23 + mode: OUTPUT + inverted: true + - platform: gpio + id: led4 + #name: LED4_Red + pin: + number: 25 + mode: OUTPUT + inverted: true + +select: + - platform: km271_wifi + config_ww_operation_mode: + name: "Warmwasser Betriebsmodus" + config_ww_circular_pump_interval: + name: "Warmwasser Zirkulationspumpenintervall" + + config_heating_circuit_1_summer_winter_switch_temperature: + name: "Heizkreis 1 Sommer Winter Umschalttemperatur" + config_heating_circuit_1_operation_mode: + name: "Heizkreis 1 Betriebsmodus" + config_heating_circuit_1_lowering_type: + name: "Heizkreis 1 Absenkungsart" + config_heating_circuit_1_heating_system_type: + name: "Heizkreis 1 Heizsystem" + config_heating_circuit_1_heating_program: + name: "Heizkreis 1 Heizprogramm" + +number: + - platform: km271_wifi + config_ww_temperature: + name: "Warmwassersolltemperatur Tag" + config_frost_switch_temperature: + name: "Frost Umschalttemperatur" + + config_heating_circuit_1_room_target_temperature_night: + name: "Heizkreis 1 Raumsolltemperatur Nacht" + config_heating_circuit_1_room_target_temperature_day: + name: "Heizkreis 1 Raumsolltemperatur Tag" + config_heating_circuit_1_holiday_target_temperature: + name: "Urlaubstemperatur" + config_heating_circuit_1_flow_temperature_max: + name: "Heizkreis 1 Heizkreistemperatur Maximal" + config_heating_circuit_1_design_temperature: + name: "Heizkreis 1 Auslegungstemperatur" +# handled by config_frost_switch_temperature +# config_heating_circuit_1_outdoor_switch_temperature: +# name: "Heizkreis 1 Aussenhalt Umschalttemperatur" + config_heating_circuit_1_room_temperature_offset: + name: "Heizkreis 1 Raumtemperatur Offset" + config_heating_circuit_1_holiday_days: + name: "Heizkreis 1 Urlaubstage" + +sensor: + +switch: + - platform: gpio + name: LED2_Green + pin: + number: 22 + mode: OUTPUT + inverted: true + +text_sensor: + - platform: km271_wifi + firmware_version: + name: "Firmware Version Control" \ No newline at end of file diff --git a/firmware-files.txt b/firmware-files.txt index 2f9a456..d1be6c6 100644 --- a/firmware-files.txt +++ b/firmware-files.txt @@ -9,6 +9,7 @@ buderus-km271_en_noimprov.yaml buderus-km271-hc2-rw.yaml buderus-km271-writable-espidf.yaml buderus-km271-writable-8MB.yaml +buderus-km271-writable-espidf-8MB.yaml # Component-specific variants components/km271_wifi/km271-for-friends.yaml From 8c7788b0f7ea3f508e1defe4bae69ccb254e8003 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 8 Sep 2025 08:43:08 +0000 Subject: [PATCH 3/4] Update README with new ESP-IDF 8MB configuration Co-authored-by: the78mole <7723396+the78mole@users.noreply.github.com> --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 6fa8761..256a317 100644 --- a/README.md +++ b/README.md @@ -53,6 +53,7 @@ The main intention of these examples are: | buderus-km271-hc2-rw.yaml | Configuration for KM271 with read/write support for heating circuit 2. | | buderus-km271-writable-espidf.yaml | Configuration using the ESP-IDF framework (saves ~50% of flash space). | | buderus-km271-writable-8MB.yaml | Configuration using 8MB flash memory (not supported by all HW versions). | +| buderus-km271-writable-espidf-8MB.yaml | Configuration using ESP-IDF framework with 8MB flash memory. | | components/km271_wifi/km271-for-friends.yaml | This is the version usually delivered with the HW. | | components/km271_wifi/km271_hc1_only.yaml | Example configuration for KM271 only using heating circuit 1. | From e27256bd0f1a6eab45960934956d49a8d733f123 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 9 Sep 2025 11:16:09 +0000 Subject: [PATCH 4/4] Remove improv configurations from ESP-IDF 8MB variant to fix boot stability Co-authored-by: the78mole <7723396+the78mole@users.noreply.github.com> --- buderus-km271-writable-espidf-8MB.factory.yaml | 3 --- buderus-km271-writable-espidf-8MB.yaml | 8 -------- 2 files changed, 11 deletions(-) diff --git a/buderus-km271-writable-espidf-8MB.factory.yaml b/buderus-km271-writable-espidf-8MB.factory.yaml index c6ae30c..3412af5 100644 --- a/buderus-km271-writable-espidf-8MB.factory.yaml +++ b/buderus-km271-writable-espidf-8MB.factory.yaml @@ -16,6 +16,3 @@ esphome: dashboard_import: package_import_url: github://the78mole/esphome_components/buderus-km271-writable-espidf-8MB.yaml@main -# Sets up the improv via serial client for Wi-Fi provisioning. -# Handy if your device has a usb port for the user to add credentials when they first get it. -improv_serial: \ No newline at end of file diff --git a/buderus-km271-writable-espidf-8MB.yaml b/buderus-km271-writable-espidf-8MB.yaml index 45b7c1b..2677ef5 100644 --- a/buderus-km271-writable-espidf-8MB.yaml +++ b/buderus-km271-writable-espidf-8MB.yaml @@ -62,14 +62,6 @@ external_components: - source: github://the78mole/esphome_components@main components: [ km271_wifi ] -esp32_improv: - authorizer: improvble - authorized_duration: 120s - status_indicator: led3 - identify_duration: 60s - -improv_serial: - status_led: id: ledgn1 pin: