From 4f76c44099a4fff275f487b5180f5a9d8e49f3dd Mon Sep 17 00:00:00 2001 From: Edward Firmo <94725493+edwardtfn@users.noreply.github.com> Date: Fri, 31 May 2024 16:57:41 +0200 Subject: [PATCH] Introduce limited BLE add-on Helps with #9 --- ...Ultimate-Easy-ESPHome_addon_ble_proxy.yaml | 41 +++++++++++++++++ ESPHome/TX-Ultimate-Easy-ESPHome_core.yaml | 46 +------------------ TX-Ultimate-Easy-ESPHome.yaml | 7 +-- 3 files changed, 45 insertions(+), 49 deletions(-) create mode 100644 ESPHome/TX-Ultimate-Easy-ESPHome_addon_ble_proxy.yaml diff --git a/ESPHome/TX-Ultimate-Easy-ESPHome_addon_ble_proxy.yaml b/ESPHome/TX-Ultimate-Easy-ESPHome_addon_ble_proxy.yaml new file mode 100644 index 0000000..b005a56 --- /dev/null +++ b/ESPHome/TX-Ultimate-Easy-ESPHome_addon_ble_proxy.yaml @@ -0,0 +1,41 @@ +bluetooth_proxy: + +esp32: + framework: + type: esp-idf + sdkconfig_options: + CONFIG_BT_ALLOCATION_FROM_SPIRAM_FIRST: "y" + CONFIG_BT_BLE_DYNAMIC_ENV_MEMORY: "y" + CONFIG_ESP32_REV_MIN_3: "y" + CONFIG_MBEDTLS_DYNAMIC_BUFFER: "y" + CONFIG_MBEDTLS_DYNAMIC_FREE_CA_CERT: "y" + CONFIG_MBEDTLS_DYNAMIC_FREE_CONFIG_DATA: "y" + CONFIG_MBEDTLS_EXTERNAL_MEM_ALLOC: "y" + CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY: "y" + CONFIG_SPIRAM_RODATA: "y" + CONFIG_SPIRAM_TRY_ALLOCATE_WIFI_LWIP: "y" + +light: + - id: !extend light_full + platform: esp32_rmt_led_strip + rgb_order: GRB + rmt_channel: 0 + chipset: ws2812 + type: !remove + variant: !remove + max_refresh_rate: 33ms + #bit0_high: 0.0004ms # High time for bit 0 + #bit0_low: 0.00085ms # Low time for bit 0 + #bit1_high: 0.0008ms # High time for bit 1 + #bit1_low: 0.00045ms # Low time for bit 1 + +media_player: !remove + +switch: + - id: !extend sw_speaker_amplifier + pin: + number: GPIO26 + inverted: true + allow_other_uses: false + +i2s_audio: !remove diff --git a/ESPHome/TX-Ultimate-Easy-ESPHome_core.yaml b/ESPHome/TX-Ultimate-Easy-ESPHome_core.yaml index a2f5f56..80e7ac3 100644 --- a/ESPHome/TX-Ultimate-Easy-ESPHome_core.yaml +++ b/ESPHome/TX-Ultimate-Easy-ESPHome_core.yaml @@ -169,50 +169,10 @@ captive_portal: esp32: board: esp32dev flash_size: 8MB - framework: - # type: esp-idf - type: arduino -# sdkconfig_options: -# CONFIG_BT_ALLOCATION_FROM_SPIRAM_FIRST: "y" -# CONFIG_BT_BLE_DYNAMIC_ENV_MEMORY: "y" -# CONFIG_ESP32_REV_MIN_3: "y" -# CONFIG_MBEDTLS_DYNAMIC_BUFFER: "y" -# CONFIG_MBEDTLS_DYNAMIC_FREE_CA_CERT: "y" -# CONFIG_MBEDTLS_DYNAMIC_FREE_CONFIG_DATA: "y" -# CONFIG_MBEDTLS_EXTERNAL_MEM_ALLOC: "y" -# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY: "y" -# CONFIG_SPIRAM_RODATA: "y" -# CONFIG_SPIRAM_TRY_ALLOCATE_WIFI_LWIP: "y" esphome: name: ${name} friendly_name: ${friendly_name} -# platformio_options: -# build_flags: -# - -DCONFIG_BT_ALLOCATION_FROM_SPIRAM_FIRST -# - -DCONFIG_BT_BLE_DYNAMIC_ENV_MEMORY -# - -DCONFIG_ESP32_REV_MIN_3 -# - -DCONFIG_MBEDTLS_DYNAMIC_BUFFER -# - -DCONFIG_MBEDTLS_DYNAMIC_FREE_CA_CERT -# - -DCONFIG_MBEDTLS_DYNAMIC_FREE_CONFIG_DATA -# - -DCONFIG_MBEDTLS_EXTERNAL_MEM_ALLOC -# - -DCONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY -# - -DCONFIG_SPIRAM_RODATA -# - -DCONFIG_SPIRAM_TRY_ALLOCATE_WIFI_LWIP -# - -DCONFIG_SPIRAM_USE -# - -DCONFIG_SPIRAM_ALLOW_NOINIT_SEG_EXTERNAL_MEMORY -# - -DCONFIG_SPIRAM_CACHE_LIBCHAR_IN_IRAM -# - -DCONFIG_SPIRAM_CACHE_LIBENV_IN_IRAM -# - -DCONFIG_SPIRAM_CACHE_LIBFILE_IN_IRAM -# - -DCONFIG_SPIRAM_CACHE_LIBIO_IN_IRAM -# - -DCONFIG_SPIRAM_CACHE_LIBJMP_IN_IRAM -# - -DCONFIG_SPIRAM_CACHE_LIBMATH_IN_IRAM -# - -DCONFIG_SPIRAM_CACHE_LIBMEM_IN_IRAM -# - -DCONFIG_SPIRAM_CACHE_LIBMISC_IN_IRAM -# - -DCONFIG_SPIRAM_CACHE_LIBNUMPARSER_IN_IRAM -# - -DCONFIG_SPIRAM_CACHE_LIBRAND_IN_IRAM -# - -DCONFIG_SPIRAM_CACHE_LIBSTR_IN_IRAM -# - -DCONFIG_SPIRAM_CACHE_LIBTIME_IN_IRAM on_boot: - priority: 701 @@ -232,10 +192,12 @@ esphome: light_29->set_internal(idx == 0); light_30->set_internal(idx == 0); light_31->set_internal(idx == 0); + light_eu->set_internal(idx == 1); light_eu_bottom->set_internal(idx == 1); light_eu_left->set_internal(idx == 1); light_eu_right->set_internal(idx == 1); light_eu_top->set_internal(idx == 1); + light_us->set_internal(idx == 0); light_us_bottom->set_internal(idx == 0); light_us_left->set_internal(idx == 0); light_us_right->set_internal(idx == 0); @@ -354,10 +316,6 @@ light: platform: neopixelbus type: GRB variant: WS2811 - # platform: esp32_rmt_led_strip - # rgb_order: GRB - # rmt_channel: 0 - # chipset: ws2812 num_leds: 32 pin: GPIO13 diff --git a/TX-Ultimate-Easy-ESPHome.yaml b/TX-Ultimate-Easy-ESPHome.yaml index 958c3c4..12ab708 100644 --- a/TX-Ultimate-Easy-ESPHome.yaml +++ b/TX-Ultimate-Easy-ESPHome.yaml @@ -10,10 +10,7 @@ packages: remote_package: url: https://github.com/edwardtfn/TX-Ultimate-Easy ref: dev - refresh: 1h + refresh: 30s files: - ESPHome/TX-Ultimate-Easy-ESPHome_core.yaml - -### Uncomment the lines bellow if you have issues with OTA and cannot flash via serial at this moment. ### -#esp32: -# flash_size: 4MB + #- ESPHome/TX-Ultimate-Easy-ESPHome_addon_ble_proxy.yaml # Adds experimental BLE proxy support (limited)