Compare commits

..

3314 Commits

Author SHA1 Message Date
J. Nick Koston
f6ebe21509 Merge branch 'integration' into memory_api 2025-09-10 21:17:19 -05:00
J. Nick Koston
99d25cc0b3 Merge branch 'ble_cleanups' into integration 2025-09-10 21:17:10 -05:00
J. Nick Koston
ec97a464f7 [esp32_ble_tracker] Simplify BLE client state machine by removing READY_TO_CONNECT 2025-09-10 21:14:12 -05:00
J. Nick Koston
386b52f4a4 [esp32_ble_tracker] Simplify BLE client state machine by removing READY_TO_CONNECT 2025-09-10 21:06:35 -05:00
J. Nick Koston
604074e3bf [esp32_ble_tracker] Simplify BLE client state machine by removing READY_TO_CONNECT 2025-09-10 21:02:33 -05:00
dependabot[bot]
41f0d1c622 Bump ruff from 0.12.12 to 0.13.0 (#10670)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@home-assistant.io>
2025-09-10 21:09:45 +00:00
Jesse Hills
6469bb168d Merge branch 'beta' into dev 2025-09-11 07:25:06 +12:00
Jesse Hills
7a869a33f0 Merge pull request #10665 from esphome/bump-2025.9.0b1
2025.9.0b1
2025-09-11 07:24:33 +12:00
esphomebot
af0da3f897 Update webserver local assets to 20250910-110003 (#10668) 2025-09-10 10:41:18 -05:00
Jonathan Swoboda
32e4eb26ad [remote] Remove duplicate implementations of remote code (#10548) 2025-09-10 10:46:30 -04:00
J. Nick Koston
10aae33979 Improve coverage for various core modules (#10663) 2025-09-10 08:17:34 -05:00
Keith Burzinski
56e85b3ef9 [thermostat] Rename timer enums to mitigate naming conflict (#10666) 2025-09-10 22:58:35 +12:00
Keith Burzinski
55dd12c66b [thermostat] Rename timer enums to mitigate naming conflict (#10666) 2025-09-10 22:58:07 +12:00
Jesse Hills
9dd17b464d Bump version to 2025.10.0-dev 2025-09-10 19:48:02 +12:00
Jesse Hills
2401f81be3 Bump version to 2025.9.0b1 2025-09-10 19:48:01 +12:00
Josip Šimun Kuči
52a7e26c6d [inkplate] Rename component and fix grayscale (#10200)
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-10 18:46:58 +12:00
Jesse Hills
d729dc20a8 Merge branch 'release' into dev 2025-09-10 17:04:21 +12:00
Jesse Hills
d3b7a9687b Merge pull request #10664 from esphome/bump-2025.8.4
2025.8.4
2025-09-10 17:03:37 +12:00
Jesse Hills
9d7fc11108 Bump version to 2025.8.4 2025-09-10 13:56:50 +12:00
tomaszduda23
7969627d3e [light] add missing header (#10590) 2025-09-10 13:56:50 +12:00
Clyde Stubbs
82d2e367d4 [kmeteriso] Fix i2c call (#10618) 2025-09-10 13:56:50 +12:00
Keith Burzinski
972aa691e4 [sen5x] Fix initialization (#10603) 2025-09-10 13:56:50 +12:00
Daniel M
ac61b8f893 [bl0940] extend configuration options of bl0940 device (#8158)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
2025-09-10 13:50:49 +12:00
Keith Burzinski
d9f625e5c8 [thermostat] General clean-up, optimization, properly support "auto" mode (#10561)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2025-09-10 13:24:50 +12:00
Jonathan Swoboda
e218f16f0f Allow both files and directories to be passed to update-all (#10575)
Co-authored-by: J. Nick Koston <nick@home-assistant.io>
2025-09-09 18:06:59 -05:00
J. Nick Koston
185a2c2fe7 Merge branch 'integration' into memory_api 2025-09-09 17:06:57 -05:00
J. Nick Koston
2ac3d19d96 Merge branch 'dev' into integration 2025-09-09 17:06:51 -05:00
J. Nick Koston
af45b63d51 Merge branch 'dev' into memory_api 2025-09-09 17:06:39 -05:00
J. Nick Koston
422d209786 [api] Add timezone support to GetTimeResponse for automatic timezone synchronization (#10661) 2025-09-09 15:54:50 -05:00
dependabot[bot]
e972e1f8c2 Bump aioesphomeapi from 40.0.2 to 40.1.0 (#10662)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-09 20:33:36 +00:00
dependabot[bot]
cfb90b7b18 Bump pytest-cov from 6.3.0 to 7.0.0 (#10660)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-09 15:15:53 -05:00
mrtoy-me
8976ea2436 [ms5611] remove delay in setup (#10658) 2025-09-10 07:31:06 +12:00
tomaszduda23
01ff09064d [nrf52] add more tests (#10591) 2025-09-10 07:29:49 +12:00
tomaszduda23
39212f0d7f allow to implement show_logs as external component (#10523) 2025-09-09 11:45:42 -05:00
Mischa Siekmann
8993f4e6b4 RingBuffer: Make partial writing optional (#10302) 2025-09-09 08:39:47 -05:00
J. Nick Koston
7adad0ee49 [core] Refactor insertion sort functions to eliminate code duplication (#10653) 2025-09-09 02:03:35 -05:00
J. Nick Koston
dd8815ec9d [core] Reduce flash usage by refactoring looping component partitioning (#10652) 2025-09-09 01:17:30 -05:00
Jesse Hills
59e62a1f44 Sort codeowners using case-insensitive (#10651)
Co-authored-by: J. Nick Koston <nick@koston.org>
2025-09-08 21:26:22 -05:00
J. Nick Koston
e59928166b Merge branch 'integration' into memory_api 2025-09-08 20:31:33 -05:00
J. Nick Koston
67603ba302 Merge branch 'insertion_sort_by_priority' into integration 2025-09-08 20:31:23 -05:00
J. Nick Koston
c0cab7ded3 [core] Refactor insertion sort functions to eliminate code duplication 2025-09-08 20:30:38 -05:00
Edward Firmo
f5f84fe825 [nextion] Increase delay before reboot to prevent TFT upload interruption (#10402) 2025-09-09 12:57:24 +12:00
Edward Firmo
90c2fdd565 [adc] Fix autorange negative coefficient bug causing incorrect voltage readings (#10549) 2025-09-09 12:56:18 +12:00
J. Nick Koston
6a7145fef8 Merge branch 'integration' into memory_api 2025-09-08 19:53:58 -05:00
J. Nick Koston
b955454852 Merge branch 'reduce_flash_loop_comp' into integration 2025-09-08 19:53:46 -05:00
J. Nick Koston
0495856f61 [core] Reduce flash usage by refactoring looping component partitioning 2025-09-08 19:53:08 -05:00
J. Nick Koston
29552b951d Merge branch 'integration' into memory_api 2025-09-08 19:28:32 -05:00
J. Nick Koston
959846ed89 Merge remote-tracking branch 'upstream/dev' into integration 2025-09-08 19:28:20 -05:00
tomaszduda23
f6d69231e8 [light] add missing header (#10590) 2025-09-09 11:10:29 +12:00
J. Nick Koston
5cc0e21bc7 [core] Reduce unnecessary nesting in scheduler loop (#10644) 2025-09-09 09:04:07 +12:00
Thomas Rupprecht
703b592793 Add I2S Audio Port for ESP32-C5/C6/H2 (#10414) 2025-09-08 14:03:41 -04:00
J. Nick Koston
75c9430d91 [core] Fix serial upload regression from DNS resolution PR #10595 (#10648) 2025-09-08 10:41:03 -05:00
J. Nick Koston
4c9fd2b800 Merge branch 'integration' into memory_api 2025-09-08 10:05:14 -05:00
J. Nick Koston
6b73cdbafb Merge branch 'fix_upload_run' into integration 2025-09-08 10:05:03 -05:00
J. Nick Koston
8179495fd7 [core] Fix serial upload regression from DNS resolution PR #10595 2025-09-08 10:03:56 -05:00
J. Nick Koston
e5bba00deb [esp32] Reduce GPIO memory usage by 50% through bit-packing (#10556) 2025-09-08 08:46:30 -05:00
J. Nick Koston
f37223c756 Merge branch 'integration' into memory_api 2025-09-07 22:03:07 -05:00
J. Nick Koston
2f66a9f586 Merge branch 'tiny_scheduler_cleanup_reduce_nesting' into integration 2025-09-07 22:02:55 -05:00
J. Nick Koston
9a9783bb21 [core] Reduce unnecessary nesting in scheduler loop 2025-09-07 22:02:03 -05:00
J. Nick Koston
5b4b026d1b Merge branch 'integration' into memory_api 2025-09-07 20:11:09 -05:00
J. Nick Koston
b78b4601f3 Merge remote-tracking branch 'upstream/dev' into integration 2025-09-07 20:10:59 -05:00
J. Nick Koston
8d90f13e97 [core] Store component source strings in flash on ESP8266 (breaking change) (#10621) 2025-09-07 20:10:00 -05:00
J. Nick Koston
666e33e70b [api] Store plaintext error message in PROGMEM on ESP8266 (#10634) 2025-09-07 20:09:47 -05:00
Clyde Stubbs
7eaaa4e426 [mipi_rgb] Unified driver for MIPI RGB displays (#9892)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2025-09-08 12:56:34 +12:00
J. Nick Koston
563216220d Merge branch 'integration' into memory_api 2025-09-07 18:54:50 -05:00
J. Nick Koston
66d301a120 Merge branch 'component_source_logstring' into integration 2025-09-07 18:54:29 -05:00
J. Nick Koston
b3c4c4b411 Merge remote-tracking branch 'upstream/dev' into component_source_logstring 2025-09-07 18:53:46 -05:00
J. Nick Koston
166ad942ef [scheduler] Reduce SchedulerItem memory usage by 7.4% on 32-bit platforms (#10553)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-07 18:51:07 -05:00
J. Nick Koston
d2e1135a56 Merge branch 'integration' into memory_api 2025-09-07 18:47:09 -05:00
J. Nick Koston
232c91fccf Merge branch 'dev' into integration 2025-09-07 18:46:59 -05:00
J. Nick Koston
0ff08bbc09 [mcp23016] Migrate to CachedGpioExpander to reduce I2C bus usage (#10581)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-07 18:26:49 -05:00
J. Nick Koston
6e2bcabbc9 [sx1509] Migrate to CachedGpioExpander to reduce I2C bus usage (#10588)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2025-09-07 18:26:33 -05:00
J. Nick Koston
afa191ae41 [pcf8574] Migrate to CachedGpioExpander to reduce I2C bus usage (#10573)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2025-09-07 18:26:22 -05:00
J. Nick Koston
93da52c4d2 [pca9554] Migrate to CachedGpioExpander to reduce I2C bus usage (#10571)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2025-09-07 18:26:11 -05:00
J. Nick Koston
aec6c3ae33 Merge branch 'integration' into memory_api 2025-09-07 18:23:31 -05:00
J. Nick Koston
a255e5be13 Merge branch 'bad_ind_flash_esp8266' into integration 2025-09-07 18:23:22 -05:00
J. Nick Koston
424e0a97b2 const 2025-09-07 18:23:03 -05:00
J. Nick Koston
72a1f467f0 Merge branch 'integration' into memory_api 2025-09-07 18:05:23 -05:00
J. Nick Koston
00e54961a2 fix merge 2025-09-07 18:05:14 -05:00
J. Nick Koston
c3b20bbda1 Merge branch 'dev' into bad_ind_flash_esp8266 2025-09-07 18:02:27 -05:00
J. Nick Koston
c634ef4b12 Merge branch 'integration' into memory_api 2025-09-07 18:02:14 -05:00
J. Nick Koston
bf5e0d6e28 Merge remote-tracking branch 'upstream/dev' into integration 2025-09-07 18:01:59 -05:00
J. Nick Koston
0cc0979674 [pca6416a] Migrate to CachedGpioExpander to reduce I2C bus usage (#10587) 2025-09-08 10:59:23 +12:00
Jesse Hills
629f1e94f1 [ota] Fix duplicate include and sort (#10643) 2025-09-07 22:58:41 +00:00
J. Nick Koston
8c28f346c7 [gpio_expander] Add intelligent pin type selection to CachedGpioExpander template (#10577) 2025-09-08 10:57:02 +12:00
dependabot[bot]
3cf36e2f94 Bump aioesphomeapi from 40.0.1 to 40.0.2 (#10641)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-07 17:32:21 -05:00
J. Nick Koston
1ac07c96b1 [esphome] Store OTA component log strings in flash on ESP8266 (#10570) 2025-09-08 10:30:39 +12:00
J. Nick Koston
91228c82e6 [esp8266][logger] Store LOG_LEVELS strings in PROGMEM to reduce RAM usage (#10569) 2025-09-08 10:29:45 +12:00
J. Nick Koston
28d16728d3 [core] Add memory pool to scheduler to reduce heap fragmentation (#10536) 2025-09-08 10:27:58 +12:00
dependabot[bot]
f24a182ba2 Bump pytest-cov from 6.2.1 to 6.3.0 (#10640)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-07 17:26:31 -05:00
dependabot[bot]
0065fe1516 Bump zeroconf from 0.147.0 to 0.147.2 (#10642)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-07 17:26:06 -05:00
J. Nick Koston
148fa698cc Fix DNS resolution inconsistency between logs and OTA operations (#10595)
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
2025-09-08 10:25:22 +12:00
J. Nick Koston
ffd607ee28 Merge branch 'integration' into memory_api 2025-09-07 17:21:57 -05:00
J. Nick Koston
5a5b528205 Merge branch 'optimize_pcf8574' into integration 2025-09-07 17:21:51 -05:00
J. Nick Koston
b227e83c08 Merge branch 'pca9554_loop_churn_fix' into integration 2025-09-07 17:21:48 -05:00
J. Nick Koston
e969fc3027 Merge branch 'sx1509_gpio_cache' into integration 2025-09-07 17:21:44 -05:00
J. Nick Koston
269fed6ccc Merge branch 'gpio_expander_fix_more_than_8_pins_in_bank' into sx1509_gpio_cache 2025-09-07 17:21:27 -05:00
J. Nick Koston
2d43f31fdb Merge branch 'gpio_expander_fix_more_than_8_pins_in_bank' into optimize_pcf8574 2025-09-07 17:21:09 -05:00
J. Nick Koston
c906eb881b Merge branch 'gpio_expander_fix_more_than_8_pins_in_bank' into pca9554_loop_churn_fix 2025-09-07 17:20:40 -05:00
J. Nick Koston
1964764dd0 Merge branch 'integration' into memory_api 2025-09-07 16:50:48 -05:00
J. Nick Koston
d0c157c92e Merge branch 'gpio_expander_fix_more_than_8_pins_in_bank' into integration 2025-09-07 16:50:42 -05:00
J. Nick Koston
7d65acf7db use conditional 2025-09-07 16:48:09 -05:00
J. Nick Koston
b25506b045 [core] Skip redundant process_to_add() call when no scheduler items added (#10630)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-08 09:10:55 +12:00
J. Nick Koston
0c737fc4df [core] Convert LOG_UPDATE_INTERVAL macro to function to reduce flash usage (#10636) 2025-09-08 09:09:15 +12:00
davidmonro
a8b8507ffc Atm90e32/26 device class fixes (#10629) 2025-09-08 08:06:10 +12:00
J. Nick Koston
f358f0a8f9 Merge branch 'integration' into memory_api 2025-09-07 09:48:20 -05:00
J. Nick Koston
8fb7cd2340 Merge branch 'base64_chars_flash_esp8266' into integration 2025-09-07 09:48:10 -05:00
J. Nick Koston
f9d10954bb Merge branch 'integration' into memory_api 2025-09-07 09:33:29 -05:00
J. Nick Koston
3a9bc75b29 Merge branch 'log_update_interval' into integration 2025-09-07 09:33:21 -05:00
J. Nick Koston
0f2a8300b2 [core] Convert LOG_UPDATE_INTERVAL macro to function to reduce flash usage 2025-09-07 09:32:02 -05:00
J. Nick Koston
68c8a67677 Merge branch 'integration' into memory_api 2025-09-07 09:02:28 -05:00
J. Nick Koston
546a2e2fcc Merge branch 'component_source_logstring' into integration 2025-09-07 09:02:20 -05:00
J. Nick Koston
b70573e8ff Merge remote-tracking branch 'upstream/dev' into component_source_logstring 2025-09-07 09:02:07 -05:00
J. Nick Koston
5f8731a136 Merge branch 'integration' into memory_api 2025-09-07 08:59:12 -05:00
J. Nick Koston
3faea0b0cd Merge branch 'base64_chars_flash_esp8266' into integration 2025-09-07 08:58:54 -05:00
J. Nick Koston
28233180c9 tidy 2025-09-07 08:27:25 -05:00
J. Nick Koston
2be9f42ddd Merge branch 'integration' into memory_api 2025-09-07 08:23:54 -05:00
J. Nick Koston
11f5849e70 Merge branch 'bad_ind_flash_esp8266' into integration 2025-09-07 08:23:29 -05:00
J. Nick Koston
c198ef6b07 [api] Store plaintext error message in PROGMEM on ESP8266 2025-09-07 08:21:02 -05:00
J. Nick Koston
902619e46d Merge branch 'integration' into memory_api 2025-09-06 23:30:57 -05:00
J. Nick Koston
b738a8ba83 Merge branch 'scheduler_skip_add_no_change' into integration 2025-09-06 23:30:51 -05:00
J. Nick Koston
0364ea38e6 Merge remote-tracking branch 'upstream/scheduler_skip_add_no_change' into scheduler_skip_add_no_change 2025-09-06 23:30:40 -05:00
J. Nick Koston
fec9e63b0c rename 2025-09-06 23:29:40 -05:00
J. Nick Koston
97957b49f1 rename 2025-09-06 23:29:11 -05:00
J. Nick Koston
98f7ae93db Update esphome/core/scheduler.cpp
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-06 23:27:14 -05:00
J. Nick Koston
871d36e303 Merge branch 'integration' into memory_api 2025-09-06 22:58:10 -05:00
J. Nick Koston
d0b0ee704c Merge branch 'scheduler_skip_add_no_change' into integration 2025-09-06 22:58:00 -05:00
J. Nick Koston
4a9cfeddcd better name 2025-09-06 22:56:57 -05:00
J. Nick Koston
08f6286427 Merge branch 'integration' into memory_api 2025-09-06 22:53:35 -05:00
J. Nick Koston
7b7ec63b4a Merge branch 'scheduler_skip_add_no_change' into integration 2025-09-06 22:53:27 -05:00
J. Nick Koston
57fd7552e3 [core] Skip redundant process_to_add() call when no scheduler items added 2025-09-06 22:52:48 -05:00
J. Nick Koston
261ab786fd Merge branch 'integration' into memory_api 2025-09-06 09:23:33 -05:00
J. Nick Koston
a4e7805635 Merge remote-tracking branch 'origin/dev' into integration 2025-09-06 09:23:24 -05:00
J. Nick Koston
5e44aa2ccc Merge branch 'integration' into memory_api 2025-09-05 22:23:30 -05:00
J. Nick Koston
5d039c3bbc Merge branch 'warning_strings_flash' into integration 2025-09-05 22:23:16 -05:00
J. Nick Koston
2aadf59219 cleanup 2025-09-05 22:22:52 -05:00
J. Nick Koston
e9498d65c5 Merge branch 'integration' into memory_api 2025-09-05 22:15:46 -05:00
J. Nick Koston
ba5324fa2f merge 2025-09-05 22:15:31 -05:00
J. Nick Koston
f2dede2861 Merge branch 'integration' into memory_api 2025-09-05 22:14:32 -05:00
J. Nick Koston
b793f94d9a Merge branch 'warning_strings_flash' into integration 2025-09-05 22:13:20 -05:00
J. Nick Koston
ad58b92abe more 2025-09-05 22:08:32 -05:00
J. Nick Koston
9360601f53 more 2025-09-05 22:07:20 -05:00
J. Nick Koston
52fe034bff wip 2025-09-05 22:01:10 -05:00
J. Nick Koston
1108dd8e78 warnings strings flash 2025-09-05 21:54:47 -05:00
J. Nick Koston
a6d43b5ec9 warnings strings flash 2025-09-05 21:49:19 -05:00
J. Nick Koston
a26c769b96 Merge branch 'integration' into memory_api 2025-09-05 21:28:09 -05:00
J. Nick Koston
d8d9c21ee6 Merge remote-tracking branch 'upstream/dev' into integration 2025-09-05 21:27:59 -05:00
J. Nick Koston
bf7ac26ab1 Merge branch 'integration' into memory_api 2025-09-05 17:20:13 -05:00
J. Nick Koston
65d8819a9e Merge branch 'component_source_logstring' into integration 2025-09-05 17:20:05 -05:00
J. Nick Koston
d90d7e77e9 cleanup 2025-09-05 17:19:52 -05:00
J. Nick Koston
8e468ff645 Merge branch 'integration' into memory_api 2025-09-05 17:11:30 -05:00
J. Nick Koston
ac46cc0eea Merge branch 'component_source_logstring' into integration 2025-09-05 17:11:16 -05:00
J. Nick Koston
c84928aba5 [core] Store component source strings in flash on ESP8266 (breaking change) 2025-09-05 17:08:11 -05:00
J. Nick Koston
a891b34b01 Merge branch 'integration' into memory_api 2025-09-05 14:40:56 -05:00
J. Nick Koston
2d28a1a4f4 Merge branch 'mdns_progmem' into integration 2025-09-05 14:40:46 -05:00
J. Nick Koston
a1773e0a3c fix warning 2025-09-05 14:40:32 -05:00
J. Nick Koston
48d9de7f24 Merge branch 'integration' into memory_api 2025-09-05 13:53:51 -05:00
J. Nick Koston
d8abd045e0 Merge branch 'ota_log_str' into integration 2025-09-05 13:53:40 -05:00
J. Nick Koston
bc67196556 [esphome] ESP8266: Move OTA error strings to PROGMEM (saves 116 bytes RAM) 2025-09-05 13:53:10 -05:00
J. Nick Koston
7ffe6459f6 Merge branch 'integration' into memory_api 2025-09-05 13:36:33 -05:00
J. Nick Koston
e968302251 Merge branch 'logger_esp8266_progmem' into integration 2025-09-05 13:35:39 -05:00
J. Nick Koston
f2bde66933 cleanup 2025-09-05 13:35:30 -05:00
J. Nick Koston
f6b97d3977 Merge branch 'logger_esp8266_progmem' into memory_api 2025-09-05 13:27:37 -05:00
J. Nick Koston
fd1086965a Merge branch 'logger_esp8266_progmem' into integration 2025-09-05 13:27:29 -05:00
J. Nick Koston
47fac7c99a standard way 2025-09-05 13:21:54 -05:00
J. Nick Koston
c311ed9e15 Merge remote-tracking branch 'upstream/dev' into logger_esp8266_progmem 2025-09-05 13:18:15 -05:00
J. Nick Koston
35ab40faf4 try to make tidy happy 2025-09-05 13:14:51 -05:00
J. Nick Koston
ce9cf27ca5 Merge branch 'integration' into memory_api 2025-09-05 13:10:56 -05:00
J. Nick Koston
b7fc25c69c Merge branch 'state_class_to_string_flash' into integration 2025-09-05 13:10:51 -05:00
J. Nick Koston
3f3b31a2b4 simplify 2025-09-05 13:04:27 -05:00
J. Nick Koston
2f7c1601e3 Merge branch 'integration' into memory_api 2025-09-05 13:02:18 -05:00
J. Nick Koston
dd6283bc4d Merge branch 'state_class_to_string_flash' into integration 2025-09-05 13:02:14 -05:00
J. Nick Koston
406e6852d2 preen 2025-09-05 13:01:58 -05:00
J. Nick Koston
bb5a973fdf Merge branch 'integration' into memory_api 2025-09-05 11:34:19 -05:00
J. Nick Koston
ba2f6027fb Merge branch 'state_class_to_string_flash' into memory_api 2025-09-05 11:34:06 -05:00
J. Nick Koston
fa9f8c829b Merge branch 'state_class_to_string_flash' into integration 2025-09-05 11:33:27 -05:00
J. Nick Koston
4248cbc596 [sensor] ESP8266: Use LogString for state_class_to_string() to save RAM 2025-09-05 11:32:52 -05:00
J. Nick Koston
ed7cbb9111 Merge branch 'integration' into memory_api 2025-09-05 11:20:33 -05:00
J. Nick Koston
394c20c54b Merge branch 'logger_esp8266_progmem' into integration 2025-09-05 11:20:29 -05:00
J. Nick Koston
dd870b0362 fix header 2025-09-05 11:19:38 -05:00
J. Nick Koston
b5dea4549c Merge branch 'integration' into memory_api 2025-09-05 11:17:17 -05:00
J. Nick Koston
71ac279adc revert 2025-09-05 11:17:08 -05:00
J. Nick Koston
c8d575aab7 revert 2025-09-05 11:15:09 -05:00
J. Nick Koston
9b882a8792 Merge branch 'integration' into memory_api 2025-09-05 11:12:43 -05:00
J. Nick Koston
9dabaf3c31 Merge branch 'web_server_8266_store_flash' into integration 2025-09-05 11:12:36 -05:00
J. Nick Koston
a0b2d9c34c Revert "json keys"
This reverts commit ae3f4ad919.
2025-09-05 11:12:25 -05:00
J. Nick Koston
4321fc86c2 Revert "more"
This reverts commit ef0e93a9cb.
2025-09-05 11:12:15 -05:00
J. Nick Koston
210680a4cb Merge branch 'integration' into memory_api 2025-09-05 11:06:50 -05:00
J. Nick Koston
20935a9b9b Merge branch 'web_server_8266_store_flash' into integration 2025-09-05 11:06:43 -05:00
J. Nick Koston
ef0e93a9cb more 2025-09-05 11:05:10 -05:00
J. Nick Koston
ae3f4ad919 json keys 2025-09-05 11:02:14 -05:00
J. Nick Koston
c6f8aa45eb Merge branch 'integration' into memory_api 2025-09-05 10:45:36 -05:00
J. Nick Koston
820fffbf71 Merge branch 'logger_esp8266_progmem' into integration 2025-09-05 10:45:31 -05:00
J. Nick Koston
abe768a704 header 2025-09-05 10:45:21 -05:00
J. Nick Koston
def3992af5 Merge branch 'integration' into memory_api 2025-09-05 10:43:11 -05:00
J. Nick Koston
c598366e61 Merge branch 'web_server_8266_store_flash' into integration 2025-09-05 10:43:07 -05:00
J. Nick Koston
6d70417cae silence false positive 2025-09-05 10:42:39 -05:00
J. Nick Koston
f28691edb4 Merge branch 'integration' into memory_api 2025-09-05 10:39:27 -05:00
J. Nick Koston
da09a2d76c Merge branch 'ota_web_server_esp8266_flash' into integration 2025-09-05 10:39:20 -05:00
J. Nick Koston
4911c859d4 beginResponse_P 2025-09-05 10:39:11 -05:00
J. Nick Koston
4b57f1e619 beginResponse_P 2025-09-05 10:38:58 -05:00
J. Nick Koston
f9d3cddd23 Merge branch 'integration' into memory_api 2025-09-05 10:34:18 -05:00
J. Nick Koston
3603b6c18d Merge branch 'web_server_8266_store_flash' into integration 2025-09-05 10:34:11 -05:00
J. Nick Koston
6e24048a90 preen 2025-09-05 10:30:45 -05:00
J. Nick Koston
b7ef1cd7d4 Merge branch 'integration' into memory_api 2025-09-05 10:26:16 -05:00
J. Nick Koston
1ca66767ba Merge branch 'ota_web_server_esp8266_flash' into integration 2025-09-05 10:26:10 -05:00
J. Nick Koston
70358c27d3 [web_server] ESP8266: Store OTA response strings in PROGMEM (saves 52 bytes RAM) 2025-09-05 10:25:34 -05:00
J. Nick Koston
40794bca78 Merge branch 'logger_esp8266_progmem' into memory_api 2025-09-05 10:20:37 -05:00
J. Nick Koston
7c15311622 Merge branch 'logger_esp8266_progmem' into integration 2025-09-05 10:20:34 -05:00
J. Nick Koston
d323d49185 Revert "Update esphome/components/logger/logger_esp8266.cpp"
This reverts commit 9e56bc1710.
2025-09-05 10:20:13 -05:00
J. Nick Koston
f4f1b9d8c3 Merge branch 'integration' into memory_api 2025-09-05 10:19:29 -05:00
J. Nick Koston
0a72155c42 Merge branch 'logger_esp8266_progmem' into integration 2025-09-05 10:19:25 -05:00
J. Nick Koston
9e56bc1710 Update esphome/components/logger/logger_esp8266.cpp
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-05 10:19:03 -05:00
J. Nick Koston
7903e43a66 [logger] ESP8266: Store UART selection strings in PROGMEM (saves 36 bytes RAM) 2025-09-05 10:18:07 -05:00
J. Nick Koston
8c90675eb2 Merge branch 'integration' into memory_api 2025-09-05 10:12:10 -05:00
J. Nick Koston
d4e49f6705 Merge branch 'script_ram' into integration 2025-09-05 10:12:03 -05:00
J. Nick Koston
d2d0f06be3 [script] ESP8266: Store log format strings in PROGMEM (saves 240 bytes RAM) 2025-09-05 10:11:11 -05:00
J. Nick Koston
51c29f7c61 Merge branch 'integration' into memory_api 2025-09-05 09:43:38 -05:00
J. Nick Koston
0dfa34d961 Merge branch 'light_missing_macros' into integration 2025-09-05 09:43:33 -05:00
J. Nick Koston
4969b8ab80 [light] ESP8266: Store log strings in flash memory 2025-09-05 09:42:53 -05:00
J. Nick Koston
5760d5c995 Merge branch 'integration' into memory_api 2025-09-05 09:22:50 -05:00
J. Nick Koston
2c571dbe68 Merge branch 'gpio_binary_sensor_progmem_logs' into integration 2025-09-05 09:22:43 -05:00
J. Nick Koston
fd67da9fb0 [gpio] ESP8266: Store log strings in flash memory 2025-09-05 09:22:06 -05:00
J. Nick Koston
62fbda4cc3 Merge branch 'integration' into memory_api 2025-09-05 09:14:09 -05:00
J. Nick Koston
a580d83954 Merge branch 'web_server_8266_store_flash' into integration 2025-09-05 09:14:04 -05:00
J. Nick Koston
f67c5fbab2 [web_server] ESP8266: Move strings to PROGMEM (saves 128 bytes RAM) 2025-09-05 09:13:15 -05:00
J. Nick Koston
33697e95ac Merge branch 'captive_portal_progmem_8266' into memory_api 2025-09-05 08:43:02 -05:00
J. Nick Koston
14b0a84ca7 Merge branch 'captive_portal_progmem_8266' into integration 2025-09-05 08:42:58 -05:00
J. Nick Koston
3f622169b9 missed one 2025-09-05 08:42:46 -05:00
J. Nick Koston
894bbd27c3 Merge branch 'integration' into memory_api 2025-09-05 08:32:09 -05:00
J. Nick Koston
8a53229bfb Merge branch 'captive_portal_progmem_8266' into integration 2025-09-05 08:32:01 -05:00
J. Nick Koston
a8352ef2cb preen 2025-09-05 08:29:32 -05:00
J. Nick Koston
6ff31bdbbf fix refactoring error 2025-09-05 08:27:39 -05:00
J. Nick Koston
eb666324fe Merge branch 'integration' into memory_api 2025-09-04 23:32:23 -05:00
J. Nick Koston
fde9d70f95 Merge branch 'captive_portal_progmem_8266' into integration 2025-09-04 23:32:15 -05:00
J. Nick Koston
089430abc9 [captive_portal] ESP8266: Move strings to PROGMEM (saves 192 bytes RAM) 2025-09-04 23:31:44 -05:00
J. Nick Koston
2433ac4821 Merge branch 'integration' into memory_api 2025-09-04 22:58:41 -05:00
J. Nick Koston
f53c9be729 Merge branch 'mdns_progmem' into integration 2025-09-04 22:58:35 -05:00
J. Nick Koston
639b924be3 [mdns] Move constant strings to flash on ESP8266 2025-09-04 22:57:44 -05:00
J. Nick Koston
cf7140ce1a Merge branch 'integration' into memory_api 2025-09-04 22:29:59 -05:00
J. Nick Koston
38ccfc7b5c Merge branch 'noise_prologue_flash_esp8266' into integration 2025-09-04 22:29:53 -05:00
J. Nick Koston
e2b6efd8de [api] Store Noise protocol prologue in flash on ESP8266 2025-09-04 22:28:42 -05:00
J. Nick Koston
f762d3a6e2 Merge branch 'integration' into memory_api 2025-09-04 21:42:14 -05:00
J. Nick Koston
c45b8a33d4 Merge branch 'align_resolver' into integration 2025-09-04 21:42:09 -05:00
J. Nick Koston
830b9a881a redesign 2025-09-04 21:39:50 -05:00
pre-commit-ci-lite[bot]
6ab0581c93 [pre-commit.ci lite] apply automatic fixes 2025-09-05 02:12:35 +00:00
J. Nick Koston
f836b71e1c Update test_resolver.py 2025-09-04 21:11:22 -05:00
J. Nick Koston
f18303fe2b fix test 2025-09-04 20:56:05 -05:00
J. Nick Koston
3fc928f5d1 fix, cover 2025-09-04 20:17:08 -05:00
J. Nick Koston
2d37518c00 fix, cover 2025-09-04 20:16:30 -05:00
J. Nick Koston
a282920d7c fix, cover 2025-09-04 20:06:55 -05:00
J. Nick Koston
d7aec744b7 preen 2025-09-04 20:00:31 -05:00
J. Nick Koston
ccbe629f8d Fix DNS resolution inconsistency between logs and OTA operations 2025-09-04 19:58:44 -05:00
J. Nick Koston
d5f855004e Merge branch 'integration' into memory_api 2025-09-04 14:45:52 -05:00
J. Nick Koston
85b8925d17 Merge branch 'sx1509_gpio_cache' into integration 2025-09-04 14:45:46 -05:00
J. Nick Koston
245c36e628 fix 2025-09-04 14:45:34 -05:00
J. Nick Koston
025da5ac30 Merge branch 'integration' into memory_api 2025-09-04 14:40:26 -05:00
J. Nick Koston
140b970ac5 Merge branch 'pca6414a_cached_gpio_expander' into integration 2025-09-04 14:40:15 -05:00
J. Nick Koston
87b6fbfb47 Merge branch 'mcp_23016_gpio_cache' into integration 2025-09-04 14:40:12 -05:00
J. Nick Koston
ead5ba4da6 Merge branch 'sx1509_gpio_cache' into integration 2025-09-04 14:40:07 -05:00
J. Nick Koston
06833d6f8b [sx1509] Migrate to CachedGpioExpander to reduce I2C bus usage 2025-09-04 14:36:27 -05:00
J. Nick Koston
d9ded6b87e [sx1509] Migrate to CachedGpioExpander to reduce I2C bus usage 2025-09-04 14:35:34 -05:00
J. Nick Koston
977f07c338 [pca6416a] Migrate to reduce I2C bus usage 2025-09-04 14:22:33 -05:00
J. Nick Koston
053415a22e [mcp23016] Migrate to CachedGpioExpander to reduce I2C bus usage 2025-09-04 14:02:31 -05:00
J. Nick Koston
ed0b1b02ed Merge branch 'integration' into memory_api 2025-09-04 13:51:40 -05:00
J. Nick Koston
66d3e8c5c2 Merge branch 'pca9554_loop_churn_fix' into integration 2025-09-04 13:51:29 -05:00
J. Nick Koston
04a238d851 Merge branch 'optimize_pcf8574' into integration 2025-09-04 13:51:15 -05:00
J. Nick Koston
a63927a5f6 Merge branch 'gpio_expander_fix_more_than_8_pins_in_bank' into optimize_pcf8574 2025-09-04 13:51:05 -05:00
J. Nick Koston
c29c5b754a Merge branch 'gpio_expander_fix_more_than_8_pins_in_bank' into pca9554_loop_churn_fix 2025-09-04 13:50:39 -05:00
J. Nick Koston
2b4bf270fd Merge branch 'integration' into memory_api 2025-09-04 13:49:39 -05:00
J. Nick Koston
71c5f3c6b2 Merge branch 'gpio_expander_fix_more_than_8_pins_in_bank' into integration 2025-09-04 13:49:30 -05:00
J. Nick Koston
e843f1759b update docs 2025-09-04 13:49:19 -05:00
J. Nick Koston
feecc734fb update docs 2025-09-04 13:49:10 -05:00
J. Nick Koston
a6ed4bb844 Merge branch 'integration' into memory_api 2025-09-04 13:27:13 -05:00
J. Nick Koston
058f04232f Merge branch 'gpio_expander_fix_more_than_8_pins_in_bank' into integration 2025-09-04 13:27:07 -05:00
J. Nick Koston
ef50033766 [gpio_expander] Fix CachedGpioExpander template to support >8 pins per bank 2025-09-04 13:16:48 -05:00
J. Nick Koston
56652ce763 Merge branch 'integration' into memory_api 2025-09-04 13:10:35 -05:00
J. Nick Koston
5920508c32 Merge branch 'pca9554_loop_churn_fix' into integration 2025-09-04 13:10:31 -05:00
J. Nick Koston
d29586ba5a fix 2025-09-04 13:10:21 -05:00
J. Nick Koston
42c8624f95 Merge branch 'integration' into memory_api 2025-09-04 13:09:32 -05:00
J. Nick Koston
960590434c Merge branch 'pca9554_loop_churn_fix' into integration 2025-09-04 13:09:27 -05:00
J. Nick Koston
4065bdaea6 merge 2025-09-04 13:08:57 -05:00
J. Nick Koston
1528c06599 Merge branch 'integration' into memory_api 2025-09-04 13:05:31 -05:00
J. Nick Koston
b814edd43c Merge branch 'optimize_pcf8574' into integration 2025-09-04 13:05:23 -05:00
J. Nick Koston
2d409b017e Merge branch 'optimize_pcf8574' into memory_api 2025-09-04 13:05:15 -05:00
J. Nick Koston
20d3e4a1b8 Merge branch 'integration' into memory_api 2025-09-04 13:05:08 -05:00
J. Nick Koston
c36dc5c4ad Merge branch 'pca9554_loop_churn_fix' into integration 2025-09-04 13:05:04 -05:00
J. Nick Koston
cf9c8e3786 update pca as well 2025-09-04 13:03:33 -05:00
J. Nick Koston
5b0d1fb30e cleanup 2025-09-04 12:57:44 -05:00
J. Nick Koston
ee090c7c38 cleanup 2025-09-04 12:32:52 -05:00
J. Nick Koston
e866ae0f50 handle 16 pins 2025-09-04 12:28:23 -05:00
J. Nick Koston
f5dbc44662 Merge branch 'optimize_pcf8574' into memory_api 2025-09-04 12:24:02 -05:00
J. Nick Koston
75de980f58 Merge branch 'optimize_pcf8574' into integration 2025-09-04 12:23:58 -05:00
J. Nick Koston
4885819881 use helper 2025-09-04 12:21:48 -05:00
J. Nick Koston
ec88aefebf Merge branch 'integration' into memory_api 2025-09-04 11:21:29 -05:00
J. Nick Koston
03c64b1ae5 Merge branch 'pca9554_loop_churn_fix' into integration 2025-09-04 11:21:22 -05:00
J. Nick Koston
c1c522dc08 fix stale comment 2025-09-04 11:21:17 -05:00
J. Nick Koston
0585f05d90 Merge branch 'optimize_pcf8574' into memory_api 2025-09-04 11:20:27 -05:00
J. Nick Koston
8211220cc4 Merge branch 'optimize_pcf8574' into integration 2025-09-04 11:20:21 -05:00
J. Nick Koston
784d547294 correctness 2025-09-04 11:19:30 -05:00
J. Nick Koston
526ba902ae Merge branch 'integration' into memory_api 2025-09-04 11:04:30 -05:00
J. Nick Koston
339a2e2d0f Merge branch 'optimize_pcf8574' into integration 2025-09-04 11:04:21 -05:00
J. Nick Koston
1d91bf5759 [pcf8574] Add lazy input caching to reduce I2C bus usage 2025-09-04 11:02:23 -05:00
J. Nick Koston
888a1539c5 Merge branch 'integration' into memory_api 2025-09-04 10:56:08 -05:00
J. Nick Koston
abb6e1c2ab Merge branch 'pca9554_loop_churn_fix' into integration 2025-09-04 10:55:54 -05:00
J. Nick Koston
d2a9e0ef7a build 2025-09-04 10:55:27 -05:00
J. Nick Koston
52ce1f8985 Merge branch 'integration' into memory_api 2025-09-04 10:53:37 -05:00
J. Nick Koston
2d84834d6d Merge branch 'pca9554_loop_churn_fix' into integration 2025-09-04 10:53:31 -05:00
J. Nick Koston
cd4a6bbe37 add myself since I use this in production now and will be swithing more devices to use it 2025-09-04 10:52:47 -05:00
J. Nick Koston
30ed4717de Merge branch 'integration' into memory_api 2025-09-04 10:43:24 -05:00
J. Nick Koston
727b271079 Merge branch 'pca9554_loop_churn_fix' into integration 2025-09-04 10:43:19 -05:00
J. Nick Koston
faca78aeb9 [pca9554] Reduce I2C bus usage with lazy input caching 2025-09-04 10:33:05 -05:00
J. Nick Koston
b0ec9abbc4 Merge branch 'i2c_std_vector_heap' into memory_api 2025-09-04 10:14:22 -05:00
J. Nick Koston
b1413ac0e0 Merge branch 'integration' into memory_api 2025-09-04 09:06:59 -05:00
J. Nick Koston
80ed40426a Merge branch 'logger_8266_str_to_flash' into integration 2025-09-04 09:06:54 -05:00
J. Nick Koston
e6ab45a78d esp32 fix 2025-09-04 09:06:11 -05:00
J. Nick Koston
049606607a Merge branch 'ota_esp8266_logstr' into memory_api 2025-09-04 09:02:48 -05:00
J. Nick Koston
8fdb62b4f7 Merge branch 'ota_esp8266_logstr' into integration 2025-09-04 09:02:41 -05:00
J. Nick Koston
2e7ebc6258 [esphome] Store OTA component log strings in flash on ESP8266 2025-09-04 09:01:59 -05:00
J. Nick Koston
b5df54d900 Merge branch 'integration' into memory_api 2025-09-04 08:58:18 -05:00
J. Nick Koston
072bbcd30b Merge branch 'logger_8266_str_to_flash' into integration 2025-09-04 08:58:12 -05:00
J. Nick Koston
b4154831a6 cleanup 2025-09-04 08:58:03 -05:00
J. Nick Koston
81783ef49d cleanup 2025-09-04 08:57:43 -05:00
J. Nick Koston
85314be7a2 Merge branch 'logger_8266_str_to_flash' into memory_api 2025-09-04 08:53:18 -05:00
J. Nick Koston
8d7dfc1a75 Merge branch 'logger_8266_str_to_flash' into integration 2025-09-04 08:53:13 -05:00
J. Nick Koston
313556bb49 [esp8266][logger] Store LOG_LEVELS strings in PROGMEM to reduce RAM usage 2025-09-04 08:52:06 -05:00
J. Nick Koston
a58b7abde7 Merge branch 'integration' into memory_api 2025-09-04 08:37:41 -05:00
J. Nick Koston
faa243227f Merge branch 'esp8266_api_progmem' into integration 2025-09-04 08:37:35 -05:00
J. Nick Koston
70da50b32f [esp8266][api] Store error strings in PROGMEM to reduce RAM usage 2025-09-04 08:32:49 -05:00
J. Nick Koston
85a4a61d14 [i2c] Optimize memory usage with stack allocation for small buffers 2025-09-04 08:07:22 -05:00
J. Nick Koston
e1b9b57cd7 Merge branch 'esp8266_gpio_progmem' into memory_api 2025-09-03 22:58:53 -05:00
J. Nick Koston
07fba41139 Merge branch 'esp8266_gpio_progmem' into integration 2025-09-03 22:58:48 -05:00
J. Nick Koston
0fa3d79c38 fixes 2025-09-03 22:58:35 -05:00
J. Nick Koston
27594869e2 fixes 2025-09-03 22:58:14 -05:00
J. Nick Koston
7587be3dfd Merge branch 'integration' into memory_api 2025-09-03 22:57:33 -05:00
J. Nick Koston
4cc17031a0 Merge branch 'esp8266_gpio_progmem' into integration 2025-09-03 22:57:23 -05:00
J. Nick Koston
ace79b1886 fixes 2025-09-03 22:57:15 -05:00
J. Nick Koston
28c2af69ea Merge branch 'integration' into memory_api 2025-09-03 22:56:34 -05:00
J. Nick Koston
5026406d90 Merge branch 'esp8266_gpio_progmem' into integration 2025-09-03 22:56:27 -05:00
J. Nick Koston
87f40cf24a cleanup 2025-09-03 22:56:15 -05:00
J. Nick Koston
897bb4d13f [esp8266] Store GPIO initialization arrays in PROGMEM to save RAM 2025-09-03 22:53:24 -05:00
J. Nick Koston
c57631394c Revert "[esp8266] Store component source strings in PROGMEM to save RAM"
This reverts commit ea01cc598b.
2025-09-03 22:17:41 -05:00
J. Nick Koston
aadbc41d6a Revert "preen"
This reverts commit da9a7c41d1.
2025-09-03 22:17:36 -05:00
J. Nick Koston
2d3243d631 Revert "[esp8266] Store component source strings in PROGMEM to save RAM"
This reverts commit ea01cc598b.
2025-09-03 22:16:59 -05:00
J. Nick Koston
105e94db2e Revert "preen"
This reverts commit da9a7c41d1.
2025-09-03 22:16:41 -05:00
J. Nick Koston
32fec42130 Merge branch 'integration' into memory_api 2025-09-03 22:06:30 -05:00
J. Nick Koston
b04f4e949d Merge branch 'esp8266_component_source_progmem' into integration 2025-09-03 22:06:22 -05:00
J. Nick Koston
da9a7c41d1 preen 2025-09-03 22:05:21 -05:00
J. Nick Koston
ea01cc598b [esp8266] Store component source strings in PROGMEM to save RAM 2025-09-03 21:56:47 -05:00
J. Nick Koston
4766abc461 Merge branch 'integration' into memory_api 2025-09-03 19:11:03 -05:00
J. Nick Koston
e453da6161 Merge remote-tracking branch 'origin/esp8266_prefs' into memory_api 2025-09-03 19:10:44 -05:00
J. Nick Koston
64902373e4 Merge remote-tracking branch 'origin/esp8266_prefs' into integration 2025-09-03 19:10:37 -05:00
J. Nick Koston
3b4ed0a51f preen 2025-09-03 19:04:21 -05:00
J. Nick Koston
2d2ca0de52 Merge branch 'integration' into memory_api 2025-09-03 18:41:23 -05:00
J. Nick Koston
6cee81589e Merge remote-tracking branch 'origin/esp8266_prefs' into integration 2025-09-03 18:41:13 -05:00
J. Nick Koston
63cd8a6a58 [esp8266] Reduce preference memory usage by 40% through field optimization 2025-09-03 18:40:28 -05:00
J. Nick Koston
9495a885ed Merge branch 'integration' into memory_api 2025-09-03 17:56:30 -05:00
J. Nick Koston
8f2903dee8 Merge branch 'esp32_gpio_memory' into integration 2025-09-03 17:56:23 -05:00
J. Nick Koston
7249716a3c [esp32] Reduce GPIO memory usage by 50% through bit-packing 2025-09-03 17:53:48 -05:00
J. Nick Koston
6c3dba06ba Merge branch 'integration' into memory_api 2025-09-03 16:37:56 -05:00
J. Nick Koston
0ffd011286 Merge branch 'reduce_scheduler_item_memory' into integration 2025-09-03 16:37:20 -05:00
J. Nick Koston
1298268937 Update esphome/core/scheduler.h
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-03 16:37:01 -05:00
J. Nick Koston
26e0151fee Update esphome/core/scheduler.h
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-03 16:36:49 -05:00
J. Nick Koston
4192930b0f Merge remote-tracking branch 'upstream/reduce_scheduler_item_memory' into reduce_scheduler_item_memory 2025-09-03 16:35:28 -05:00
J. Nick Koston
ca0029e002 explain why its safe 2025-09-03 16:35:00 -05:00
J. Nick Koston
9d7f606a39 explain why its safe 2025-09-03 16:34:47 -05:00
J. Nick Koston
191e9dedc5 Update esphome/core/scheduler.h 2025-09-03 16:30:37 -05:00
J. Nick Koston
93c453c8f9 Merge branch 'integration' into memory_api 2025-09-03 16:23:14 -05:00
J. Nick Koston
34472313f4 Merge branch 'reduce_scheduler_item_memory' into integration 2025-09-03 16:22:50 -05:00
J. Nick Koston
ce0271aab1 Merge branch 'scheduler_pool_v2' into integration 2025-09-03 16:21:50 -05:00
J. Nick Koston
d505f5ecaa [scheduler] Reduce SchedulerItem memory usage by 7.4% on 32-bit platforms 2025-09-03 16:13:07 -05:00
J. Nick Koston
00ea769787 Merge branch 'dev' into scheduler_pool_v2 2025-09-03 15:31:41 -05:00
J. Nick Koston
a9bd37bacd Merge branch 'integration' into memory_api 2025-09-02 23:32:49 -05:00
J. Nick Koston
3206afdc2a Merge branch 'scheduler_pool_v2' into integration 2025-09-02 23:32:37 -05:00
J. Nick Koston
af10a809de cleanup 2025-09-02 22:43:26 -05:00
J. Nick Koston
1a5402f35c preen 2025-09-02 22:27:40 -05:00
J. Nick Koston
9a6e678621 Merge remote-tracking branch 'upstream/dev' into scheduler_pool_v2 2025-09-02 21:31:24 -05:00
J. Nick Koston
4e54bd8c45 Merge remote-tracking branch 'upstream/dev' into scheduler_pool_v2 2025-09-02 21:31:12 -05:00
J. Nick Koston
5aa54bfff4 preen 2025-09-02 20:30:16 -05:00
J. Nick Koston
91eabc983e cleanup 2025-09-02 20:20:02 -05:00
J. Nick Koston
3066afef24 fix churn on last itme 2025-09-02 20:07:47 -05:00
J. Nick Koston
979a021a27 preen 2025-09-02 19:55:38 -05:00
J. Nick Koston
e90ae09354 preen 2025-09-02 19:54:01 -05:00
J. Nick Koston
c8a4a3b752 more churn 2025-09-02 19:52:44 -05:00
J. Nick Koston
41628d2193 improve debug logging 2025-09-02 19:47:15 -05:00
J. Nick Koston
be4c8956ad debug 2025-09-02 19:39:49 -05:00
J. Nick Koston
6e14050351 preen 2025-09-02 19:11:14 -05:00
J. Nick Koston
0c5b63c382 preen 2025-09-02 18:59:54 -05:00
J. Nick Koston
43634257f6 fix defer churn 2025-09-02 18:43:38 -05:00
J. Nick Koston
d061feafdd Merge branch 'scheduler_pool_v2' into integration 2025-09-02 16:14:01 -05:00
J. Nick Koston
f72f80ed7b cleanup 2025-09-02 16:13:51 -05:00
J. Nick Koston
e0e8a982d5 improve pool hit rate 2025-09-02 16:12:59 -05:00
J. Nick Koston
b009a0f967 improve pool hit rate 2025-09-02 16:10:28 -05:00
J. Nick Koston
c4efdf5766 preen 2025-09-02 11:14:43 -05:00
J. Nick Koston
05c71bda91 preen 2025-09-02 11:10:46 -05:00
J. Nick Koston
ef33f630c2 preen 2025-09-02 11:07:13 -05:00
J. Nick Koston
3115c6fdbf preen 2025-09-02 11:05:42 -05:00
J. Nick Koston
154023f017 preen 2025-09-02 11:04:42 -05:00
J. Nick Koston
50f5728c76 preen 2025-09-02 11:00:18 -05:00
J. Nick Koston
4400535775 some tests 2025-09-02 10:45:59 -05:00
J. Nick Koston
4c12150200 debug logging 2025-09-02 10:31:27 -05:00
J. Nick Koston
2080f881da Merge branch 'integration' into memory_api 2025-09-02 10:18:22 -05:00
J. Nick Koston
86a6edd612 Merge branch 'scheduler_pool_v2' into integration 2025-09-02 10:18:16 -05:00
J. Nick Koston
4eb744d05e Merge branch 'integration' into memory_api 2025-09-02 10:11:55 -05:00
J. Nick Koston
1da1144e5b Merge remote-tracking branch 'upstream/dev' into integration 2025-09-02 10:11:50 -05:00
J. Nick Koston
ce4d422da8 comments 2025-09-02 10:06:51 -05:00
J. Nick Koston
98b8f15576 pool scheduler items 2025-09-02 08:48:39 -05:00
J. Nick Koston
98c1b01fe7 pool scheduler items 2025-09-02 08:47:07 -05:00
J. Nick Koston
1855877abe Merge branch 'integration' into memory_api 2025-09-02 08:00:14 -05:00
J. Nick Koston
01187a9000 Merge branch 'state_class_to_string_no_alloc' into integration 2025-09-02 08:00:04 -05:00
J. Nick Koston
48070be829 [sensor] Change state_class_to_string() to return const char* to avoid allocations 2025-09-01 23:24:37 -05:00
J. Nick Koston
d738962d8d Merge branch 'integration' into memory_api 2025-09-01 23:14:34 -05:00
J. Nick Koston
3527ca75b6 Merge branch 'get_icon_avoid_string_alloc' into integration 2025-09-01 23:14:19 -05:00
J. Nick Koston
0affd158cb Merge branch 'get_device_class_avoid_string_alloc' into integration 2025-09-01 23:14:14 -05:00
J. Nick Koston
085647a1cd Merge branch 'get_uom_avoid_string_alloc' into integration 2025-09-01 23:14:06 -05:00
J. Nick Koston
4746eb65f7 [core] Use get_unit_of_measurement_ref() in entity logging to avoid string allocations 2025-09-01 23:11:47 -05:00
J. Nick Koston
4da18133f4 [core] Use get_device_class_ref() in entity platform logging to avoid string allocations 2025-09-01 23:07:33 -05:00
J. Nick Koston
ae46100af8 [core] Use get_icon_ref() in entity platform logging to avoid string allocations 2025-09-01 23:01:11 -05:00
J. Nick Koston
64a2b688a5 Merge branch 'integration' into memory_api 2025-09-01 22:34:38 -05:00
J. Nick Koston
e55b05ed32 Merge branch 'hash_avoid_temp_heap_std_string' into integration 2025-09-01 22:34:28 -05:00
J. Nick Koston
f75a50206f [core] Optimize fnv1_hash to avoid string allocations for static entities 2025-09-01 22:28:43 -05:00
J. Nick Koston
9ebdfde287 Merge branch 'integration' into memory_api 2025-08-29 22:11:17 -05:00
J. Nick Koston
fb234ee9bf Merge branch 'entity_count_order_fix' into integration 2025-08-29 22:11:09 -05:00
J. Nick Koston
8be40bf1ca Fix incorrect entity count when lambdas are present (priority ordering issue) 2025-08-29 18:21:41 -05:00
J. Nick Koston
bcea7e9fb1 Merge branch 'integration' into memory_api 2025-08-29 10:49:02 -05:00
J. Nick Koston
d8fbe2457e Merge remote-tracking branch 'upstream/proxy_configured_mode' into integration 2025-08-29 10:48:51 -05:00
J. Nick Koston
a6eaf59eff [bluetooth_proxy] Expose configured scanning mode in API responses 2025-08-29 08:59:09 -05:00
J. Nick Koston
c828941e16 Merge branch 'integration' into memory_api 2025-08-28 13:13:27 -05:00
J. Nick Koston
a8df3fa249 Merge branch 'fix_string_lifetime_fill_and_encode_entity_info' into integration 2025-08-28 13:13:18 -05:00
J. Nick Koston
4930027557 [api] Fix string lifetime issue in fill_and_encode_entity_info for dynamic object_id 2025-08-28 13:11:58 -05:00
J. Nick Koston
c90b4c0f81 Merge branch 'integration' into memory_api 2025-08-27 09:47:26 -05:00
J. Nick Koston
0df992ee44 Merge remote-tracking branch 'upstream/dev' into integration 2025-08-27 09:47:18 -05:00
J. Nick Koston
2f699b3c20 Merge branch 'integration' into memory_api 2025-08-27 09:47:03 -05:00
J. Nick Koston
170f99ee08 Merge branch 'ota_magic_validation' into integration 2025-08-27 09:46:58 -05:00
J. Nick Koston
001d05b8f2 Merge branch 'integration' into memory_api 2025-08-26 18:22:10 -05:00
J. Nick Koston
be7578ef9a Merge branch 'none_address_fix' into integration 2025-08-26 18:22:05 -05:00
J. Nick Koston
ed7054cdb7 Fix AttributeError when uploading OTA to offline OpenThread devices 2025-08-26 18:20:38 -05:00
J. Nick Koston
a61300b82f Merge branch 'integration' into memory_api 2025-08-26 17:22:56 -05:00
J. Nick Koston
830e8969a3 Merge branch 'partial_revert_wifi_race_fix' into integration 2025-08-26 17:22:50 -05:00
J. Nick Koston
6e681a5f3e [wifi] Fix reconnection failures after adapter restart by not clearing netif pointers 2025-08-26 17:20:55 -05:00
J. Nick Koston
9e0600ec45 Merge branch 'integration' into memory_api 2025-08-26 16:34:04 -05:00
J. Nick Koston
7a7a6825a2 Merge branch 'dev' into integration 2025-08-26 16:33:49 -05:00
J. Nick Koston
bef783451b [esphome] Fix OTA watchdog resets by validating all magic bytes before blocking 2025-08-23 19:03:18 -05:00
J. Nick Koston
b871456c1e Merge branch 'integration' into memory_api 2025-08-23 16:19:19 -05:00
J. Nick Koston
5c6f92a83e Merge branch 'on_scan_end' into integration 2025-08-23 16:19:11 -05:00
J. Nick Koston
f4deb0f70b [esp32_ble_tracker] Fix on_scan_end trigger compilation without USE_ESP32_BLE_DEVICE 2025-08-23 14:41:45 -05:00
J. Nick Koston
e44eb59e3c Merge branch 'integration' into memory_api 2025-08-22 08:52:52 -05:00
J. Nick Koston
6e9acfdebd Merge branch 'ble_retries_no_give_up_before_timeout' into integration 2025-08-22 08:52:45 -05:00
J. Nick Koston
29b25194ba [esp32_ble] Increase GATT connection retry count to use full timeout window 2025-08-22 08:48:27 -05:00
J. Nick Koston
a38b994f2b [esp32_ble] Increase GATT connection retry count to use full timeout window 2025-08-22 08:45:35 -05:00
J. Nick Koston
101d98014d Merge branch 'integration' into memory_api 2025-08-21 21:47:24 -05:00
J. Nick Koston
9fd9c1b9d3 Merge branch 'connection_params' into integration 2025-08-21 21:47:16 -05:00
J. Nick Koston
7d7dbefb60 tweak 2025-08-21 21:46:36 -05:00
J. Nick Koston
caf4fcce5f Merge branch 'dev' into connection_params 2025-08-21 21:45:18 -05:00
J. Nick Koston
65eb57ca1b tweak 2025-08-21 21:44:59 -05:00
J. Nick Koston
082f795adc Merge branch 'integration' into memory_api 2025-08-21 20:27:21 -05:00
J. Nick Koston
f83f05b704 Merge branch 'connection_params' into integration 2025-08-21 20:27:15 -05:00
J. Nick Koston
9d16eeeb77 tweak 2025-08-21 20:27:04 -05:00
J. Nick Koston
3ac5285515 Merge branch 'integration' into memory_api 2025-08-21 09:00:18 -05:00
J. Nick Koston
8f44ec0b51 Merge branch 'connection_params' into integration 2025-08-21 09:00:12 -05:00
J. Nick Koston
f12bcc621c dry, review 2025-08-21 09:00:01 -05:00
J. Nick Koston
2993940e1d Merge branch 'integration' into memory_api 2025-08-21 08:25:28 -05:00
J. Nick Koston
f4077fdd52 Merge branch 'connection_params' into integration 2025-08-21 08:25:23 -05:00
J. Nick Koston
1ba37ca7c9 preen 2025-08-21 08:25:13 -05:00
J. Nick Koston
db96cfaf14 Merge branch 'integration' into memory_api 2025-08-21 08:12:51 -05:00
J. Nick Koston
6054c3eac8 Merge branch 'connection_params' into integration 2025-08-21 08:12:43 -05:00
J. Nick Koston
2f101c0a20 [esp32_ble_client] Adjust connection parameters to improve device compatibility 2025-08-21 08:11:17 -05:00
J. Nick Koston
bad7b0598b Merge branch 'integration' into memory_api 2025-08-20 20:26:20 -05:00
J. Nick Koston
840a814f75 Merge remote-tracking branch 'origin/event_39' into integration 2025-08-20 20:26:14 -05:00
J. Nick Koston
4dd01ea9ac [esp32_ble_client] Add missing ESP_GATTC_UNREG_FOR_NOTIFY_EVT logging 2025-08-20 20:25:50 -05:00
J. Nick Koston
b4f0d4b0c3 Merge branch 'integration' into memory_api 2025-08-20 20:24:31 -05:00
J. Nick Koston
7577153baa Merge remote-tracking branch 'origin/event_39' into integration 2025-08-20 20:24:22 -05:00
J. Nick Koston
a6850786e2 [esp32_ble_client] Add missing ESP_GATTC_UNREG_FOR_NOTIFY_EVT logging 2025-08-20 20:23:37 -05:00
J. Nick Koston
df7c2473c1 Merge branch 'integration' into memory_api 2025-08-20 20:07:21 -05:00
J. Nick Koston
18ad9804d3 Merge branch 'open_error_fix' into integration 2025-08-20 20:07:13 -05:00
J. Nick Koston
8ee46435a3 cleanup 2025-08-20 20:04:13 -05:00
J. Nick Koston
dde1cec3ce Merge branch 'integration' into memory_api 2025-08-20 14:54:39 -05:00
J. Nick Koston
fbd3cb0965 Merge branch 'open_error_fix' into integration 2025-08-20 14:54:31 -05:00
J. Nick Koston
977ff9b481 [esp32_ble_client] Fix race condition causing "ESP_GATTC_OPEN_EVT in IDLE state" error spam 2025-08-20 14:53:42 -05:00
J. Nick Koston
3c6a54bb70 Merge branch 'integration' into memory_api 2025-08-20 13:26:15 -05:00
J. Nick Koston
ec7919e294 Merge branch 'pvvx_mithermometer_defer_write' into integration 2025-08-20 13:26:09 -05:00
J. Nick Koston
5253b77cfe Merge branch 'improve_entity_error_reporting_sanitized_name' into integration 2025-08-20 13:26:04 -05:00
J. Nick Koston
77aba57078 Merge branch 'prefs_device_id' into integration 2025-08-20 13:26:00 -05:00
J. Nick Koston
6c01e7196c preen 2025-08-20 13:09:15 -05:00
J. Nick Koston
2c44198cb5 preen 2025-08-20 13:06:18 -05:00
J. Nick Koston
757ad2ff96 [core] Fix preference storage to account for device_id 2025-08-20 13:02:14 -05:00
J. Nick Koston
86c3812174 preen 2025-08-20 12:15:54 -05:00
J. Nick Koston
d182ce8bf6 preen 2025-08-20 12:12:39 -05:00
J. Nick Koston
ea5da950c0 [core] Improve error reporting for entity name conflicts with non-ASCII characters 2025-08-20 12:09:26 -05:00
J. Nick Koston
c88f2eb4d1 reduce 2025-08-20 11:38:07 -05:00
J. Nick Koston
998a9264a1 fix race 2025-08-20 10:05:46 -05:00
J. Nick Koston
6fd46966e2 Merge branch 'integration' into memory_api 2025-08-20 08:07:50 -05:00
J. Nick Koston
916c661544 Merge branch 'duplicate_stop_path' into integration 2025-08-20 08:07:45 -05:00
J. Nick Koston
4d4ab5b804 preen 2025-08-20 08:07:16 -05:00
J. Nick Koston
558cdda8a4 Merge branch 'integration' into memory_api 2025-08-20 08:06:47 -05:00
J. Nick Koston
3e1be2b987 Merge branch 'duplicate_stop_path' into integration 2025-08-20 08:06:39 -05:00
J. Nick Koston
d555766306 fix 2025-08-20 08:06:27 -05:00
J. Nick Koston
856ffc2e86 Merge branch 'integration' into memory_api 2025-08-20 07:46:07 -05:00
J. Nick Koston
5a740fb390 Merge branch 'remove_searching' into integration 2025-08-20 07:46:01 -05:00
J. Nick Koston
cdf85b419b Merge branch 'duplicate_stop_path' into integration 2025-08-20 07:45:56 -05:00
J. Nick Koston
d03eec5a58 [esp32_ble_tracker] Remove duplicate client promotion logic 2025-08-20 07:44:35 -05:00
J. Nick Koston
9f4e31b07c preen 2025-08-20 07:01:13 -05:00
J. Nick Koston
df0ed57667 preen 2025-08-20 06:58:43 -05:00
J. Nick Koston
963b0333ba preen 2025-08-20 06:58:27 -05:00
J. Nick Koston
fbc9b751c5 preen 2025-08-20 06:58:20 -05:00
J. Nick Koston
d8c85bfc44 [bluetooth_proxy] Remove unused ClientState::SEARCHING state 2025-08-20 06:44:25 -05:00
J. Nick Koston
518443606c Merge branch 'integration' into memory_api 2025-08-19 21:53:35 -05:00
J. Nick Koston
c5b794e41c merge 2025-08-19 21:53:28 -05:00
J. Nick Koston
72dd419c49 Merge branch 'integration' into memory_api 2025-08-19 21:52:31 -05:00
J. Nick Koston
951842e30f Merge remote-tracking branch 'upstream/dev' into integration 2025-08-19 21:52:22 -05:00
J. Nick Koston
997223c93e Merge branch 'integration' into memory_api 2025-08-19 21:43:20 -05:00
J. Nick Koston
f0da3d6c09 Merge branch 'dev' into integration 2025-08-19 21:43:09 -05:00
J. Nick Koston
d1b9902e41 Merge branch 'integration' into memory_api 2025-08-19 15:38:10 -05:00
J. Nick Koston
9554c82c0b Merge branch 'optimize_safemode_flash' into integration 2025-08-19 15:38:04 -05:00
J. Nick Koston
c5998690ba Merge branch 'integration' into memory_api 2025-08-19 09:48:25 -05:00
J. Nick Koston
084d8828a6 Merge branch 'slot_freed_too_early' into integration 2025-08-19 09:48:20 -05:00
J. Nick Koston
0c86241aed [bluetooth_proxy] Fix connection slot race by deferring slot release until GATT close 2025-08-19 09:40:21 -05:00
J. Nick Koston
db10185c7e Merge branch 'integration' into memory_api 2025-08-18 21:07:11 -05:00
J. Nick Koston
9a7ffa4bbc Merge branch 'log_sensor' into integration 2025-08-18 21:07:04 -05:00
J. Nick Koston
9ec6b3144a Merge remote-tracking branch 'origin/log_sensor' into log_sensor 2025-08-18 21:06:34 -05:00
J. Nick Koston
70eb45b5d3 lint 2025-08-18 21:06:24 -05:00
J. Nick Koston
7f34757ded Merge branch 'integration' into memory_api 2025-08-18 20:03:00 -05:00
J. Nick Koston
0c0e8491d2 Merge branch 'webserver_reduce_defer_calls' into integration 2025-08-18 20:02:53 -05:00
J. Nick Koston
1786934242 [web_server] Reduce flash usage by consolidating defer calls in switch and lock handlers 2025-08-18 20:01:42 -05:00
J. Nick Koston
8fd430e423 Update esphome/components/sensor/sensor.h 2025-08-18 19:17:26 -05:00
J. Nick Koston
8dc3958b0c Update esphome/components/sensor/sensor.h 2025-08-18 19:17:19 -05:00
J. Nick Koston
bbd5ab1340 Merge branch 'integration' into memory_api 2025-08-18 18:33:43 -05:00
J. Nick Koston
63cd279cd4 Merge branch 'log_number' into integration 2025-08-18 18:33:26 -05:00
J. Nick Koston
6f6b38762a Merge branch 'log_button' into integration 2025-08-18 18:33:23 -05:00
J. Nick Koston
2dc57d6236 Merge branch 'log_binary_sensor' into integration 2025-08-18 18:33:20 -05:00
J. Nick Koston
deadb8d9be Merge branch 'log_sensor' into integration 2025-08-18 18:33:15 -05:00
J. Nick Koston
59c93cf3f1 preen 2025-08-18 18:32:50 -05:00
J. Nick Koston
9d25dd5dd2 [button] Convert LOG_BUTTON macro to function to reduce flash usage 2025-08-18 18:29:13 -05:00
J. Nick Koston
a21ee3c483 [binary_sensor] Convert LOG_BINARY_SENSOR macro to function to reduce flash usage 2025-08-18 18:19:53 -05:00
J. Nick Koston
8971e2e9a4 [number] Convert LOG_NUMBER macro to function to reduce flash usage 2025-08-18 18:14:55 -05:00
J. Nick Koston
e7fadef15c [sensor] Convert LOG_SENSOR macro to function to reduce flash usage 2025-08-18 18:00:46 -05:00
J. Nick Koston
67ae6ce00a tweak 2025-08-18 17:36:20 -05:00
J. Nick Koston
24cee8ae03 tweak 2025-08-18 17:35:21 -05:00
J. Nick Koston
58a9944601 tweak 2025-08-18 17:34:08 -05:00
J. Nick Koston
a999540d4b Merge branch 'integration' into memory_api 2025-08-18 17:13:49 -05:00
J. Nick Koston
aa608f3a92 Merge remote-tracking branch 'upstream/dev' into integration 2025-08-18 17:13:42 -05:00
J. Nick Koston
727e04c424 Merge branch 'integration' into memory_api 2025-08-18 14:37:37 -05:00
J. Nick Koston
0ea3018bd1 Merge branch 'mdns_cleanups' into integration 2025-08-18 14:37:30 -05:00
J. Nick Koston
fd6002e334 [mdns] Reduce flash usage and prevent RAM over-allocation in service compilation 2025-08-18 14:36:41 -05:00
J. Nick Koston
6248c3d729 preen 2025-08-18 12:47:22 -05:00
J. Nick Koston
3d03053eb5 Merge branch 'optimize_safemode_flash' into memory_api 2025-08-18 12:42:22 -05:00
J. Nick Koston
571e6be404 [safe_mode] Reduce flash usage by 172 bytes through code optimization 2025-08-18 12:41:35 -05:00
J. Nick Koston
7d3a87c603 [safe_mode] Reduce flash usage by 172 bytes through code optimization 2025-08-18 12:40:24 -05:00
J. Nick Koston
be2a680e8f [safe_mode] Reduce flash usage by 172 bytes through code optimization 2025-08-18 12:39:33 -05:00
J. Nick Koston
a36942b760 [safe_mode] Reduce flash usage by 172 bytes through code optimization 2025-08-18 12:37:44 -05:00
J. Nick Koston
8332893661 Merge branch 'integration' into memory_api 2025-08-18 11:06:58 -05:00
J. Nick Koston
ed3884e5aa Merge branch 'bluetooth_connection_final' into integration 2025-08-18 11:06:53 -05:00
J. Nick Koston
fb3a01e84e might as well do both 2025-08-18 11:05:09 -05:00
J. Nick Koston
54696eac67 Merge branch 'integration' into memory_api 2025-08-18 09:02:43 -05:00
J. Nick Koston
60e27e3ed7 Merge branch 'more_zero_copy_api_followup' into integration 2025-08-18 09:02:36 -05:00
J. Nick Koston
dbda2d5b6a Merge branch 'integration' into memory_api 2025-08-18 08:29:23 -05:00
J. Nick Koston
23fa231ca2 Merge branch 'decode_cleanup' into integration 2025-08-18 08:29:17 -05:00
J. Nick Koston
a9227148f5 review comments 2025-08-18 08:28:58 -05:00
J. Nick Koston
7e67f0432d Merge branch 'integration' into memory_api 2025-08-18 01:07:43 -05:00
J. Nick Koston
b249cc25d9 Merge branch 'bluetooth_connection_final' into integration 2025-08-18 01:07:35 -05:00
J. Nick Koston
5678621cd5 [bluetooth_proxy] Mark BluetoothConnection as final for compiler optimizations 2025-08-18 01:06:47 -05:00
J. Nick Koston
c9932342eb Merge branch 'integration' into memory_api 2025-08-18 01:01:20 -05:00
J. Nick Koston
e68a44bcba Merge branch 'api_connection_final' into integration 2025-08-18 01:01:12 -05:00
J. Nick Koston
af87e27382 [api] Mark APIConnection as final for compiler optimizations 2025-08-18 01:00:12 -05:00
J. Nick Koston
f556ab1515 Merge branch 'frame_helper_opt' into memory_api 2025-08-18 00:57:04 -05:00
J. Nick Koston
76b6d77337 Merge branch 'frame_helper_opt' into integration 2025-08-18 00:56:57 -05:00
J. Nick Koston
134526e0ec [api] Optimize APIFrameHelper virtual methods and mark implementations as final 2025-08-18 00:56:19 -05:00
J. Nick Koston
cb157822d0 Merge branch 'decode_cleanup' into memory_api 2025-08-17 22:22:50 -05:00
J. Nick Koston
d7b28752e0 Merge branch 'decode_cleanup' into integration 2025-08-17 22:22:41 -05:00
J. Nick Koston
a2ad2dd10e [api] Optimize protobuf decode loop for better performance and maintainability 2025-08-17 22:21:51 -05:00
J. Nick Koston
4ee84b6d53 Merge remote-tracking branch 'origin/libretiny_no_vector' into memory_api 2025-08-17 21:40:59 -05:00
J. Nick Koston
0a483012ae Update esphome/components/libretiny/preferences.cpp 2025-08-17 21:40:45 -05:00
J. Nick Koston
b12666f356 Merge branch 'integration' into memory_api 2025-08-17 21:38:18 -05:00
J. Nick Koston
a82eeabbc8 Merge branch 'libretiny_no_vector' into memory_api 2025-08-17 21:37:42 -05:00
J. Nick Koston
6b9fc783b6 Merge remote-tracking branch 'upstream/libretiny_no_vector' into integration 2025-08-17 21:37:32 -05:00
J. Nick Koston
2b23899750 Merge branch 'integration' into memory_api 2025-08-17 21:15:01 -05:00
J. Nick Koston
afc2ba066e Merge remote-tracking branch 'origin/atomic_remove' into integration 2025-08-17 21:14:54 -05:00
J. Nick Koston
b0e8aba426 Merge branch 'integration' into memory_api 2025-08-17 21:13:44 -05:00
J. Nick Koston
898b7b079e Merge branch 'final_proto' into integration 2025-08-17 21:13:34 -05:00
J. Nick Koston
37e36a3d1d [api] Mark protobuf message classes as final to enable compiler optimizations 2025-08-17 21:12:38 -05:00
J. Nick Koston
89732f30f4 [libretiny] Optimize preferences is_changed() by replacing temporary vector with unique_ptr 2025-08-17 18:46:53 -04:00
J. Nick Koston
c56fd00a7c cleanup 2025-08-17 16:28:32 -04:00
J. Nick Koston
e06dbffe9f fix 2025-08-17 16:12:53 -04:00
J. Nick Koston
5b674dc28c atomic remove 2025-08-17 16:09:57 -04:00
J. Nick Koston
17467150d8 Merge branch 'integration' into memory_api 2025-08-17 08:43:10 -04:00
J. Nick Koston
cb1d4830d8 Merge remote-tracking branch 'upstream/dev' into integration 2025-08-17 08:42:46 -04:00
J. Nick Koston
1666aae105 Merge branch 'integration' into memory_api 2025-08-16 09:45:27 -04:00
J. Nick Koston
05a0380a9f Merge branch 'object_id_alloc' into integration 2025-08-16 09:45:17 -04:00
J. Nick Koston
0b004a7d9b tweak 2025-08-16 09:38:00 -04:00
J. Nick Koston
15fca7dea8 Avoid object_id string allocations for all entity info API messages 2025-08-16 09:35:12 -04:00
J. Nick Koston
29daef230d [api] Add zero-copy StringRef methods for compilation_time and effect_name 2025-08-15 23:51:24 -04:00
J. Nick Koston
82d7255a16 Merge branch 'integration' into memory_api 2025-08-15 21:36:21 -04:00
J. Nick Koston
c05db304ef Merge branch 'teardown_fix_size' into integration 2025-08-15 21:30:37 -04:00
J. Nick Koston
59037458d6 Update esphome/core/application.cpp
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-15 21:27:31 -04:00
J. Nick Koston
769a874d33 Merge branch 'integration' into memory_api 2025-08-15 21:16:44 -04:00
J. Nick Koston
50d284f21f Merge branch 'teardown_fix_size' into integration 2025-08-15 21:16:22 -04:00
J. Nick Koston
0a66612399 teardown 2025-08-15 15:40:19 -05:00
J. Nick Koston
405ebe90f5 teardown 2025-08-15 15:39:33 -05:00
J. Nick Koston
15d1e1f8dd Merge branch 'integration' into memory_api 2025-08-15 15:05:19 -05:00
J. Nick Koston
fdf3db465c Merge branch 'useless_fd_setsize_check' into integration 2025-08-15 15:05:13 -05:00
J. Nick Koston
2b887033c5 [core] Remove unnecessary FD_SETSIZE check on ESP32 and improve logging 2025-08-15 14:49:22 -05:00
J. Nick Koston
e4a6dcd9c7 Merge branch 'integration' into memory_api 2025-08-15 12:33:32 -05:00
J. Nick Koston
ffc234f934 Merge remote-tracking branch 'upstream/dev' into integration 2025-08-15 12:33:27 -05:00
J. Nick Koston
9f8f1f5bc9 Merge branch 'integration' into memory_api 2025-08-15 09:54:57 -05:00
J. Nick Koston
b43ab33662 Merge branch 'esp32_ble_no_vector_no_heap_small' into integration 2025-08-15 09:54:47 -05:00
J. Nick Koston
d78d2c8710 Apply suggestions from code review 2025-08-15 09:53:07 -05:00
J. Nick Koston
3aae84fade preen 2025-08-15 08:54:17 -05:00
J. Nick Koston
7005da42bb preen 2025-08-15 08:52:21 -05:00
J. Nick Koston
0c06b02af4 Merge remote-tracking branch 'upstream/dev' into esp32_ble_no_vector_no_heap_small 2025-08-15 08:43:53 -05:00
J. Nick Koston
57b4c65c6c Merge branch 'integration' into memory_api 2025-08-15 00:59:09 -05:00
J. Nick Koston
d632fc930c Merge branch 'esp32_ble_no_vector_no_heap_small' into integration 2025-08-15 00:59:00 -05:00
J. Nick Koston
0d966ac115 preen 2025-08-15 00:58:52 -05:00
J. Nick Koston
c2abb2c8ba [esp32_ble] Use union space for inline GATTC/GATTS data storage to reduce heap allocations 2025-08-15 00:49:25 -05:00
J. Nick Koston
ce328bc9b9 Merge branch 'integration' into memory_api 2025-08-14 23:49:39 -05:00
J. Nick Koston
0757a18fe7 Merge remote-tracking branch 'upstream/esp32_prefs_vector' into integration 2025-08-14 23:49:33 -05:00
J. Nick Koston
04b0a82963 Update esphome/components/esp32/preferences.cpp
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-14 23:49:05 -05:00
J. Nick Koston
306f7263b2 Merge branch 'integration' into memory_api 2025-08-14 23:39:56 -05:00
J. Nick Koston
2cb9f65830 Merge branch 'esp32_ble_no_vector' into integration 2025-08-14 23:39:47 -05:00
J. Nick Koston
c32584d48e preen 2025-08-14 23:39:29 -05:00
J. Nick Koston
ce6d71e942 Update esphome/components/esp32_ble/ble_event.h 2025-08-14 23:38:54 -05:00
J. Nick Koston
14895adf47 Update esphome/components/esp32_ble/ble_event.h
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-14 23:38:25 -05:00
J. Nick Koston
d2faac10a5 Merge branch 'integration' into memory_api 2025-08-14 23:01:08 -05:00
J. Nick Koston
8e485b521a Merge branch 'esp32_prefs_vector' into integration 2025-08-14 23:00:59 -05:00
J. Nick Koston
da5020354f preen 2025-08-14 22:59:37 -05:00
J. Nick Koston
7b46be523a Merge branch 'integration' into memory_api 2025-08-14 22:42:39 -05:00
J. Nick Koston
b695b6b31e Merge branch 'esp32_prefs_vector' into integration 2025-08-14 22:42:34 -05:00
J. Nick Koston
9f4d0d3f23 preen 2025-08-14 22:42:19 -05:00
J. Nick Koston
3585ed185f Merge branch 'integration' into memory_api 2025-08-14 22:22:14 -05:00
J. Nick Koston
a7c60e76df Merge branch 'esp32_ble_no_vector' into integration 2025-08-14 22:22:04 -05:00
J. Nick Koston
0ee3155123 fix 2025-08-14 22:20:08 -05:00
J. Nick Koston
1bd458c868 Merge branch 'integration' into memory_api 2025-08-14 22:14:23 -05:00
J. Nick Koston
792f9392a1 Merge branch 'esp32_ble_no_vector' into integration 2025-08-14 22:14:18 -05:00
J. Nick Koston
1fa33253f8 wip 2025-08-14 22:04:10 -05:00
J. Nick Koston
269786cac9 preen 2025-08-14 21:59:46 -05:00
J. Nick Koston
9f22de449a Merge branch 'integration' into memory_api 2025-08-14 21:20:40 -05:00
J. Nick Koston
3aa6901861 Merge branch 'esp32_prefs_vector' into integration 2025-08-14 21:20:33 -05:00
J. Nick Koston
e9e94bcd45 [esp32] Optimize preferences is_changed() by replacing temporary vector with unique_ptr 2025-08-14 21:19:36 -05:00
J. Nick Koston
bf4070ad75 Merge branch 'integration' into memory_api 2025-08-14 21:04:59 -05:00
J. Nick Koston
c562ef6b79 Merge branch 'esp8266_prefs_no_vector' into integration 2025-08-14 21:04:53 -05:00
J. Nick Koston
df73d81aca [esp8266] Replace std::vector with std::unique_ptr in preferences to save flash 2025-08-14 21:03:51 -05:00
J. Nick Koston
00ae0fea31 Merge branch 'integration' into memory_api 2025-08-14 20:29:21 -05:00
J. Nick Koston
8cadb011a9 Merge remote-tracking branch 'upstream/dev' into integration 2025-08-14 20:28:41 -05:00
J. Nick Koston
0d288ceef3 Merge branch 'integration' into memory_api 2025-08-14 17:46:43 -05:00
J. Nick Koston
0413914eda Merge branch 'esp32_ble_client_strings_2' into integration 2025-08-14 17:46:34 -05:00
J. Nick Koston
8a9d30c8d3 [esp32_ble_client] Add log helper functions to reduce flash usage by 120 bytes 2025-08-14 17:44:15 -05:00
J. Nick Koston
40d35f3dff Merge branch 'integration' into memory_api 2025-08-14 16:32:51 -05:00
J. Nick Koston
bf3436f3b3 Merge branch 'no_eap_when_not_configured' into integration 2025-08-14 16:32:40 -05:00
J. Nick Koston
b7e0627b21 [wifi] Automatically disable Enterprise WiFi support when EAP is not configured 2025-08-14 16:29:53 -05:00
J. Nick Koston
4d0049aa62 Merge branch 'integration' into memory_api 2025-08-14 16:04:37 -05:00
J. Nick Koston
9a0d663fb0 Merge branch 'clean_comp_removed' into integration 2025-08-14 16:04:30 -05:00
J. Nick Koston
9af016e2ce preen 2025-08-14 16:03:44 -05:00
J. Nick Koston
256f81f514 Merge branch 'clean_comp_removed' into memory_api 2025-08-14 15:59:52 -05:00
J. Nick Koston
a5a0ec907d Merge branch 'clean_comp_removed' into integration 2025-08-14 15:59:46 -05:00
J. Nick Koston
da73cb06cc cover other case 2025-08-14 15:59:36 -05:00
J. Nick Koston
c0c1b4738a Merge branch 'integration' into memory_api 2025-08-14 14:21:14 -05:00
J. Nick Koston
6a9dcc7d76 merge 2025-08-14 14:20:55 -05:00
J. Nick Koston
93c90124ee Merge branch 'integration' into memory_api 2025-08-14 10:07:27 -05:00
J. Nick Koston
82de6516c6 Merge branch 'clean_comp_removed' into integration 2025-08-14 10:07:19 -05:00
J. Nick Koston
7e7bfb00aa fix typing 2025-08-14 10:06:48 -05:00
J. Nick Koston
d42d9fa41e Update esphome/writer.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-14 10:05:11 -05:00
J. Nick Koston
6dd818a320 Merge branch 'integration' into memory_api 2025-08-14 09:41:12 -05:00
J. Nick Koston
7637b77394 Merge branch 'clean_comp_removed' into integration 2025-08-14 09:41:04 -05:00
J. Nick Koston
ef07d3e0c8 [core] Trigger clean build when components are removed from configuration 2025-08-14 09:34:41 -05:00
J. Nick Koston
6e9fb8201b Merge branch 'integration' into memory_api 2025-08-13 23:10:18 -05:00
J. Nick Koston
912f676133 Merge branch 'api_reduce_2' into integration 2025-08-13 23:10:10 -05:00
J. Nick Koston
9bcd6c7a85 fix 2025-08-13 23:07:22 -05:00
J. Nick Koston
09fa349349 Revert "Revert "preen""
This reverts commit d83ed9ebe1.
2025-08-13 23:06:23 -05:00
J. Nick Koston
58074e0357 Revert "preen"
This reverts commit 51bf2c3511.
2025-08-13 23:05:12 -05:00
J. Nick Koston
d83ed9ebe1 Revert "preen"
This reverts commit 0207444765.
2025-08-13 23:04:38 -05:00
J. Nick Koston
6fc0831762 Merge branch 'integration' into memory_api 2025-08-13 23:01:43 -05:00
J. Nick Koston
dfa2aa481d Merge branch 'api_reduce_2' into integration 2025-08-13 23:01:30 -05:00
J. Nick Koston
0207444765 preen 2025-08-13 22:58:04 -05:00
J. Nick Koston
51bf2c3511 preen 2025-08-13 22:55:06 -05:00
J. Nick Koston
97c405b57e preen 2025-08-13 22:53:33 -05:00
J. Nick Koston
deff1c4bc7 preen 2025-08-13 22:53:12 -05:00
J. Nick Koston
d37390412c preen 2025-08-13 22:52:51 -05:00
J. Nick Koston
62a2b5e736 Merge branch 'integration' into memory_api 2025-08-13 22:46:00 -05:00
J. Nick Koston
6c0d21f116 Merge branch 'api_reduce_2' into integration 2025-08-13 22:45:49 -05:00
J. Nick Koston
f0decc4716 tweak 2025-08-13 22:42:08 -05:00
J. Nick Koston
3346e09785 preen 2025-08-13 22:23:47 -05:00
J. Nick Koston
b43ca2bbab [api] Optimize message buffer allocation and eliminate redundant methods 2025-08-13 22:10:15 -05:00
J. Nick Koston
3bf8624b87 Merge remote-tracking branch 'upstream/dev' into memory_api 2025-08-13 21:43:55 -05:00
J. Nick Koston
0c92dc77ad Merge branch 'integration' into memory_api 2025-08-13 11:24:22 -05:00
J. Nick Koston
203da37390 Merge remote-tracking branch 'upstream/dev' into integration 2025-08-13 11:24:14 -05:00
J. Nick Koston
bb6ce91c9d Merge branch 'integration' into memory_api 2025-08-12 21:03:55 -05:00
J. Nick Koston
b3e6a0e417 Merge branch 'proxy_uuids_services' into integration 2025-08-12 21:03:43 -05:00
J. Nick Koston
4acc7f77cc one more 2025-08-12 20:22:24 -05:00
J. Nick Koston
9238916b32 one more 2025-08-12 20:22:10 -05:00
J. Nick Koston
ed9e717703 Merge branch 'integration' into memory_api 2025-08-12 19:33:42 -05:00
J. Nick Koston
ae4f051cd4 Merge branch 'proxy_uuids_services' into integration 2025-08-12 19:33:36 -05:00
J. Nick Koston
dec9810177 fix 2025-08-12 19:26:41 -05:00
J. Nick Koston
235050fe58 fix 2025-08-12 19:25:20 -05:00
J. Nick Koston
b5c381982c fix 2025-08-12 19:23:44 -05:00
J. Nick Koston
5c12f638bd fix 2025-08-12 19:22:27 -05:00
J. Nick Koston
36613507be fix 2025-08-12 19:19:21 -05:00
J. Nick Koston
803d665a94 tweak 2025-08-12 19:16:02 -05:00
J. Nick Koston
5b279f5f92 tweak 2025-08-12 19:14:37 -05:00
J. Nick Koston
841deff578 [bluetooth_proxy] Optimize UUID conversion and reduce flash usage by 296 bytes 2025-08-12 18:57:17 -05:00
J. Nick Koston
c2ebfe8f27 [bluetooth_proxy] Optimize UUID conversion and reduce flash usage by 296 bytes 2025-08-12 18:56:20 -05:00
J. Nick Koston
7b116be48b [bluetooth_proxy] Optimize UUID conversion and reduce flash usage by 296 bytes 2025-08-12 18:54:23 -05:00
J. Nick Koston
1c409e1b51 Merge branch 'integration' into memory_api 2025-08-12 15:34:36 -05:00
J. Nick Koston
ffdf80533e Merge branch 'redudant_checks_bluetooth_proxy' into integration 2025-08-12 15:34:29 -05:00
J. Nick Koston
b85185f821 [bluetooth_proxy] Remove redundant connection type check after V1 removal 2025-08-12 15:12:58 -05:00
J. Nick Koston
daa7633ebb Merge branch 'integration' into memory_api 2025-08-11 17:22:09 -05:00
J. Nick Koston
a62d846dd1 Merge remote-tracking branch 'upstream/dev' into integration 2025-08-11 17:22:00 -05:00
J. Nick Koston
0813362ea8 Merge branch 'integration' into memory_api 2025-08-11 14:53:48 -05:00
J. Nick Koston
53da4391a0 Merge branch 'api_writev' into integration 2025-08-11 14:53:36 -05:00
J. Nick Koston
04415211e6 [api] Optimize single vector writes to use write() instead of writev() 2025-08-11 14:52:41 -05:00
J. Nick Koston
4b62f48e12 Merge branch 'integration' into memory_api 2025-08-11 14:37:19 -05:00
J. Nick Koston
d46843f6f1 Merge branch 'small_proto_cleanups' into integration 2025-08-11 14:37:11 -05:00
J. Nick Koston
1bd4098cea [api] Add constexpr optimizations to protobuf encoding 2025-08-11 14:36:31 -05:00
J. Nick Koston
11dd8ccd1e Merge branch 'integration' into memory_api 2025-08-11 13:29:31 -05:00
J. Nick Koston
8e0915a3a5 Merge branch 'improve_entity_validation_message' into integration 2025-08-11 13:29:15 -05:00
J. Nick Koston
d04422e27d add missing file 2025-08-11 11:36:15 -05:00
J. Nick Koston
753ee1badc [core] Improve entity duplicate validation error messages 2025-08-11 11:32:23 -05:00
J. Nick Koston
073957a310 Merge branch 'integration' into memory_api 2025-08-11 00:44:05 -05:00
J. Nick Koston
075d533b93 Merge branch 'fixed_ble_adv' into integration 2025-08-11 00:43:57 -05:00
J. Nick Koston
a847aab65e preen 2025-08-11 00:42:58 -05:00
J. Nick Koston
3d821f1223 preen 2025-08-11 00:42:42 -05:00
J. Nick Koston
9d29031d81 Merge remote-tracking branch 'origin/fixed_ble_adv' into fixed_ble_adv 2025-08-11 00:40:51 -05:00
J. Nick Koston
dc0c4a8991 Merge remote-tracking branch 'origin/dev' into fixed_ble_adv 2025-08-11 00:40:41 -05:00
J. Nick Koston
af9c008ccb fix off by 1 2025-08-11 00:40:28 -05:00
J. Nick Koston
c437d0057c Merge branch 'dev' into fixed_ble_adv 2025-08-11 00:12:22 -05:00
J. Nick Koston
cfe2bfea92 Merge branch 'integration' into memory_api 2025-08-11 00:09:51 -05:00
J. Nick Koston
7d3cc0b811 Merge branch 'fixed_ble_adv' into integration 2025-08-11 00:09:45 -05:00
J. Nick Koston
07db443207 fixed ble adv 2025-08-10 23:31:40 -05:00
J. Nick Koston
35a51280d4 fixed ble adv 2025-08-10 23:29:46 -05:00
J. Nick Koston
336fea4251 Merge branch 'integration' into memory_api 2025-08-10 19:29:03 -05:00
J. Nick Koston
2fc44ac831 Merge branch 'ota_fixes' into integration 2025-08-10 19:28:57 -05:00
J. Nick Koston
8f8d6734db dry 2025-08-10 19:26:12 -05:00
J. Nick Koston
6f817fd06a Merge branch 'integration' into memory_api 2025-08-10 19:09:54 -05:00
J. Nick Koston
96cc7f4b99 Merge remote-tracking branch 'origin/ota_fixes' into integration 2025-08-10 19:09:44 -05:00
J. Nick Koston
9021de9c1c preen 2025-08-10 19:04:24 -05:00
J. Nick Koston
7c0856c460 Merge branch 'integration' into memory_api 2025-08-10 18:54:14 -05:00
J. Nick Koston
7148500fa2 Merge branch 'ota_fixes' into integration 2025-08-10 18:54:07 -05:00
J. Nick Koston
d337da3d3c cleanp 2025-08-10 18:53:48 -05:00
J. Nick Koston
3cc916b9d8 Merge branch 'integration' into memory_api 2025-08-10 18:47:30 -05:00
J. Nick Koston
5c9816e51b Merge branch 'ota_fixes' into integration 2025-08-10 18:47:24 -05:00
J. Nick Koston
9ce75d2f0f preen 2025-08-10 18:45:44 -05:00
J. Nick Koston
bcd4386fe4 Merge branch 'integration' into memory_api 2025-08-10 18:36:04 -05:00
J. Nick Koston
d5e831b93a Merge branch 'ota_fixes' into integration 2025-08-10 18:35:41 -05:00
J. Nick Koston
2f9d1e6dac preen 2025-08-10 18:33:30 -05:00
J. Nick Koston
ef676a5a77 preen 2025-08-10 18:30:28 -05:00
J. Nick Koston
4faa9231a9 preen 2025-08-10 18:29:00 -05:00
J. Nick Koston
4bdf44bb78 preen 2025-08-10 18:28:27 -05:00
J. Nick Koston
856e13986a preen 2025-08-10 18:25:51 -05:00
J. Nick Koston
4a8369ef93 preen 2025-08-10 18:24:41 -05:00
J. Nick Koston
f5790bff73 adjust 2025-08-10 18:19:52 -05:00
J. Nick Koston
adf941f68e Merge remote-tracking branch 'upstream/dev' into ota_fixes 2025-08-10 18:04:22 -05:00
J. Nick Koston
e48a223eac preen 2025-08-10 18:04:08 -05:00
J. Nick Koston
cd5f7fdc98 preen 2025-08-10 18:03:56 -05:00
J. Nick Koston
8ca671ad6f Merge branch 'integration' into memory_api 2025-08-10 17:53:46 -05:00
J. Nick Koston
e535c62b47 Merge branch 'ota_fixes' into integration 2025-08-10 17:53:40 -05:00
J. Nick Koston
2bdf335127 uint32_t 2025-08-10 17:53:24 -05:00
J. Nick Koston
f0c97c299f uint32_t 2025-08-10 17:53:02 -05:00
J. Nick Koston
17cdf9c8d6 do not block until we get first magic byte 2025-08-10 17:48:47 -05:00
J. Nick Koston
3edb1e0726 Merge branch 'integration' into memory_api 2025-08-10 12:41:54 -05:00
J. Nick Koston
089721606b Merge branch 'ota_fixes' into integration 2025-08-10 12:41:38 -05:00
J. Nick Koston
0c230fcd10 increase to 30s 2025-08-10 12:39:44 -05:00
J. Nick Koston
7ff8094be2 Merge branch 'integration' into memory_api 2025-08-10 11:12:57 -05:00
J. Nick Koston
88642ec717 Merge remote-tracking branch 'swoboda1337/idf_logger' into integration 2025-08-10 11:12:46 -05:00
Jonathan Swoboda
d052dec11b Use CONF_LOG_LEVEL from const 2025-08-10 09:11:17 -04:00
Jonathan Swoboda
6d0e86cf25 Add log_level option to idf framework 2025-08-10 09:00:03 -04:00
J. Nick Koston
5394ee37f9 Merge branch 'integration' into memory_api 2025-08-09 21:02:17 -05:00
J. Nick Koston
8a87336aa8 Merge branch 'webserver_flash' into integration 2025-08-09 21:02:12 -05:00
J. Nick Koston
e64ecca771 tidy 2025-08-09 21:02:02 -05:00
J. Nick Koston
6aedcab37e Merge branch 'integration' into memory_api 2025-08-09 20:52:47 -05:00
J. Nick Koston
da9a29a1dd Merge branch 'webserver_flash' into integration 2025-08-09 20:52:37 -05:00
J. Nick Koston
4e07c50490 tweak 2025-08-09 20:52:28 -05:00
J. Nick Koston
5b91c5f043 Merge branch 'integration' into memory_api 2025-08-09 20:46:51 -05:00
J. Nick Koston
73b11896d4 Merge branch 'webserver_flash' into integration 2025-08-09 20:46:44 -05:00
J. Nick Koston
8faac0c184 [web_server] Reduce flash usage by consolidating parameter parsing 2025-08-09 20:41:44 -05:00
J. Nick Koston
233882e1c2 Merge branch 'integration' into memory_api 2025-08-09 14:06:01 -05:00
J. Nick Koston
54a2ac92bf Merge branch 'ota_fixes' into integration 2025-08-09 14:05:52 -05:00
J. Nick Koston
ea74a9ec8f [esphome] Fix OTA watchdog reset when port scanning 2025-08-09 14:01:49 -05:00
J. Nick Koston
48a94b686d Merge branch 'integration' into memory_api 2025-08-08 16:23:20 -05:00
J. Nick Koston
32a968784c Merge branch 'subproc' into integration 2025-08-08 16:23:03 -05:00
J. Nick Koston
3ded96bb26 Optimize subprocess performance with close_fds=False 2025-08-08 16:18:04 -05:00
J. Nick Koston
c982e35189 Merge branch 'integration' into memory_api 2025-08-08 16:05:26 -05:00
J. Nick Koston
507ec82886 Merge branch 'port_fallback' into integration 2025-08-08 16:05:20 -05:00
J. Nick Koston
e316fe3b80 Merge branch 'esp32_ble_tracker_reboot_on_blocked_loop' into integration 2025-08-08 16:05:15 -05:00
J. Nick Koston
cdcf5fd74c [dashboard] Fix port fallback regression when device is offline 2025-08-07 18:47:54 -10:00
J. Nick Koston
61fbf7cd81 Merge branch 'integration' into memory_api 2025-08-07 12:55:44 -10:00
J. Nick Koston
11b82fe3d4 Merge branch 'startup_herd_ble_fix' into integration 2025-08-07 12:55:38 -10:00
J. Nick Koston
1de0a73a63 preen 2025-08-07 12:55:31 -10:00
J. Nick Koston
760add7d29 Merge branch 'integration' into memory_api 2025-08-07 12:39:23 -10:00
J. Nick Koston
86798e3a2b Merge branch 'startup_herd_ble_fix' into integration 2025-08-07 12:39:19 -10:00
J. Nick Koston
543e5099a4 [bluetooth_proxy] Optimize connection loop to reduce CPU usage 2025-08-07 12:38:15 -10:00
J. Nick Koston
3f31bcacad Merge branch 'integration' into memory_api 2025-08-07 10:28:59 -10:00
J. Nick Koston
4ba5718ddd Merge branch 'cover_logging' into integration 2025-08-07 10:28:51 -10:00
J. Nick Koston
ac05ab6de1 [cover] Reduce flash usage by optimizing validation messages 2025-08-07 10:28:07 -10:00
J. Nick Koston
75249775ee Merge branch 'integration' into memory_api 2025-08-07 09:57:32 -10:00
J. Nick Koston
902846c6da Merge branch 'mdns_extra' into integration 2025-08-07 09:57:27 -10:00
J. Nick Koston
887d43d76c [mdns] Conditionally compile extra services to reduce flash usage 2025-08-07 09:56:47 -10:00
J. Nick Koston
2ff418c8f9 Merge branch 'integration' into memory_api 2025-08-07 09:44:14 -10:00
J. Nick Koston
3a2c7c9154 Merge branch 'wifi_flash' into integration 2025-08-07 09:44:08 -10:00
J. Nick Koston
c5c71bd85e [wifi] Reduce flash usage by optimizing logging 2025-08-07 09:43:24 -10:00
J. Nick Koston
fb86bd05db Merge branch 'integration' into memory_api 2025-08-06 22:42:38 -10:00
J. Nick Koston
4d56781be9 Merge branch 'esp32_ble_client_strings' into integration 2025-08-06 22:42:31 -10:00
J. Nick Koston
481bbeb6b5 [esp32_ble_client] Reduce flash usage by optimizing logging strings 2025-08-06 22:41:50 -10:00
J. Nick Koston
431a8dd374 Merge branch 'integration' into memory_api 2025-08-06 22:04:44 -10:00
J. Nick Koston
469076c7dd Merge branch 'cond_compile_service_char_desc_cond' into integration 2025-08-06 22:04:31 -10:00
J. Nick Koston
c5065f21b8 condtional 2025-08-06 19:53:57 -10:00
J. Nick Koston
9841d7cf87 Merge branch 'integration' into memory_api 2025-08-06 17:31:53 -10:00
J. Nick Koston
24246a136e Merge branch 'esp32_tracker_touch_ups' into integration 2025-08-06 17:31:48 -10:00
J. Nick Koston
cf1b24145b [esp32_ble_tracker] Optimize member variable ordering to reduce memory padding 2025-08-06 17:30:48 -10:00
J. Nick Koston
28d2c86a91 Merge branch 'dev' into memory_api 2025-08-06 14:08:07 -10:00
J. Nick Koston
5e8768084b Merge branch 'integration' into memory_api 2025-08-06 10:56:41 -10:00
J. Nick Koston
28c4460f8b Merge branch 'esp32_ble_client_namespace' into integration 2025-08-06 10:56:28 -10:00
J. Nick Koston
cb4d3d37cf [esp32_ble_client] Convert to C++17 nested namespace syntax 2025-08-06 10:55:56 -10:00
J. Nick Koston
e29b04bcfe Merge branch 'integration' into memory_api 2025-08-06 10:45:16 -10:00
J. Nick Koston
341d2febd6 Merge branch 'entire_service_list_copied_discarded' into integration 2025-08-06 10:45:06 -10:00
J. Nick Koston
534681b988 [esp32_ble_client] Fix V3_WITH_CACHE connections unnecessarily populating services vector
preen
2025-08-06 10:40:48 -10:00
J. Nick Koston
ddb1fcd0f9 preen 2025-08-06 10:39:44 -10:00
J. Nick Koston
2327c5bddf Merge branch 'integration' into memory_api 2025-08-06 10:28:49 -10:00
J. Nick Koston
a962bb4af2 Merge branch 'entire_service_list_copied_discarded' into integration 2025-08-06 10:28:43 -10:00
J. Nick Koston
ee98abe9f1 [esp32_ble_client] Fix V3_WITH_CACHE connections unnecessarily populating services vector 2025-08-06 10:27:18 -10:00
J. Nick Koston
2cdf50a025 tweak 2025-08-06 10:11:28 -10:00
J. Nick Koston
b75719d37e Merge branch 'integration' into memory_api 2025-08-06 10:03:29 -10:00
J. Nick Koston
e99794fe9b Merge branch 'drop_v1_connection_type_proxy_only' into integration 2025-08-06 10:03:22 -10:00
J. Nick Koston
16a2677bcf [bluetooth_proxy] Remove V1 connection support 2025-08-06 09:55:01 -10:00
J. Nick Koston
27397593c1 Merge branch 'integration' into memory_api 2025-08-06 07:47:47 -10:00
J. Nick Koston
cb4cd00ad1 Merge branch 'proxy_alloc_cleanup' into integration 2025-08-06 07:47:41 -10:00
J. Nick Koston
0893d1d958 [bluetooth_proxy] Remove unnecessary heap allocation for response object 2025-08-06 07:47:14 -10:00
J. Nick Koston
5511dae2fa Merge branch 'integration' into memory_api 2025-08-06 07:38:12 -10:00
J. Nick Koston
1b65d2b1d3 Merge branch 'proxy_log_config' into integration 2025-08-06 07:38:05 -10:00
J. Nick Koston
2af29aab6f [bluetooth_proxy] Consolidate dump_config() log calls 2025-08-06 07:37:30 -10:00
J. Nick Koston
e1cb364436 Merge branch 'integration' into memory_api 2025-08-06 07:31:43 -10:00
J. Nick Koston
fdc4be8c0c Merge branch 'no_std_find_alloc' into integration 2025-08-06 07:31:35 -10:00
J. Nick Koston
a10e7b2a54 [bluetooth_proxy] Replace std::find with simple loop for small fixed array 2025-08-06 07:30:53 -10:00
J. Nick Koston
e5a1820708 Merge branch 'integration' into memory_api 2025-08-06 07:09:31 -10:00
J. Nick Koston
211db40cb4 Merge branch 'conditional_compile_ble_adv' into integration 2025-08-06 07:09:21 -10:00
J. Nick Koston
0aec58665a remove filter, its too early 2025-08-06 07:09:05 -10:00
J. Nick Koston
c667218f3f Merge branch 'conditional_compile_ble_adv' into memory_api 2025-08-05 22:22:42 -10:00
J. Nick Koston
f19ed094b7 Merge branch 'conditional_compile_ble_adv' into integration 2025-08-05 22:22:36 -10:00
J. Nick Koston
f55ab960bb order 2025-08-05 22:22:26 -10:00
J. Nick Koston
2da1974a80 Merge branch 'integration' into memory_api 2025-08-05 22:02:28 -10:00
J. Nick Koston
bb4ddbd218 Merge branch 'ble_logging_cleanup' into integration 2025-08-05 22:02:18 -10:00
J. Nick Koston
9cc907778b Merge remote-tracking branch 'upstream/dev' into ble_logging_cleanup 2025-08-05 21:55:13 -10:00
J. Nick Koston
a11f32d6aa dry 2025-08-05 21:54:44 -10:00
J. Nick Koston
ba713737bc Merge branch 'integration' into memory_api 2025-08-05 21:36:58 -10:00
J. Nick Koston
0240c68771 Merge branch 'conditional_compile_ble_adv' into integration 2025-08-05 21:36:46 -10:00
J. Nick Koston
722d76565c [esp32_ble] Conditionally compile BLE advertising to reduce flash usage 2025-08-05 21:30:07 -10:00
J. Nick Koston
096b9c9651 Merge branch 'integration' into memory_api 2025-08-05 20:54:21 -10:00
J. Nick Koston
605e840f81 Merge branch 'out_of_notify' into integration 2025-08-05 20:53:50 -10:00
J. Nick Koston
3bfd77426a [esp32_ble] Make BLE notification limit configurable to fix ESP_GATT_NO_RESOURCES errors 2025-08-05 20:49:35 -10:00
J. Nick Koston
7e288126fa Merge branch 'integration' into memory_api 2025-08-05 20:30:40 -10:00
J. Nick Koston
b475542c8b Merge branch 'ble_logging_cleanup' into integration 2025-08-05 20:30:34 -10:00
J. Nick Koston
5d93388a5f [bluetooth_proxy][esp32_ble_tracker][esp32_ble_client] Consolidate duplicate logging code to reduce flash usage 2025-08-05 20:26:43 -10:00
J. Nick Koston
addeec572a Merge branch 'integration' into memory_api 2025-08-05 17:26:40 -10:00
J. Nick Koston
bb95320348 Merge branch 'bluetooth_proxy_flash' into integration 2025-08-05 17:26:34 -10:00
J. Nick Koston
c1ace213ab [bluetooth_proxy] Reduce flash usage by consolidating duplicate logging 2025-08-05 17:26:06 -10:00
J. Nick Koston
c253eb2362 Merge branch 'integration' into memory_api 2025-08-05 17:06:06 -10:00
J. Nick Koston
8fbef8e71e Merge branch 'esp32_ble_tracker_more_cleanups' into integration 2025-08-05 17:05:56 -10:00
J. Nick Koston
c5d5e66f30 dry 2025-08-05 17:04:02 -10:00
J. Nick Koston
eea84a43d6 Merge branch 'integration' into memory_api 2025-08-05 17:02:43 -10:00
J. Nick Koston
c52bd6fecf Merge branch 'esp32_ble_tracker_more_cleanups' into integration 2025-08-05 17:02:34 -10:00
J. Nick Koston
028d20908e Merge remote-tracking branch 'upstream/dev' into integration 2025-08-05 17:02:31 -10:00
J. Nick Koston
ef271cbd3b [esp32_ble_tracker] Simplify state machine guards with helper functions 2025-08-05 17:01:53 -10:00
J. Nick Koston
7344ff6941 merge 2025-08-04 21:50:36 -10:00
J. Nick Koston
2b5d035c39 Merge branch 'integration' into memory_api 2025-08-04 21:49:10 -10:00
J. Nick Koston
6cc5f83c71 Merge branch 'already_discovered_missing_guard' into integration 2025-08-04 21:48:48 -10:00
J. Nick Koston
acdcf514b9 [esp32_ble_tracker] Add missing USE_ESP32_BLE_DEVICE guard for already_discovered_ member 2025-08-04 20:14:30 -10:00
J. Nick Koston
89cf81baaa Merge branch 'integration' into memory_api 2025-08-04 20:06:47 -10:00
J. Nick Koston
7c328e51c4 Merge branch 'esp32_ble_co' into integration 2025-08-04 20:06:29 -10:00
J. Nick Koston
ba9cf1b5f6 Add myself to multiple bluetooth codeowners 2025-08-04 19:56:22 -10:00
J. Nick Koston
1c7200545b Merge branch 'integration' into memory_api 2025-08-04 16:52:44 -10:00
J. Nick Koston
e499374964 Merge branch 'multi_device_args' into integration 2025-08-04 16:52:30 -10:00
J. Nick Koston
63705c5a6e Merge branch 'dev' into multi_device_args 2025-08-04 16:51:57 -10:00
J. Nick Koston
3bbd3acea6 Merge branch 'integration' into memory_api 2025-08-04 16:26:55 -10:00
J. Nick Koston
8fc1835e5b Merge branch 'esp32_ble_tracker_cleanup_code' into integration 2025-08-04 16:26:49 -10:00
J. Nick Koston
655d001d72 address bot comments 2025-08-04 16:26:40 -10:00
J. Nick Koston
5f9080dac9 fix --device OTA 2025-08-04 15:57:29 -10:00
J. Nick Koston
1d6c491dea Merge branch 'dev' into multi_device_args 2025-08-04 15:43:15 -10:00
J. Nick Koston
9e1054cb87 Merge branch 'integration' into memory_api 2025-08-04 15:25:44 -10:00
J. Nick Koston
e0fe73ec5b Merge branch 'esp32_ble_tracker_cleanup_code' into integration 2025-08-04 15:25:37 -10:00
J. Nick Koston
166ed736a9 Merge remote-tracking branch 'upstream/dev' into esp32_ble_tracker_cleanup_code 2025-08-04 15:24:55 -10:00
J. Nick Koston
df83205997 Merge branch 'integration' into memory_api 2025-08-04 11:17:58 -10:00
J. Nick Koston
d8a2e020a9 Merge branch 'helpful_custom_api_error' into integration 2025-08-04 11:17:48 -10:00
J. Nick Koston
fb1d2368a9 fix 2025-08-04 11:15:47 -10:00
J. Nick Koston
76cdef966b fix 2025-08-04 11:14:22 -10:00
J. Nick Koston
c6aeeb98b6 Merge branch 'integration' into memory_api 2025-08-04 11:10:01 -10:00
J. Nick Koston
b5bd065f94 Merge branch 'helpful_custom_api_error' into integration 2025-08-04 11:09:42 -10:00
J. Nick Koston
734b2691c8 [api] Add helpful compile-time errors for Custom API Device methods 2025-08-04 11:08:00 -10:00
J. Nick Koston
739cc5ff50 [esp32_ble_tracker] Refactor loop() method for improved readability and performance 2025-08-04 09:24:22 -10:00
J. Nick Koston
2facd1b436 Cleanup esp32_ble_tracker 2025-08-04 09:18:30 -10:00
J. Nick Koston
d4ff83bf6e Merge branch 'integration' into memory_api 2025-08-04 08:52:25 -10:00
J. Nick Koston
97544869bd Merge branch '5_5_fixes' into integration 2025-08-04 08:52:17 -10:00
Jonathan Swoboda
608cc4f0d1 Fix 5.5 compile issues 2025-08-04 08:45:04 -04:00
J. Nick Koston
15790145b2 Merge branch 'integration' into memory_api 2025-08-03 22:31:55 -10:00
J. Nick Koston
75b6bb9f76 Merge branch 'warn_ble_timeout_mismatch' into integration 2025-08-03 22:31:48 -10:00
J. Nick Koston
74c0e63a1d cleanup 2025-08-03 22:31:27 -10:00
J. Nick Koston
1d3cd0500e Merge branch 'integration' into memory_api 2025-08-03 22:20:15 -10:00
J. Nick Koston
0cebde66bd Merge branch 'warn_ble_timeout_mismatch' into integration 2025-08-03 22:20:11 -10:00
J. Nick Koston
081f0a1871 Update esphome/components/bluetooth_proxy/__init__.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-03 22:19:48 -10:00
J. Nick Koston
5062bab73f Merge branch 'integration' into memory_api 2025-08-03 22:17:25 -10:00
J. Nick Koston
8694cf71fd Merge branch 'warn_ble_timeout_mismatch' into integration 2025-08-03 22:17:17 -10:00
J. Nick Koston
2bc77be5ab [bluetooth_proxy] Warn about BLE connection timeout mismatch on Arduino framework 2025-08-03 22:16:40 -10:00
J. Nick Koston
cccbe4293b Merge branch 'integration' into memory_api 2025-08-03 21:42:00 -10:00
J. Nick Koston
8077dbd892 Merge branch 'mtu_sooner' into integration 2025-08-03 21:41:55 -10:00
J. Nick Koston
e6629f662c [esp32_ble_client] Start MTU negotiation earlier following ESP-IDF examples 2025-08-03 21:41:15 -10:00
J. Nick Koston
5126aefe13 Merge branch 'integration' into memory_api 2025-08-03 21:23:05 -10:00
J. Nick Koston
da3c6ade7b Merge branch 'promote_after_stop' into integration 2025-08-03 21:22:55 -10:00
J. Nick Koston
dd80fcdb62 Update esphome/components/esp32_ble_tracker/esp32_ble_tracker.cpp
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-03 21:22:38 -10:00
J. Nick Koston
3a99929619 Merge branch 'integration' into memory_api 2025-08-03 21:02:31 -10:00
J. Nick Koston
d4449f372a Merge branch 'fix_connection_param_order' into integration 2025-08-03 21:02:14 -10:00
J. Nick Koston
a645c02476 Merge branch 'integration' into memory_api 2025-08-03 20:58:39 -10:00
J. Nick Koston
951d0de52d Merge branch 'promote_after_stop' into integration 2025-08-03 20:58:34 -10:00
J. Nick Koston
8d4f1802fb [esp32_ble_tracker] Optimize connection by promoting client immediately after scan stop trigger 2025-08-03 20:57:02 -10:00
J. Nick Koston
fffa9b813c [esp32_ble_client] Fix connection parameter timing by setting preferences before connection 2025-08-03 19:51:18 -10:00
J. Nick Koston
5ddf32b0a6 Merge branch 'integration' into memory_api 2025-08-03 19:32:46 -10:00
J. Nick Koston
8cc6cf2bbd Merge remote-tracking branch 'upstream/fold_ring_buffer_esp32_ble_tracker' into integration 2025-08-03 19:32:34 -10:00
Jesse Hills
61386aaf6e Merge branch 'dev' into fold_ring_buffer_esp32_ble_tracker 2025-08-04 17:00:08 +12:00
J. Nick Koston
85fd10f06e Merge branch 'integration' into memory_api 2025-08-03 18:06:01 -10:00
J. Nick Koston
fe8f24cad7 Merge branch 'fold_ring_buffer_esp32_ble_tracker' into integration 2025-08-03 18:05:54 -10:00
J. Nick Koston
5a695267aa [esp32_ble_tracker] Eliminate redundant ring buffer for lower latency 2025-08-03 18:04:09 -10:00
J. Nick Koston
a6c8651298 Merge branch 'integration' into memory_api 2025-08-03 16:31:11 -10:00
J. Nick Koston
4945855415 Merge branch 'no_more_stopped_state' into integration 2025-08-03 16:31:01 -10:00
J. Nick Koston
9ff89dfb81 dry 2025-08-03 16:29:31 -10:00
J. Nick Koston
7a7132f1c8 Merge branch 'integration' into memory_api 2025-08-03 16:16:40 -10:00
J. Nick Koston
5c491b385e Merge branch 'no_more_stopped_state' into integration 2025-08-03 16:16:33 -10:00
J. Nick Koston
2e08285570 [esp32_ble_tracker] Remove unnecessary STOPPED scanner state to reduce latency 2025-08-03 16:14:34 -10:00
J. Nick Koston
367e35771e Merge branch 'integration' into memory_api 2025-08-03 15:51:48 -10:00
J. Nick Koston
86af0d7965 Merge branch 'second_connection_fix' into integration 2025-08-03 15:51:42 -10:00
J. Nick Koston
e17a200b7c [esp32_ble_client] Use FAST connection parameters for all v3 connections 2025-08-03 15:51:02 -10:00
J. Nick Koston
27d66e5cfe Merge branch 'integration' into memory_api 2025-08-03 15:45:56 -10:00
J. Nick Koston
72142bc7d7 Merge branch 'reduce_connect_one_loop' into integration 2025-08-03 15:45:50 -10:00
J. Nick Koston
137df4ff20 [esp32_ble_client] Connect immediately on READY_TO_CONNECT to reduce latency 2025-08-03 15:45:03 -10:00
J. Nick Koston
ef33d36d63 Merge branch 'integration' into memory_api 2025-08-03 15:04:46 -10:00
J. Nick Koston
ee899147ff Merge branch 'update_esp32_camera' into integration 2025-08-03 15:04:39 -10:00
J. Nick Koston
e95baa67d5 Merge branch 'integration' into memory_api 2025-08-03 13:55:26 -10:00
J. Nick Koston
72eaba6e2c Merge branch 'update_no_batch' into integration 2025-08-03 13:55:19 -10:00
J. Nick Koston
3e69f41b42 needs ifdef 2025-08-03 13:54:03 -10:00
J. Nick Koston
be7b63898f [api] Fix OTA progress updates not being sent when main loop is blocked 2025-08-03 13:43:15 -10:00
J. Nick Koston
a86c0b66c8 Merge branch 'unregister_fd_flash' into memory_api 2025-08-02 22:45:29 -10:00
J. Nick Koston
fb004fd0c9 Merge branch 'unregister_fd_flash' into integration 2025-08-02 22:45:24 -10:00
J. Nick Koston
53449f298e lint 2025-08-02 22:45:13 -10:00
J. Nick Koston
f34e7a0051 Merge branch 'integration' into memory_api 2025-08-02 22:03:23 -10:00
J. Nick Koston
68e8966b47 Merge branch 'webserver_std_find' into integration 2025-08-02 22:03:09 -10:00
J. Nick Koston
5c7ddc584e Merge branch 'unregister_fd_flash' into integration 2025-08-02 22:03:05 -10:00
J. Nick Koston
451095eef4 [core] Replace std::find and std::max_element with simple loops to reduce binary size 2025-08-02 21:50:39 -10:00
J. Nick Koston
b667cc45cc [web_server_idf] Replace std::find_if with simple loop to reduce binary size 2025-08-02 17:22:41 -10:00
J. Nick Koston
be701c58e1 Merge branch 'integration' into memory_api 2025-08-02 15:57:31 -10:00
J. Nick Koston
aafa1190ce Merge branch 'core_dupe_add_mac' into integration 2025-08-02 15:57:25 -10:00
J. Nick Koston
7a8b2feec6 [core] Optimize Application::pre_setup() to reduce duplicate MAC address operations 2025-08-02 15:56:47 -10:00
J. Nick Koston
5d6a152c45 Merge branch 'integration' into memory_api 2025-08-02 15:37:27 -10:00
J. Nick Koston
f9e15558e7 Merge branch 'static_areas_devices_api' into integration 2025-08-02 15:37:11 -10:00
J. Nick Koston
88f251b29c [api] Use static allocation for areas and devices in DeviceInfoResponse 2025-08-02 14:48:51 -10:00
J. Nick Koston
7faded49d3 Merge branch 'integration' into memory_api 2025-08-02 14:23:48 -10:00
J. Nick Koston
07ce321e99 Merge branch 'webserver_entity_base' into integration 2025-08-02 14:23:41 -10:00
J. Nick Koston
7391bbc6ee suggestion 2025-08-02 14:20:18 -10:00
J. Nick Koston
901fd47f48 Merge branch 'dev' into webserver_entity_base 2025-08-02 14:00:47 -10:00
J. Nick Koston
5f0e1f8ab5 Merge branch 'integration' into memory_api 2025-08-02 13:01:22 -10:00
J. Nick Koston
eb5def5ad7 Merge branch 'wifi_sort' into integration 2025-08-02 13:01:11 -10:00
J. Nick Koston
61c97b029c preen 2025-08-02 13:01:03 -10:00
J. Nick Koston
3ef334c882 Merge branch 'integration' into memory_api 2025-08-02 12:54:39 -10:00
J. Nick Koston
a5a64edf9a Merge branch 'sort_core' into integration 2025-08-02 12:54:29 -10:00
J. Nick Koston
67abbc833f flex 2025-08-02 12:49:03 -10:00
J. Nick Koston
ade5aba423 Merge branch 'integration' into memory_api 2025-08-02 12:47:00 -10:00
J. Nick Koston
56eedad727 Merge branch 'wifi_sort' into integration 2025-08-02 12:46:51 -10:00
J. Nick Koston
9c76847aca [wifi] Replace std::stable_sort with insertion sort to save 2.4KB flash 2025-08-02 12:45:44 -10:00
J. Nick Koston
711eb2d7eb Merge branch 'sort_core' into integration 2025-08-02 12:28:09 -10:00
J. Nick Koston
40dcee594b preen 2025-08-02 12:27:54 -10:00
J. Nick Koston
36eab00eac preen 2025-08-02 12:14:17 -10:00
J. Nick Koston
178910d15e Merge branch 'integration' into memory_api 2025-08-02 12:04:28 -10:00
J. Nick Koston
c609341605 Merge branch 'sort_core' into integration 2025-08-02 12:04:09 -10:00
J. Nick Koston
c89bc0bfd7 [core] Replace std::stable_sort with insertion sort to save 1.3KB flash 2025-08-02 12:02:30 -10:00
J. Nick Koston
18dca1a07d Merge branch 'integration' into memory_api 2025-08-02 10:30:55 -10:00
J. Nick Koston
7ac9bdb36b Merge branch 'webserver_entity_base' into integration 2025-08-02 10:30:48 -10:00
J. Nick Koston
894565a97f [web_server] Reduce binary size by using EntityBase and minimizing template instantiations 2025-08-02 10:15:41 -10:00
J. Nick Koston
79bc7ba206 Merge branch 'integration' into memory_api 2025-08-02 10:05:56 -10:00
J. Nick Koston
2575913880 Merge branch 'drop_py_esptool' into integration 2025-08-02 10:05:48 -10:00
J. Nick Koston
716c25366c do the others 2025-08-02 10:01:36 -10:00
J. Nick Koston
aa33baf5a2 Merge branch 'integration' into memory_api 2025-08-02 09:47:48 -10:00
J. Nick Koston
ce74f07218 Merge branch 'no_entites_fix' into integration 2025-08-02 09:47:35 -10:00
J. Nick Koston
4dd175df90 Merge branch 'idf_default' into integration 2025-08-02 09:47:23 -10:00
J. Nick Koston
e4db32d73e tweak 2025-08-02 09:21:57 -10:00
J. Nick Koston
a1e7317f5e [esp32] Add framework migration warning for upcoming ESP-IDF default change 2025-08-02 08:46:08 -10:00
J. Nick Koston
30f988c5f3 [esp32] Add framework migration warning for upcoming ESP-IDF default change 2025-08-02 08:42:46 -10:00
J. Nick Koston
ed2e8466c8 [esp32] Add framework migration warning for upcoming ESP-IDF default change 2025-08-02 08:42:17 -10:00
J. Nick Koston
2c01c06828 remove test 2025-08-02 07:53:32 -10:00
J. Nick Koston
466f8d2050 remove test 2025-08-02 07:53:14 -10:00
J. Nick Koston
90b68d6fa0 Merge branch 'integration' into memory_api 2025-08-02 00:00:58 -10:00
J. Nick Koston
ee4a1528d7 Merge branch 'no_entites_fix' into integration 2025-08-02 00:00:40 -10:00
J. Nick Koston
bba63625a4 [core] Fix compilation errors when platform sections have no entities 2025-08-01 23:58:32 -10:00
J. Nick Koston
37827c1272 Merge branch 'integration' into memory_api 2025-08-01 23:08:30 -10:00
J. Nick Koston
58a5b6ac71 Merge branch 'webserver_conditional_auth' into integration 2025-08-01 23:08:19 -10:00
J. Nick Koston
49b5dd3299 missed one 2025-08-01 23:08:03 -10:00
J. Nick Koston
3986399e93 missed one 2025-08-01 23:07:37 -10:00
J. Nick Koston
9088790e63 Merge branch 'integration' into memory_api 2025-08-01 23:00:24 -10:00
J. Nick Koston
151718ccf2 Merge branch 'webserver_conditional_auth' into integration 2025-08-01 23:00:15 -10:00
J. Nick Koston
fefa35a418 define 2025-08-01 22:57:26 -10:00
J. Nick Koston
204b54ce38 preen 2025-08-01 22:53:17 -10:00
J. Nick Koston
c28147b3a4 test 2025-08-01 22:43:42 -10:00
J. Nick Koston
fdb437deb2 Merge branch 'integration' into memory_api 2025-08-01 22:39:01 -10:00
J. Nick Koston
11c48ab9c7 Merge branch 'webserver_conditional_auth' into integration 2025-08-01 22:38:54 -10:00
J. Nick Koston
e50135ef8a [web_server] Conditionally compile authentication code to save flash memory 2025-08-01 22:37:35 -10:00
J. Nick Koston
9b3ee6936d Merge branch 'integration' into memory_api 2025-08-01 21:26:51 -10:00
J. Nick Koston
983690f56d Merge branch 'static_comp_areas' into integration 2025-08-01 21:26:44 -10:00
J. Nick Koston
72d0660261 Merge branch 'integration' into memory_api 2025-08-01 21:26:29 -10:00
J. Nick Koston
dcecbb9fa8 Merge branch 'bluetooth_connection_churn_array' into integration 2025-08-01 21:26:19 -10:00
J. Nick Koston
a8f4b5c4e2 fixes 2025-08-01 21:25:58 -10:00
J. Nick Koston
015bb6f602 reorder 2025-08-01 21:05:28 -10:00
J. Nick Koston
f1650fc647 static comp, areas, devices 2025-08-01 20:54:41 -10:00
J. Nick Koston
9d0df67a9e Merge branch 'integration' into memory_api 2025-08-01 20:33:14 -10:00
J. Nick Koston
833602db74 Merge branch 'bluetooth_connection_churn_array' into integration 2025-08-01 20:32:48 -10:00
J. Nick Koston
20959c2366 [bluetooth_proxy] Optimize memory usage with fixed-size array and const string references 2025-08-01 20:32:09 -10:00
J. Nick Koston
18fb3618a0 Merge branch 'integration' into memory_api 2025-08-01 15:41:50 -10:00
J. Nick Koston
0fc874b7d3 Merge branch 'static_entity_vectors' into integration 2025-08-01 15:41:43 -10:00
J. Nick Koston
d8d9123c58 fix clang-tiy 2025-08-01 15:41:33 -10:00
J. Nick Koston
4019bf9027 Merge branch 'integration' into memory_api 2025-08-01 15:36:16 -10:00
J. Nick Koston
8c2f0580d6 Merge branch 'static_entity_vectors' into integration 2025-08-01 15:36:01 -10:00
J. Nick Koston
4de68ded79 preen 2025-08-01 15:31:01 -10:00
J. Nick Koston
591b9ce87b preen 2025-08-01 15:28:48 -10:00
J. Nick Koston
7e25846cad preen 2025-08-01 15:26:51 -10:00
J. Nick Koston
a25edf93d6 preen 2025-08-01 15:26:13 -10:00
J. Nick Koston
13c749ceda preen 2025-08-01 15:26:04 -10:00
J. Nick Koston
8bf3d52fb0 tidy 2025-08-01 15:25:10 -10:00
J. Nick Koston
082e365f82 Merge branch 'integration' into memory_api 2025-08-01 15:00:49 -10:00
J. Nick Koston
48060f2f7f Merge branch 'static_entity_vectors' into integration 2025-08-01 15:00:41 -10:00
J. Nick Koston
7351fb374f [core] Convert entity vectors to static allocation for reduced memory usage 2025-08-01 14:59:01 -10:00
J. Nick Koston
9005767b67 Merge branch 'integration' into memory_api 2025-08-01 14:13:33 -10:00
J. Nick Koston
d401200404 Merge branch 'bluetooth_connection_churn_array' into integration 2025-08-01 14:13:22 -10:00
J. Nick Koston
68ab351cc8 [bluetooth_proxy] Optimize memory usage with fixed-size array and const string references 2025-08-01 14:12:08 -10:00
J. Nick Koston
1c469747d4 Merge branch 'integration' into memory_api 2025-08-01 13:01:25 -10:00
J. Nick Koston
ee6e24b424 Merge branch 'bluetooth_connection_churn' into integration 2025-08-01 13:01:10 -10:00
J. Nick Koston
11e8cfba3d tidy 2025-08-01 13:00:54 -10:00
J. Nick Koston
7d1a816c5e Merge branch 'integration' into memory_api 2025-08-01 12:47:49 -10:00
J. Nick Koston
b86722dfa4 Merge branch 'wasted_slot_fix' into integration 2025-08-01 12:47:41 -10:00
J. Nick Koston
54227ff768 fix 2025-08-01 12:43:51 -10:00
J. Nick Koston
23519c9211 fix 2025-08-01 12:43:10 -10:00
J. Nick Koston
559872fa31 Fix BLE connection slot waste by aligning ESP-IDF timeout with client timeout 2025-08-01 12:39:21 -10:00
J. Nick Koston
1a55885fc3 Merge branch 'integration' into memory_api 2025-08-01 11:21:24 -10:00
J. Nick Koston
1bd4951713 Merge branch 'bluetooth_connection_churn' into integration 2025-08-01 11:21:10 -10:00
J. Nick Koston
fa267f94ea preen 2025-08-01 11:20:57 -10:00
J. Nick Koston
9f52caf3b6 Merge branch 'integration' into memory_api 2025-08-01 11:19:46 -10:00
J. Nick Koston
c111b8bc11 Merge branch 'bluetooth_connection_churn' into integration 2025-08-01 11:19:33 -10:00
J. Nick Koston
f77d15a381 preen 2025-08-01 11:19:27 -10:00
J. Nick Koston
7667325788 Merge branch 'integration' into memory_api 2025-08-01 11:17:16 -10:00
J. Nick Koston
b51b3bf9ce Merge branch 'drop_py_esptool' into integration 2025-08-01 11:17:09 -10:00
J. Nick Koston
3aaf11f404 missed some 2025-08-01 11:15:34 -10:00
J. Nick Koston
ee7c44c3b0 Merge branch 'integration' into memory_api 2025-08-01 11:06:26 -10:00
J. Nick Koston
e079e46d99 Merge branch 'bluetooth_connection_churn' into memory_api 2025-08-01 11:06:24 -10:00
J. Nick Koston
d65fa4b5fa Merge branch 'bluetooth_connection_churn' into integration 2025-08-01 11:06:14 -10:00
J. Nick Koston
493bfaf76a cleanup 2025-08-01 11:02:48 -10:00
J. Nick Koston
f7c7aa9f9a Merge branch 'integration' into memory_api 2025-08-01 10:43:58 -10:00
J. Nick Koston
eb851174d3 merge 2025-08-01 10:43:40 -10:00
J. Nick Koston
b84fc1e777 Merge branch 'bluetooth_connection_churn' into integration 2025-08-01 10:41:46 -10:00
J. Nick Koston
3a52b754c0 preen 2025-08-01 10:30:02 -10:00
J. Nick Koston
a8af06b4dc Merge remote-tracking branch 'origin/bluetooth_connection_churn' into bluetooth_connection_churn 2025-08-01 10:29:36 -10:00
J. Nick Koston
d3cbe21fa3 preen 2025-08-01 10:29:24 -10:00
J. Nick Koston
1ce52f2b0f Update esphome/components/bluetooth_proxy/bluetooth_connection.cpp 2025-08-01 10:22:03 -10:00
J. Nick Koston
a41adad41a Merge branch 'dev' into bluetooth_connection_churn 2025-08-01 10:21:46 -10:00
J. Nick Koston
7c12f1a5bf [core] Update to use esptool instead of deprecated esptool.py 2025-08-01 10:06:16 -10:00
J. Nick Koston
7d06013608 missing define 2025-08-01 10:01:33 -10:00
J. Nick Koston
aa0b80b004 Eliminate heap allocations in bluetooth_proxy connection state reporting 2025-08-01 09:50:11 -10:00
J. Nick Koston
e17af87f6e preen 2025-07-31 22:25:44 -10:00
J. Nick Koston
bea2f4971e preen 2025-07-31 20:07:06 -10:00
J. Nick Koston
42fe7d9fb2 preen 2025-07-31 20:05:34 -10:00
J. Nick Koston
204da1af8b preen 2025-07-31 20:03:31 -10:00
J. Nick Koston
65e2c20bcf preen 2025-07-31 20:02:25 -10:00
J. Nick Koston
837863568f preen 2025-07-31 19:52:34 -10:00
J. Nick Koston
8a15d2ea8c preen 2025-07-31 19:51:21 -10:00
J. Nick Koston
082d741066 preen 2025-07-31 19:46:40 -10:00
J. Nick Koston
264fbb4029 preen 2025-07-31 19:45:54 -10:00
J. Nick Koston
b96cd2b932 preen 2025-07-31 19:41:04 -10:00
J. Nick Koston
5fac039a06 preen 2025-07-31 19:39:08 -10:00
J. Nick Koston
1161bfcc93 preen 2025-07-31 19:35:49 -10:00
J. Nick Koston
d3f103c789 make entry.address take priority over mdns 2025-07-31 17:28:04 -10:00
J. Nick Koston
4caf2b7042 cleanup 2025-07-31 17:16:15 -10:00
J. Nick Koston
13e9350568 cleanup 2025-07-31 17:13:42 -10:00
J. Nick Koston
1c67dfc850 Support multiple --device arguments for address fallback 2025-07-31 17:02:39 -10:00
J. Nick Koston
f3a57bd248 Merge branch 'integration' into memory_api 2025-07-31 11:51:50 -10:00
J. Nick Koston
151530836c Merge branch 'btp_uuids_dynamic_services_sq' into integration 2025-07-31 11:51:39 -10:00
J. Nick Koston
69d33cdd3d preen 2025-07-31 11:51:24 -10:00
J. Nick Koston
038548500c Merge branch 'integration' into memory_api 2025-07-31 11:45:32 -10:00
J. Nick Koston
5d0323d6ea Merge branch 'btp_uuids_dynamic_services_sq' into memory_api 2025-07-31 11:45:28 -10:00
J. Nick Koston
e57205793c Merge branch 'btp_uuids_dynamic_services_sq' into integration 2025-07-31 11:45:23 -10:00
J. Nick Koston
30b687ccbb fix name 2025-07-31 11:45:12 -10:00
J. Nick Koston
6d40866231 Merge branch 'integration' into memory_api 2025-07-31 11:44:07 -10:00
J. Nick Koston
b06c307ec8 Merge branch 'btp_uuids_dynamic_services_sq' into integration 2025-07-31 11:43:59 -10:00
J. Nick Koston
854e29161b only needed once 2025-07-31 11:43:49 -10:00
J. Nick Koston
6ac8c47b6e preen 2025-07-31 11:41:35 -10:00
J. Nick Koston
c10330b890 preen 2025-07-31 11:40:28 -10:00
J. Nick Koston
27861d85fe preen 2025-07-31 11:40:04 -10:00
J. Nick Koston
abb775fc53 Merge branch 'integration' into memory_api 2025-07-31 11:37:40 -10:00
J. Nick Koston
27141f2886 Merge branch 'btp_uuids_dynamic_services_sq' into integration 2025-07-31 11:37:27 -10:00
J. Nick Koston
8729ba17a0 preen 2025-07-31 11:37:17 -10:00
J. Nick Koston
ce6aee873f Merge branch 'integration' into memory_api 2025-07-31 11:27:15 -10:00
J. Nick Koston
a808d00b88 Merge branch 'btp_uuids_dynamic_services_sq' into integration 2025-07-31 11:27:01 -10:00
J. Nick Koston
3c88d8388e Merge branch 'btp_uuids_dynamic_services' into integration 2025-07-31 11:26:41 -10:00
J. Nick Koston
dd7441e104 Update esphome/components/bluetooth_proxy/bluetooth_connection.cpp 2025-07-31 11:25:48 -10:00
J. Nick Koston
0f19e23486 Update esphome/components/bluetooth_proxy/bluetooth_connection.cpp 2025-07-31 11:25:33 -10:00
J. Nick Koston
7205b1edf0 [bluetooth_proxy] Implement dynamic service batching based on MTU constraints 2025-07-31 11:24:31 -10:00
J. Nick Koston
f2b3f413fc back 2025-07-31 07:56:57 -10:00
J. Nick Koston
0ae7dcdb62 tweak 2025-07-31 07:48:54 -10:00
J. Nick Koston
0356e24bae tweak 2025-07-31 07:46:18 -10:00
J. Nick Koston
d6776804ae tweak 2025-07-31 07:45:03 -10:00
J. Nick Koston
255cf4b661 wip 2025-07-31 07:34:02 -10:00
J. Nick Koston
38e2b6c5f3 wip 2025-07-31 07:33:14 -10:00
J. Nick Koston
fe2b2d5280 fix 2025-07-31 07:19:03 -10:00
J. Nick Koston
b66141e5ba fix 2025-07-31 07:12:53 -10:00
J. Nick Koston
1225df594f preen 2025-07-31 06:59:10 -10:00
J. Nick Koston
551bff33c2 preen 2025-07-31 06:47:31 -10:00
J. Nick Koston
3a80aac6e8 ble dynamic batch 2025-07-31 06:35:19 -10:00
J. Nick Koston
3988b48708 Merge branch 'btp_uuids' into memory_api 2025-07-31 05:15:41 -10:00
J. Nick Koston
d338f753a5 Merge branch 'btp_uuids' into integration 2025-07-31 05:15:34 -10:00
J. Nick Koston
1877d5d11d Merge remote-tracking branch 'upstream/btp_uuids' into btp_uuids 2025-07-31 05:15:22 -10:00
J. Nick Koston
f120240350 dry 2025-07-31 05:15:12 -10:00
J. Nick Koston
c6aa704d39 Merge branch 'dev' into btp_uuids 2025-07-31 04:41:32 -10:00
J. Nick Koston
ccae1bbe15 Merge branch 'integration' into memory_api 2025-07-31 04:17:55 -10:00
J. Nick Koston
d11a3ed742 Merge branch 'btp_uuids' into integration 2025-07-31 04:17:46 -10:00
J. Nick Koston
ef05c97984 Merge remote-tracking branch 'upstream/btp_uuids' into btp_uuids 2025-07-31 04:06:06 -10:00
J. Nick Koston
f3d42ef6e4 save 4 bytes since we must store as uint32_t anyways 2025-07-31 04:05:48 -10:00
J. Nick Koston
766e3480cf Merge branch 'dev' into btp_uuids 2025-07-30 23:20:50 -10:00
J. Nick Koston
40e2960264 fixes 2025-07-30 22:15:39 -10:00
J. Nick Koston
712de79973 tidy 2025-07-30 22:06:31 -10:00
J. Nick Koston
37911e84f2 [bluetooth_proxy] Send native 16/32-bit UUIDs instead of always converting to 128-bit 2025-07-30 21:24:40 -10:00
J. Nick Koston
6f4a8100ef Merge branch 'integration' into memory_api 2025-07-30 19:26:41 -10:00
J. Nick Koston
f52dadab41 Merge remote-tracking branch 'upstream/dev' into integration 2025-07-30 19:26:28 -10:00
J. Nick Koston
383f54810c Merge branch 'fix_normal_opts' into memory_api 2025-07-30 16:12:47 -10:00
J. Nick Koston
3abc959e37 Merge branch 'fix_normal_opts' into integration 2025-07-30 16:12:42 -10:00
J. Nick Koston
d1cf6c2b14 [esp32_ble_client] Fix BLE connection stability for WiFi-based proxies 2025-07-30 16:12:07 -10:00
J. Nick Koston
77677f3edc Merge branch 'integration' into memory_api 2025-07-30 15:39:40 -10:00
J. Nick Koston
a46d9f3ff2 Merge branch 'service_batching_ble' into integration 2025-07-30 15:39:30 -10:00
J. Nick Koston
97b522da98 Merge branch 'dev' into service_batching_ble 2025-07-30 15:39:11 -10:00
J. Nick Koston
2b58f78082 fix busy loop on fail 2025-07-30 15:38:19 -10:00
J. Nick Koston
caa9f6fdc7 Merge branch 'integration' into memory_api 2025-07-30 15:00:31 -10:00
J. Nick Koston
e50840232e Merge branch 'service_batching_ble' into integration 2025-07-30 15:00:20 -10:00
J. Nick Koston
08aad73af9 did not need 2025-07-30 15:00:11 -10:00
J. Nick Koston
093e8093f5 Merge branch 'integration' into memory_api 2025-07-30 14:54:05 -10:00
J. Nick Koston
60b548fccd Merge branch 'service_batching_ble' into integration 2025-07-30 14:53:59 -10:00
J. Nick Koston
7692aacc2d [bluetooth_proxy] Batch BLE service discovery messages for 67% reduction in API traffic 2025-07-30 14:51:35 -10:00
J. Nick Koston
ecb029e0a7 [bluetooth_proxy] Batch BLE service discovery messages for 67% reduction in API traffic 2025-07-30 14:50:20 -10:00
J. Nick Koston
12cd1ec525 [bluetooth_proxy] Batch BLE service discovery messages for 67% reduction in API traffic 2025-07-30 14:46:13 -10:00
J. Nick Koston
a4ebcc691a Batch 3 services 2025-07-30 14:33:11 -10:00
J. Nick Koston
de51f0f205 Merge branch 'integration' into memory_api 2025-07-30 13:18:01 -10:00
J. Nick Koston
1194b20b09 Merge branch 'wifi_reconnect_race_fix' into integration 2025-07-30 13:17:49 -10:00
J. Nick Koston
79bee386ff [wifi] Fix crash during WiFi reconnection on ESP32 with poor signal quality 2025-07-30 13:16:40 -10:00
J. Nick Koston
07bc41a900 Merge branch 'integration' into memory_api 2025-07-30 09:43:05 -10:00
J. Nick Koston
e23fb2bf4e Merge branch 'api_polish' into integration 2025-07-30 09:42:52 -10:00
J. Nick Koston
8d9daca386 address copilot review comments 2025-07-30 09:42:28 -10:00
J. Nick Koston
1600ab58a1 Merge branch 'integration' into memory_api 2025-07-30 00:12:36 -10:00
J. Nick Koston
3e2b7e8309 Merge branch 'api_polish' into integration 2025-07-30 00:12:29 -10:00
J. Nick Koston
1568fc36cc preen 2025-07-29 23:39:32 -10:00
J. Nick Koston
a8493df659 api polish 2025-07-29 23:33:43 -10:00
J. Nick Koston
24174c3eed Merge branch 'integration' into memory_api 2025-07-29 22:55:46 -10:00
J. Nick Koston
e81c5ef61e Merge branch 'ruff_ret' into integration 2025-07-29 22:55:33 -10:00
J. Nick Koston
8e68b1a7d9 Merge remote-tracking branch 'upstream/dev' into ruff_ret 2025-07-29 22:48:15 -10:00
J. Nick Koston
4441d0ea8d Merge branch 'integration' into memory_api 2025-07-29 15:53:43 -10:00
J. Nick Koston
fdde5ea0f1 Merge branch 'service_discovery' into integration 2025-07-29 15:53:31 -10:00
J. Nick Koston
68b8fab33a const 2025-07-29 15:53:15 -10:00
J. Nick Koston
537c774a6c use const 2025-07-29 15:47:36 -10:00
J. Nick Koston
4aec2a95f2 Merge branch 'integration' into memory_api 2025-07-29 14:58:15 -10:00
J. Nick Koston
7698e7faee Merge branch 'service_discovery' into integration 2025-07-29 14:58:04 -10:00
J. Nick Koston
561d7ec978 cleanup 2025-07-29 14:57:52 -10:00
J. Nick Koston
579c6c57e0 Merge branch 'service_discovery' into memory_api 2025-07-29 14:32:55 -10:00
J. Nick Koston
3018b1a7e5 Merge branch 'service_discovery' into integration 2025-07-29 14:32:49 -10:00
J. Nick Koston
63484d9f08 tidy 2025-07-29 14:32:34 -10:00
J. Nick Koston
ff1239c2a4 Merge branch 'integration' into memory_api 2025-07-29 14:27:04 -10:00
J. Nick Koston
4999b5793f Merge branch 'service_discovery' into integration 2025-07-29 14:26:53 -10:00
J. Nick Koston
f794506002 Revert "[esp32_ble] Add PHY configuration and default to 1M for compatibility"
This reverts commit 5c44cd8962.
2025-07-29 14:26:47 -10:00
J. Nick Koston
92055b221a Revert "test"
This reverts commit 51d2e70854.
2025-07-29 14:26:37 -10:00
J. Nick Koston
f810ebbf79 [esp32_ble_client] Fix connection failures with short discovery timeout devices and speed up BLE connections 2025-07-29 14:24:46 -10:00
J. Nick Koston
53d68abf79 Merge branch 'integration' into memory_api 2025-07-29 10:17:46 -10:00
J. Nick Koston
ad86f1352b Merge branch 's3_ble_events' into integration 2025-07-29 10:17:35 -10:00
J. Nick Koston
1adf45eebf [esp32_ble] Fix spurious BLE 5.0 event warnings on ESP32-S3 2025-07-29 10:17:00 -10:00
J. Nick Koston
11f0d0015c Merge branch 'integration' into memory_api 2025-07-29 09:55:31 -10:00
J. Nick Koston
dadcab1581 Merge branch 'ble_phy_defaults' into integration 2025-07-29 09:55:25 -10:00
J. Nick Koston
51d2e70854 test 2025-07-29 09:54:44 -10:00
J. Nick Koston
5c44cd8962 [esp32_ble] Add PHY configuration and default to 1M for compatibility 2025-07-29 09:50:11 -10:00
J. Nick Koston
2537c4437f cleanup 2025-07-29 07:15:12 -10:00
J. Nick Koston
9133554588 Merge branch 'integration' into memory_api 2025-07-29 07:06:56 -10:00
J. Nick Koston
f577c857c5 Merge remote-tracking branch 'upstream/api_heap_churn_info' into integration 2025-07-29 07:06:40 -10:00
J. Nick Koston
5c5f29fbc8 Merge branch 'dev' into api_heap_churn_info 2025-07-29 07:06:25 -10:00
J. Nick Koston
e222232376 Merge branch 'integration' into memory_api 2025-07-29 07:04:07 -10:00
J. Nick Koston
05ad1d310b Merge remote-tracking branch 'upstream/dev' into integration 2025-07-29 07:03:50 -10:00
J. Nick Koston
aeec9a9379 Merge branch 'integration' into memory_api 2025-07-28 22:11:00 -10:00
J. Nick Koston
e12458c30f Merge branch 'api_heap_churn_info' into integration 2025-07-28 22:10:49 -10:00
J. Nick Koston
8b52a9a02e Merge branch 'integration' into memory_api 2025-07-28 22:10:32 -10:00
J. Nick Koston
b324978c9d Merge branch 'disable_touch_pad_read_filtered' into integration 2025-07-28 22:10:19 -10:00
J. Nick Koston
e0e0a1a420 [esp32_touch] Work around ESP-IDF v5.4 regression in touch_pad_read_filtered() 2025-07-28 22:08:29 -10:00
J. Nick Koston
20294e9307 Merge remote-tracking branch 'upstream/api_heap_churn_info' into api_heap_churn_info 2025-07-28 19:54:27 -10:00
J. Nick Koston
e113078f82 document 2025-07-28 19:54:08 -10:00
J. Nick Koston
b4fe1e61f5 Merge branch 'dev' into api_heap_churn_info 2025-07-28 19:46:05 -10:00
J. Nick Koston
7822865aee limit change 2025-07-28 19:37:44 -10:00
J. Nick Koston
14d1fd02cc fix 2025-07-28 19:30:32 -10:00
J. Nick Koston
397bc80a15 Merge branch 'dev' into api_heap_churn_info 2025-07-28 13:41:46 -10:00
J. Nick Koston
8ebde566d2 Merge branch 'dev' into api_heap_churn_info 2025-07-28 13:34:26 -10:00
J. Nick Koston
dbe895f0a3 preen 2025-07-28 12:46:58 -10:00
J. Nick Koston
7ab8cc49c6 preen 2025-07-28 12:44:07 -10:00
J. Nick Koston
5b7085287f preen 2025-07-28 12:43:50 -10:00
J. Nick Koston
4e565202e4 preen 2025-07-28 12:42:46 -10:00
J. Nick Koston
224ea51cd7 zero copy vectors 2025-07-28 12:35:38 -10:00
J. Nick Koston
226d465f6a Merge branch 'integration' into memory_api 2025-07-27 18:50:05 -10:00
J. Nick Koston
2123e778e5 Merge branch 'protosize_object' into integration 2025-07-27 18:49:51 -10:00
J. Nick Koston
14744fc381 Merge remote-tracking branch 'upstream/dev' into integration 2025-07-27 18:49:43 -10:00
J. Nick Koston
ab643350f5 Merge remote-tracking branch 'upstream/dev' into protosize_object 2025-07-27 18:46:54 -10:00
J. Nick Koston
81cea0b2eb Merge branch 'integration' into memory_api 2025-07-27 11:36:35 -10:00
J. Nick Koston
44ec2b37af Merge branch 'unspec_string_copies' into integration 2025-07-27 11:36:28 -10:00
J. Nick Koston
0fa9704675 [core] Use nullptr defaults in status_set_error/warning to reduce flash usage 2025-07-27 11:25:42 -10:00
J. Nick Koston
0f5aff4d21 Merge branch 'integration' into memory_api 2025-07-27 11:08:21 -10:00
J. Nick Koston
d56ff40952 Merge branch 'retry_string_cleanup' into integration 2025-07-27 11:08:12 -10:00
J. Nick Koston
4fc6ef6d3e cover 2025-07-27 10:54:57 -10:00
J. Nick Koston
6c8df02d9c [core] Optimize scheduler retry mechanism to reduce flash usage 2025-07-27 10:45:35 -10:00
J. Nick Koston
a4026d6ba1 [ruff] Enable RET and fix all violations 2025-07-27 08:34:43 -10:00
J. Nick Koston
e3b3259243 Merge branch 'integration' into memory_api 2025-07-26 22:15:15 -10:00
J. Nick Koston
0d23476a1d Merge branch 'light_opt_part2' into integration 2025-07-26 22:15:06 -10:00
J. Nick Koston
4f28aacf66 fix 2025-07-26 22:11:48 -10:00
J. Nick Koston
5769fbc3b6 fix 2025-07-26 22:10:17 -10:00
J. Nick Koston
9cf0535d39 Merge branch 'integration' into memory_api 2025-07-26 21:55:34 -10:00
J. Nick Koston
52b04611ba Merge branch 'light_opt_part2' into integration 2025-07-26 21:55:23 -10:00
J. Nick Koston
bcdfc744c6 missed existing helper 2025-07-26 21:48:53 -10:00
J. Nick Koston
e223a1008b missed existing helper 2025-07-26 21:46:54 -10:00
J. Nick Koston
b7d48284ac missed existing helper 2025-07-26 21:44:31 -10:00
J. Nick Koston
de3e9451dc missed existing helper 2025-07-26 21:43:53 -10:00
J. Nick Koston
eb25ff0de7 Merge branch 'integration' into memory_api 2025-07-26 21:38:04 -10:00
J. Nick Koston
fa4a52a0dc Merge branch 'light_opt_part2' into integration 2025-07-26 21:37:53 -10:00
J. Nick Koston
51de85b1c1 merge 2025-07-26 21:37:46 -10:00
J. Nick Koston
4f30fd9668 Merge branch 'integration' into memory_api 2025-07-26 21:36:16 -10:00
J. Nick Koston
c9995e5fac Merge branch 'light_opt_part2' into integration 2025-07-26 21:35:54 -10:00
J. Nick Koston
28dbf3bbcc revert 2025-07-26 21:32:34 -10:00
J. Nick Koston
29e61c8913 revert 2025-07-26 21:27:44 -10:00
J. Nick Koston
10434ac2a3 fixes 2025-07-26 21:24:24 -10:00
J. Nick Koston
92e9383164 light_opt_part2 2025-07-26 21:18:58 -10:00
J. Nick Koston
3a49215dd6 preen 2025-07-26 21:18:39 -10:00
J. Nick Koston
dc45bed048 preen 2025-07-26 21:15:53 -10:00
J. Nick Koston
8e6a053ead preen 2025-07-26 21:11:57 -10:00
J. Nick Koston
5cf89f8594 light2 2025-07-26 21:06:39 -10:00
J. Nick Koston
825f3eee70 light2 2025-07-26 21:04:39 -10:00
J. Nick Koston
eec31846e1 Revert "Revert "light2""
This reverts commit b99b0140ae.
2025-07-26 20:50:50 -10:00
J. Nick Koston
b99b0140ae Revert "light2"
This reverts commit af7e43bbc1.
2025-07-26 20:49:51 -10:00
J. Nick Koston
af7e43bbc1 light2 2025-07-26 20:45:21 -10:00
J. Nick Koston
52750f931b light2 2025-07-26 20:42:45 -10:00
J. Nick Koston
446e9bc529 Merge branch 'integration' into memory_api 2025-07-26 20:26:28 -10:00
J. Nick Koston
6c44392359 Merge remote-tracking branch 'upstream/dev' into integration 2025-07-26 20:26:16 -10:00
J. Nick Koston
d9f3ecd1a3 Merge branch 'integration' into memory_api 2025-07-26 17:14:24 -10:00
J. Nick Koston
3ec6b9d1a4 Merge branch 'light_flash' into integration 2025-07-26 17:14:09 -10:00
J. Nick Koston
2d237d0f97 fixes 2025-07-26 17:13:59 -10:00
J. Nick Koston
f9d0fa1c6d Merge branch 'integration' into memory_api 2025-07-26 17:09:53 -10:00
J. Nick Koston
75525349c7 Merge branch 'light_flash' into integration 2025-07-26 17:09:44 -10:00
J. Nick Koston
79984a288e preen 2025-07-26 17:06:39 -10:00
J. Nick Koston
f333ab1fd7 cover 2025-07-26 17:01:02 -10:00
J. Nick Koston
5bdd850012 reduce light flash 2025-07-26 16:59:57 -10:00
J. Nick Koston
6e345c5f23 dry 2025-07-26 15:03:36 -10:00
J. Nick Koston
5ebce4a901 dry 2025-07-26 15:01:45 -10:00
J. Nick Koston
a82b5fa87a dry 2025-07-26 15:01:07 -10:00
J. Nick Koston
193a85eb1c dry 2025-07-26 14:57:50 -10:00
J. Nick Koston
0773fc320b dry 2025-07-26 14:57:42 -10:00
J. Nick Koston
32edc3f062 dry 2025-07-26 14:54:52 -10:00
J. Nick Koston
ae12097636 dry 2025-07-26 14:53:14 -10:00
J. Nick Koston
2e16b3ea31 dry 2025-07-26 14:52:15 -10:00
J. Nick Koston
d98a3fca96 dry 2025-07-26 14:49:43 -10:00
J. Nick Koston
e94f5bffa3 preen 2025-07-26 14:45:26 -10:00
J. Nick Koston
09a30689e9 preen 2025-07-26 14:19:35 -10:00
J. Nick Koston
33ec5e195f Make ProtoSize an object 2025-07-26 14:09:17 -10:00
J. Nick Koston
1032e5c220 Make ProtoSize an object 2025-07-26 14:08:43 -10:00
J. Nick Koston
d111b84ca4 Make ProtoSize an object 2025-07-26 14:03:47 -10:00
J. Nick Koston
de6686ee14 Merge branch 'integration' into memory_api 2025-07-26 13:11:37 -10:00
J. Nick Koston
fd5805c54a Merge branch 'noise_key_flash' into integration 2025-07-26 13:11:19 -10:00
J. Nick Koston
32d6acb3b2 [api] Reduce code duplication in send_noise_encryption_set_key_response 2025-07-26 11:52:23 -10:00
J. Nick Koston
cab11086ac Merge branch 'integration' into memory_api 2025-07-25 23:38:30 -10:00
J. Nick Koston
c40a9eabef Merge branch 'services_must_make_copy' into integration 2025-07-25 23:38:17 -10:00
J. Nick Koston
17e1d3650c missed ha 2025-07-25 23:37:40 -10:00
J. Nick Koston
56b00f9bb7 Merge branch 'integration' into memory_api 2025-07-25 23:31:53 -10:00
J. Nick Koston
cfb4ef120f Merge remote-tracking branch 'upstream/dev' into integration 2025-07-25 23:31:43 -10:00
J. Nick Koston
eb2bfd4b70 Merge branch 'empty_messages' into integration 2025-07-25 23:31:37 -10:00
J. Nick Koston
91b46757b4 Merge remote-tracking branch 'upstream/dev' into empty_messages 2025-07-25 23:30:39 -10:00
J. Nick Koston
2d501e7b42 Merge branch 'dev' into services_must_make_copy 2025-07-25 23:27:43 -10:00
J. Nick Koston
01101380ee Merge branch 'integration' into memory_api 2025-07-25 23:15:42 -10:00
J. Nick Koston
eedcd818a9 Merge branch 'services_must_make_copy' into integration 2025-07-25 23:15:31 -10:00
J. Nick Koston
ab02f6da3d custom api 2025-07-25 23:15:24 -10:00
J. Nick Koston
90908996b1 Merge branch 'integration' into memory_api 2025-07-25 23:13:32 -10:00
J. Nick Koston
58d043ea0d Merge branch 'services_must_make_copy' into integration 2025-07-25 23:13:09 -10:00
J. Nick Koston
a57daa2656 Merge branch 'integration' into memory_api 2025-07-25 23:12:04 -10:00
J. Nick Koston
6bb6e475e7 Merge branch 'optional_api' into integration 2025-07-25 23:11:54 -10:00
J. Nick Koston
01b24a7b69 fix merge conflict 2025-07-25 23:11:11 -10:00
J. Nick Koston
5feb891e97 fix 2025-07-25 23:08:22 -10:00
J. Nick Koston
c32767db81 Merge branch 'dev' into optional_api 2025-07-25 23:06:10 -10:00
J. Nick Koston
0155769ffe [api] Fix string lifetime issue in Home Assistant service calls with templated values 2025-07-25 23:01:24 -10:00
J. Nick Koston
30b6a683c2 Merge branch 'integration' into memory_api 2025-07-25 21:39:46 -10:00
J. Nick Koston
7976c5e06c Merge branch 'api_ha_services' into memory_api 2025-07-25 21:39:38 -10:00
J. Nick Koston
50f770c600 Merge branch 'api_ha_services' into integration 2025-07-25 21:39:28 -10:00
J. Nick Koston
1cf5822bf5 Merge remote-tracking branch 'upstream/dev' into api_ha_services 2025-07-25 21:39:09 -10:00
J. Nick Koston
369b5e6c86 Merge branch 'dev' into optional_api 2025-07-25 21:36:44 -10:00
J. Nick Koston
f6ebdd79fe Merge branch 'dev' into empty_messages 2025-07-25 19:29:06 -10:00
J. Nick Koston
9010ddf56b [api] Optimize protobuf empty message handling to reduce flash and runtime overhead 2025-07-25 19:28:20 -10:00
J. Nick Koston
89c47c0dae Merge branch 'integration' into memory_api 2025-07-25 18:34:24 -10:00
J. Nick Koston
cae688446f Merge remote-tracking branch 'upstream/dependabot/pip/aioesphomeapi-37.1.0' into integration 2025-07-25 18:34:16 -10:00
dependabot[bot]
9bf666d63f Bump aioesphomeapi from 37.0.4 to 37.1.0
Bumps [aioesphomeapi](https://github.com/esphome/aioesphomeapi) from 37.0.4 to 37.1.0.
- [Release notes](https://github.com/esphome/aioesphomeapi/releases)
- [Commits](https://github.com/esphome/aioesphomeapi/compare/v37.0.4...v37.1.0)

---
updated-dependencies:
- dependency-name: aioesphomeapi
  dependency-version: 37.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-26 04:33:21 +00:00
J. Nick Koston
63e5a0b38c Merge branch 'integration' into memory_api 2025-07-25 18:28:03 -10:00
J. Nick Koston
09a24e0d88 Merge branch 'i2c_logging_fix' into integration 2025-07-25 18:27:54 -10:00
J. Nick Koston
de69e78a78 [i2c] Fix logging level for bus scan results in dump_config 2025-07-25 18:26:10 -10:00
J. Nick Koston
00266e080b merge 2025-07-25 17:39:48 -10:00
J. Nick Koston
9d4cf2543f Merge branch 'ble_chars' into integration 2025-07-25 17:39:24 -10:00
J. Nick Koston
967993f70d fix descriptor lookup 2025-07-25 17:39:14 -10:00
J. Nick Koston
711b153a6a revert 2025-07-25 17:32:30 -10:00
J. Nick Koston
ec9b10954c Merge branch 'integration' into memory_api 2025-07-25 17:25:55 -10:00
J. Nick Koston
c272e7282a Merge branch 'ble_chars' into integration 2025-07-25 17:25:47 -10:00
J. Nick Koston
5884bdb9e8 preen 2025-07-25 17:25:30 -10:00
J. Nick Koston
f0a63313b1 Merge branch 'integration' into memory_api 2025-07-25 17:22:54 -10:00
J. Nick Koston
15806fb95d Merge branch 'ble_chars' into integration 2025-07-25 17:22:40 -10:00
J. Nick Koston
d40a5a1651 preen 2025-07-25 17:21:38 -10:00
J. Nick Koston
535e995c75 preen 2025-07-25 17:20:37 -10:00
J. Nick Koston
6c825def9e Merge branch 'integration' into memory_api 2025-07-25 17:15:23 -10:00
J. Nick Koston
cb51c2e930 Merge branch 'ble_chars' into integration 2025-07-25 17:15:14 -10:00
J. Nick Koston
a06c4e1d56 cleanup 2025-07-25 17:14:56 -10:00
J. Nick Koston
793b3de3e9 revert 2025-07-25 16:50:36 -10:00
J. Nick Koston
60d988ca92 Merge branch 'ble_chars' into memory_api 2025-07-25 16:44:40 -10:00
J. Nick Koston
abf94e61f1 Revert "Revert "cleanup""
This reverts commit 7320cd24f0.
2025-07-25 16:43:28 -10:00
J. Nick Koston
7320cd24f0 Revert "cleanup"
This reverts commit 40a3232267.
2025-07-25 16:42:05 -10:00
J. Nick Koston
40a3232267 cleanup 2025-07-25 16:40:09 -10:00
J. Nick Koston
1d22bcac82 cleanup 2025-07-25 16:38:32 -10:00
J. Nick Koston
9dbcb2ea2e Merge branch 'integration' into memory_api 2025-07-25 16:17:31 -10:00
J. Nick Koston
cab19aed3d Merge branch 'ble_chars' into integration 2025-07-25 16:17:22 -10:00
J. Nick Koston
b22ff37e3d cleanup 2025-07-25 16:09:44 -10:00
J. Nick Koston
3396dfe52a cleanup 2025-07-25 16:08:22 -10:00
J. Nick Koston
accbc8fb0b cleanup 2025-07-25 16:07:46 -10:00
J. Nick Koston
5d8f38cce4 cleanup 2025-07-25 15:58:49 -10:00
J. Nick Koston
85a4f05d67 cleanup 2025-07-25 15:57:23 -10:00
J. Nick Koston
8a03e4c2cb cleanup 2025-07-25 15:56:00 -10:00
J. Nick Koston
e28c32af15 Merge branch 'integration' into memory_api 2025-07-25 15:37:20 -10:00
J. Nick Koston
4da9abe3fa Merge branch 'api_ha_services' into integration 2025-07-25 15:37:06 -10:00
J. Nick Koston
95b8321284 [api] Add conditional compilation for Home Assistant service subscriptions 2025-07-25 15:26:15 -10:00
J. Nick Koston
ce96c3c105 Merge branch 'integration' into memory_api 2025-07-25 14:48:21 -10:00
J. Nick Koston
3538cf936c Merge branch 'optional_api' into integration 2025-07-25 14:48:12 -10:00
J. Nick Koston
fd8c77c340 remove unneeded assertion 2025-07-25 14:48:00 -10:00
J. Nick Koston
6b49813084 Merge branch 'integration' into memory_api 2025-07-25 14:36:23 -10:00
J. Nick Koston
80407cf755 Merge branch 'missing_password_ifdefs' into integration 2025-07-25 14:36:01 -10:00
J. Nick Koston
ed379852fb cleanup 2025-07-25 14:35:47 -10:00
J. Nick Koston
662b5a452e Merge branch 'integration' into memory_api 2025-07-25 13:34:00 -10:00
J. Nick Koston
64d92fc92c Merge branch 'missing_password_ifdefs' into integration 2025-07-25 13:33:47 -10:00
J. Nick Koston
48128d965e make clang-tidy happy 2025-07-25 13:33:36 -10:00
J. Nick Koston
254c70a420 Merge branch 'integration' into memory_api 2025-07-25 13:28:11 -10:00
J. Nick Koston
5f9bd75954 Merge branch 'missing_password_ifdefs' into integration 2025-07-25 13:27:58 -10:00
J. Nick Koston
9ac38ff8d0 [api] Add missing USE_API_PASSWORD guards to reduce flash usage 2025-07-25 13:25:46 -10:00
J. Nick Koston
436ba20b7f Merge branch 'integration' into memory_api 2025-07-25 12:11:11 -10:00
J. Nick Koston
b89b1dfc29 Merge remote-tracking branch 'upstream/integration' into integration 2025-07-25 12:10:58 -10:00
J. Nick Koston
e7ea184709 preen 2025-07-25 12:10:41 -10:00
J. Nick Koston
b68f2b0ae4 Merge remote-tracking branch 'origin/memory_api' into memory_api 2025-07-25 12:08:26 -10:00
J. Nick Koston
4053a88c3a Merge branch 'integration' into memory_api 2025-07-25 12:08:13 -10:00
J. Nick Koston
9df3ad3567 Merge remote-tracking branch 'origin/homeassistant_states' into integration 2025-07-25 12:06:39 -10:00
J. Nick Koston
52df0a9412 Merge branch 'homeassistant_states' into integration 2025-07-25 12:05:59 -10:00
J. Nick Koston
9c4fc5d354 fixes 2025-07-25 11:59:13 -10:00
J. Nick Koston
1ac444a558 Merge remote-tracking branch 'origin/dev' into homeassistant_states 2025-07-25 11:55:29 -10:00
J. Nick Koston
90587583b4 [api] Add conditional compilation for Home Assistant state subscriptions 2025-07-25 11:55:07 -10:00
J. Nick Koston
0420bb3862 [api] Add conditional compilation for Home Assistant state subscriptions 2025-07-25 11:47:52 -10:00
J. Nick Koston
17dca4d761 Merge branch 'integration' into memory_api 2025-07-25 11:29:22 -10:00
J. Nick Koston
794db17e0f Merge remote-tracking branch 'upstream/optional_api' into integration 2025-07-25 11:29:10 -10:00
J. Nick Koston
91ec0f959e review comment 2025-07-25 11:27:01 -10:00
J. Nick Koston
066e4940e1 Merge branch 'integration' into memory_api 2025-07-25 11:02:11 -10:00
J. Nick Koston
88adbe7197 Merge branch 'optional_api' into integration 2025-07-25 11:02:01 -10:00
J. Nick Koston
3765058813 cover 2025-07-25 10:58:15 -10:00
J. Nick Koston
6cd2a80224 [api] Remove unnecessary string copies from optional access 2025-07-25 10:50:32 -10:00
J. Nick Koston
bacb6a2c11 Merge branch 'integration' into memory_api 2025-07-25 08:42:45 -10:00
J. Nick Koston
f248309a7f Merge branch 'start_end_setup' into integration 2025-07-25 08:42:32 -10:00
J. Nick Koston
76a63e5d55 Merge branch 'dev' into integration 2025-07-25 08:42:21 -10:00
J. Nick Koston
65f7426ceb keep mcp2515 since it has error flags 2025-07-24 22:08:59 -10:00
J. Nick Koston
9cd657e8f5 Apply suggestions from code review 2025-07-24 22:05:39 -10:00
J. Nick Koston
431766d898 preen 2025-07-24 21:08:57 -10:00
J. Nick Koston
9d20b04512 preen 2025-07-24 21:07:43 -10:00
J. Nick Koston
6a9f1d9b2e preen 2025-07-24 21:05:38 -10:00
J. Nick Koston
c18724526a preen 2025-07-24 21:03:46 -10:00
J. Nick Koston
cce7eca2b7 preen 2025-07-24 21:03:32 -10:00
J. Nick Koston
0f9fa89ddc preen 2025-07-24 21:02:53 -10:00
J. Nick Koston
56d6c41a1d preen 2025-07-24 21:02:45 -10:00
J. Nick Koston
0f7cfe2c95 preen 2025-07-24 21:02:05 -10:00
J. Nick Koston
f33419a3aa preen 2025-07-24 21:01:47 -10:00
J. Nick Koston
3f33f04651 preen 2025-07-24 21:01:32 -10:00
J. Nick Koston
abcf62339d preen 2025-07-24 21:00:53 -10:00
J. Nick Koston
bd20d8b7b2 preen 2025-07-24 20:59:26 -10:00
J. Nick Koston
3843e4011f preen 2025-07-24 20:58:29 -10:00
J. Nick Koston
5b7ed4f419 preen 2025-07-24 20:57:51 -10:00
J. Nick Koston
a14809999a preen 2025-07-24 20:56:28 -10:00
J. Nick Koston
fd6204e804 preen 2025-07-24 20:54:00 -10:00
J. Nick Koston
a418e8df48 preen 2025-07-24 20:53:25 -10:00
J. Nick Koston
05d1c0300f preen 2025-07-24 20:49:36 -10:00
J. Nick Koston
d54724a475 preen 2025-07-24 20:48:51 -10:00
J. Nick Koston
0121dfc514 preen 2025-07-24 20:46:10 -10:00
J. Nick Koston
1a1382de43 running setup 2025-07-24 16:29:54 -10:00
J. Nick Koston
3d0cea4ce3 revert 2025-07-24 16:28:31 -10:00
J. Nick Koston
25cd16409b running setup 2025-07-24 16:27:59 -10:00
RubenKelevra
25666811c6 Update esp32-camera library version to 2.1.0 2025-07-24 20:49:59 +02:00
J. Nick Koston
d839141386 Merge branch 'integration' into memory_api 2025-07-23 22:41:37 -10:00
J. Nick Koston
86919102c8 Merge remote-tracking branch 'upstream/dev' into integration 2025-07-23 22:41:22 -10:00
J. Nick Koston
43e2938724 Merge branch '20250724-ld2450-use-deduplicator' into integration 2025-07-23 22:41:09 -10:00
J. Nick Koston
82c65040e2 Merge branch 'integration' into memory_api 2025-07-23 21:23:01 -10:00
J. Nick Koston
d291c1b207 Merge remote-tracking branch 'upstream/dev' into integration 2025-07-23 21:22:50 -10:00
J. Nick Koston
3a4f645a6c Merge remote-tracking branch 'upstream/dev' into memory_api 2025-07-23 21:22:29 -10:00
Keith Burzinski
b977231431 clang-tidy 2025-07-24 02:13:52 -05:00
J. Nick Koston
557da2e7a7 Merge branch 'integration' into memory_api 2025-07-23 20:54:51 -10:00
J. Nick Koston
1458845672 Merge branch 'threading_model' into integration 2025-07-23 20:54:43 -10:00
J. Nick Koston
e4c8a6a0af [core] Revert #9851 and rename ESPHOME_CORES to ESPHOME_THREAD 2025-07-23 20:45:54 -10:00
Keith Burzinski
6609dce695 [ld2450] Use Deduplicator for sensors 2025-07-24 01:30:31 -05:00
J. Nick Koston
a5b4629662 Merge branch 'integration' into memory_api 2025-07-23 19:06:33 -10:00
J. Nick Koston
a4f952b851 Merge branch 'lwip_slowness' into integration 2025-07-23 19:06:24 -10:00
J. Nick Koston
8146a0139f [esp32] Enable LWIP core locking on ESP-IDF to reduce socket operation overhead 2025-07-23 18:50:46 -10:00
J. Nick Koston
7ba2927d1d Merge branch 'integration' into memory_api 2025-07-23 18:05:17 -10:00
J. Nick Koston
2d66effbda Merge branch 'api_nest' into integration 2025-07-23 18:05:03 -10:00
J. Nick Koston
dcae628b25 [api] Use C++17 nested namespace syntax 2025-07-23 18:04:06 -10:00
J. Nick Koston
74c9580e4b Merge branch 'integration' into memory_api 2025-07-23 17:55:17 -10:00
J. Nick Koston
42862ec5b5 Merge remote-tracking branch 'upstream/dev' into integration 2025-07-23 17:54:53 -10:00
J. Nick Koston
f9c844be89 Merge branch 'integration' into memory_api 2025-07-22 23:52:21 -10:00
J. Nick Koston
dee58804e8 Merge branch 'loop_fix' into integration 2025-07-22 23:52:08 -10:00
J. Nick Koston
77c8363946 [core] Restore COMPONENT_STATE_LOOP_DONE check in calculate_looping_components 2025-07-22 23:49:33 -10:00
J. Nick Koston
0b2270c1d0 Merge branch 'integration' into memory_api 2025-07-22 23:24:24 -10:00
J. Nick Koston
bfae905a2b Merge branch 'bluetooth_namespace_cpp17' into integration 2025-07-22 19:41:52 -10:00
J. Nick Koston
5b8ae6ed1a update script 2025-07-22 19:20:28 -10:00
J. Nick Koston
1b74c877e1 Merge branch 'integration' into memory_api 2025-07-22 19:17:27 -10:00
J. Nick Koston
edeee42fd9 Merge branch 'bluetooth_namespace_cpp17' into integration 2025-07-22 19:17:18 -10:00
J. Nick Koston
8ae2b31a2f [bluetooth_proxy] [esp32_ble_tracker] [esp32_ble] Use C++17 nested namespace syntax 2025-07-22 19:16:01 -10:00
J. Nick Koston
aefb53cb0e Merge branch 'integration' into memory_api 2025-07-22 17:58:44 -10:00
J. Nick Koston
0fea9aab99 Merge remote-tracking branch 'upstream/component_cleanups' into integration 2025-07-22 17:58:36 -10:00
J. Nick Koston
e5001734ce [core] Fix component state documentation and add state helper method 2025-07-22 17:57:34 -10:00
J. Nick Koston
39f79522db Merge branch 'integration' into memory_api 2025-07-22 15:57:37 -10:00
J. Nick Koston
9bceed2cfc Merge branch 'fix_missed_calculate_looping_components_' into integration 2025-07-22 15:57:15 -10:00
J. Nick Koston
c400d8e5a9 Merge branch 'dev' into fix_missed_calculate_looping_components_ 2025-07-22 15:51:47 -10:00
J. Nick Koston
e6961f8f24 wip 2025-07-22 15:46:49 -10:00
J. Nick Koston
0b9b33b81b [core] Initialize looping_components_ before setup blocking phase 2025-07-22 15:42:09 -10:00
J. Nick Koston
d71f2ad185 Merge remote-tracking branch 'upstream/dev' into integration 2025-07-22 13:16:00 -10:00
J. Nick Koston
f92571e767 Merge branch 'integration' into memory_api 2025-07-22 13:07:29 -10:00
J. Nick Koston
efa3d32fce Merge branch '5_4_2' into memory_api 2025-07-22 13:07:27 -10:00
J. Nick Koston
ac19d5eba2 Merge branch '5_4_2' into integration 2025-07-22 13:07:08 -10:00
J. Nick Koston
ffcf2229f6 Merge branch 'integration' into memory_api 2025-07-22 09:21:38 -10:00
J. Nick Koston
157c4f4369 Merge branch 'pb_dump' into integration 2025-07-22 09:21:32 -10:00
J. Nick Koston
2a935d9238 preen 2025-07-22 09:21:20 -10:00
J. Nick Koston
d4556608c8 preen 2025-07-22 09:21:14 -10:00
J. Nick Koston
285ad9af1e Merge branch 'integration' into memory_api 2025-07-22 09:16:47 -10:00
J. Nick Koston
f15662d4b5 Merge branch 'protobuf_magic_numbers' into integration 2025-07-22 09:16:28 -10:00
J. Nick Koston
fffa6eb0db Merge branch 'api_cleanups_5' into integration 2025-07-22 09:16:10 -10:00
J. Nick Koston
6711742248 Merge branch 'pb_dump' into integration 2025-07-22 09:15:49 -10:00
J. Nick Koston
d624f2a9ce dump helper 2025-07-22 09:10:01 -10:00
J. Nick Koston
c590ffd289 cleans to dump 2025-07-22 09:03:01 -10:00
J. Nick Koston
8096eea6c3 cleans to dump 2025-07-22 09:01:11 -10:00
J. Nick Koston
873aebc572 cleans to dump 2025-07-22 09:00:53 -10:00
J. Nick Koston
5adc58f826 cleans to dump 2025-07-22 09:00:44 -10:00
J. Nick Koston
3d35b9679a cleans to dump 2025-07-22 08:58:52 -10:00
J. Nick Koston
fbd3c051ec cleans to dump 2025-07-22 08:58:19 -10:00
J. Nick Koston
26b77e0f06 [api] Simplify generated authentication check code 2025-07-22 08:01:42 -10:00
J. Nick Koston
f3030e35a8 Merge branch 'integration' into memory_api 2025-07-22 07:49:36 -10:00
J. Nick Koston
adc21eef70 Merge branch 'api_services_emplace_back' into integration 2025-07-22 07:49:23 -10:00
J. Nick Koston
93fdea954f [api] Use emplace_back for TemplatableKeyValuePair construction in HomeAssistant services 2025-07-22 07:46:21 -10:00
J. Nick Koston
bb81a40b7c Merge branch 'integration' into memory_api 2025-07-21 22:26:21 -10:00
J. Nick Koston
922692338f Merge branch 'zero_copy_str' into integration 2025-07-21 22:26:09 -10:00
J. Nick Koston
2088deeacb give bot hint 2025-07-21 22:10:26 -10:00
J. Nick Koston
0534d1bfcf preen 2025-07-21 21:46:37 -10:00
J. Nick Koston
b8e326eb01 preen 2025-07-21 21:34:46 -10:00
J. Nick Koston
58d7533128 docs 2025-07-21 21:26:06 -10:00
J. Nick Koston
444c77775f Merge remote-tracking branch 'origin/zero_copy_str' into zero_copy_str 2025-07-21 21:25:01 -10:00
J. Nick Koston
2310610aa0 missed some 2025-07-21 21:24:34 -10:00
J. Nick Koston
7dec484eae Merge branch 'dev' into zero_copy_str 2025-07-21 21:21:29 -10:00
J. Nick Koston
712d3dee98 missed one 2025-07-21 21:06:43 -10:00
J. Nick Koston
44d7147ea4 fixes 2025-07-21 20:02:22 -10:00
J. Nick Koston
ede8e542bc fixes 2025-07-21 20:00:50 -10:00
J. Nick Koston
e17fef3208 unused 2025-07-21 19:50:41 -10:00
J. Nick Koston
7f25d3e6d3 unused 2025-07-21 19:50:01 -10:00
J. Nick Koston
72fd984d4b preen 2025-07-21 19:39:23 -10:00
J. Nick Koston
97525cfe87 preen 2025-07-21 19:31:42 -10:00
J. Nick Koston
8f201cdb7e fixes 2025-07-21 18:31:13 -10:00
J. Nick Koston
d0511e118d fixes 2025-07-21 18:28:09 -10:00
J. Nick Koston
c120676d19 fixes 2025-07-21 18:26:59 -10:00
J. Nick Koston
bd52acff12 adjust 2025-07-21 18:14:36 -10:00
J. Nick Koston
22422fc3dd send 2025-07-21 18:03:00 -10:00
J. Nick Koston
70c9cf9d95 ref 2025-07-21 17:24:23 -10:00
J. Nick Koston
b0aafb1226 ref 2025-07-21 17:21:59 -10:00
J. Nick Koston
c4ac22286f zero_copy_str 2025-07-21 17:02:01 -10:00
J. Nick Koston
4a0716d7ba Merge branch 'integration' into memory_api 2025-07-21 13:46:41 -10:00
J. Nick Koston
4f17c352db Merge branch 'fixed_arrays' into integration 2025-07-21 13:46:25 -10:00
J. Nick Koston
37d24dd707 cleanup 2025-07-21 13:44:28 -10:00
J. Nick Koston
a508d9dd3a Merge branch 'integration' into memory_api 2025-07-21 13:25:22 -10:00
J. Nick Koston
48436ec7c8 Merge branch 'fixed_arrays' into integration 2025-07-21 13:25:13 -10:00
Jonathan Swoboda
daf241b3f6 Remove picolibc dir from clangtidy 2025-07-21 19:23:34 -04:00
J. Nick Koston
4c62f43dcd cleanup 2025-07-21 13:19:19 -10:00
J. Nick Koston
767ec53cfa cleanup 2025-07-21 13:18:10 -10:00
J. Nick Koston
7b9acd39e1 cleanup 2025-07-21 13:17:18 -10:00
J. Nick Koston
55272dd0fd cleanup 2025-07-21 13:13:45 -10:00
J. Nick Koston
bc6b1ffc14 cleanup 2025-07-21 13:12:30 -10:00
J. Nick Koston
b3abebfb37 cleanup 2025-07-21 13:08:51 -10:00
J. Nick Koston
f034069b5e cleanup 2025-07-21 13:04:23 -10:00
J. Nick Koston
9a391df0f0 cleanup 2025-07-21 13:03:21 -10:00
J. Nick Koston
6d6bf82501 cleanup 2025-07-21 13:02:46 -10:00
J. Nick Koston
5f14579af8 cleanup 2025-07-21 13:00:30 -10:00
J. Nick Koston
8ee06cdc8c cleanup 2025-07-21 12:56:57 -10:00
J. Nick Koston
37cbcd5110 preen 2025-07-21 12:55:05 -10:00
J. Nick Koston
91e1a4ff76 fixed arrays 2025-07-21 12:49:48 -10:00
J. Nick Koston
ed190a92b1 Merge branch 'integration' into memory_api 2025-07-21 11:54:02 -10:00
J. Nick Koston
b660c867fb Merge branch 'api_inserts' into integration 2025-07-21 11:53:51 -10:00
J. Nick Koston
4cdef8c001 const 2025-07-21 11:50:20 -10:00
J. Nick Koston
a1667b29f1 Merge branch 'integration' into memory_api 2025-07-21 11:40:58 -10:00
J. Nick Koston
74fe8bd022 Merge remote-tracking branch 'upstream/dev' into integration 2025-07-21 11:40:41 -10:00
J. Nick Koston
b38faa1870 Merge branch 'integration' into memory_api 2025-07-21 11:29:30 -10:00
J. Nick Koston
524d69a238 Merge branch 'api_inserts' into integration 2025-07-21 11:29:10 -10:00
J. Nick Koston
4a39f14037 [api] Optimize noise handshake with memcpy for faster connection setup 2025-07-21 11:20:49 -10:00
J. Nick Koston
b66c6dd856 Merge branch 'integration' into memory_api 2025-07-21 10:54:17 -10:00
J. Nick Koston
504c67f59f Merge branch 'memcpy_speedup' into integration 2025-07-21 10:54:10 -10:00
J. Nick Koston
383791418b [api] Optimize string encoding with memcpy for 10x performance improvement 2025-07-21 10:50:36 -10:00
J. Nick Koston
0240a7c310 Merge remote-tracking branch 'upstream/dev' into memory_api 2025-07-21 09:57:58 -10:00
J. Nick Koston
0be1395647 [api] Replace magic numbers with MESSAGE_TYPE constants in protobuf switch cases 2025-07-21 08:44:30 -10:00
Jonathan Swoboda
daae3a93ab Update .clang-tidy.hash 2025-07-21 08:13:20 -04:00
Jonathan Swoboda
00eba20ea9 Merge remote-tracking branch 'upstream/dev' into 5_4_2 2025-07-21 07:59:19 -04:00
J. Nick Koston
31caacabf0 revert -- for followup 2025-07-20 21:46:14 -10:00
J. Nick Koston
8a7446a1ea Merge branch 'integration' into memory_api 2025-07-20 21:37:55 -10:00
J. Nick Koston
1395af2c1c Merge branch 'ble_services_opt' into integration 2025-07-20 21:37:41 -10:00
J. Nick Koston
ebf225d5f2 cleanup 2025-07-20 21:37:15 -10:00
J. Nick Koston
b6aca30c42 cleanup 2025-07-20 21:36:27 -10:00
J. Nick Koston
b5da9b0e7c Merge branch 'integration' into memory_api 2025-07-20 21:31:38 -10:00
J. Nick Koston
38d38d6e8c Merge branch 'ble_services_opt' into integration 2025-07-20 21:31:15 -10:00
J. Nick Koston
fffc324c6e [bluetooth_proxy] Optimize service discovery with in-place construction 2025-07-20 21:29:36 -10:00
J. Nick Koston
3d832e4d92 Merge branch 'zero_copy' into memory_api 2025-07-20 21:15:16 -10:00
J. Nick Koston
85ab9d3eec Merge branch 'zero_copy' into integration 2025-07-20 21:14:53 -10:00
J. Nick Koston
67b9c249d4 device_id 2025-07-20 21:12:03 -10:00
J. Nick Koston
c66726336c Merge branch 'zero_copy' into memory_api 2025-07-20 21:03:01 -10:00
J. Nick Koston
54158bf5f1 Merge branch 'zero_copy' into integration 2025-07-20 21:02:54 -10:00
J. Nick Koston
edc641cfa3 Merge remote-tracking branch 'origin/zero_copy' into zero_copy 2025-07-20 21:02:48 -10:00
J. Nick Koston
12994c3a29 preen 2025-07-20 21:02:33 -10:00
J. Nick Koston
a63ebf2c5e preen 2025-07-20 21:02:01 -10:00
J. Nick Koston
839a26c289 Merge branch 'dev' into zero_copy 2025-07-20 20:46:13 -10:00
J. Nick Koston
9e6481c492 Merge branch 'integration' into memory_api 2025-07-20 20:44:25 -10:00
J. Nick Koston
311888ac6d Merge branch 'zero_copy' into integration 2025-07-20 20:44:14 -10:00
J. Nick Koston
7e86aefa91 preen 2025-07-20 20:44:03 -10:00
J. Nick Koston
756fc89eab preen 2025-07-20 20:43:50 -10:00
J. Nick Koston
c8140e966a Merge branch 'integration' into memory_api 2025-07-20 20:39:31 -10:00
J. Nick Koston
eff866c222 Merge branch 'zero_copy' into integration 2025-07-20 20:39:24 -10:00
J. Nick Koston
ffaba916d7 cleanup 2025-07-20 20:39:13 -10:00
J. Nick Koston
1de659420e Merge branch 'zero_copy' into memory_api 2025-07-20 20:23:15 -10:00
J. Nick Koston
d9210eba69 Merge branch 'zero_copy' into integration 2025-07-20 20:18:35 -10:00
J. Nick Koston
4a8f6ce556 Merge remote-tracking branch 'upstream/dev' into zero_copy 2025-07-20 20:17:55 -10:00
J. Nick Koston
8c11241af0 cleanup 2025-07-20 20:08:57 -10:00
J. Nick Koston
b24ff7236e cleanup 2025-07-20 20:07:30 -10:00
J. Nick Koston
5e906b1dd9 cleanup 2025-07-20 20:06:50 -10:00
J. Nick Koston
ad52d80281 cleanup 2025-07-20 19:57:32 -10:00
J. Nick Koston
04953db51e cleanup 2025-07-20 19:56:42 -10:00
J. Nick Koston
8b74333e8b preen 2025-07-20 19:52:26 -10:00
J. Nick Koston
5fb97e8e3c preen 2025-07-20 19:50:55 -10:00
J. Nick Koston
8b09a5259e preen 2025-07-20 19:48:19 -10:00
J. Nick Koston
ae7aa4c0ef preen 2025-07-20 19:46:41 -10:00
J. Nick Koston
9cb86241b9 cleanup 2025-07-20 19:40:21 -10:00
J. Nick Koston
1dc736e27a preen 2025-07-20 19:28:07 -10:00
J. Nick Koston
7de63d0670 fixes 2025-07-20 19:18:25 -10:00
J. Nick Koston
54bbde6183 zero copy cleanup 2025-07-20 19:01:41 -10:00
J. Nick Koston
8b54e46652 Merge branch 'add_fixed_field' into integration 2025-07-20 18:06:30 -10:00
J. Nick Koston
14e2c85028 [api] Remove unused add_fixed_field template function 2025-07-20 18:05:21 -10:00
J. Nick Koston
9cd1c7a355 Merge branch 'integration' into memory_api 2025-07-20 16:48:23 -10:00
J. Nick Koston
e2a0879239 Merge branch 'uses_password_ifdef' into integration 2025-07-20 16:46:55 -10:00
J. Nick Koston
197b04d74f Merge remote-tracking branch 'upstream/dev' into integration 2025-07-20 16:45:58 -10:00
J. Nick Koston
852671945a [api] Sync uses_password field_ifdef optimization from aioesphomeapi 2025-07-20 16:26:17 -10:00
J. Nick Koston
8a296e013c Merge branch 'integration' into memory_api 2025-07-20 14:37:04 -10:00
J. Nick Koston
953c05d4da Merge branch 'api_frame_helper_split' into integration 2025-07-20 14:33:06 -10:00
J. Nick Koston
af061d6cd8 have to dupe macros 2025-07-20 14:32:54 -10:00
J. Nick Koston
836ea5c60a have to dupe macros 2025-07-20 14:32:19 -10:00
J. Nick Koston
58f79ef654 Merge branch 'api_frame_helper_split' into integration 2025-07-20 14:31:12 -10:00
J. Nick Koston
984d10aff1 have to dupe macros 2025-07-20 14:31:01 -10:00
J. Nick Koston
48ddb5c999 Merge branch 'api_frame_helper_split' into integration 2025-07-20 14:27:48 -10:00
J. Nick Koston
cc34cc7a4e order 2025-07-20 14:27:34 -10:00
J. Nick Koston
59e567e567 Merge branch 'api_frame_helper_split' into integration 2025-07-20 14:23:58 -10:00
J. Nick Koston
a45be553ed Merge remote-tracking branch 'origin/api_frame_helper_split' into api_frame_helper_split 2025-07-20 14:23:44 -10:00
J. Nick Koston
ff59e37d8d fixes 2025-07-20 14:23:34 -10:00
J. Nick Koston
d251d78002 Merge branch 'dev' into api_frame_helper_split 2025-07-20 14:18:56 -10:00
J. Nick Koston
55833380c1 Merge branch 'api_frame_helper_split' into integration 2025-07-20 14:17:59 -10:00
J. Nick Koston
16bd3f92c4 fixes 2025-07-20 14:17:45 -10:00
J. Nick Koston
e1e95c36c5 Merge branch 'api_frame_helper_split' into integration 2025-07-20 14:15:14 -10:00
J. Nick Koston
2e7826aa34 Merge remote-tracking branch 'upstream/dev' into integration 2025-07-20 14:13:20 -10:00
J. Nick Koston
e1be941bda preen 2025-07-20 14:07:52 -10:00
J. Nick Koston
eea7b9843b preen 2025-07-20 14:04:08 -10:00
J. Nick Koston
a626053220 Merge branch 'integration' into memory_api 2025-07-20 13:20:02 -10:00
J. Nick Koston
a5f22e99a3 Merge branch 'frame_helper_dupe_name_storage' into integration 2025-07-20 13:19:50 -10:00
J. Nick Koston
fb44fddacf Merge remote-tracking branch 'upstream/dev' into integration 2025-07-20 13:19:34 -10:00
J. Nick Koston
72fcb29fd2 Merge remote-tracking branch 'upstream/dev' into frame_helper_dupe_name_storage 2025-07-20 13:00:45 -10:00
J. Nick Koston
29988d414c Merge branch 'integration' into memory_api 2025-07-20 12:28:11 -10:00
J. Nick Koston
82970b640f merge 2025-07-20 12:27:51 -10:00
J. Nick Koston
af724ffb15 Merge branch 'api_cleanups_2' into memory_api 2025-07-20 12:26:33 -10:00
J. Nick Koston
82dfd0a233 empty commit 2025-07-20 12:24:31 -10:00
J. Nick Koston
7688cc619b Merge branch 'integration' into memory_api 2025-07-20 12:23:25 -10:00
J. Nick Koston
232d3a8b89 Merge branch 'api_cleanups_2' into integration 2025-07-20 12:23:12 -10:00
J. Nick Koston
a976df4da8 Merge remote-tracking branch 'upstream/dev' into api_cleanups_2 2025-07-20 12:22:42 -10:00
J. Nick Koston
f9744dabc1 Merge remote-tracking branch 'upstream/dev' into api_cleanups_2 2025-07-20 12:21:49 -10:00
J. Nick Koston
79acf97c48 Merge branch 'integration' into memory_api 2025-07-20 12:18:30 -10:00
J. Nick Koston
8becc57835 Merge branch 'empty_hidden_side_effects' into integration 2025-07-20 12:18:14 -10:00
J. Nick Koston
f6b989bd9a cleanup 2025-07-20 12:15:16 -10:00
J. Nick Koston
109eae26a7 [core] Refactor scheduler to eliminate hidden side effects in empty_() method 2025-07-20 12:09:11 -10:00
J. Nick Koston
8496102eb6 Merge branch 'dev' into memory_api 2025-07-20 11:22:18 -10:00
J. Nick Koston
04d7213ede simplify 2025-07-20 09:42:17 -10:00
J. Nick Koston
2ebb17a05e Merge remote-tracking branch 'upstream/frame_helper_dupe_name_storage' into frame_helper_dupe_name_storage 2025-07-20 09:30:52 -10:00
J. Nick Koston
905263548d cleaner 2025-07-20 09:30:40 -10:00
J. Nick Koston
83c0589c06 Update esphome/components/api/api_frame_helper.h
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-07-20 09:22:17 -10:00
J. Nick Koston
acc8b57709 [api] Reduce memory usage by eliminating duplicate client info strings 2025-07-20 09:18:52 -10:00
J. Nick Koston
8621bca535 Merge branch 'integration' into memory_api 2025-07-19 22:04:57 -10:00
J. Nick Koston
fc4c383409 Merge branch 'area_device_info_ifdefs' into integration 2025-07-19 22:04:06 -10:00
J. Nick Koston
a5ed8db5bd [api] Fix missing ifdef guards for AreaInfo and DeviceInfo messages 2025-07-19 22:01:22 -10:00
J. Nick Koston
3060e2cbc3 Merge branch 'integration' into memory_api 2025-07-19 16:21:13 -10:00
J. Nick Koston
1cc507b211 Merge branch 'touch_setup_mode' into integration 2025-07-19 16:21:03 -10:00
J. Nick Koston
b88061843c Merge branch 'integration' into memory_api 2025-07-19 15:43:02 -10:00
J. Nick Koston
1d6fcafefc Merge branch 'api_cleanups_2' into integration 2025-07-19 15:42:49 -10:00
J. Nick Koston
bc57cdb71a preen 2025-07-19 15:40:53 -10:00
J. Nick Koston
b70007852d Merge branch 'integration' into memory_api 2025-07-19 15:29:42 -10:00
J. Nick Koston
9f6cd1f809 Merge branch 'api_cleanups_2' into integration 2025-07-19 15:29:32 -10:00
J. Nick Koston
3905085614 dry 2025-07-19 15:22:08 -10:00
J. Nick Koston
722df19758 dry 2025-07-19 15:18:43 -10:00
J. Nick Koston
0046e67727 wip 2025-07-19 15:06:42 -10:00
J. Nick Koston
7e3027d9bd wip 2025-07-19 15:05:26 -10:00
Jonathan Swoboda
d0307cec4f Fix logging message 2025-07-19 20:12:33 -04:00
J. Nick Koston
1bc7b805c0 Merge branch 'integration' into memory_api 2025-07-19 13:46:17 -10:00
J. Nick Koston
79e20ed894 Merge branch 'api_buffering_cleanup' into integration 2025-07-19 13:46:07 -10:00
J. Nick Koston
b125cd6979 save some more 2025-07-19 13:45:58 -10:00
J. Nick Koston
0582fee82c save some more 2025-07-19 13:43:47 -10:00
Jonathan Swoboda
cd4a10e4e1 Fix setup mode in v1 driver 2025-07-19 19:43:17 -04:00
J. Nick Koston
3400cdf4c0 Merge branch 'integration' into memory_api 2025-07-19 13:18:55 -10:00
J. Nick Koston
d72fe6ea4b Merge branch 'api_buffering_cleanup' into integration 2025-07-19 13:18:44 -10:00
J. Nick Koston
2ca306c1c1 [api] Optimize frame helper buffering to reduce flash usage by 176 bytes 2025-07-19 13:15:55 -10:00
J. Nick Koston
3ad551b27e Merge branch 'integration' into memory_api 2025-07-19 12:34:13 -10:00
J. Nick Koston
9682c6c3d7 Merge branch 'bugfix/make_schedule_rollover_atomic' into integration 2025-07-19 11:13:38 -10:00
J. Nick Koston
d67508a6eb move defines 2025-07-19 11:12:59 -10:00
J. Nick Koston
b25206b7bb move defines 2025-07-19 11:12:41 -10:00
J. Nick Koston
112c6e34a5 move defines 2025-07-19 11:11:32 -10:00
J. Nick Koston
2ed70c3c60 Merge branch 'bugfix/make_schedule_rollover_atomic' into integration 2025-07-19 10:53:31 -10:00
J. Nick Koston
9119ac1c32 fix stale comments 2025-07-19 10:50:40 -10:00
J. Nick Koston
152e3ee587 make more readable 2025-07-19 10:43:57 -10:00
J. Nick Koston
acbcc5f9b8 make more readable 2025-07-19 10:40:21 -10:00
J. Nick Koston
5ed589fc97 make more readable 2025-07-19 10:39:27 -10:00
J. Nick Koston
58696961bd make more readable 2025-07-19 10:38:28 -10:00
J. Nick Koston
a5f5af9596 make more readable 2025-07-19 10:36:49 -10:00
RubenKelevra
fde80bc530 core/scheduler: split millis_64_ into different platform functions 2025-07-19 21:44:35 +02:00
RubenKelevra
211739bba0 core/scheduler: Make millis_64_ rollover monotonic on SMP
The current implementation uses only memory_order_relaxed on all atomic
accesses. That protects each variable individually but not the semantic
link between the low word (last_millis_) and the high-word epoch counter
(millis_major_). On a multi-core target a reader could observe a freshly
stored low word before seeing the matching increment of the epoch,
causing a ~49-day negative jump.

Key fixes
- Release/acquire pairing
  - writer: compare_exchange_weak(..., memory_order_release, …)
  - reader: first load of last_millis_ now uses memory_order_acquire
  - ensures any core that sees the new low word also sees the updated
    high word
- Epoch-coherency retry loop
  - re-loads millis_major_ after the update and retries if it changed,
    guaranteeing monotonicity even when another core rolls over
    concurrently
- millis_major_ promoted to std::atomic<uint16_t> on SMP platforms
  - removes the formal data race at negligible cost
- new macros for better readability
  - ESPHOME_SINGLE_CORE – currently ESP8266/RP2040 only
  - ESPHOME_ATOMIC_SCHEDULER – all others except LibreTiny
- Logging and comments
  - loads atomics safely in debug output
  - updated inline docs to match the memory ordering

Behavior on single-core or non-atomic platforms is unchanged; multi-core
targets now get a provably monotonic 64-bit millisecond clock with
minimal overhead.
2025-07-19 19:09:10 +02:00
J. Nick Koston
23f0c596c2 Merge branch 'integration' into memory_api 2025-07-18 22:21:19 -10:00
J. Nick Koston
dec3c69190 Merge branch 'batch_eliminate_heap' into integration 2025-07-18 22:20:08 -10:00
J. Nick Koston
3204cf52e9 Update esphome/components/api/api_connection.cpp
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-07-18 22:17:12 -10:00
J. Nick Koston
e2d509d63d Merge branch 'integration' into memory_api 2025-07-18 22:11:40 -10:00
J. Nick Koston
00dd5d64de Merge branch 'batch_eliminate_heap' into integration 2025-07-18 22:11:20 -10:00
J. Nick Koston
09705ca526 guard 2025-07-18 22:11:13 -10:00
J. Nick Koston
8223db761d document 2025-07-18 22:05:55 -10:00
J. Nick Koston
9dddb749c5 Merge branch 'batch_eliminate_heap' into integration 2025-07-18 21:31:31 -10:00
J. Nick Koston
e2524c9764 [api] Eliminate heap allocation in process_batch_ using stack-allocated PacketInfo array 2025-07-18 21:14:25 -10:00
J. Nick Koston
03a2237f2e Merge remote-tracking branch 'upstream/dev' into integration 2025-07-18 20:19:21 -10:00
J. Nick Koston
ba62a368ff Merge branch 'ble_tracker_read_up_to_end' into integration 2025-07-18 16:32:32 -10:00
J. Nick Koston
ffbadc0929 [esp32_ble_tracker] Batch BLE advertisement processing to reduce overhead 2025-07-18 16:30:56 -10:00
J. Nick Koston
d19e2d9cce Merge branch 'bluetooth_proxy_fixes' into integration 2025-07-18 16:11:26 -10:00
J. Nick Koston
c7884253d2 cannot always need to update timestamp 2025-07-18 16:11:16 -10:00
J. Nick Koston
fd2e6b1d2d Merge branch 'bluetooth_proxy_fixes' into integration 2025-07-18 16:09:47 -10:00
J. Nick Koston
6b8da2f0ca preen 2025-07-18 16:09:37 -10:00
J. Nick Koston
45e9522221 Merge branch 'integration' into memory_api 2025-07-18 15:41:34 -10:00
J. Nick Koston
8084c19a6c Merge branch 'bluetooth_proxy_fixes' into integration 2025-07-18 14:51:40 -10:00
J. Nick Koston
2c63d5c7ce rpreen 2025-07-18 14:51:12 -10:00
J. Nick Koston
6a728c2d7d Merge branch 'bluetooth_proxy_fixes' into integration 2025-07-18 14:43:29 -10:00
J. Nick Koston
7afb2fe077 preen 2025-07-18 14:43:05 -10:00
J. Nick Koston
57c0a44b55 Merge branch 'bluetooth_proxy_fixes' into integration 2025-07-18 14:33:50 -10:00
J. Nick Koston
b2ec2615bb other way 2025-07-18 14:33:10 -10:00
J. Nick Koston
6a566c6305 other way 2025-07-18 14:31:27 -10:00
J. Nick Koston
da1e1ce9ce other way 2025-07-18 14:30:46 -10:00
J. Nick Koston
9902a4ee9c Revert "preen"
This reverts commit 5f13aa162d.
2025-07-18 14:28:45 -10:00
J. Nick Koston
2ce0753ec6 Revert "preen"
This reverts commit 27db5352ac.
2025-07-18 14:28:45 -10:00
J. Nick Koston
e4736e9aa7 Revert "preen"
This reverts commit 9f5584ac62.
2025-07-18 14:28:44 -10:00
J. Nick Koston
8acd7548c6 Revert "preen"
This reverts commit 1c4a50ad3a.
2025-07-18 14:28:43 -10:00
J. Nick Koston
1ca1ceb08d Revert "preen"
This reverts commit 4c9fa2f753.
2025-07-18 14:28:42 -10:00
J. Nick Koston
3087ccface Revert "preen"
This reverts commit a8dd0b474a.
2025-07-18 14:28:41 -10:00
J. Nick Koston
d9fe52a5fb Revert "preen"
This reverts commit 56fdc1d115.
2025-07-18 14:28:40 -10:00
J. Nick Koston
56fdc1d115 preen 2025-07-18 14:25:22 -10:00
J. Nick Koston
a8dd0b474a preen 2025-07-18 14:25:06 -10:00
J. Nick Koston
4c9fa2f753 preen 2025-07-18 14:24:49 -10:00
J. Nick Koston
1c4a50ad3a preen 2025-07-18 14:24:32 -10:00
J. Nick Koston
9f5584ac62 preen 2025-07-18 14:24:20 -10:00
J. Nick Koston
27db5352ac preen 2025-07-18 14:24:05 -10:00
J. Nick Koston
5f13aa162d preen 2025-07-18 14:23:38 -10:00
J. Nick Koston
9aa53fd140 preen 2025-07-18 14:22:43 -10:00
J. Nick Koston
b9afa119a0 preen 2025-07-18 14:22:29 -10:00
J. Nick Koston
1a62b75ec3 [bluetooth_proxy] Fix performance issue and service discovery on disconnect 2025-07-18 14:19:06 -10:00
J. Nick Koston
15693a9cf0 Merge branch 'integration' into memory_api 2025-07-18 13:04:17 -10:00
J. Nick Koston
a62a8c3d94 Merge branch 'missing_ifdef_member_vars' into integration 2025-07-18 12:57:59 -10:00
J. Nick Koston
8593da7426 missing ifdef 2025-07-18 12:57:32 -10:00
J. Nick Koston
0ce077db94 Merge branch 'missing_ifdef_member_vars' into integration 2025-07-18 12:53:28 -10:00
J. Nick Koston
512cc24dc7 [api] Fix missing ifdef guards for field_ifdef fields in protobuf base classes 2025-07-18 12:50:36 -10:00
J. Nick Koston
cd6d686fd6 Merge remote-tracking branch 'origin/dep_proto_fields' into memory_api 2025-07-18 12:31:11 -10:00
J. Nick Koston
eeb827e88f Merge remote-tracking branch 'upstream/dev' into memory_api 2025-07-18 12:30:32 -10:00
J. Nick Koston
a8324e84f0 Merge branch 'integration' into memory_api 2025-07-18 10:52:00 -10:00
J. Nick Koston
a23f33cbad Merge branch 'libretiny_gpio' into integration 2025-07-18 10:51:23 -10:00
J. Nick Koston
bab6fdcf4e nrf52 2025-07-18 10:50:40 -10:00
J. Nick Koston
a1e74802ea nrf52 2025-07-18 10:49:17 -10:00
J. Nick Koston
5be2339bb5 Merge branch 'dev' into dep_proto_fields 2025-07-18 10:30:42 -10:00
J. Nick Koston
9a0ab594ef Merge remote-tracking branch 'upstream/libretiny_gpio' into libretiny_gpio 2025-07-18 10:24:08 -10:00
J. Nick Koston
fbf615f73c list them all 2025-07-18 10:23:52 -10:00
J. Nick Koston
186e64931a Update esphome/components/gpio/binary_sensor/__init__.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-07-18 10:17:52 -10:00
J. Nick Koston
6e7e2b4471 [gpio] Disable interrupt mode by default for LibreTiny platforms 2025-07-18 10:15:56 -10:00
J. Nick Koston
6b83975df0 Merge branch 'integration' into memory_api 2025-07-18 10:05:43 -10:00
J. Nick Koston
f52fe63ad1 Merge remote-tracking branch 'origin/integration' into integration 2025-07-18 10:05:29 -10:00
J. Nick Koston
4723f767f4 Merge remote-tracking branch 'upstream/dep_proto_fields' into integration 2025-07-18 10:05:16 -10:00
J. Nick Koston
cc1abfcdb3 fixed unref enum tracking 2025-07-18 09:24:24 -10:00
J. Nick Koston
d6422b6d25 missed some more 2025-07-18 09:07:29 -10:00
J. Nick Koston
cde4fc0609 missed some more 2025-07-18 09:07:13 -10:00
J. Nick Koston
7f5eefed10 remove dead code 2025-07-18 09:01:18 -10:00
J. Nick Koston
1aab2f5a7f missed one 2025-07-18 08:57:30 -10:00
J. Nick Koston
7566d85941 preen 2025-07-18 08:47:27 -10:00
J. Nick Koston
db59f3ae88 preen 2025-07-18 08:42:18 -10:00
J. Nick Koston
dc7b39722d preen 2025-07-18 08:39:31 -10:00
J. Nick Koston
19ab40e5c2 preen 2025-07-18 08:38:22 -10:00
J. Nick Koston
8a2599b7c2 preen 2025-07-18 08:36:15 -10:00
J. Nick Koston
0a45014330 Remove deprecated protobuf fields to reduce flash usage 2025-07-18 08:13:33 -10:00
J. Nick Koston
10605e93cd Merge remote-tracking branch 'upstream/dev' into integration 2025-07-18 07:58:14 -10:00
J. Nick Koston
0f65731673 Merge branch 'async_tcp_mismatch_fix' into integration 2025-07-18 07:51:18 -10:00
J. Nick Koston
5f9331b112 Fix AsyncTCP version mismatch between platformio.ini and async_tcp component 2025-07-18 07:50:28 -10:00
J. Nick Koston
94f49ab9da Merge remote-tracking branch 'upstream/dev' into memory_api 2025-07-17 21:59:34 -10:00
J. Nick Koston
603d4cfcf9 Merge branch 'retiny_includes' into integration 2025-07-17 20:19:47 -10:00
J. Nick Koston
759fe53fd4 [libretiny] Remove unsupported lock-free queue and event pool implementations 2025-07-17 20:18:40 -10:00
J. Nick Koston
61a965019f Merge remote-tracking branch 'origin/integration' into integration 2025-07-17 14:43:45 -10:00
J. Nick Koston
a91d0e5c2f Merge branch 'scheduler_retiny' into integration 2025-07-17 14:43:35 -10:00
J. Nick Koston
e26c20910d [scheduler] Fix LibreTiny compilation error due to missing atomic operations 2025-07-17 14:42:35 -10:00
J. Nick Koston
6740561bd7 Fix scheduler with libretiny 2025-07-17 14:24:31 -10:00
J. Nick Koston
04820ede37 Merge branch 'bluetooth_proxy_heap' into integration 2025-07-17 14:08:00 -10:00
J. Nick Koston
732370effc remove unneeded cast 2025-07-17 13:34:00 -10:00
J. Nick Koston
03f52e741b Merge branch 'bluetooth_proxy_heap' into integration 2025-07-17 12:59:43 -10:00
J. Nick Koston
f5c6e03404 Merge remote-tracking branch 'upstream/dev' into bluetooth_proxy_heap 2025-07-17 12:58:40 -10:00
J. Nick Koston
ee7bda74c0 Revert "Revert "missed one""
This reverts commit d40fcb324c.
2025-07-17 12:24:57 -10:00
J. Nick Koston
d40fcb324c Revert "missed one"
This reverts commit 8ba14d1f54.
2025-07-17 12:24:36 -10:00
J. Nick Koston
126f7acad2 Merge branch 'bluetooth_proxy_heap' into integration 2025-07-17 12:23:39 -10:00
J. Nick Koston
f9357f5e6e Merge remote-tracking branch 'upstream/dev' into integration 2025-07-17 12:23:10 -10:00
J. Nick Koston
81281c181f Merge branch 'dev' into bluetooth_proxy_heap 2025-07-17 12:07:47 -10:00
J. Nick Koston
c17fdd91de commit overreserve fix 2025-07-17 10:23:00 -10:00
J. Nick Koston
1f0958e824 safer 2025-07-17 09:57:29 -10:00
J. Nick Koston
9291dc4e27 Merge remote-tracking branch 'upstream/dev' into bluetooth_proxy_heap 2025-07-17 09:53:25 -10:00
J. Nick Koston
72419eb540 fix 2025-07-17 07:21:32 -10:00
J. Nick Koston
dbbcbc0998 ble churn fix 2025-07-16 20:41:01 -10:00
J. Nick Koston
7c45afa338 ble churn fix 2025-07-16 20:40:46 -10:00
J. Nick Koston
984601f0b2 ble churn fix 2025-07-16 20:39:15 -10:00
J. Nick Koston
ee600ced31 Merge branch 'esphome_webserver_ota' into integration 2025-07-16 16:21:12 -10:00
J. Nick Koston
c3da5b7a3f tell the bot 2025-07-16 15:50:42 -10:00
J. Nick Koston
ce21b992e3 tidy happy 2025-07-16 15:49:30 -10:00
J. Nick Koston
88323bcca0 Allow disabling OTA for web_server while keeping it enabled for captive_portal 2025-07-16 15:42:48 -10:00
J. Nick Koston
121759c07d Merge branch 'lwip_locking_fix' into integration 2025-07-16 13:15:26 -10:00
J. Nick Koston
f1d2300153 simplify 2025-07-16 13:10:00 -10:00
J. Nick Koston
94fd2d8ca1 Merge branch 'dev' into lwip_locking_fix 2025-07-16 12:47:29 -10:00
J. Nick Koston
c51bae3640 Merge branch 'lwip_locking_fix' into integration 2025-07-16 11:10:51 -10:00
J. Nick Koston
a399e90ed6 fix missing init 2025-07-16 11:10:36 -10:00
J. Nick Koston
e164e6ce37 Merge branch 'lwip_locking_fix' into integration 2025-07-16 10:57:10 -10:00
J. Nick Koston
cb0ef0b54a Fix lwIP thread safety assertion failures on ESP32 2025-07-16 10:56:29 -10:00
J. Nick Koston
73a8c03562 Merge branch 'integration' into memory_api 2025-07-16 08:26:40 -10:00
J. Nick Koston
e1583ff2d3 Merge branch 'template_send_message' into integration 2025-07-16 08:26:29 -10:00
J. Nick Koston
969fc54409 Merge branch 'template_send_message' into memory_api 2025-07-16 08:26:19 -10:00
J. Nick Koston
8ba14d1f54 missed one 2025-07-16 08:18:51 -10:00
J. Nick Koston
6aeefdc085 Refactor API send_message from template to non-template implementation 2025-07-16 08:09:54 -10:00
J. Nick Koston
9d10c79491 Merge branch 'integration' into memory_api 2025-07-15 23:24:53 -10:00
J. Nick Koston
b50bd00207 Merge branch 'dev' into integration 2025-07-15 23:24:34 -10:00
J. Nick Koston
472a594c6d Merge branch 'integration' into memory_api 2025-07-15 22:25:01 -10:00
J. Nick Koston
3e6da2870a Merge branch 'vtable' into integration 2025-07-15 22:24:32 -10:00
J. Nick Koston
d999ef3047 Merge branch 'entity_dupe_code' into integration 2025-07-15 22:24:23 -10:00
J. Nick Koston
e5bd2bd31b not virtual 2025-07-15 22:17:42 -10:00
J. Nick Koston
fc30ca83ca Reduce API proto vtable overhead by splitting decode functionality 2025-07-15 22:07:27 -10:00
J. Nick Koston
5dc7dee6d6 empty commit 2025-07-15 21:30:58 -10:00
J. Nick Koston
5aa4ed8d87 Merge remote-tracking branch 'upstream/dev' into entity_dupe_code 2025-07-15 21:24:00 -10:00
J. Nick Koston
5c4ded83d0 Merge branch 'integration' into memory_api 2025-07-15 20:04:01 -10:00
J. Nick Koston
7744b2db79 Merge branch 'proto_field_ifdefs' into integration 2025-07-15 20:02:50 -10:00
J. Nick Koston
8fcbcebf84 Merge branch 'entity_dupe_code' into integration 2025-07-15 20:02:45 -10:00
J. Nick Koston
561ed32b2a fix a few more that are missing 2025-07-15 19:58:28 -10:00
J. Nick Koston
5adfb71fe1 fix a few more that are missing 2025-07-15 19:58:13 -10:00
J. Nick Koston
dfdec8ec0a fix a few more that are missing 2025-07-15 19:58:08 -10:00
J. Nick Koston
f6c12229e5 fix a few more that are missing 2025-07-15 19:57:43 -10:00
J. Nick Koston
c80481baab fix a few more that are missing 2025-07-15 19:57:34 -10:00
J. Nick Koston
86ceccbb1c fix a few more that are missing 2025-07-15 19:57:15 -10:00
J. Nick Koston
628caf63fc fix a few more that are missing 2025-07-15 19:57:10 -10:00
J. Nick Koston
1ce5a994d8 fix a few more that are missing 2025-07-15 19:56:40 -10:00
J. Nick Koston
2abccce297 Merge remote-tracking branch 'upstream/dev' into proto_field_ifdefs 2025-07-15 19:51:56 -10:00
J. Nick Koston
0448a66960 Merge remote-tracking branch 'upstream/dev' into entity_dupe_code 2025-07-15 19:49:33 -10:00
J. Nick Koston
1a36c3cec4 Merge branch 'integration' into memory_api 2025-07-15 17:18:42 -10:00
J. Nick Koston
b497f11af0 Merge branch 'proto_field_ifdefs' into integration 2025-07-15 17:17:19 -10:00
J. Nick Koston
07f16dc065 Merge branch 'drop_unique_id' into integration 2025-07-15 17:16:13 -10:00
pre-commit-ci-lite[bot]
d2deba6b69 [pre-commit.ci lite] apply automatic fixes 2025-07-16 01:56:19 +00:00
J. Nick Koston
545fa1f1bc Merge remote-tracking branch 'upstream/dev' into proto_field_ifdefs 2025-07-15 15:52:18 -10:00
pre-commit-ci-lite[bot]
a477249266 [pre-commit.ci lite] apply automatic fixes 2025-07-16 01:35:26 +00:00
J. Nick Koston
b974ccabac Merge branch 'dev' from upstream 2025-07-15 15:25:51 -10:00
J. Nick Koston
8f38be0914 Merge remote-tracking branch 'upstream/dev' into proto_field_ifdefs 2025-07-15 15:19:26 -10:00
J. Nick Koston
2b12307b49 Merge remote-tracking branch 'upstream/drop_unique_id' into drop_unique_id 2025-07-15 15:10:29 -10:00
J. Nick Koston
e340d61a85 Merge upstream/dev into drop_unique_id 2025-07-15 15:09:56 -10:00
Jesse Hills
0110a376b7 Merge branch 'dev' into drop_unique_id 2025-07-16 13:09:52 +12:00
J. Nick Koston
c739a33be0 Merge remote-tracking branch 'upstream/dev' into memory_api 2025-07-15 12:22:30 -10:00
J. Nick Koston
0f6dad9c62 Merge branch 'scheduler_opt' into integration 2025-07-15 11:15:19 -10:00
J. Nick Koston
58541aa739 simplify 2025-07-15 11:11:15 -10:00
J. Nick Koston
4c91dead3d Merge branch 'loop_time_update_disable' into integration 2025-07-15 11:07:42 -10:00
J. Nick Koston
78a0fecc08 Fix timing overflow when components disable themselves during loop 2025-07-15 11:03:56 -10:00
J. Nick Koston
ff7a3d9f55 Merge branch 'integration' into memory_api 2025-07-15 09:39:01 -10:00
J. Nick Koston
42e1b1a2c1 Merge branch 'api_logconfig' into integration 2025-07-15 09:38:35 -10:00
J. Nick Koston
0d360938c2 Optimize API component LOGCONFIG usage for flash memory savings 2025-07-15 09:37:15 -10:00
J. Nick Koston
36ca3546f5 Merge branch 'scheduler_opt' into integration 2025-07-15 09:24:51 -10:00
J. Nick Koston
5536bdf0c9 Optimize scheduler timing by reducing millis() calls 2025-07-15 09:21:32 -10:00
J. Nick Koston
1718591ac1 Merge branch 'integration' into memory_api 2025-07-14 21:26:50 -10:00
J. Nick Koston
5aaa99d0e4 Merge branch 'logger_check_outside_func' into integration 2025-07-14 21:23:49 -10:00
J. Nick Koston
60e9ad2240 Skip API log message calls for unsubscribed log levels 2025-07-14 21:22:45 -10:00
J. Nick Koston
5ec25d84be Merge branch 'integration' into memory_api 2025-07-14 21:00:55 -10:00
J. Nick Koston
74b0a29a52 Merge branch 'api_connection_batch_prio' into integration 2025-07-14 20:59:52 -10:00
J. Nick Koston
909356698c Optimize API connection batch priority message handling to reduce flash usage 2025-07-14 20:31:34 -10:00
J. Nick Koston
bd416e761e Merge branch 'integration' into memory_api 2025-07-14 17:29:12 -10:00
J. Nick Koston
f34fe95f1c wip 2025-07-14 17:28:30 -10:00
J. Nick Koston
388fde1ee8 Merge entity_dupe_code: Refactor API connection entity encoding to reduce code duplication 2025-07-14 17:25:02 -10:00
J. Nick Koston
b13842f44e Refactor API connection entity encoding to reduce code duplication 2025-07-14 17:17:49 -10:00
J. Nick Koston
2396bf412d Merge branch 'integration' into memory_api 2025-07-14 17:03:26 -10:00
J. Nick Koston
1229766436 Merge branch 'drop_unique_id' into integration 2025-07-14 17:03:10 -10:00
J. Nick Koston
3fa899776d Merge branch 'integration' into memory_api 2025-07-14 16:56:53 -10:00
J. Nick Koston
77a5430f00 Merge remote-tracking branch 'upstream/dev' into integration 2025-07-14 16:56:37 -10:00
J. Nick Koston
f27ef9210a Merge branch 'integration' into memory_api 2025-07-14 16:56:19 -10:00
J. Nick Koston
8ac6075321 Merge remote-tracking branch 'origin/dev' into integration 2025-07-14 15:52:35 -10:00
J. Nick Koston
6e1e8ed321 Merge branch 'remove_parsed_adv_support_bluetooth_proxy' into integration 2025-07-14 15:52:20 -10:00
J. Nick Koston
0826ade69d Merge remote-tracking branch 'origin/dev' into integration 2025-07-14 14:33:50 -10:00
J. Nick Koston
cf9130f906 Merge remote-tracking branch 'kahrendt/json-bump-library' into integration 2025-07-14 14:33:42 -10:00
Kevin Ahrendt
d268c14f7e Apply suggestions from code review
Fixes unsigned integer wrong type

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2025-07-14 20:20:46 -04:00
J. Nick Koston
3cca7a6161 fix incorrect comment 2025-07-14 12:31:41 -10:00
J. Nick Koston
52d6801618 address bot comments 2025-07-14 12:29:40 -10:00
J. Nick Koston
a714e8da0b last ones 2025-07-14 11:52:11 -10:00
J. Nick Koston
1778776b73 use NOLINTBEGIN/NOLINTEND for the multi occ cases 2025-07-14 11:30:43 -10:00
J. Nick Koston
d6e05061f8 a few more 2025-07-14 11:19:49 -10:00
J. Nick Koston
13ceda899b add some more , rearrange 2025-07-14 11:00:25 -10:00
J. Nick Koston
40d436746c webserver needs as well 2025-07-14 10:28:10 -10:00
J. Nick Koston
5c59b4fcad Merge remote-tracking branch 'kahrendt/json-bump-library' into integration 2025-07-14 10:14:19 -10:00
J. Nick Koston
4de36ffeb4 Merge branch 'dev' into json-bump-library 2025-07-14 10:13:33 -10:00
J. Nick Koston
4b3393ce64 location fixes 2025-07-14 10:12:46 -10:00
J. Nick Koston
4c8bb878bf Merge branch 'json-bump-library' of https://github.com/kahrendt/esphome into json-bump-library 2025-07-14 09:57:16 -10:00
Kevin Ahrendt
8a3cb32531 a few formatting things 2025-07-14 15:57:01 -04:00
Kevin Ahrendt
d3ab7f320e a few missing nolint messages 2025-07-14 15:52:40 -04:00
J. Nick Koston
85351bb952 a few more 2025-07-14 09:50:29 -10:00
Kevin Ahrendt
b47f9158b2 fix a few wrong types 2025-07-14 15:47:22 -04:00
J. Nick Koston
ee5242ec8d no real good option but to disable them all manually 2025-07-14 09:33:33 -10:00
J. Nick Koston
238909c0de no real good option but to disable them all manually 2025-07-14 09:31:22 -10:00
J. Nick Koston
fe9316c95d Merge branch 'json-bump-library' of https://github.com/kahrendt/esphome into json-bump-library 2025-07-14 09:30:45 -10:00
J. Nick Koston
a7e74bb7de no real good option but to disable them all manually 2025-07-14 09:30:43 -10:00
Kevin Ahrendt
b9cb690986 use better types 2025-07-14 15:28:54 -04:00
J. Nick Koston
808066f564 no real good option but to disable them all manually 2025-07-14 09:24:38 -10:00
J. Nick Koston
2057af8396 Revert "try another way"
This reverts commit 96d39403f4.
2025-07-14 09:21:42 -10:00
J. Nick Koston
b95449615f Revert "more aggressive fix"
This reverts commit 4f10a0ccf7.
2025-07-14 09:21:36 -10:00
Kevin Ahrendt
5e8f1d82c3 specify data types 2025-07-14 14:58:16 -04:00
Kevin Ahrendt
6afda9d4dc don't set string define 2025-07-14 14:58:16 -04:00
J. Nick Koston
4f10a0ccf7 more aggressive fix 2025-07-14 08:53:32 -10:00
J. Nick Koston
96d39403f4 try another way 2025-07-14 08:45:33 -10:00
J. Nick Koston
aeb56cc3d0 Revert "do not analyze platformio files"
This reverts commit f76cba0af6.
2025-07-14 08:45:15 -10:00
J. Nick Koston
33389f9c7f Revert "do not analyze platformio files"
This reverts commit 55a7926670.
2025-07-14 08:45:06 -10:00
J. Nick Koston
55a7926670 do not analyze platformio files 2025-07-14 08:13:45 -10:00
J. Nick Koston
f76cba0af6 do not analyze platformio files 2025-07-14 08:10:23 -10:00
J. Nick Koston
1dc75f6ffa Merge branch 'bump_ESPAsyncWebServer_AsyncTCP' into integration 2025-07-14 07:18:15 -10:00
J. Nick Koston
acb0fdc288 one more dep 2025-07-14 07:16:41 -10:00
J. Nick Koston
de235b638a Fix LibreTiny compilation error by updating ESPAsyncWebServer to 3.7.10 2025-07-14 07:12:07 -10:00
Kevin Ahrendt
ab454e9928 explicitly define support for std::string 2025-07-14 11:54:02 -04:00
Kevin Ahrendt
0a8af3ec85 Revert "testing a different approach"
This reverts commit 51eecac2de.
2025-07-14 11:52:26 -04:00
Kevin Ahrendt
51eecac2de testing a different approach 2025-07-14 11:43:31 -04:00
Kevin Ahrendt
815744b0f6 fix merge issues and clean up old comments 2025-07-14 10:47:38 -04:00
Kevin Ahrendt
a1281febe9 bump to 7.4.2 2025-07-14 10:35:10 -04:00
Kevin Ahrendt
9ef982fa4d clang fix 2025-07-14 10:35:10 -04:00
Kevin Ahrendt
44f97e2de4 move allocator to be a protected variable 2025-07-14 10:35:10 -04:00
Kevin Ahrendt
8ad4d3b6f5 fix type of ota object 2025-07-14 10:33:32 -04:00
Kevin Ahrendt
d97f473e4a include proper header for allocator and mark the functions as override 2025-07-14 10:33:32 -04:00
Kevin Ahrendt
ef072eb655 update createNestedObject 2025-07-14 10:33:32 -04:00
Kevin Ahrendt
8040c7cd92 update createdNestedArray calls 2025-07-14 10:33:32 -04:00
Kevin Ahrendt
8648acab5d remove old capacity() call 2025-07-14 10:33:32 -04:00
Kevin Ahrendt
1155e9b88a use new syntax instead of containsKey 2025-07-14 10:33:32 -04:00
Kevin Ahrendt
c069a66625 bump ArduinoJSON library to 7.4.1 2025-07-14 10:33:32 -04:00
J. Nick Koston
2a10f58bdd Remove parsed advertisement support from bluetooth_proxy to save memory 2025-07-13 22:09:53 -10:00
J. Nick Koston
e713b0bd8c Remove parsed advertisement support from bluetooth_proxy to save memory 2025-07-13 22:01:44 -10:00
J. Nick Koston
6ed5ea87f1 Merge branch 'integration' into memory_api 2025-07-13 18:08:10 -10:00
J. Nick Koston
fd13ed78ab Merge branch 'proto_size_remove_cond' into integration 2025-07-13 18:07:57 -10:00
J. Nick Koston
221f380ca3 single func 2025-07-13 18:03:21 -10:00
J. Nick Koston
cf472d5281 Merge branch 'integration' into memory_api 2025-07-13 17:37:35 -10:00
J. Nick Koston
85fa884382 Merge remote-tracking branch 'upstream/dev' into integration 2025-07-13 17:37:13 -10:00
J. Nick Koston
6cd443e9dc Merge remote-tracking branch 'upstream/dev' into integration 2025-07-13 14:51:19 -10:00
J. Nick Koston
26b12ee790 Merge branch 'format_hex_dupe_code' into memory_api 2025-07-13 14:15:11 -10:00
J. Nick Koston
b1c6ece50d Merge branch 'integration' into memory_api 2025-07-13 14:12:49 -10:00
J. Nick Koston
c8c1573fbb Merge branch 'component_logging' into integration 2025-07-13 14:12:35 -10:00
J. Nick Koston
e7fb069bb3 Merge branch 'ram_realloc_bug' into integration 2025-07-13 14:12:31 -10:00
J. Nick Koston
fe7e5feba7 Fix dormant bug in RAMAllocator::reallocate() manual_size calculation 2025-07-13 14:11:23 -10:00
J. Nick Koston
1abdc23a23 Follow logging best practices by removing redundant component prefix 2025-07-13 13:55:35 -10:00
J. Nick Koston
c59c5db03e Refactor format_hex_pretty functions to eliminate code duplication 2025-07-13 13:44:31 -10:00
J. Nick Koston
2076d615f0 Merge branch 'integration' into memory_api 2025-07-13 13:06:20 -10:00
J. Nick Koston
ec3660e8ae Merge remote-tracking branch 'upstream/dev' into integration 2025-07-13 13:05:16 -10:00
J. Nick Koston
f6251cf6e4 Merge branch 'proto_field_ifdefs' into integration 2025-07-13 12:43:54 -10:00
J. Nick Koston
77258b5e62 Merge remote-tracking branch 'upstream/proto_field_ifdefs' into proto_field_ifdefs 2025-07-13 12:12:11 -10:00
J. Nick Koston
dc7996922b missing ifdefs 2025-07-13 12:11:59 -10:00
J. Nick Koston
31a6ae00b5 Merge branch 'dev' into proto_field_ifdefs 2025-07-13 11:57:55 -10:00
J. Nick Koston
d2569c0f1e Reduce binary size with field-level conditional compilation for protobuf messages 2025-07-13 11:16:36 -10:00
J. Nick Koston
ae9a48ebbb Reduce binary size with field-level conditional compilation for protobuf messages 2025-07-13 11:13:17 -10:00
J. Nick Koston
1c00e0b9c1 Merge branch 'integration' into memory_api 2025-07-13 10:20:30 -10:00
J. Nick Koston
d8f786cfdf Merge branch 'wire_type_1' into integration 2025-07-13 10:20:21 -10:00
J. Nick Koston
75ef572a24 Remove dead code: 64-bit protobuf types never used in 7 years 2025-07-13 10:18:55 -10:00
J. Nick Koston
f0f30224d3 Merge branch 'webserver_cleanups' into integration 2025-07-13 09:10:24 -10:00
J. Nick Koston
ec6e61e688 Refactor WebServer request handling for improved maintainability 2025-07-13 09:08:51 -10:00
J. Nick Koston
3dd457c471 Merge branch 'api_errors' into integration 2025-07-13 08:08:52 -10:00
J. Nick Koston
3b8a34c8d0 Reduce API component flash usage by consolidating error logging 2025-07-13 07:57:27 -10:00
J. Nick Koston
864709b006 Merge remote-tracking branch 'upstream/dev' into memory_api 2025-07-12 16:51:07 -10:00
J. Nick Koston
fe76955f3e Merge remote-tracking branch 'upstream/dev' into integration 2025-07-12 16:50:25 -10:00
J. Nick Koston
db8767fb05 Merge remote-tracking branch 'upstream/dev' into drop_unique_id 2025-07-12 14:25:47 -10:00
J. Nick Koston
7dad9c2ab0 Merge branch 'reformat_api_jump_tables' into integration 2025-07-12 13:52:14 -10:00
J. Nick Koston
4c0c0954a4 Merge remote-tracking branch 'upstream/dev' into reformat_api_jump_tables 2025-07-12 13:51:50 -10:00
J. Nick Koston
f5a486a7da Merge branch 'source_server' into integration 2025-07-12 10:50:31 -10:00
J. Nick Koston
a0b4100ff0 Merge branch 'source_server' into memory_api 2025-07-12 10:38:15 -10:00
J. Nick Koston
425d57ba7d other direction 2025-07-12 10:23:21 -10:00
J. Nick Koston
1965a41725 Skip generating decode methods for SOURCE_SERVER protobuf messages 2025-07-12 10:18:53 -10:00
J. Nick Koston
27f352b7dc Merge remote-tracking branch 'upstream/dev' into integration 2025-07-12 10:08:17 -10:00
J. Nick Koston
e01fb0b677 merge 2025-07-12 07:24:12 -10:00
J. Nick Koston
671f0d62c7 Merge remote-tracking branch 'origin/runtime_stats' into integration 2025-07-12 07:21:51 -10:00
J. Nick Koston
f1b888b309 Merge branch 'dev' into runtime_stats 2025-07-12 07:21:44 -10:00
J. Nick Koston
9cbcd0497a Merge branch 'encode_perf' into integration 2025-07-12 07:14:06 -10:00
J. Nick Koston
0139de37ba fixup 2025-07-12 06:51:40 -10:00
J. Nick Koston
4e7fe88da3 Apply existing protobuf buffer optimization to nested message encoding 2025-07-12 06:45:37 -10:00
J. Nick Koston
b1a81b45ea Merge remote-tracking branch 'upstream/dev' into memory_api 2025-07-11 20:59:41 -10:00
J. Nick Koston
fb0a8b9f3e Merge branch 'disable_wifi_ethernet_pr' into memory_api 2025-07-11 19:17:57 -10:00
J. Nick Koston
87ad8eab62 Merge remote-tracking branch 'upstream/dev' into memory_api 2025-07-11 19:17:51 -10:00
J. Nick Koston
6af4961695 Merge remote-tracking branch 'upstream/dev' into integration 2025-07-11 19:08:23 -10:00
J. Nick Koston
ae78f7798f Merge branch 'disable_wifi_ethernet_pr' into integration 2025-07-11 19:00:15 -10:00
J. Nick Koston
53295fde7e Disable WiFi when using Ethernet to save memory 2025-07-11 18:59:31 -10:00
J. Nick Koston
268816bf7f Merge branch 'reformat_api_jump_tables' into memory_api 2025-07-11 18:43:40 -10:00
J. Nick Koston
200bec8440 Merge remote-tracking branch 'upstream/dev' into memory_api 2025-07-11 18:43:23 -10:00
J. Nick Koston
df461c08a9 Merge branch 'reformat_api_jump_tables' into integration 2025-07-11 18:34:07 -10:00
J. Nick Koston
bbf9dcc15a Merge remote-tracking branch 'origin/integration' into integration 2025-07-11 18:33:57 -10:00
J. Nick Koston
a3e7105cb0 Merge remote-tracking branch 'upstream/dev' into integration 2025-07-11 18:33:40 -10:00
J. Nick Koston
10e5400d1f Improve API protobuf decode method readability and reduce code size 2025-07-11 18:30:08 -10:00
J. Nick Koston
97eb949670 Merge remote-tracking branch 'origin/integration' into integration 2025-07-11 17:32:30 -10:00
J. Nick Koston
8f484a89f3 Merge branch 'enum_uint32' into integration 2025-07-11 17:32:15 -10:00
J. Nick Koston
1f35c35e2a oops, removed wrong one 2025-07-11 17:32:07 -10:00
J. Nick Koston
427560f814 address bot review comments 2025-07-11 17:24:55 -10:00
J. Nick Koston
991200551d Merge branch 'enum_uint32' into memory_api 2025-07-11 17:10:21 -10:00
J. Nick Koston
60de0c6e69 Merge branch 'guard_custom_services' into memory_api 2025-07-11 17:10:12 -10:00
J. Nick Koston
4a3000bcc5 Merge branch 'guard_custom_services' into integration 2025-07-11 17:06:28 -10:00
J. Nick Koston
25cac3e04e make clang-tidy happy 2025-07-11 17:06:08 -10:00
J. Nick Koston
fc386a2648 Merge branch 'integration' of https://github.com/esphome/esphome into integration 2025-07-11 16:52:42 -10:00
J. Nick Koston
3fd9a3507c Merge branch 'reduce_api_size' into integration 2025-07-11 16:52:27 -10:00
J. Nick Koston
d92005113a Merge branch 'guard_custom_services' into integration 2025-07-11 16:52:15 -10:00
J. Nick Koston
fb2d764c89 tidy 2025-07-11 16:48:20 -10:00
J. Nick Koston
0251bb48ec Merge branch 'guard_custom_services' into integration 2025-07-11 16:34:10 -10:00
J. Nick Koston
a035db1d11 Merge remote-tracking branch 'origin/enum_uint32' into integration 2025-07-11 16:34:05 -10:00
J. Nick Koston
88049f9801 Merge branch 'dev' into enum_uint32 2025-07-11 16:33:45 -10:00
J. Nick Koston
42a9125ea7 preen 2025-07-11 16:25:49 -10:00
J. Nick Koston
63972ff272 preen 2025-07-11 16:24:16 -10:00
J. Nick Koston
dc53473e7e less templates 2025-07-11 16:16:57 -10:00
J. Nick Koston
2c290e3bee less templates 2025-07-11 16:10:39 -10:00
J. Nick Koston
c37494ea55 less templates 2025-07-11 16:09:33 -10:00
J. Nick Koston
b3e8963a33 less templates 2025-07-11 16:06:50 -10:00
J. Nick Koston
e2c77c0c4f less templates 2025-07-11 16:05:55 -10:00
J. Nick Koston
139ce4c655 lint 2025-07-11 15:54:20 -10:00
J. Nick Koston
010dc35efc etst 2025-07-11 15:49:59 -10:00
J. Nick Koston
413969300b etst 2025-07-11 15:48:36 -10:00
J. Nick Koston
b67a88027d guard 2025-07-11 15:35:26 -10:00
J. Nick Koston
2384b54ee3 Guard custom services 2025-07-11 15:30:37 -10:00
J. Nick Koston
c3ae23dc90 Merge branch 'remove_false' into memory_api 2025-07-11 14:42:42 -10:00
J. Nick Koston
aa00091e2b Merge remote-tracking branch 'upstream/dev' into memory_api 2025-07-11 14:42:38 -10:00
J. Nick Koston
7e3a203f0b Merge branch 'remove_false' into integration 2025-07-11 14:42:18 -10:00
J. Nick Koston
054e39316c Merge remote-tracking branch 'upstream/dev' into integration 2025-07-11 14:42:09 -10:00
J. Nick Koston
7ce879521d Merge branch 'dev' into remove_false 2025-07-11 14:39:09 -10:00
J. Nick Koston
6f5f378857 address lint comment 2025-07-11 14:36:54 -10:00
J. Nick Koston
773950332b address lint comment 2025-07-11 14:36:38 -10:00
J. Nick Koston
35cd8616a2 Merge branch 'remove_false' into integration 2025-07-11 14:17:44 -10:00
J. Nick Koston
95786ce269 review feedback from bot 2025-07-11 14:16:17 -10:00
J. Nick Koston
c082ee616e address feedback 2025-07-11 14:12:03 -10:00
J. Nick Koston
869f96f832 Optimize API proto size calculations by removing redundant force parameter 2025-07-11 14:06:27 -10:00
J. Nick Koston
2dff08b6f9 opt 2025-07-11 12:15:11 -10:00
J. Nick Koston
e76c40a1e7 Merge remote-tracking branch 'upstream/dev' into memory 2025-07-11 12:05:55 -10:00
J. Nick Koston
504ca09451 revert 2025-07-11 11:59:39 -10:00
J. Nick Koston
90c4b71d3f revert 2025-07-11 11:59:14 -10:00
J. Nick Koston
7e1db7a75c Merge remote-tracking branch 'origin/integration' into integration 2025-07-11 11:54:39 -10:00
J. Nick Koston
2f298992cf Merge branch 'auto_auth' into integration 2025-07-11 11:54:23 -10:00
J. Nick Koston
c8c5c26896 Merge remote-tracking branch 'origin/integration' into integration 2025-07-11 11:54:03 -10:00
J. Nick Koston
d8545ef946 Merge branch 'reduce_api_size' into integration 2025-07-11 11:53:49 -10:00
J. Nick Koston
db68f9571b revert 2025-07-11 11:47:09 -10:00
J. Nick Koston
0350471fa9 revert 2025-07-11 11:46:03 -10:00
J. Nick Koston
3ed533d709 tweak 2025-07-11 11:37:17 -10:00
J. Nick Koston
e472a345c9 tweak 2025-07-11 11:05:28 -10:00
J. Nick Koston
42be5d892a cleanup 2025-07-11 10:58:05 -10:00
J. Nick Koston
9a0d5019e1 tweak 2025-07-11 10:27:59 -10:00
J. Nick Koston
fc8c1ac9dd make sure we did not break password auth 2025-07-11 10:19:33 -10:00
J. Nick Koston
536134e2b5 preen 2025-07-11 10:17:41 -10:00
J. Nick Koston
005d4354d5 test this 2025-07-11 10:14:59 -10:00
J. Nick Koston
7107b5cfef preen 2025-07-11 10:11:26 -10:00
J. Nick Koston
bb153d42dc review 2025-07-11 10:02:51 -10:00
J. Nick Koston
a3806e4de2 Optimize API performance and flash usage by eliminating runtime message size lookup 2025-07-11 10:01:11 -10:00
J. Nick Koston
4dbe19a56e Auto auth if no password is required
Next step in password deprecation
2025-07-11 09:22:40 -10:00
J. Nick Koston
0b74122d6f Auto auth if no password is required
Next step in password deprecation
2025-07-11 09:21:18 -10:00
J. Nick Koston
e148c22f25 Auto auth if no password is required
Next step in password deprecation
2025-07-11 09:20:42 -10:00
J. Nick Koston
33fb4d5d42 fixes 2025-07-09 16:27:40 -10:00
J. Nick Koston
7f7623cc8d Merge remote-tracking branch 'upstream/dev' into memory 2025-07-09 16:16:01 -10:00
J. Nick Koston
f2e914fb94 Merge remote-tracking branch 'upstream/dev' into memory 2025-07-09 15:20:45 -10:00
J. Nick Koston
1678eb0591 Merge remote-tracking branch 'upstream/dev' into integration 2025-07-09 15:20:35 -10:00
J. Nick Koston
1a0943c960 add component symbols 2025-07-09 10:00:20 -10:00
J. Nick Koston
073590124d Merge remote-tracking branch 'upstream/dev' into memory 2025-07-09 09:37:48 -10:00
J. Nick Koston
dfa4328604 tidy up 2025-07-08 13:03:01 -06:00
J. Nick Koston
9dab840c58 tidy up 2025-07-08 11:42:17 -06:00
J. Nick Koston
29fff967f5 tweak 2025-07-08 11:38:14 -06:00
J. Nick Koston
2a35c95718 fixes 2025-07-08 11:31:25 -06:00
J. Nick Koston
4a70aa26e8 Merge branch 'runtime_stats' into integration 2025-07-08 11:25:09 -06:00
J. Nick Koston
748604d374 preen 2025-07-08 11:12:46 -06:00
J. Nick Koston
d32db20aa0 preen 2025-07-08 11:10:32 -06:00
J. Nick Koston
ae346bb94e remove dead code 2025-07-08 10:11:47 -06:00
J. Nick Koston
cb67010574 remove dead code 2025-07-08 10:11:24 -06:00
J. Nick Koston
defa452aa1 preen 2025-07-08 09:58:02 -06:00
J. Nick Koston
97a476b475 stats 2025-07-08 09:52:44 -06:00
J. Nick Koston
07a4f6f53c fixes 2025-07-08 09:40:12 -06:00
J. Nick Koston
7d2726ab21 fixes 2025-07-08 09:37:07 -06:00
J. Nick Koston
3862e3b4e7 fixes 2025-07-08 09:35:31 -06:00
J. Nick Koston
be84f12100 fixes 2025-07-08 09:34:56 -06:00
J. Nick Koston
0097a55eaa fixes 2025-07-08 09:34:16 -06:00
J. Nick Koston
d1609de25a cleanup 2025-07-08 09:28:09 -06:00
J. Nick Koston
02395c92a1 cleanup 2025-07-08 09:26:13 -06:00
J. Nick Koston
f2ac6b0af6 cleanup 2025-07-08 09:25:00 -06:00
J. Nick Koston
a3c8f667a7 cleanup 2025-07-08 09:16:42 -06:00
J. Nick Koston
d06bab01ac runtime_stats 2025-07-08 09:09:07 -06:00
J. Nick Koston
591786a787 Merge remote-tracking branch 'upstream/dev' into integration 2025-07-08 09:08:03 -06:00
Jonathan Swoboda
6c593fde22 Merge remote-tracking branch 'upstream/dev' into 5_4_2 2025-07-08 07:47:31 -04:00
Jonathan Swoboda
5e862412d8 Fix ifdef 2025-07-07 22:35:11 -04:00
Jonathan Swoboda
c72489b502 Merge remote-tracking branch 'upstream/dev' into 5_4_2 2025-07-07 21:59:15 -04:00
Jonathan Swoboda
33f6599320 Remove USE_ESP_IDF_VERSION_CODE & fix ethernet 2025-07-07 21:28:51 -04:00
J. Nick Koston
5de7b874b0 sync 2025-07-07 17:23:01 -05:00
J. Nick Koston
a27f6c72b9 Merge remote-tracking branch 'upstream/dev' into integration 2025-07-07 17:22:35 -05:00
J. Nick Koston
a80d3012bd Merge remote-tracking branch 'origin/integration' into integration 2025-07-07 16:34:03 -05:00
J. Nick Koston
1c0a646309 Merge upstream/dev into integration 2025-07-07 16:33:30 -05:00
J. Nick Koston
eabb781e5f Merge remote-tracking branch 'upstream/dev' into integration 2025-07-07 15:46:19 -05:00
J. Nick Koston
03c2cda17c Merge branch 'logger_strlen' into integration 2025-07-07 15:38:53 -05:00
J. Nick Koston
26b72ccb10 Merge remote-tracking branch 'origin/logger_strlen' into logger_strlen 2025-07-07 15:18:37 -05:00
J. Nick Koston
ab993c6d5a add diagram 2025-07-07 15:18:27 -05:00
J. Nick Koston
999090fa18 Merge remote-tracking branch 'upstream/dev' into integration 2025-07-07 15:11:18 -05:00
J. Nick Koston
2eed309224 Merge branch 'dev' into logger_strlen 2025-07-07 15:09:16 -05:00
J. Nick Koston
12980847a8 Merge branch 'logger_strlen' into integration 2025-07-07 15:08:21 -05:00
J. Nick Koston
01a6b38b89 null term is already there 2025-07-07 15:08:11 -05:00
J. Nick Koston
73b786c22e fix calculation 2025-07-07 15:01:15 -05:00
J. Nick Koston
c1a6e82322 fix calculation 2025-07-07 14:58:45 -05:00
J. Nick Koston
ec848bc7b4 Merge branch 'bluetooth_proxy_guard_var' into integration 2025-07-07 14:39:39 -05:00
J. Nick Koston
e5df43b934 cleanup 2025-07-07 14:38:49 -05:00
J. Nick Koston
d13f87e891 Merge upstream/dev while preserving guard variable optimization 2025-07-07 14:37:28 -05:00
J. Nick Koston
132d56fe1a lint 2025-07-07 14:24:55 -05:00
J. Nick Koston
171e19381f Update esphome/components/text_sensor/text_sensor.cpp 2025-07-07 14:19:17 -05:00
J. Nick Koston
9cc7b060c9 Update esphome/components/sensor/sensor.h 2025-07-07 14:18:57 -05:00
J. Nick Koston
d178e2da6f reduce more 2025-07-07 14:05:14 -05:00
J. Nick Koston
1e8f961362 reduce more 2025-07-07 14:03:15 -05:00
J. Nick Koston
166f77610f reduce more 2025-07-07 14:02:15 -05:00
J. Nick Koston
97dc244d1e reduce more 2025-07-07 13:55:22 -05:00
J. Nick Koston
085ddebf7d Merge remote-tracking branch 'upstream/dev' into drop_unique_id 2025-07-07 13:51:53 -05:00
J. Nick Koston
bccc3d79d8 Merge branch 'api_voice' into integration 2025-07-07 13:39:47 -05:00
J. Nick Koston
4df3bfe85d review 2025-07-07 13:39:37 -05:00
J. Nick Koston
99345574e4 Merge branch 'api_voice' into integration 2025-07-07 13:09:45 -05:00
J. Nick Koston
80c66b0742 preen 2025-07-07 13:09:30 -05:00
J. Nick Koston
17d820570b Merge branch 'api_dispatch_dry' into integration 2025-07-07 12:24:09 -05:00
J. Nick Koston
c979d5c9b1 bad linter suggestion again 2025-07-07 12:23:57 -05:00
J. Nick Koston
62c7f14d9a Merge remote-tracking branch 'upstream/dev' into memory 2025-07-07 12:08:50 -05:00
J. Nick Koston
13ac6df1dd Merge branch 'api_voice' into integration 2025-07-07 12:06:12 -05:00
J. Nick Koston
98d091fbc3 Refactor voice assistant API methods to reduce code duplication 2025-07-07 12:05:31 -05:00
J. Nick Koston
22e67f9754 Merge branch 'prepare_commands_for_device_id' into integration 2025-07-07 11:48:43 -05:00
J. Nick Koston
515a97de76 clang-format 2025-07-07 11:48:35 -05:00
J. Nick Koston
68b5337ed3 Merge branch 'api_dispatch_dry' into integration 2025-07-07 11:44:49 -05:00
J. Nick Koston
8ee86c717b update is a special case as well 2025-07-07 11:44:31 -05:00
J. Nick Koston
10530cdef3 Merge branch 'api_dispatch_dry' into integration 2025-07-07 11:40:41 -05:00
J. Nick Koston
5de0f9efc9 Refactor API entity update dispatch to reduce code duplication 2025-07-07 11:37:06 -05:00
J. Nick Koston
6d1d7f137f Merge branch 'prepare_commands_for_device_id' into integration 2025-07-07 11:15:32 -05:00
J. Nick Koston
38e16efa11 Refactor entity lookup methods with macros in preparation for device_id support 2025-07-07 11:10:23 -05:00
J. Nick Koston
5e2f0f7f5e Merge branch 'socket_read_dupe_code' into integration 2025-07-07 10:33:51 -05:00
J. Nick Koston
83c7afc46f Refactor duplicate socket read error handling in API frame helper 2025-07-07 10:33:04 -05:00
J. Nick Koston
10753f0f99 Merge branch 'more_str_len_logger' into integration 2025-07-07 10:10:17 -05:00
J. Nick Koston
34a852d433 Optimize logger performance by eliminating redundant strlen calls 2025-07-07 10:09:51 -05:00
J. Nick Koston
3922fbdef7 Merge branch 'logger_strlen' into integration 2025-07-07 09:04:17 -05:00
J. Nick Koston
e5415abf20 tidy 2025-07-07 09:03:52 -05:00
J. Nick Koston
67e1a92cce Merge branch 'logger_strlen' into integration 2025-07-07 08:53:11 -05:00
J. Nick Koston
4c64511a15 apply suggestions from review 2025-07-07 08:52:52 -05:00
J. Nick Koston
75f3e0900e apply suggestions from review 2025-07-07 08:52:28 -05:00
J. Nick Koston
abd33c21bf Update esphome/components/syslog/esphome_syslog.cpp
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-07-07 08:50:40 -05:00
J. Nick Koston
d592ba2c5e Update esphome/components/web_server/web_server.cpp
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-07-07 08:50:33 -05:00
J. Nick Koston
321eba5184 Merge branch 'logger_strlen' into integration 2025-07-07 08:48:45 -05:00
J. Nick Koston
82b9ec53fd fix merge error 2025-07-07 08:48:35 -05:00
J. Nick Koston
b9262f967b Merge branch 'logger_strlen' into integration 2025-07-07 08:47:27 -05:00
J. Nick Koston
949fb9a890 Optimize logger callback API by including message length parameter 2025-07-07 08:46:21 -05:00
J. Nick Koston
99952a701f Merge remote-tracking branch 'upstream/jesserockz-2025-282' into integration 2025-07-07 07:34:48 -05:00
J. Nick Koston
88878adb6c Merge branch 'filter_compile_warning_vv' into integration 2025-07-07 07:33:53 -05:00
J. Nick Koston
17e3b49ebb Merge branch 'api_sprint' into integration 2025-07-07 07:33:49 -05:00
J. Nick Koston
a217747f5d Replace deprecated sprintf with snprintf in API protobuf code generation 2025-07-07 07:32:22 -05:00
J. Nick Koston
790c9cbb84 Fix format specifier warnings in QuantileFilter logging 2025-07-07 07:27:31 -05:00
J. Nick Koston
da5fb6e24f Merge branch '20250707-ld2450-clean-up' into integration 2025-07-07 07:18:12 -05:00
Jesse Hills
a77439b4b7 Ignore new helper files for namespace inclusion 2025-07-07 23:24:30 +12:00
Jesse Hills
1a049bdcbb More missing includes 2025-07-07 21:06:50 +12:00
Keith Burzinski
79686239d3 Rename button, sort vars 2025-07-07 03:33:21 -05:00
Keith Burzinski
c934e84e21 [ld2450] Clean-up for consistency, reduce CPU usage when idle 2025-07-07 03:23:04 -05:00
Jesse Hills
5e2f8cb018 Missing includes 2025-07-07 17:33:05 +12:00
J. Nick Koston
6bd0af6d85 Merge branch 'heap_scheduler_stress_component' into integration 2025-07-06 23:58:09 -05:00
J. Nick Koston
0f28a49822 tidy 2025-07-06 23:57:46 -05:00
Jesse Hills
66d96646b1 [core] Move platform helper implementations into their own file 2025-07-07 16:40:45 +12:00
J. Nick Koston
be4cf6505f Merge branch 'heap_scheduler_stress_component' into integration 2025-07-06 22:56:46 -05:00
J. Nick Koston
e8ea7825a9 Merge branch 'dev' into heap_scheduler_stress_component 2025-07-06 22:56:18 -05:00
J. Nick Koston
8c13eab731 no flakey 2025-07-06 22:54:46 -05:00
J. Nick Koston
bf4cbb0aee Merge branch 'heap_scheduler_stress_component' into integration 2025-07-06 22:14:38 -05:00
J. Nick Koston
aaec4b7bd3 validation consistent 2025-07-06 22:13:35 -05:00
J. Nick Koston
7bddcd4f64 Merge branch 'heap_scheduler_stress_component' into integration 2025-07-06 22:07:21 -05:00
J. Nick Koston
af205a5267 one more test 2025-07-06 22:01:19 -05:00
J. Nick Koston
c2599d7719 safer 2025-07-06 21:43:03 -05:00
J. Nick Koston
4ea6f23d9e Merge branch 'heap_scheduler_stress_component' into integration 2025-07-06 21:32:06 -05:00
J. Nick Koston
f23fd52a26 clarify what we know 2025-07-06 21:31:39 -05:00
J. Nick Koston
cfd43c81fb clarify what we know 2025-07-06 21:30:39 -05:00
J. Nick Koston
3dcba675b4 Merge branch 'heap_scheduler_stress_component' into integration 2025-07-06 21:23:51 -05:00
J. Nick Koston
bb51031ec6 preen 2025-07-06 21:23:30 -05:00
J. Nick Koston
ecb99cbcce fix flakey test 2025-07-06 21:19:38 -05:00
J. Nick Koston
0a514821c6 preen 2025-07-06 21:04:23 -05:00
J. Nick Koston
074fbb522c preen 2025-07-06 21:01:52 -05:00
J. Nick Koston
71d6ba242e preen 2025-07-06 21:01:25 -05:00
J. Nick Koston
37ffd64b48 Merge remote-tracking branch 'upstream/heap_scheduler_stress_component' into heap_scheduler_stress_component 2025-07-06 20:59:59 -05:00
J. Nick Koston
ec65652567 add missed remake 2025-07-06 20:59:43 -05:00
J. Nick Koston
731613421d fix flakey 2025-07-06 20:59:08 -05:00
J. Nick Koston
58dfad4ed0 Merge branch 'heap_scheduler_stress_component' into integration 2025-07-06 20:38:10 -05:00
J. Nick Koston
7eb029f4b9 cleanup 2025-07-06 20:38:00 -05:00
J. Nick Koston
8da8d938f0 Merge branch 'heap_scheduler_stress_component' into integration 2025-07-06 20:36:50 -05:00
J. Nick Koston
64ac0d2bde cover 2025-07-06 20:36:32 -05:00
J. Nick Koston
7d3cdd15ad cleanup 2025-07-06 20:31:28 -05:00
J. Nick Koston
53baf02087 cleanup 2025-07-06 20:30:40 -05:00
J. Nick Koston
a0d2392344 cleanup 2025-07-06 20:26:43 -05:00
J. Nick Koston
fb3c092eaa cleanup 2025-07-06 20:25:27 -05:00
J. Nick Koston
c169cf1e77 Merge remote-tracking branch 'origin/heap_scheduler_stress_component' into heap_scheduler_stress_component 2025-07-06 20:13:48 -05:00
J. Nick Koston
fa4d8e083a Merge remote-tracking branch 'origin/dev' into heap_scheduler_stress_component 2025-07-06 20:13:34 -05:00
J. Nick Koston
2cfeccfd71 cleanup locking 2025-07-06 20:13:21 -05:00
J. Nick Koston
f36ca93752 Merge branch 'dev' into heap_scheduler_stress_component 2025-07-06 20:05:23 -05:00
J. Nick Koston
dc8714c277 fix race 2025-07-06 19:59:11 -05:00
J. Nick Koston
90fcb5fbcd fix another race 2025-07-06 19:54:07 -05:00
J. Nick Koston
932d0a5d8b fix another race 2025-07-06 19:50:54 -05:00
J. Nick Koston
4cafa18fa4 fix another race 2025-07-06 19:46:23 -05:00
J. Nick Koston
b12d7db5a7 prevent future refactoring errors 2025-07-06 19:27:33 -05:00
J. Nick Koston
e84345594d Merge branch 'heap_scheduler_stress_component' into integration 2025-07-06 19:01:11 -05:00
J. Nick Koston
add7bec7f2 tweak 2025-07-06 18:54:00 -05:00
J. Nick Koston
db84d8e8dc tweak 2025-07-06 18:49:41 -05:00
J. Nick Koston
ad51e647af tweak 2025-07-06 18:48:50 -05:00
J. Nick Koston
c45901746b tweak 2025-07-06 18:46:48 -05:00
J. Nick Koston
033c469250 tweak 2025-07-06 18:44:19 -05:00
J. Nick Koston
0900fd3cea tweak 2025-07-06 18:42:47 -05:00
J. Nick Koston
ba8f3d3f63 tweak 2025-07-06 18:36:05 -05:00
J. Nick Koston
2759f3828e tweak 2025-07-06 18:34:56 -05:00
J. Nick Koston
f395767766 tweak 2025-07-06 18:27:49 -05:00
J. Nick Koston
2dc222aea6 tweak 2025-07-06 18:26:29 -05:00
J. Nick Koston
82d68c87e2 adjust 2025-07-06 18:24:00 -05:00
J. Nick Koston
f213657753 adjust 2025-07-06 18:18:47 -05:00
J. Nick Koston
e077e6cec7 adjust 2025-07-06 18:17:16 -05:00
J. Nick Koston
339a3270f6 adjust 2025-07-06 18:16:25 -05:00
J. Nick Koston
462b44ee23 adjust 2025-07-06 18:15:11 -05:00
J. Nick Koston
52d3dba89c adjust 2025-07-06 18:11:04 -05:00
J. Nick Koston
939d01dd99 preen 2025-07-06 18:08:50 -05:00
J. Nick Koston
4900f7c7ca preen 2025-07-06 18:07:34 -05:00
J. Nick Koston
48957aee8b preen 2025-07-06 18:03:53 -05:00
J. Nick Koston
e355ce04f7 preen 2025-07-06 18:01:21 -05:00
J. Nick Koston
758e5b89bb preen 2025-07-06 17:53:56 -05:00
J. Nick Koston
3ffdd1d451 preen 2025-07-06 17:42:57 -05:00
J. Nick Koston
4c1b8c8b96 preen 2025-07-06 17:33:50 -05:00
J. Nick Koston
3ca956cd6a fix merge error 2025-07-06 17:27:32 -05:00
J. Nick Koston
2e24a11a1d Merge remote-tracking branch 'upstream/dev' into heap_scheduler_stress_component 2025-07-06 17:21:36 -05:00
J. Nick Koston
10a03ad538 tidy 2025-07-06 15:37:09 -05:00
J. Nick Koston
69839ec4dc Merge branch 'filter_files' into integration 2025-07-06 14:22:31 -05:00
J. Nick Koston
28a66d4bf0 preen 2025-07-06 14:18:17 -05:00
J. Nick Koston
782d894801 preen 2025-07-06 14:18:05 -05:00
J. Nick Koston
06dd731c78 preen 2025-07-06 14:10:20 -05:00
J. Nick Koston
6af74302dc missed one 2025-07-06 14:06:03 -05:00
J. Nick Koston
03380a6ecd some tests 2025-07-06 13:51:51 -05:00
J. Nick Koston
8d8db11dd9 some tests 2025-07-06 13:51:17 -05:00
J. Nick Koston
28886a896b some tests 2025-07-06 13:48:11 -05:00
J. Nick Koston
05253991c2 fixes 2025-07-06 13:42:44 -05:00
J. Nick Koston
96f0fda477 fixes 2025-07-06 13:42:18 -05:00
J. Nick Koston
023fa4d220 fixes 2025-07-06 13:37:41 -05:00
J. Nick Koston
a1f63c0dfc fixes 2025-07-06 13:24:50 -05:00
J. Nick Koston
ef98f42e7e tweaks 2025-07-06 13:18:24 -05:00
J. Nick Koston
737e1284af tweaks 2025-07-06 13:18:10 -05:00
J. Nick Koston
8677918157 tweaks 2025-07-06 13:16:49 -05:00
J. Nick Koston
629c891dfc Filter unused files 2025-07-06 12:12:16 -05:00
J. Nick Koston
8e8ef83780 cleanup 2025-07-06 11:05:18 -05:00
J. Nick Koston
2a15f35e9d cleanup 2025-07-06 11:04:04 -05:00
J. Nick Koston
9bfa942cf2 merge 2025-07-06 10:58:15 -05:00
J. Nick Koston
b00adbddce fix race 2025-07-06 10:40:44 -05:00
J. Nick Koston
a71030c4de fix race 2025-07-06 10:40:19 -05:00
J. Nick Koston
6bb32c2e61 tweaks 2025-07-06 10:12:29 -05:00
J. Nick Koston
7bc2c685e0 tweaks 2025-07-06 10:12:14 -05:00
J. Nick Koston
9205338cc8 Merge branch 'heap_scheduler_stress_component' into integration 2025-07-06 10:08:35 -05:00
J. Nick Koston
04336f7ba3 Merge branch 'dev' into heap_scheduler_stress_component 2025-07-06 10:08:03 -05:00
J. Nick Koston
6f64312d08 remove debugging 2025-07-06 10:06:45 -05:00
J. Nick Koston
79dfb86830 remove debugging 2025-07-06 10:04:17 -05:00
J. Nick Koston
453dc29540 preen 2025-07-06 10:03:28 -05:00
J. Nick Koston
f4260d370c preen 2025-07-06 10:03:24 -05:00
J. Nick Koston
655f9489a8 preen 2025-07-06 10:02:58 -05:00
J. Nick Koston
4b3cc52afe preen 2025-07-06 10:02:47 -05:00
J. Nick Koston
fd3f15637a lint 2025-07-06 10:01:07 -05:00
J. Nick Koston
1311e1b8b0 lint 2025-07-06 10:00:55 -05:00
J. Nick Koston
64e84872da lint 2025-07-06 10:00:35 -05:00
J. Nick Koston
bc7379030e lint 2025-07-06 10:00:25 -05:00
J. Nick Koston
ecfb6dc8ed lint 2025-07-06 10:00:17 -05:00
J. Nick Koston
75d67af932 Add heap scheduler tests 2025-07-06 09:55:14 -05:00
J. Nick Koston
845dad6ee7 Merge branch 'idf_webserver_guard' into integration 2025-07-05 23:48:48 -05:00
J. Nick Koston
e2e86da64b make bot happy 2025-07-05 23:48:37 -05:00
J. Nick Koston
90ec63589f Merge branch 'core_ram' into integration 2025-07-05 23:40:51 -05:00
J. Nick Koston
ea308eaaa2 add comments to explain why its safe and the bot is wrong 2025-07-05 23:39:25 -05:00
J. Nick Koston
87f1fac2bf nolint 2025-07-05 23:28:39 -05:00
J. Nick Koston
c23651527f Merge branch 'bluetooth_proxy_guard_var' into integration 2025-07-05 23:02:44 -05:00
J. Nick Koston
2cc263a707 lint 2025-07-05 23:01:49 -05:00
J. Nick Koston
fb336718de Merge branch 'core_ram' into integration 2025-07-05 23:00:30 -05:00
J. Nick Koston
e2e35bf965 simplify 2025-07-05 22:58:27 -05:00
J. Nick Koston
bdd25c7268 Merge branch 'idf_webserver_guard' into integration 2025-07-05 22:26:54 -05:00
J. Nick Koston
82c788d6ce Eliminate web_server_idf guard variable to save 8 bytes RAM 2025-07-05 22:24:26 -05:00
J. Nick Koston
5167184cc7 merge 2025-07-05 22:18:20 -05:00
J. Nick Koston
a5d1b11204 Merge branch 'bluetooth_proxy_guard_var' into integration 2025-07-05 22:17:32 -05:00
J. Nick Koston
dc8f2fd37e Eliminate bluetooth_proxy guard variable to save 8 bytes RAM 2025-07-05 22:15:45 -05:00
J. Nick Koston
7c85886ce8 Merge branch 'api_guard_var' into integration 2025-07-05 21:59:47 -05:00
J. Nick Koston
12f172436d Eliminate API component guard variable to save 8 bytes RAM 2025-07-05 21:59:08 -05:00
J. Nick Koston
e69ac0478e Merge branch 'core_ram' into integration 2025-07-05 21:38:49 -05:00
J. Nick Koston
a45743c2b7 Reduce core RAM usage by 40 bytes with static initialization optimizations 2025-07-05 21:35:32 -05:00
J. Nick Koston
ebe1531927 Merge branch 'color_memory' into integration 2025-07-05 21:24:23 -05:00
J. Nick Koston
a88a059c6a Reduce RAM usage by optimizing Color constant storage 2025-07-05 21:21:43 -05:00
J. Nick Koston
d314cbb0d5 Merge branch 'icon_opt_pay_as_you_go' into integration 2025-07-05 17:44:05 -05:00
J. Nick Koston
4d75758eb2 tests 2025-07-05 17:39:02 -05:00
J. Nick Koston
0eecc29039 Merge branch 'icon_opt_pay_as_you_go' into integration 2025-07-05 17:38:13 -05:00
J. Nick Koston
294fb67410 Optimize entity icon memory usage with USE_ENTITY_ICON flag 2025-07-05 17:36:51 -05:00
J. Nick Koston
2f1f098b47 revert 2025-07-05 16:55:15 -05:00
J. Nick Koston
77be414261 Merge branch 'deep_sleep_loop' into integration 2025-07-05 16:12:06 -05:00
J. Nick Koston
c34fc3c4c7 simplify 2025-07-05 16:07:43 -05:00
J. Nick Koston
8aac2f525e simplify 2025-07-05 16:01:59 -05:00
J. Nick Koston
f85dcdca4e unreachable 2025-07-05 15:57:21 -05:00
J. Nick Koston
e7a1ef7aa1 Merge branch 'deep_sleep_loop' into integration 2025-07-05 15:54:13 -05:00
J. Nick Koston
7c2d2ef5a3 deep_sleep: Replace polling loop with event-driven state machine 2025-07-05 15:53:12 -05:00
J. Nick Koston
1449001747 Merge branch 'ld2450_cpu_drain_spam' into integration 2025-07-05 15:07:58 -05:00
J. Nick Koston
f245c74520 fix byte ordering 2025-07-05 15:01:02 -05:00
J. Nick Koston
da1658e4f9 Merge branch 'ld2450_cpu_drain_spam' into integration 2025-07-05 14:50:51 -05:00
J. Nick Koston
80f9352a79 Merge branch 'light_ram' into integration 2025-07-05 14:50:47 -05:00
J. Nick Koston
9ded501402 clang-tidy 2025-07-05 14:50:17 -05:00
J. Nick Koston
3d6a1811c5 comments 2025-07-05 14:28:26 -05:00
J. Nick Koston
a5ee047efb Fix LD2450 excessive CPU usage and redundant sensor updates 2025-07-05 14:25:56 -05:00
J. Nick Koston
fb0090dcdc Merge branch 'light_ram' into integration 2025-07-05 13:53:20 -05:00
J. Nick Koston
294bd4d042 tweaks 2025-07-05 13:44:42 -05:00
J. Nick Koston
e99b8d2daf tweaks 2025-07-05 13:41:09 -05:00
J. Nick Koston
6dbdeeb59b tidy 2025-07-05 13:18:45 -05:00
J. Nick Koston
82fd62e9dd comments 2025-07-05 13:00:48 -05:00
J. Nick Koston
70f935d323 fixed a few missed ones 2025-07-05 12:39:05 -05:00
J. Nick Koston
0f3e6cccd9 Reduce light component memory usage by 50+ bytes per instance 2025-07-05 12:33:54 -05:00
J. Nick Koston
6ff323c56d Merge branch 'busy_disconnect_loop' into integration 2025-07-05 11:12:06 -05:00
J. Nick Koston
096ec79ef9 Fix bluetooth proxy busy loop when disconnecting pending BLE connections 2025-07-05 11:11:36 -05:00
J. Nick Koston
bf5ba65558 Merge branch 'ble_align' into integration 2025-07-05 09:05:20 -05:00
J. Nick Koston
62088dfaed Split LockFreeQueue into base and notifying variants to reduce memory usage 2025-07-05 09:02:33 -05:00
J. Nick Koston
dfcc3206f7 Split LockFreeQueue into base and notifying variants to reduce memory usage 2025-07-05 08:59:19 -05:00
J. Nick Koston
e173b7f0c2 Split LockFreeQueue into base and notifying variants to reduce memory usage 2025-07-05 08:58:41 -05:00
J. Nick Koston
f98e28a8a2 Split LockFreeQueue into base and notifying variants to reduce memory usage 2025-07-05 08:57:04 -05:00
J. Nick Koston
f63557f2e7 notes to the future 2025-07-05 07:34:46 -05:00
J. Nick Koston
a353598961 Merge branch 'ble_batching' into integration 2025-07-05 07:24:07 -05:00
J. Nick Koston
bc33b44648 Optimize Bluetooth proxy batching and increase scan buffer capacity 2025-07-05 07:23:31 -05:00
J. Nick Koston
1579779967 Merge branch 'defer_const' into integration 2025-07-04 20:54:41 -05:00
J. Nick Koston
cc6ea4cd14 cover 2025-07-04 20:51:50 -05:00
J. Nick Koston
303a8ff87a Merge branch 'defer_const' into integration 2025-07-04 20:33:07 -05:00
J. Nick Koston
7d3a11a735 Add const char overload for Component::defer() 2025-07-04 20:30:04 -05:00
J. Nick Koston
94b6344820 Merge branch 'reduce_main_loop' into integration 2025-07-04 13:56:19 -05:00
J. Nick Koston
40307c079c Merge remote-tracking branch 'origin/reduce_main_loop' into reduce_main_loop 2025-07-04 13:54:41 -05:00
J. Nick Koston
debef6fde4 address review comments 2025-07-04 13:54:07 -05:00
J. Nick Koston
0cda83d29c Update scheduler.cpp
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-07-04 13:46:39 -05:00
J. Nick Koston
32729c7ca7 Merge branch 'reduce_main_loop' into integration 2025-07-04 12:59:23 -05:00
J. Nick Koston
b7fca5488a lol 2025-07-04 12:59:11 -05:00
J. Nick Koston
9c22772758 fix scope issue 2025-07-04 11:40:11 -05:00
J. Nick Koston
1e72f07fdf Merge branch 'reduce_main_loop' into integration 2025-07-04 11:29:12 -05:00
J. Nick Koston
a592e96709 preen 2025-07-04 11:29:01 -05:00
J. Nick Koston
3980339868 Merge branch 'reduce_main_loop' into integration 2025-07-04 11:26:45 -05:00
J. Nick Koston
afa66c17bd preen 2025-07-04 11:26:33 -05:00
J. Nick Koston
be2988b1d7 Merge branch 'reduce_main_loop' into integration 2025-07-04 11:24:46 -05:00
J. Nick Koston
cf647f0c36 Merge remote-tracking branch 'upstream/dev' into integration 2025-07-04 11:24:40 -05:00
J. Nick Koston
385ed4ca0c Merge remote-tracking branch 'upstream/reduce_main_loop' into reduce_main_loop 2025-07-04 11:23:44 -05:00
J. Nick Koston
9188a8e326 preen 2025-07-04 11:23:33 -05:00
J. Nick Koston
0efb6d55c8 Merge branch 'dev' into reduce_main_loop 2025-07-04 11:20:27 -05:00
J. Nick Koston
f748047b7b Merge branch 'reduce_main_loop' into integration 2025-07-04 11:18:55 -05:00
J. Nick Koston
49bc767bf4 cleanup 2025-07-04 11:13:08 -05:00
J. Nick Koston
e12cc9a9a7 cleanup 2025-07-04 11:12:54 -05:00
J. Nick Koston
8e4470cdff Merge branch 'reduce_main_loop' into integration 2025-07-04 11:02:07 -05:00
J. Nick Koston
bdb7e19fd0 guard esp8266 2025-07-04 10:59:58 -05:00
J. Nick Koston
0fc3f0e162 guard esp8266 2025-07-04 10:57:39 -05:00
J. Nick Koston
6fac66e63b Merge branch 'reduce_main_loop' into integration 2025-07-04 10:46:38 -05:00
J. Nick Koston
71e06ea1b6 cleanup 2025-07-04 10:45:47 -05:00
J. Nick Koston
3df434fd55 improve test 2025-07-04 10:41:59 -05:00
J. Nick Koston
729b2b2873 remove debug 2025-07-04 10:35:29 -05:00
J. Nick Koston
bc2adb6b5a there was no locking on host! 2025-07-04 10:25:31 -05:00
J. Nick Koston
aaff086aeb there was no locking on host! 2025-07-04 10:24:04 -05:00
J. Nick Koston
e4c0f18ee3 fixes 2025-07-04 10:17:41 -05:00
J. Nick Koston
9c09a271f2 tweaks 2025-07-04 10:14:54 -05:00
J. Nick Koston
37578f3e22 fixes 2025-07-04 10:11:19 -05:00
J. Nick Koston
4649599592 fixes 2025-07-04 10:01:00 -05:00
J. Nick Koston
71f78e3a81 fixes 2025-07-04 10:00:25 -05:00
J. Nick Koston
f7ca26eef8 stress 2025-07-04 08:59:15 -05:00
J. Nick Koston
0665fcea9e stress test 2025-07-04 08:49:35 -05:00
J. Nick Koston
cd2b50c27f stress test 2025-07-04 08:49:12 -05:00
J. Nick Koston
ca70f17b3b make test race safe 2025-07-04 08:33:34 -05:00
J. Nick Koston
a5e08aaf74 make test race safe 2025-07-04 08:33:24 -05:00
J. Nick Koston
947db4605a Merge branch 'reduce_main_loop' into integration 2025-07-04 08:16:18 -05:00
J. Nick Koston
481a00a0b5 Merge remote-tracking branch 'upstream/dev' into integration 2025-07-04 08:16:16 -05:00
J. Nick Koston
465019e510 cover 2025-07-04 08:04:16 -05:00
J. Nick Koston
a4d5f39fb6 cover 2025-07-04 07:59:12 -05:00
J. Nick Koston
5dd76966c3 cover 2025-07-04 07:55:01 -05:00
J. Nick Koston
db86f87fc3 Make defer FIFO 2025-07-04 07:42:59 -05:00
J. Nick Koston
e21334b7fa Make defer FIFO 2025-07-04 07:42:37 -05:00
J. Nick Koston
ba4c268956 Make defer FIFO 2025-07-04 07:35:24 -05:00
J. Nick Koston
068594be5e Make defer FIFO 2025-07-04 07:29:37 -05:00
J. Nick Koston
0fd45fc86e fix 2025-07-03 20:15:45 -05:00
J. Nick Koston
257fb98113 Merge branch 'api_cleanup' into integration 2025-07-03 20:05:59 -05:00
J. Nick Koston
f8922b3cca Use std::span to eliminate heap allocation for single-packet API transmissions 2025-07-03 20:01:28 -05:00
J. Nick Koston
b0b08f317b Merge remote-tracking branch 'origin/dev' into integration 2025-07-03 17:47:02 -05:00
Jonathan Swoboda
a8e4ed009b Bump arduino version to 3.2.1 2025-07-03 16:49:22 -04:00
J. Nick Koston
2c4667fb46 Merge branch 'camera-platform' into integration 2025-07-03 15:14:49 -05:00
J. Nick Koston
9eadfa21d8 Merge branch 'webserver_busy_loop_dropped_connection' into integration 2025-07-03 14:45:38 -05:00
J. Nick Koston
953fd24458 Fix web_server busy loop with ungracefully disconnected clients 2025-07-03 14:43:11 -05:00
J. Nick Koston
1be171e084 Merge remote-tracking branch 'origin/webserver_string_lifetime' into integration 2025-07-03 14:06:25 -05:00
J. Nick Koston
5c83b99e0c do not need to rename as we changed design to not need it 2025-07-03 14:06:07 -05:00
J. Nick Koston
743e611735 Merge remote-tracking branch 'origin/webserver_string_lifetime' into integration 2025-07-03 13:59:22 -05:00
J. Nick Koston
35ff850894 make sure its bug for bug compat 2025-07-03 13:56:29 -05:00
Dieter Tschanz
b666295b53 Replace Windows-style with Unix-style directory separators in test 2025-07-03 20:53:00 +02:00
J. Nick Koston
96cf8d97ab Merge remote-tracking branch 'upstream/webserver_string_lifetime' into integration 2025-07-03 13:52:04 -05:00
J. Nick Koston
3c1a781a1c cleanups 2025-07-03 13:51:01 -05:00
J. Nick Koston
00bd1b0a02 cleanups 2025-07-03 13:49:22 -05:00
J. Nick Koston
b8482da421 fix defines 2025-07-03 13:38:23 -05:00
J. Nick Koston
756ece9ff3 Merge branch 'dev' into camera-platform 2025-07-03 13:37:54 -05:00
J. Nick Koston
4bb016fec3 Merge branch 'webserver_lock_churn' into integration 2025-07-03 13:35:15 -05:00
J. Nick Koston
32f0322dec Merge branch 'webserver_string_lifetime' into integration 2025-07-03 13:35:10 -05:00
J. Nick Koston
1a1c13b722 Fix web_server URL parsing lifetime issue 2025-07-03 13:27:02 -05:00
Dieter Tschanz
139453822b Add compile-time test to verify Camera interface implementation. 2025-07-03 20:26:10 +02:00
J. Nick Koston
7a33994666 Reduce web_server loop overhead on ESP32 by avoiding unnecessary semaphore operations 2025-07-03 12:50:59 -05:00
J. Nick Koston
f381d9011b Merge remote-tracking branch 'upstream/dev' into integration 2025-07-03 12:18:06 -05:00
J. Nick Koston
96352f047d Merge branch 'device_id_state' into integration 2025-07-03 12:17:48 -05:00
J. Nick Koston
5e7a1fea8c Add device_id to entity state messages for sub-device support 2025-07-03 10:21:12 -05:00
Jonathan Swoboda
baaafb7fcb Bump ESP-IDF to 5.4.2 2025-07-03 11:13:45 -04:00
J. Nick Koston
64eb70444d Merge branch 'dev' into camera-platform 2025-07-02 19:52:06 -05:00
J. Nick Koston
0f39b1c49a merge 2025-07-02 14:06:59 -05:00
J. Nick Koston
e2d6363c68 merge 2025-07-02 14:06:32 -05:00
J. Nick Koston
cdeef700c2 Merge branch 'password_api' into integration 2025-07-02 14:05:12 -05:00
J. Nick Koston
86fd702841 Save flash and RAM by conditionally compiling unused API password code 2025-07-02 13:56:41 -05:00
J. Nick Koston
b1553807f7 wip 2025-07-02 09:14:26 -05:00
J. Nick Koston
797d4929ab wip 2025-07-02 09:05:28 -05:00
J. Nick Koston
ba5bb9dfa7 wip 2025-07-02 09:02:06 -05:00
J. Nick Koston
dd49d832c4 wip 2025-07-02 08:56:13 -05:00
J. Nick Koston
5004f44f65 wip 2025-07-02 08:42:17 -05:00
J. Nick Koston
bc9c4a8b8e wip 2025-07-02 08:35:42 -05:00
J. Nick Koston
6f05ee7427 wip 2025-07-02 08:25:41 -05:00
J. Nick Koston
f3523a96c9 wip 2025-07-02 08:24:15 -05:00
J. Nick Koston
06957d9895 wip 2025-07-02 08:21:36 -05:00
J. Nick Koston
1f361b07d1 wip 2025-07-02 08:16:35 -05:00
J. Nick Koston
40d9c0a3db wip 2025-07-02 07:58:35 -05:00
J. Nick Koston
548cd39496 wip 2025-07-02 07:51:04 -05:00
J. Nick Koston
85049611c3 wip 2025-07-02 07:48:55 -05:00
J. Nick Koston
b8a75bc925 analyze_memory 2025-07-02 07:30:17 -05:00
J. Nick Koston
6c62d4a923 Merge branch 'fix_bytes_encoding' into integration 2025-07-01 22:44:43 -05:00
J. Nick Koston
6e42d009fb Fix bytes field encoding in protobuf code generator 2025-07-01 20:26:34 -05:00
J. Nick Koston
7d7769ea5d Merge branch 'component_memory' into integration 2025-07-01 14:11:58 -05:00
J. Nick Koston
3908677fe2 Merge branch 'ota_base_extract' into integration 2025-07-01 14:09:51 -05:00
J. Nick Koston
9799a2b636 test 2025-07-01 13:47:59 -05:00
Dieter Tschanz
55c8129423 Correction for failed component test. 2025-07-01 20:44:11 +02:00
J. Nick Koston
099474053e cleanuip 2025-07-01 13:38:47 -05:00
J. Nick Koston
efafabed97 fix rp2040 2025-07-01 13:23:24 -05:00
Dieter Tschanz
d209739f85 Introduce base Camera class to support alternative camera implementations
This commit introduces a new 'Camera' base class positioned between the
API layer and the existing 'ESP32Camera' implementation.
- No changes to functionality in 'ESP32Camera' or
'ESP32CameraWebServer'.
- This refactoring enables future camera implementations to integrate
with the existing API.
- The goal is to keep the commit as minimal and non-breaking as
possible.

This is the first step in a series of changes aimed at modernizing and
generalizing ESPHome's camera support.
2025-07-01 19:47:50 +02:00
J. Nick Koston
d463dd0f57 Merge branch 'bk7200_tagged_pointer_fix' into integration 2025-07-01 11:57:11 -05:00
J. Nick Koston
c33c14a46f tidy 2025-07-01 11:57:02 -05:00
J. Nick Koston
2d0c109dc1 Merge remote-tracking branch 'origin/dev' into ota_base_extract 2025-07-01 11:50:49 -05:00
J. Nick Koston
825d0bed88 fix esp8266 error handling 2025-07-01 11:29:38 -05:00
J. Nick Koston
cd1390916c md5 fixes 2025-07-01 11:09:08 -05:00
J. Nick Koston
149bdaf146 fixes 2025-07-01 10:50:17 -05:00
J. Nick Koston
ad628c9cba single ota path 2025-07-01 10:36:36 -05:00
J. Nick Koston
b88f87799e single ota path 2025-07-01 10:30:52 -05:00
J. Nick Koston
1ff7cf1125 single ota path 2025-07-01 10:28:48 -05:00
J. Nick Koston
31db6e51eb single ota path 2025-07-01 10:27:46 -05:00
J. Nick Koston
681d9236f9 single ota path 2025-07-01 10:26:55 -05:00
J. Nick Koston
8aa8af735d single ota path 2025-07-01 10:25:48 -05:00
J. Nick Koston
943d0f103d single ota path 2025-07-01 10:17:28 -05:00
J. Nick Koston
8b195d7f63 use ota backend 2025-07-01 10:11:41 -05:00
J. Nick Koston
649ad47e62 web_server_ support for ota backend idf 2025-07-01 10:05:23 -05:00
J. Nick Koston
93dc5765bb Merge upstream/dev into ota_base_extract 2025-07-01 09:57:09 -05:00
J. Nick Koston
b000b1b70c Fix regression: BK7231N devices not returning entities via API 2025-07-01 09:43:50 -05:00
J. Nick Koston
8707b6e01a lint 2025-07-01 07:31:45 -05:00
J. Nick Koston
34abd67f3e Merge branch 'component_memory' into integration 2025-06-30 21:21:07 -05:00
J. Nick Koston
45f1db9233 address review comments 2025-06-30 21:20:58 -05:00
J. Nick Koston
beb4d1511a Merge branch 'component_memory' into integration 2025-06-30 21:18:06 -05:00
J. Nick Koston
adeceee71f Reduce Component memory usage by 40% (8 bytes per component) 2025-06-30 21:15:20 -05:00
J. Nick Koston
7d4b11d112 Reduce Component memory usage by 40% (8 bytes per component) 2025-06-30 21:11:49 -05:00
J. Nick Koston
6733cd4ed1 Merge branch 'entity_name_must_be_unique' into integration 2025-06-30 18:31:40 -05:00
J. Nick Koston
07f361a404 empty name uses device name, use get_base_entity_object_id 2025-06-30 18:26:09 -05:00
J. Nick Koston
ae981ea7f2 Merge branch 'entity_name_must_be_unique' into integration 2025-06-30 17:48:49 -05:00
J. Nick Koston
b7d0f5e36b Fix entity hash collisions by enforcing unique names across devices per platform 2025-06-30 17:38:04 -05:00
J. Nick Koston
3cbce4df42 Merge branch 'esp32_touch_isr' into integration 2025-06-30 14:38:54 -05:00
J. Nick Koston
7e77e40bda cleanup 2025-06-30 14:37:30 -05:00
J. Nick Koston
305805256d dry 2025-06-30 14:34:07 -05:00
J. Nick Koston
e36c669dc0 dry 2025-06-30 14:32:13 -05:00
J. Nick Koston
71aff9bc60 dry 2025-06-30 14:30:07 -05:00
J. Nick Koston
36d11c969f dry 2025-06-30 14:29:57 -05:00
J. Nick Koston
f76ce5d3bb dry 2025-06-30 14:28:31 -05:00
J. Nick Koston
0df454481e safer 2025-06-30 14:15:26 -05:00
J. Nick Koston
83c1a30cfb Merge branch 'esp32_touch_isr' into integration 2025-06-30 13:46:54 -05:00
J. Nick Koston
6cbd1479c6 loop 2025-06-30 13:46:47 -05:00
J. Nick Koston
3e6e438920 Merge remote-tracking branch 'upstream/dev' into esp32_touch_isr 2025-06-30 13:43:18 -05:00
J. Nick Koston
560886eb90 clenaup 2025-06-30 13:32:59 -05:00
J. Nick Koston
340bb5cef6 clenaup 2025-06-30 13:31:55 -05:00
J. Nick Koston
44a7c1d4a5 cleanup 2025-06-30 13:14:55 -05:00
J. Nick Koston
519c49f175 Revert "fix"
This reverts commit c96ffefa42.
2025-06-30 13:11:27 -05:00
J. Nick Koston
c96ffefa42 fix 2025-06-30 13:02:26 -05:00
J. Nick Koston
490ca8ad5a relo 2025-06-30 12:53:41 -05:00
J. Nick Koston
e385f87d6c move more 2025-06-30 12:46:47 -05:00
J. Nick Koston
58de53123a move more 2025-06-30 12:41:55 -05:00
J. Nick Koston
4f365c1716 todo 2025-06-30 12:11:37 -05:00
J. Nick Koston
981177da23 todo 2025-06-30 12:09:07 -05:00
J. Nick Koston
088bea9ccd split 2025-06-30 10:50:26 -05:00
J. Nick Koston
36350f179e split 2025-06-30 10:49:59 -05:00
J. Nick Koston
902f08c1bc Extract OTA backend functionality into separate ota_base component 2025-06-30 10:38:31 -05:00
J. Nick Koston
47ad206ccd Extract OTA backend functionality into separate ota_base component 2025-06-30 10:35:19 -05:00
J. Nick Koston
9f51546023 Extract OTA backend functionality into separate ota_base component 2025-06-30 10:33:43 -05:00
J. Nick Koston
f6d679f056 Merge branch 'idf_webserver_ota' into integration 2025-06-30 10:04:39 -05:00
J. Nick Koston
93c45e88e7 revert ota backend changes 2025-06-30 10:04:23 -05:00
J. Nick Koston
da189da9ae Merge branch 'idf_webserver_ota' into integration 2025-06-30 09:56:30 -05:00
J. Nick Koston
c40a33cb48 revert ota backend changes 2025-06-30 09:56:20 -05:00
J. Nick Koston
9846beee7d revert ota backend changes 2025-06-30 09:55:02 -05:00
J. Nick Koston
81685f9132 Merge branch 'idf_webserver_ota' into integration 2025-06-30 09:50:56 -05:00
J. Nick Koston
14123d25c2 fixes 2025-06-30 09:50:46 -05:00
J. Nick Koston
928819ffbd fixes 2025-06-30 09:49:59 -05:00
J. Nick Koston
7f2f9636f5 make sure ota still works without ota loaded 2025-06-30 09:46:33 -05:00
J. Nick Koston
b49fe146ad make sure ota still works without ota loaded 2025-06-30 09:44:20 -05:00
J. Nick Koston
98bbd4136b Merge branch 'idf_webserver_ota' into integration 2025-06-30 09:24:05 -05:00
J. Nick Koston
d8d02f71ba cleanup 2025-06-30 09:23:57 -05:00
J. Nick Koston
26980df2b9 Merge branch 'idf_webserver_ota' into integration 2025-06-30 08:25:08 -05:00
J. Nick Koston
ffe39473d0 fixes 2025-06-30 08:18:34 -05:00
J. Nick Koston
6af8d152ee fixes 2025-06-30 08:18:18 -05:00
J. Nick Koston
de846a8f7a Merge branch 'idf_webserver_ota' into integration 2025-06-30 07:54:26 -05:00
J. Nick Koston
8e31316e3d Merge remote-tracking branch 'upstream/dev' into idf_webserver_ota 2025-06-30 07:51:22 -05:00
J. Nick Koston
fb6edb3243 fixes 2025-06-30 07:51:11 -05:00
J. Nick Koston
244bd9256f tidy 2025-06-30 06:55:08 -05:00
J. Nick Koston
1f61fd383c Merge branch 'dev' into esp32_touch_isr 2025-06-30 01:06:49 -05:00
J. Nick Koston
ce294ce0c1 Merge branch 'idf_webserver_ota' into integration 2025-06-30 01:01:29 -05:00
J. Nick Koston
dcbdc0ac51 Merge branch 'dev' into esp32_touch_isr 2025-06-30 00:59:07 -05:00
J. Nick Koston
daea06586d Merge branch 'update_libsodium' into integration 2025-06-30 00:54:49 -05:00
J. Nick Koston
9c8bf2587b Merge remote-tracking branch 'origin/update_libsodium' into update_libsodium 2025-06-30 00:50:31 -05:00
J. Nick Koston
9871cb04ea 0.1.10 2025-06-30 00:50:18 -05:00
J. Nick Koston
7dc093815f reduce 2025-06-29 23:40:09 -05:00
J. Nick Koston
087697106c remove debug 2025-06-29 23:32:59 -05:00
J. Nick Koston
9beebc7bfe Merge branch 'dev' into idf_webserver_ota 2025-06-29 23:22:34 -05:00
J. Nick Koston
4a948b7aae Merge branch 'dev' into update_libsodium 2025-06-29 23:20:30 -05:00
J. Nick Koston
0d3bc21e97 Merge branch 'dev' from upstream
Resolved conflicts in:
- esphome/components/api/list_entities.h
- esphome/components/api/subscribe_state.h

Both conflicts were about NOLINT comment style - chose upstream's inline comment format.
2025-06-29 23:18:41 -05:00
J. Nick Koston
7496894ae6 0.1.9 2025-06-29 23:16:20 -05:00
J. Nick Koston
918d7217a9 fix 2025-06-29 23:15:28 -05:00
J. Nick Koston
2103d583f9 bump to 0.1.8 2025-06-29 23:12:48 -05:00
J. Nick Koston
837c446926 Merge branch 'dev' from upstream 2025-06-29 23:10:20 -05:00
J. Nick Koston
480ea54ee0 Merge branch 'dev' into update_libsodium 2025-06-29 22:49:46 -05:00
J. Nick Koston
97e7c34cb6 Merge branch 'dev' into idf_webserver_ota 2025-06-29 22:41:30 -05:00
J. Nick Koston
fe65b149f5 tweak 2025-06-29 22:34:42 -05:00
J. Nick Koston
4106b97174 tweak 2025-06-29 22:31:47 -05:00
J. Nick Koston
8648954b94 tweak 2025-06-29 22:29:40 -05:00
J. Nick Koston
9f1fae0955 tweak 2025-06-29 22:27:36 -05:00
Jesse Hills
1d631c3c6d Update platformio.ini 2025-06-30 15:26:14 +12:00
J. Nick Koston
727161f1db tweak 2025-06-29 22:24:28 -05:00
Jesse Hills
bf5f628769 Update esphome/components/api/__init__.py 2025-06-30 15:23:40 +12:00
J. Nick Koston
8563a5785f tweak 2025-06-29 22:19:29 -05:00
J. Nick Koston
4082634e6d tweak 2025-06-29 22:14:15 -05:00
J. Nick Koston
a74adb5865 tweak 2025-06-29 22:13:56 -05:00
J. Nick Koston
2e4d7301f2 tweak 2025-06-29 22:12:36 -05:00
J. Nick Koston
94845222ad tweak 2025-06-29 22:12:20 -05:00
J. Nick Koston
7f6ac2deee tweak 2025-06-29 22:10:50 -05:00
J. Nick Koston
a054aa9c52 clean 2025-06-29 21:57:50 -05:00
J. Nick Koston
22cb59b88c clean 2025-06-29 21:55:13 -05:00
J. Nick Koston
6968772a31 preen 2025-06-29 21:48:35 -05:00
J. Nick Koston
004f4b51d1 preen 2025-06-29 21:41:57 -05:00
J. Nick Koston
8c8dd7b4bc preen 2025-06-29 21:40:20 -05:00
J. Nick Koston
9778289d33 revert 2025-06-29 21:36:25 -05:00
J. Nick Koston
a43caf08a6 cleanup 2025-06-29 21:31:54 -05:00
J. Nick Koston
01e550fac9 cleanup 2025-06-29 21:13:05 -05:00
J. Nick Koston
ad4dd6a060 cleanup 2025-06-29 21:07:39 -05:00
J. Nick Koston
849d99b0dc cleanup 2025-06-29 21:06:04 -05:00
J. Nick Koston
f5df5f71a3 cleanup 2025-06-29 21:04:45 -05:00
J. Nick Koston
429be0a5ae cleanup 2025-06-29 21:03:13 -05:00
J. Nick Koston
148e4ec555 cleanup 2025-06-29 20:59:51 -05:00
J. Nick Koston
bb22f4d6a3 cleanup 2025-06-29 20:54:36 -05:00
J. Nick Koston
f94703360b cleanup 2025-06-29 20:54:13 -05:00
J. Nick Koston
f26bec1a5a preen 2025-06-29 20:18:32 -05:00
J. Nick Koston
d065f4ae62 cleanup 2025-06-29 20:15:18 -05:00
J. Nick Koston
ed2c3e626b cleanup 2025-06-29 19:53:29 -05:00
J. Nick Koston
1927f92358 cleanup 2025-06-29 19:49:01 -05:00
J. Nick Koston
939144174c cleanup 2025-06-29 19:32:43 -05:00
J. Nick Koston
59bcbe7fef proper state machine 2025-06-29 19:31:01 -05:00
J. Nick Koston
8e00fedc67 rwatchdog 2025-06-29 19:24:40 -05:00
J. Nick Koston
0ac879ae0b remove 2025-06-29 19:22:13 -05:00
J. Nick Koston
22d1a18d22 Merge remote-tracking branch 'upstream/dev' into idf_webserver_ota 2025-06-29 19:19:32 -05:00
J. Nick Koston
ca203bff9b cleanup 2025-06-29 19:18:33 -05:00
J. Nick Koston
e01d16ce82 cleanup 2025-06-29 19:07:47 -05:00
J. Nick Koston
93b6b9835c cleanup 2025-06-29 19:04:54 -05:00
J. Nick Koston
d0ac5388d9 cleanup 2025-06-29 19:03:54 -05:00
J. Nick Koston
9097d646ca cleanup 2025-06-29 19:03:48 -05:00
J. Nick Koston
596a28e1fb cleanup 2025-06-29 19:00:07 -05:00
J. Nick Koston
5205ff5c43 cleanup 2025-06-29 18:59:09 -05:00
J. Nick Koston
c420bf5f4f cleanup 2025-06-29 18:55:46 -05:00
J. Nick Koston
18844e15dc cleanup 2025-06-29 18:54:48 -05:00
J. Nick Koston
af2f5b7348 cleanup 2025-06-29 18:54:14 -05:00
J. Nick Koston
bcbf0f0e26 cleanup 2025-06-29 18:53:43 -05:00
J. Nick Koston
4d460d4bc3 cleanup 2025-06-29 18:51:35 -05:00
J. Nick Koston
92f6f3ac0d cleanup 2025-06-29 18:48:30 -05:00
J. Nick Koston
bc63d246c8 cleanup 2025-06-29 18:46:15 -05:00
J. Nick Koston
b25f272d72 lint 2025-06-29 18:44:14 -05:00
J. Nick Koston
e3a3305adb delete 2025-06-29 18:44:02 -05:00
J. Nick Koston
c655c4e106 remove cruft 2025-06-29 18:39:17 -05:00
J. Nick Koston
7fe8cdaa34 remove cruft 2025-06-29 18:37:48 -05:00
J. Nick Koston
df97985048 Merge remote-tracking branch 'origin/integration' into integration 2025-06-29 18:33:46 -05:00
J. Nick Koston
3779675816 Merge branch 'binary_sensor_gpio_polling' into integration 2025-06-29 18:33:34 -05:00
J. Nick Koston
0005aad5b5 cleanup 2025-06-29 18:30:00 -05:00
J. Nick Koston
98c18517e2 Merge branch 'another_webserver_crash' into idf_webserver_ota 2025-06-29 18:23:25 -05:00
J. Nick Koston
e4dee935ce Fix thread-safe cleanup of event source connections in ESP-IDF web server 2025-06-29 18:21:24 -05:00
J. Nick Koston
f8cb44fb3c fixes 2025-06-29 17:54:11 -05:00
J. Nick Koston
101901fdb8 Merge remote-tracking branch 'upstream/loop_enable_disable_log_spam' into idf_webserver_ota 2025-06-29 17:41:04 -05:00
J. Nick Koston
b8579d2040 Reduce loop enable/disable log spam by using very verbose level 2025-06-29 17:39:48 -05:00
J. Nick Koston
3fca3df756 working 2025-06-29 17:22:33 -05:00
J. Nick Koston
2f5db85997 Merge remote-tracking branch 'upstream/last_Event_fix' into idf_webserver_ota 2025-06-29 16:54:00 -05:00
Jesse Hills
e0d4361875 Update esphome/components/gpio/binary_sensor/__init__.py 2025-06-30 09:53:54 +12:00
J. Nick Koston
30bafc43bd make bot happy 2025-06-29 16:52:55 -05:00
J. Nick Koston
3530437b48 Merge branch 'last_Event_fix' into idf_webserver_ota 2025-06-29 16:19:20 -05:00
J. Nick Koston
81db42942c Fix crash when event last_event_type is null in web_server 2025-06-29 16:16:53 -05:00
J. Nick Koston
6cb0d9e0b5 fixes 2025-06-29 16:11:33 -05:00
J. Nick Koston
19f7e36753 fixes 2025-06-29 16:10:58 -05:00
J. Nick Koston
a963f97520 fixes 2025-06-29 16:07:26 -05:00
J. Nick Koston
ad2d48e9b7 fixes 2025-06-29 16:03:05 -05:00
J. Nick Koston
5c0d67ca14 fixes 2025-06-29 15:50:12 -05:00
J. Nick Koston
3467329a7c cleanup 2025-06-29 15:43:41 -05:00
J. Nick Koston
d73fa370f3 cleanup 2025-06-29 15:35:59 -05:00
J. Nick Koston
78fd0a4870 cleanup 2025-06-29 15:23:32 -05:00
J. Nick Koston
3162bb475d cleanup 2025-06-29 15:08:27 -05:00
J. Nick Koston
c17503abd5 cleanup 2025-06-29 15:03:48 -05:00
J. Nick Koston
3433ee8171 cleanup 2025-06-29 14:59:41 -05:00
J. Nick Koston
344297b0a7 cleanup 2025-06-29 14:51:24 -05:00
J. Nick Koston
947456628e cleanup 2025-06-29 14:51:01 -05:00
J. Nick Koston
80dd6c111d cleanup 2025-06-29 14:44:47 -05:00
J. Nick Koston
b70188ba4b cleanup 2025-06-29 14:40:13 -05:00
J. Nick Koston
c6064aa2b4 Merge remote-tracking branch 'upstream/dev' into idf_webserver_ota 2025-06-29 14:35:44 -05:00
J. Nick Koston
6596f864be merg3 2025-06-29 14:35:38 -05:00
J. Nick Koston
f61a40efb8 fixes 2025-06-29 11:16:00 -05:00
J. Nick Koston
b049f0b480 fixes 2025-06-29 11:13:25 -05:00
J. Nick Koston
b2641d29c1 fixes 2025-06-29 11:12:40 -05:00
J. Nick Koston
7b8cfc768d fixes 2025-06-29 11:11:47 -05:00
J. Nick Koston
04860567f7 fixes 2025-06-29 11:10:29 -05:00
J. Nick Koston
b16edb5a99 fixes 2025-06-29 11:09:05 -05:00
J. Nick Koston
15a995b2e7 fixes 2025-06-29 11:07:48 -05:00
J. Nick Koston
f57e26c54e fixes 2025-06-29 11:07:25 -05:00
J. Nick Koston
2b7bc1cd9f fixes 2025-06-29 11:03:37 -05:00
J. Nick Koston
614a2f66a3 fixes 2025-06-29 10:57:00 -05:00
J. Nick Koston
9047b02c92 fixes 2025-06-29 10:53:29 -05:00
J. Nick Koston
e73d0477bb Merge branch 'api_conditional_memory' into integration 2025-06-29 10:42:24 -05:00
J. Nick Koston
2b1e623eb4 defines 2025-06-29 10:42:11 -05:00
J. Nick Koston
c366d555e9 Add OTA support to ESP-IDF webserver 2025-06-29 10:38:53 -05:00
J. Nick Koston
7efbd62730 Add OTA support to ESP-IDF webserver 2025-06-29 10:34:49 -05:00
J. Nick Koston
b77c1d0af8 Add OTA support to ESP-IDF webserver 2025-06-29 10:33:49 -05:00
J. Nick Koston
f8810ea6a8 Merge branch 'webserver_eliminate_heap_url_match' into integration 2025-06-29 10:26:55 -05:00
J. Nick Koston
40dd667211 fixes 2025-06-29 10:26:39 -05:00
J. Nick Koston
848b572864 Merge branch 'webserver_eliminate_heap_url_match' into integration 2025-06-29 10:17:49 -05:00
J. Nick Koston
7c858fbccd Optimize web_server UrlMatch to avoid heap allocations 2025-06-29 10:15:06 -05:00
J. Nick Koston
a1814ea37d Merge branch 'useless_default_data' into integration 2025-06-29 09:22:57 -05:00
J. Nick Koston
5892a1dbe2 tests 2025-06-29 08:40:26 -05:00
J. Nick Koston
29f524f432 tests 2025-06-29 08:37:53 -05:00
J. Nick Koston
4ec588ebd7 Merge remote-tracking branch 'origin/integration' into integration 2025-06-29 08:20:36 -05:00
J. Nick Koston
efdef61477 Merge branch 'api_reduce' into integration 2025-06-29 08:20:22 -05:00
J. Nick Koston
fe2b9f8c12 correct fix 2025-06-29 08:20:12 -05:00
J. Nick Koston
c6be55eb55 Merge branch 'api_conditional_memory' into integration 2025-06-29 08:14:25 -05:00
J. Nick Koston
4c69925b84 lint 2025-06-29 08:13:28 -05:00
J. Nick Koston
bc6407df0a Merge branch 'bitpack_api' into integration 2025-06-29 08:09:52 -05:00
J. Nick Koston
01982a8d0a reduce upper bound of batch delay as it did not make sense 2025-06-29 07:59:59 -05:00
J. Nick Koston
b995cd6257 Merge remote-tracking branch 'origin/integration' into integration 2025-06-29 07:47:28 -05:00
J. Nick Koston
b16d7b7a95 Merge branch 'api_conditional_memory' into integration 2025-06-29 07:47:17 -05:00
J. Nick Koston
42aea701d3 Reduce API component memory usage with conditional compilation 2025-06-29 07:45:48 -05:00
J. Nick Koston
5f56c85182 Merge remote-tracking branch 'origin/integration' into integration 2025-06-29 07:42:05 -05:00
J. Nick Koston
52b4eb8950 Merge branch 'api_reduce' into integration 2025-06-29 07:41:00 -05:00
J. Nick Koston
eeb2b42a0f fixes 2025-06-29 07:39:07 -05:00
J. Nick Koston
90772033d1 revert bad feedback 2025-06-29 06:10:55 -05:00
J. Nick Koston
dadeb4d2a9 Merge branch 'api_reduce' into integration 2025-06-28 23:24:40 -05:00
J. Nick Koston
60a5029c88 lint 2025-06-28 23:24:30 -05:00
J. Nick Koston
d7ba16b48b Merge branch 'api_reduce' into integration 2025-06-28 23:06:51 -05:00
J. Nick Koston
fca9befa63 cleanup 2025-06-28 23:06:40 -05:00
J. Nick Koston
187cbde0db cleanup 2025-06-28 23:06:34 -05:00
J. Nick Koston
f5ae5cade8 cleanup 2025-06-28 23:06:09 -05:00
J. Nick Koston
3e66c28aff Merge branch 'api_reduce' into integration 2025-06-28 23:05:15 -05:00
J. Nick Koston
89703a1aef cleanup 2025-06-28 23:05:02 -05:00
J. Nick Koston
cba31617e9 Merge branch 'api_reduce' into integration 2025-06-28 23:02:05 -05:00
J. Nick Koston
a3eeb46961 reduce 2025-06-28 23:01:48 -05:00
J. Nick Koston
128bd76f20 reduce 2025-06-28 22:45:00 -05:00
J. Nick Koston
c0355fd2c6 Merge branch 'webserver_helper_reduce_flash' into integration 2025-06-28 22:09:03 -05:00
J. Nick Koston
a5fd440e25 cleanup 2025-06-28 22:08:47 -05:00
J. Nick Koston
592ef8be2a Merge remote-tracking branch 'origin/integration' into integration 2025-06-28 22:04:41 -05:00
J. Nick Koston
3bcc1c7297 Merge branch 'add_message_object' into integration 2025-06-28 22:04:27 -05:00
J. Nick Koston
3b44c3acd1 Reduce flash usage by making add_message_object non-template 2025-06-28 22:03:04 -05:00
J. Nick Koston
ec4911643a Merge remote-tracking branch 'upstream/integration' into integration 2025-06-28 21:40:44 -05:00
J. Nick Koston
f4fedbab44 Merge branch 'webserver_helper_reduce_flash' into integration 2025-06-28 21:40:26 -05:00
J. Nick Koston
553d441ecc Reduce web_server code duplication by extracting detail parameter parsing 2025-06-28 21:38:40 -05:00
J. Nick Koston
1946116438 Merge branch 'api_read_message' into integration 2025-06-28 21:22:25 -05:00
J. Nick Koston
ab28515fba fix 2025-06-28 21:17:59 -05:00
J. Nick Koston
4dc11fb95e Merge branch 'api_read_message' into integration 2025-06-28 21:11:16 -05:00
J. Nick Koston
e27094e0f3 Remove unused return value from read_message and fix ifdef placement in generated API code 2025-06-28 21:09:33 -05:00
J. Nick Koston
88302201eb Merge remote-tracking branch 'origin/integration' into integration 2025-06-28 20:56:24 -05:00
J. Nick Koston
8afb172e83 Merge branch 'api_reduce' into integration 2025-06-28 20:56:00 -05:00
J. Nick Koston
562d024623 Remove single-use send_*_info wrappers in API connection 2025-06-28 20:49:09 -05:00
J. Nick Koston
50b094547c Remove single-use send_*_info wrappers in API connection 2025-06-28 20:47:57 -05:00
J. Nick Koston
a6c1e50985 Remove single-use send_*_info wrappers in API connection 2025-06-28 20:46:17 -05:00
J. Nick Koston
96772bdfc6 Merge remote-tracking branch 'origin/integration' into integration 2025-06-28 20:13:13 -05:00
J. Nick Koston
ed154d373c Merge remote-tracking branch 'origin/dev' into integration 2025-06-28 20:12:59 -05:00
J. Nick Koston
a5e862ce36 Remove redundant get_setup_priority() overrides returning default value 2025-06-28 17:21:20 -05:00
J. Nick Koston
ae55964bd9 Merge remote-tracking branch 'origin/bitpack_api' into integration 2025-06-28 16:47:43 -05:00
J. Nick Koston
c162309f41 Pack APIConnection members to reduce memory footprint 2025-06-28 16:46:17 -05:00
J. Nick Koston
62c667f1a0 Merge remote-tracking branch 'origin/dev' into integration 2025-06-28 16:11:15 -05:00
J. Nick Koston
3d08eae8e4 Merge branch 'scheduler_copy' into integration 2025-06-28 15:52:09 -05:00
J. Nick Koston
2af5a0a6dd Merge remote-tracking branch 'origin/scheduler_copy' into scheduler_copy 2025-06-28 15:52:03 -05:00
J. Nick Koston
6d24b04235 cover 2025-06-28 15:51:50 -05:00
J. Nick Koston
3ee8103353 Merge branch 'scheduler_copy' into integration 2025-06-28 15:49:33 -05:00
J. Nick Koston
1296165fce Merge branch 'dev' into scheduler_copy 2025-06-28 15:48:11 -05:00
J. Nick Koston
7100c22dc4 address copilot comments 2025-06-28 15:47:24 -05:00
J. Nick Koston
5718c0f5b8 Update test_scheduler_string_test.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-06-28 11:25:42 -05:00
J. Nick Koston
25ebddfa1c Update test_scheduler_string_test.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-06-28 11:25:36 -05:00
J. Nick Koston
2c0558fe23 Update test_scheduler_string_test.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-06-28 11:25:30 -05:00
J. Nick Koston
7192108fc1 Merge branch 'scheduler_copy' into integration 2025-06-28 10:32:21 -05:00
J. Nick Koston
847696c342 safer 2025-06-28 10:32:10 -05:00
J. Nick Koston
912ae1fc87 Merge remote-tracking branch 'origin/integration' into integration 2025-06-28 10:28:35 -05:00
J. Nick Koston
a86f75d31d Merge branch 'scheduler_copy' into integration 2025-06-28 10:28:22 -05:00
J. Nick Koston
fe1e25b5c7 Merge remote-tracking branch 'upstream/integration' into integration 2025-06-28 10:22:18 -05:00
J. Nick Koston
9b241b596a Merge branch 'scheduler_copy' into integration 2025-06-28 10:22:07 -05:00
J. Nick Koston
53b9c8d5bb cleanup 2025-06-28 10:15:05 -05:00
J. Nick Koston
2946bc9d72 cover 2025-06-28 10:10:43 -05:00
J. Nick Koston
67a20e212d safe 2025-06-28 09:59:50 -05:00
J. Nick Koston
a9ace366eb dry 2025-06-28 09:50:27 -05:00
J. Nick Koston
df3469efba dry 2025-06-28 09:48:58 -05:00
J. Nick Koston
0a3bbb8554 dry 2025-06-28 09:48:26 -05:00
J. Nick Koston
a15b9f5d3b dry 2025-06-28 09:45:59 -05:00
J. Nick Koston
e6334b0716 dry 2025-06-28 09:41:12 -05:00
J. Nick Koston
7a835baa5a Merge remote-tracking branch 'upstream/dev' into scheduler_copy 2025-06-28 09:36:32 -05:00
J. Nick Koston
c9c21a5728 Merge remote-tracking branch 'upstream/dev' into integration 2025-06-28 09:36:07 -05:00
J. Nick Koston
956959fc32 safety 2025-06-28 09:23:16 -05:00
J. Nick Koston
6f67f74638 Merge remote-tracking branch 'upstream/dev' into integration 2025-06-28 08:43:19 -05:00
J. Nick Koston
b3dd4543b7 Merge branch 'update_libsodium' into integration 2025-06-27 17:10:52 -05:00
J. Nick Koston
4f17a28ac5 Merge branch 'extract_helpers' into integration 2025-06-27 17:10:17 -05:00
J. Nick Koston
90736f367a release 2025-06-27 16:36:32 -05:00
J. Nick Koston
9af88bd482 DNM: Update libsodium
needs https://github.com/esphome/noise-c/pull/4
2025-06-27 14:07:27 -05:00
J. Nick Koston
13b89f4934 Merge branch 'libretiny_logconfig' into integration 2025-06-27 13:59:01 -05:00
J. Nick Koston
d00a00d142 Reduce libretiny logconfig messages
align with https://developers.esphome.io/architecture/logging
2025-06-27 13:58:33 -05:00
J. Nick Koston
e662c39e16 Merge branch 'extract_helpers' into integration 2025-06-27 13:18:50 -05:00
J. Nick Koston
95ef131285 address bot comments 2025-06-27 13:18:39 -05:00
J. Nick Koston
7476f170f6 Merge remote-tracking branch 'upstream/extract_helpers' into extract_helpers 2025-06-27 13:16:17 -05:00
J. Nick Koston
3b6bd55d1e address bot comments 2025-06-27 13:16:06 -05:00
J. Nick Koston
10dbc9e884 Merge remote-tracking branch 'origin/extract_helpers' into integration 2025-06-27 13:03:20 -05:00
J. Nick Koston
860f619dfe Merge branch 'dev' into extract_helpers 2025-06-27 20:02:57 +02:00
J. Nick Koston
17ddc9ee0c Merge branch 'extract_helpers' into integration 2025-06-27 12:56:28 -05:00
J. Nick Koston
949689c318 address bot review 2025-06-27 12:55:58 -05:00
J. Nick Koston
86a2aac011 Merge branch 'extract_helpers' into integration 2025-06-27 12:50:37 -05:00
J. Nick Koston
d0a402f201 Extract lock-free queue and event pool to core helpers 2025-06-27 12:49:44 -05:00
J. Nick Koston
05772d5365 Merge remote-tracking branch 'origin/integration' into integration 2025-06-27 10:19:35 -05:00
J. Nick Koston
c2a68f5147 Merge branch 'duplicate_webserver_code' into integration 2025-06-27 10:19:21 -05:00
J. Nick Koston
697ca1c7be simplify 2025-06-27 10:17:33 -05:00
J. Nick Koston
409346952f clang-format 2025-06-27 10:15:04 -05:00
J. Nick Koston
f4b3539d77 clang-format 2025-06-27 10:05:30 -05:00
J. Nick Koston
c12166c1a1 missed one 2025-06-27 10:04:29 -05:00
J. Nick Koston
8d20f003cb Merge branch 'duplicate_webserver_code' into integration 2025-06-27 09:45:00 -05:00
J. Nick Koston
88f857a2f0 defines 2025-06-27 09:44:50 -05:00
J. Nick Koston
fb7faadd99 reduce memory 2025-06-27 09:41:20 -05:00
J. Nick Koston
5c8d6752fb Merge branch 'dev' into duplicate_webserver_code 2025-06-27 16:01:32 +02:00
J. Nick Koston
dda81fbc2c Merge branch 'dev' into binary_sensor_gpio_polling 2025-06-27 15:58:14 +02:00
J. Nick Koston
c40dff5d63 cleanup 2025-06-27 06:30:51 -05:00
J. Nick Koston
6f07b54772 cleanup 2025-06-27 06:30:42 -05:00
J. Nick Koston
ce0f1dfcb6 Merge remote-tracking branch 'upstream/dev' into integration 2025-06-27 06:30:15 -05:00
J. Nick Koston
9a3a5d48eb Merge branch 'dynamic_logging' into integration 2025-06-26 20:47:40 -05:00
J. Nick Koston
4a759eda02 Disable dynamic log level control for ESP32 ESP-IDF builds 2025-06-26 20:47:02 -05:00
J. Nick Koston
26badf201d fixes 2025-06-27 01:17:26 +02:00
J. Nick Koston
384f27cd6d Merge branch 'wifi_memory' into integration 2025-06-27 01:13:11 +02:00
J. Nick Koston
ac1c5f9f58 Reduce WiFi component memory usage 2025-06-27 01:12:19 +02:00
J. Nick Koston
8ad058fdf4 Merge branch 'ethernet_padding' into integration 2025-06-27 01:00:27 +02:00
J. Nick Koston
9024c3c67a Reduce ethernet component memory usage by 8 bytes through struct optimization 2025-06-27 00:59:50 +02:00
J. Nick Koston
fc81a47499 Merge branch 'esp32_gpio_padding_waste' into integration 2025-06-27 00:43:41 +02:00
J. Nick Koston
a331452076 Reduce ESP32 GPIO memory usage by optimizing struct padding 2025-06-27 00:42:30 +02:00
J. Nick Koston
b1c6e8168e Merge remote-tracking branch 'origin/ota_memory_str' into integration 2025-06-27 00:34:36 +02:00
J. Nick Koston
b41cc0226e Optimize OTA password storage from std::string to const char 2025-06-27 00:24:45 +02:00
J. Nick Koston
450429ddd5 Merge branch 'safe_mode_padding' into integration 2025-06-27 00:22:40 +02:00
J. Nick Koston
f7b24f4b4b Optimize SafeModeComponent memory layout to reduce padding 2025-06-27 00:20:44 +02:00
J. Nick Koston
294c985380 Merge branch 'duplicate_webserver_code' into integration 2025-06-27 00:09:07 +02:00
J. Nick Koston
720964b901 Refactor web_server to extract duplicate sorting info code into helper method 2025-06-27 00:05:56 +02:00
J. Nick Koston
8895c8a987 bitpack api flags 2025-06-26 12:46:57 +02:00
J. Nick Koston
740dcd72a2 Merge branch 'duplicate_client_peername' into integration 2025-06-26 12:00:03 +02:00
J. Nick Koston
ffd442624f Optimize API connection memory usage by removing client_peername_ 2025-06-26 11:59:03 +02:00
J. Nick Koston
088fd85694 Merge branch 'batch_ping_fallback' into integration 2025-06-26 10:14:21 +02:00
J. Nick Koston
d5b68d69d3 tweak 2025-06-26 10:14:05 +02:00
J. Nick Koston
bb0f7bb393 Merge branch 'batch_ping_fallback' into integration 2025-06-26 10:10:12 +02:00
J. Nick Koston
d86a108f18 Merge remote-tracking branch 'upstream/dev' into batch_ping_fallback 2025-06-26 10:09:24 +02:00
J. Nick Koston
7828ed2d9e Merge branch 'batch_ping_fallback' into integration 2025-06-26 10:05:06 +02:00
J. Nick Koston
ebf14f50fb Merge branch 'dev' of https://github.com/esphome/esphome into batch_ping_fallback 2025-06-26 10:02:32 +02:00
J. Nick Koston
1546ff615b Merge branch 'app_padding' into integration 2025-06-26 02:47:46 +02:00
J. Nick Koston
46cf1fb597 comment 2025-06-26 02:47:33 +02:00
J. Nick Koston
8bf8655054 Merge branch 'app_padding' into integration 2025-06-26 02:45:13 +02:00
J. Nick Koston
a6d84948e2 Optimize Application class memory layout and reduce loop_interval size 2025-06-26 02:44:44 +02:00
J. Nick Koston
fac20a1f97 Merge branch 'batch_ping_fallback' into integration 2025-06-26 02:15:41 +02:00
J. Nick Koston
c65586b5e1 cleanup 2025-06-26 02:15:32 +02:00
J. Nick Koston
b27b018b06 Merge remote-tracking branch 'origin/integration' into integration 2025-06-26 02:13:42 +02:00
J. Nick Koston
403da1e632 Merge branch 'batch_ping_fallback' into integration 2025-06-26 02:12:53 +02:00
J. Nick Koston
2371ec1f9e Replace ping retry timer with batch queue fallback 2025-06-26 02:11:17 +02:00
J. Nick Koston
5e3ec2d34b lint 2025-06-26 00:24:53 +02:00
J. Nick Koston
78d84644c9 lint 2025-06-26 00:24:12 +02:00
J. Nick Koston
0cd0f8015a Merge branch 'message_creator_ram' into integration 2025-06-26 00:09:31 +02:00
J. Nick Koston
4b5424f695 nolint 2025-06-26 00:08:15 +02:00
J. Nick Koston
a1d59040f7 Merge remote-tracking branch 'origin/message_creator_ram' into integration 2025-06-25 23:54:37 +02:00
J. Nick Koston
0306398072 Merge remote-tracking branch 'origin/component_iterator' into integration 2025-06-25 23:54:33 +02:00
J. Nick Koston
a7e0bf9013 tweak 2025-06-25 23:53:22 +02:00
J. Nick Koston
ddb988cd83 Merge remote-tracking branch 'upstream/dev' into component_iterator 2025-06-25 23:39:45 +02:00
J. Nick Koston
04b54353f1 Merge remote-tracking branch 'upstream/dev' into scheduler_copy 2025-06-25 23:36:41 +02:00
J. Nick Koston
f058107c05 tweak 2025-06-25 23:33:54 +02:00
J. Nick Koston
6b5b0815d7 tidy issues 2025-06-25 23:26:57 +02:00
J. Nick Koston
8388497038 tidy issues 2025-06-25 23:18:50 +02:00
J. Nick Koston
825b1113b6 tweak 2025-06-25 23:17:41 +02:00
J. Nick Koston
9074ef792f Reduce component_iterator memory usage 2025-06-25 19:35:40 +02:00
J. Nick Koston
0946f28511 avoid string copy in scheduler for const strings 2025-06-25 19:08:18 +02:00
J. Nick Koston
23765cd4f5 Merge branch 'message_creator_ram' into integration 2025-06-25 18:28:56 +02:00
J. Nick Koston
e20c6468d0 fix missed one 2025-06-25 18:27:43 +02:00
J. Nick Koston
b90516de1d Merge branch 'template_value' into integration 2025-06-25 17:30:36 +02:00
J. Nick Koston
ec5cc0f00f Merge branch 'integration' of https://github.com/esphome/esphome into integration 2025-06-25 17:30:27 +02:00
J. Nick Koston
5dda5a976e Merge branch 'message_creator_ram' into integration 2025-06-25 17:22:41 +02:00
J. Nick Koston
915da9ae13 make the bot happy 2025-06-25 17:22:23 +02:00
J. Nick Koston
8652464f4e Merge branch 'dev' into message_creator_ram 2025-06-25 17:16:31 +02:00
J. Nick Koston
ce6ce1c1f8 Merge branch 'message_creator_ram' into integration 2025-06-25 17:10:41 +02:00
J. Nick Koston
39efe67e55 Optimize API connection memory with tagged pointers 2025-06-25 17:08:57 +02:00
J. Nick Koston
748ffa00f3 Optimize TemplatableValue memory 2025-06-25 14:49:01 +02:00
J. Nick Koston
e8d9df2b0e Merge branch 'sensor_memory' into integration 2025-06-25 14:32:47 +02:00
J. Nick Koston
17396d67de revert 2025-06-25 14:32:38 +02:00
J. Nick Koston
edd6a86714 Merge branch 'sensor_memory' into integration 2025-06-25 14:26:03 +02:00
J. Nick Koston
85b4012c56 Merge branch 'dev' into sensor_memory 2025-06-25 14:24:09 +02:00
J. Nick Koston
7d98433502 Update tests/integration/test_host_mode_sensor.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-06-25 14:23:59 +02:00
J. Nick Koston
23774ae03b Reduce memory required for sensor entities 2025-06-25 14:17:05 +02:00
J. Nick Koston
0dedbcdd71 Merge branch 'multi_device' into integration 2025-06-25 13:44:20 +02:00
J. Nick Koston
4bdd08887e use a common that does not have dupes on dev 2025-06-25 00:50:18 +02:00
J. Nick Koston
1fd8ebf386 update tests now that duplicate names are validated 2025-06-25 00:35:38 +02:00
J. Nick Koston
d2fc3e749c update tests now that duplicate names are validated 2025-06-25 00:34:50 +02:00
J. Nick Koston
71fbcbceaf update tests now that duplicate names are validated 2025-06-25 00:34:27 +02:00
J. Nick Koston
27347b2088 update tests now that duplicate names are validated 2025-06-25 00:34:04 +02:00
J. Nick Koston
599993d1a5 update tests now that duplicate names are validated 2025-06-25 00:22:51 +02:00
J. Nick Koston
bf359cb8e3 update tests now that duplicate names are validated 2025-06-25 00:20:51 +02:00
J. Nick Koston
509a704410 update tests now that duplicate names are validated 2025-06-25 00:19:32 +02:00
J. Nick Koston
1f48e2b01f update tests now that duplicate names are validated 2025-06-25 00:18:40 +02:00
J. Nick Koston
8b25b1eee6 update tests now that duplicate names are validated 2025-06-25 00:18:28 +02:00
J. Nick Koston
3bbf30ff5f Merge branch 'multi_device' into integration 2025-06-25 00:04:33 +02:00
J. Nick Koston
83613726d1 fix 2025-06-25 00:04:07 +02:00
J. Nick Koston
254b6a17f3 Merge remote-tracking branch 'dala318/multi_device' into integration 2025-06-24 23:54:40 +02:00
J. Nick Koston
796e12bd70 Merge branch 'dev' into multi_device 2025-06-24 23:54:24 +02:00
J. Nick Koston
ddbe17d3f6 fixes 2025-06-24 23:40:16 +02:00
J. Nick Koston
591ec36f4a fixes 2025-06-24 23:37:58 +02:00
J. Nick Koston
41eceb72ef preen 2025-06-24 23:28:06 +02:00
J. Nick Koston
0a5f094025 cleanup 2025-06-24 23:25:46 +02:00
J. Nick Koston
ca0f3ba262 cleanup 2025-06-24 23:23:59 +02:00
J. Nick Koston
30f4e782db cleanup 2025-06-24 23:23:35 +02:00
J. Nick Koston
192158ef1a cleanup 2025-06-24 23:22:18 +02:00
J. Nick Koston
602456db40 cleanup 2025-06-24 23:13:45 +02:00
J. Nick Koston
536e45668f migrate 2025-06-24 23:09:08 +02:00
J. Nick Koston
10bf05ab0d migrate 2025-06-24 22:59:46 +02:00
J. Nick Koston
5ad1af69e4 migrate 2025-06-24 22:57:10 +02:00
J. Nick Koston
48f2911434 raise 2025-06-24 22:18:29 +02:00
J. Nick Koston
dbb0d6349a Merge branch 'multi_device' into integration 2025-06-24 18:08:14 +02:00
J. Nick Koston
ac3598f12a cleanup 2025-06-24 18:07:58 +02:00
J. Nick Koston
66201be5ca preen 2025-06-24 18:00:10 +02:00
J. Nick Koston
ac0b0b652e cleanup 2025-06-24 17:55:58 +02:00
J. Nick Koston
d89ee2df42 Update esphome/core/application.h 2025-06-24 17:52:13 +02:00
J. Nick Koston
418e248e5e cleanup 2025-06-24 17:51:05 +02:00
J. Nick Koston
8c2b141049 cleanup 2025-06-24 17:41:40 +02:00
J. Nick Koston
2f8e07302b Update esphome/core/entity_base.cpp 2025-06-24 17:10:06 +02:00
J. Nick Koston
c3776240b6 fixes 2025-06-24 17:03:23 +02:00
J. Nick Koston
e370872ec1 fix conflicts 2025-06-24 16:13:34 +02:00
Jesse Hills
d4e978369a Store reference to device on EntityBase
This is so we can get the name of the device to use as part of the object id and to internally set the name for logging.
2025-06-24 19:56:30 +12:00
Jesse Hills
8d5d7f5237 Merge branch 'dev' into multi_device 2025-06-24 16:02:03 +12:00
J. Nick Koston
5cd498fbe9 Merge branch 'multi_device' into integration 2025-06-23 22:56:28 +02:00
J. Nick Koston
250f515f08 Merge branch 'api_opt' into integration 2025-06-23 12:20:40 +02:00
J. Nick Koston
0ec0a9e313 missing ifdef 2025-06-23 12:19:21 +02:00
J. Nick Koston
184f42ef03 Merge branch 'api_opt' into integration 2025-06-23 12:10:26 +02:00
J. Nick Koston
499517418d clang-tidy 2025-06-23 12:10:15 +02:00
J. Nick Koston
606b9c1a6d Merge branch 'api_opt' into integration 2025-06-23 12:00:34 +02:00
J. Nick Koston
971e954a54 follow logging guidelines 2025-06-23 11:59:07 +02:00
J. Nick Koston
e3aaf3219d speed up test 2025-06-23 11:58:16 +02:00
J. Nick Koston
0eea1c0e40 preen 2025-06-23 11:56:09 +02:00
J. Nick Koston
0773819778 cleanup 2025-06-23 11:45:58 +02:00
J. Nick Koston
170869b7db preen 2025-06-23 11:39:25 +02:00
J. Nick Koston
5dc54782e5 preen 2025-06-23 11:38:30 +02:00
J. Nick Koston
97b26fbefe preen 2025-06-23 11:38:10 +02:00
J. Nick Koston
686cc58d6c preen 2025-06-23 11:37:59 +02:00
J. Nick Koston
76a59759b2 preen 2025-06-23 11:37:27 +02:00
J. Nick Koston
93245a24b5 preen 2025-06-23 11:36:54 +02:00
J. Nick Koston
6a22ea1c7d preen 2025-06-23 11:35:41 +02:00
J. Nick Koston
56a02409c8 preen 2025-06-23 11:34:11 +02:00
J. Nick Koston
edeafd5a53 preen 2025-06-23 11:31:38 +02:00
J. Nick Koston
f67490b69b preen 2025-06-23 11:29:04 +02:00
J. Nick Koston
b76e34fb7b preen 2025-06-23 11:25:52 +02:00
J. Nick Koston
ddbda5032b preen 2025-06-23 11:25:24 +02:00
J. Nick Koston
5898d34b0a preen 2025-06-23 11:22:45 +02:00
J. Nick Koston
b0c02341ff preen 2025-06-23 11:22:08 +02:00
J. Nick Koston
19cbc8c33b preen 2025-06-23 11:21:37 +02:00
J. Nick Koston
02e61ef5d3 preen 2025-06-23 11:20:06 +02:00
J. Nick Koston
8d5d18064d preen 2025-06-23 11:19:56 +02:00
J. Nick Koston
c5ef7ebd27 preen 2025-06-23 11:19:07 +02:00
J. Nick Koston
047a3e0e8c preen 2025-06-23 11:18:47 +02:00
J. Nick Koston
13b23f840b preen 2025-06-23 11:17:17 +02:00
J. Nick Koston
147f6012b2 preen 2025-06-23 11:16:34 +02:00
J. Nick Koston
2c315595f0 preen 2025-06-23 11:12:04 +02:00
J. Nick Koston
20405c84ac preen 2025-06-23 11:10:07 +02:00
J. Nick Koston
0bc59b97de more api loop reductions 2025-06-23 11:06:51 +02:00
J. Nick Koston
a3a3bdc7eb more api loop reductions 2025-06-23 11:02:27 +02:00
J. Nick Koston
e767f30886 more api loop reductions 2025-06-23 10:59:49 +02:00
J. Nick Koston
e8c250a03c more api loop reductions 2025-06-23 10:59:00 +02:00
J. Nick Koston
d6725fc1ca more api loop reductions 2025-06-23 10:54:50 +02:00
J. Nick Koston
8ec998ff30 more api loop reductions 2025-06-23 10:52:34 +02:00
J. Nick Koston
23cc0c7f39 Merge remote-tracking branch 'upstream/dev' into api_reboot 2025-06-23 10:48:26 +02:00
J. Nick Koston
19b8bd6aa8 Merge remote-tracking branch 'upstream/logger_disable_loop' into integration 2025-06-23 09:03:16 +02:00
J. Nick Koston
ed57e7c6b0 Update esphome/components/logger/logger.cpp 2025-06-23 09:02:22 +02:00
J. Nick Koston
9f489c9f27 Update esphome/components/logger/logger.h 2025-06-23 09:01:21 +02:00
J. Nick Koston
f036989361 Update esphome/components/logger/logger.h 2025-06-23 09:01:01 +02:00
J. Nick Koston
6afa8141c0 Update esphome/components/logger/logger.cpp 2025-06-23 09:00:46 +02:00
J. Nick Koston
587964c6f1 Merge branch 'dev' into logger_disable_loop 2025-06-23 09:00:22 +02:00
Jesse Hills
7aea82a273 Move define 2025-06-23 14:15:10 +12:00
J. Nick Koston
20f946ccaf Merge branch 'dev' into multi_device 2025-06-23 00:32:09 +02:00
Jesse Hills
e5e972231c Update testing 2025-06-23 10:26:31 +12:00
J. Nick Koston
bfa80157f2 Merge branch 'scheduler_memory_opt' into integration 2025-06-23 00:07:43 +02:00
J. Nick Koston
99b1b079d0 Reduce RAM usage for scheduled tasks 2025-06-23 00:03:01 +02:00
J. Nick Koston
5697d549a8 Use scheduler for api reboot 2025-06-22 23:44:08 +02:00
Jesse Hills
754d2874e7 `this->` 2025-06-23 09:21:29 +12:00
Jesse Hills
06de58ff8b Dont need to warning about simple string area
A single device in a single area can have a simple string as the area
2025-06-23 09:20:53 +12:00
J. Nick Koston
a0b3527710 Merge branch 'logger_memory' into integration 2025-06-22 22:59:51 +02:00
J. Nick Koston
df24f48fa1 Merge branch 'pre_preserve_looping_components' into integration 2025-06-22 22:57:38 +02:00
J. Nick Koston
13d53590b2 Pre-reserve looping components vector to reduce memory allocations 2025-06-22 22:56:31 +02:00
J. Nick Koston
5857f7b9a7 Merge remote-tracking branch 'dala318/multi_device' into multi_device 2025-06-22 21:55:46 +02:00
J. Nick Koston
a5ea0cd41f remove unreachable code 2025-06-22 21:55:23 +02:00
J. Nick Koston
d677934417 Merge branch 'dev' into multi_device 2025-06-22 21:45:28 +02:00
J. Nick Koston
ba87a0b63c cleanups 2025-06-22 21:32:20 +02:00
J. Nick Koston
b725bb3dd1 lint 2025-06-22 21:28:16 +02:00
J. Nick Koston
c34ba3deb5 lint 2025-06-22 21:25:55 +02:00
J. Nick Koston
68b13340fb lint 2025-06-22 21:24:17 +02:00
J. Nick Koston
8831999ea6 lint 2025-06-22 21:23:41 +02:00
J. Nick Koston
c1853f8b84 document design decisions 2025-06-22 21:21:29 +02:00
J. Nick Koston
2b9b7e2853 validation should happen sooner 2025-06-22 21:18:04 +02:00
J. Nick Koston
d3b18debf9 validate sooner 2025-06-22 21:06:33 +02:00
J. Nick Koston
b01eb28d42 validate sooner 2025-06-22 21:05:15 +02:00
J. Nick Koston
02019dd16c validate sooner 2025-06-22 21:04:42 +02:00
J. Nick Koston
7be12f5ff6 validate sooner 2025-06-22 20:59:54 +02:00
J. Nick Koston
a90d59b6ba validate sooner 2025-06-22 20:59:07 +02:00
J. Nick Koston
e7fa156254 Merge remote-tracking branch 'upstream/dev' into integration 2025-06-22 20:15:02 +02:00
J. Nick Koston
a8ab6b1c43 Merge branch 'dev' into logger_disable_loop 2025-06-22 20:12:17 +02:00
J. Nick Koston
25ed7c890b cleanups 2025-06-22 20:03:02 +02:00
J. Nick Koston
85e3b63f05 adjust 2025-06-22 19:49:12 +02:00
J. Nick Koston
a37bac1956 add files 2025-06-22 19:47:19 +02:00
J. Nick Koston
818a978dfc units 2025-06-22 19:40:53 +02:00
J. Nick Koston
180aeb7d8e simplify 2025-06-22 13:50:29 +02:00
J. Nick Koston
0764fa7292 simplify 2025-06-22 13:48:27 +02:00
J. Nick Koston
17bf533ed7 simplify 2025-06-22 13:44:05 +02:00
J. Nick Koston
d7eae1c1a0 simplify 2025-06-22 13:43:52 +02:00
J. Nick Koston
7f2d979255 preen 2025-06-22 13:39:12 +02:00
J. Nick Koston
46b419ea8b preen 2025-06-22 13:38:14 +02:00
J. Nick Koston
b30b527ff9 one more place to check 2025-06-22 13:37:30 +02:00
J. Nick Koston
41b1bfc504 legacy test 2025-06-22 13:37:01 +02:00
J. Nick Koston
f4f14a7507 fixes 2025-06-22 13:29:49 +02:00
J. Nick Koston
61c29213a7 fixes 2025-06-22 13:29:41 +02:00
J. Nick Koston
e6d7639209 Merge branch 'dev' into multi_device 2025-06-22 13:03:16 +02:00
J. Nick Koston
3c07a186b2 Merge remote-tracking branch 'dala318/multi_device' into multi_device 2025-06-22 13:02:48 +02:00
J. Nick Koston
8a725250a9 Merge branch 'dev' into multi_device 2025-06-22 12:32:44 +02:00
J. Nick Koston
502b8a6073 fixes 2025-06-22 12:32:25 +02:00
J. Nick Koston
6212c6f80f Merge branch 'dev' into logger_disable_loop 2025-06-22 12:10:11 +02:00
J. Nick Koston
b03e3b8d4a fixes 2025-06-22 10:07:05 +02:00
J. Nick Koston
a98e34d190 handle collisions 2025-06-22 10:02:59 +02:00
J. Nick Koston
bf8d8b6e63 handle collisions 2025-06-22 10:01:53 +02:00
J. Nick Koston
57599f7a98 handle collisions 2025-06-22 10:00:31 +02:00
J. Nick Koston
ffccce7ffc handle collisions 2025-06-22 09:58:12 +02:00
J. Nick Koston
bbd5d050a9 Merge branch 'dev' into logger_disable_loop 2025-06-21 18:36:59 +02:00
J. Nick Koston
71a96fdcbf Merge branch 'dev' into logger_disable_loop 2025-06-21 18:11:19 +02:00
J. Nick Koston
221e3c6c9c preen 2025-06-21 18:09:16 +02:00
J. Nick Koston
fb1679d572 preen 2025-06-21 18:07:45 +02:00
J. Nick Koston
c19065f112 preen 2025-06-21 18:02:32 +02:00
J. Nick Koston
f2b04a077e preen 2025-06-21 18:01:12 +02:00
J. Nick Koston
8e7841c880 preen 2025-06-21 18:00:17 +02:00
J. Nick Koston
1873490b24 preen 2025-06-21 17:57:36 +02:00
J. Nick Koston
4d231953f4 preen 2025-06-21 17:57:10 +02:00
J. Nick Koston
aa4c399657 reverse space in vectors 2025-06-21 17:36:25 +02:00
J. Nick Koston
1f99d18982 reverse space in vectors 2025-06-21 17:34:08 +02:00
J. Nick Koston
be37178ef8 make areas and devices consistant 2025-06-21 17:32:11 +02:00
J. Nick Koston
fad86c655e make areas and devices consistant 2025-06-21 17:30:17 +02:00
J. Nick Koston
4a7958586e make areas and devices consistant 2025-06-21 17:19:16 +02:00
J. Nick Koston
f44ecd0891 make areas and devices consistant 2025-06-21 17:18:23 +02:00
J. Nick Koston
3d0392d668 make areas and devices consistant 2025-06-21 17:17:29 +02:00
J. Nick Koston
d300d2605b make areas and devices consistant 2025-06-21 17:13:04 +02:00
J. Nick Koston
66cce6a2f2 make areas and devices consistant 2025-06-21 17:12:25 +02:00
J. Nick Koston
65e3c6bfbb make areas and devices consistant 2025-06-21 17:12:00 +02:00
J. Nick Koston
2a39060912 Merge remote-tracking branch 'upstream/dev' into multi_device 2025-06-21 17:06:11 +02:00
J. Nick Koston
8714e80978 make areas and devices consistant 2025-06-21 17:05:46 +02:00
J. Nick Koston
98de53f60b migrate to using same area info for top level and sub devices 2025-06-21 16:47:03 +02:00
J. Nick Koston
41e11e9a0e migrate to using same area info for top level and sub devices 2025-06-21 16:43:48 +02:00
J. Nick Koston
e7a4eac8bd migrate to using same area info for top level and sub devices 2025-06-21 16:42:05 +02:00
J. Nick Koston
1589a131db migrate to using same area info for top level and sub devices 2025-06-21 16:39:07 +02:00
J. Nick Koston
7d84f0e650 migrate to using same area info for top level and sub devices 2025-06-21 16:37:21 +02:00
J. Nick Koston
86fb0e317f fixes 2025-06-21 15:22:35 +02:00
J. Nick Koston
32088d5ef7 revert 2025-06-21 13:35:32 +02:00
J. Nick Koston
63de88dd57 fixes 2025-06-21 13:33:29 +02:00
J. Nick Koston
153a6440dc cleanups to address review comments 2025-06-21 13:20:59 +02:00
J. Nick Koston
8937ed2269 cleanups to address review comments 2025-06-21 13:18:25 +02:00
J. Nick Koston
02e922b56f cleanups to address review comments 2025-06-21 13:16:42 +02:00
J. Nick Koston
bf9e901ab9 cleanups to address review comments 2025-06-21 13:13:44 +02:00
J. Nick Koston
1234ef8de2 Merge remote-tracking branch 'upstream/dev' into multi_device 2025-06-21 12:13:54 +02:00
J. Nick Koston
41697a7b1b Merge remote-tracking branch 'upstream/logger_disable_loop' into integration 2025-06-21 11:19:12 +02:00
J. Nick Koston
912e265bc0 Merge branch 'dev' into logger_disable_loop 2025-06-21 11:18:59 +02:00
J. Nick Koston
96ee6fb064 Merge branch 'logger_disable_loop' into integration 2025-06-21 11:17:13 +02:00
J. Nick Koston
788dba8ef3 define 2025-06-21 11:16:14 +02:00
J. Nick Koston
fdde9c4681 Reduce Logger memory usage by optimizing variable sizes 2025-06-21 00:27:05 +02:00
J. Nick Koston
f195e73d38 Merge branch 'logger_disable_loop' into integration 2025-06-20 22:54:40 +02:00
J. Nick Koston
b0d9ffc6a1 Reduce logger CPU usage by disabling loop when buffer is empty 2025-06-20 22:53:12 +02:00
J. Nick Koston
e17619841d fix last component being charged for stats 2025-06-20 22:03:53 +02:00
J. Nick Koston
eb6a7cf3b9 fix last component being charged for stats 2025-06-20 22:02:19 +02:00
J. Nick Koston
9901e2d72e Merge branch 'dev' into integration 2025-06-20 21:36:36 +02:00
J. Nick Koston
1be4e23b68 Merge branch 'dev' into binary_sensor_gpio_polling 2025-06-19 11:07:42 +02:00
J. Nick Koston
e78094cc0a Merge branch 'dev' into esp32_touch_isr 2025-06-19 10:49:17 +02:00
J. Nick Koston
bcf961c0b0 Merge branch 'dev' into integration 2025-06-19 04:05:25 +02:00
J. Nick Koston
f84a4c9753 Merge remote-tracking branch 'origin/disable_ethernet_loop' into integration 2025-06-19 03:42:53 +02:00
J. Nick Koston
df56ca0236 remove redundant enable_loop, it must already be enabled to get here 2025-06-19 03:41:25 +02:00
J. Nick Koston
de0cd0ec67 Merge branch 'dev' into disable_ethernet_loop 2025-06-19 03:39:15 +02:00
J. Nick Koston
67c30245c4 make copilot happy 2025-06-19 02:01:55 +02:00
J. Nick Koston
1f72757591 tidy 2025-06-19 01:35:45 +02:00
J. Nick Koston
35c2fdf6af dry 2025-06-19 01:31:11 +02:00
J. Nick Koston
d1ecd841be avoid auto 2025-06-19 01:28:17 +02:00
J. Nick Koston
828a49697c Merge branch 'gap_events' into integration 2025-06-19 01:18:36 +02:00
J. Nick Koston
0551495501 try another way 2025-06-19 01:18:26 +02:00
J. Nick Koston
2bbffe4a68 try another way 2025-06-19 01:18:11 +02:00
J. Nick Koston
281ad90e39 fixes 2025-06-19 01:16:46 +02:00
J. Nick Koston
ed50976a07 fixes 2025-06-19 01:16:22 +02:00
J. Nick Koston
a3400037d9 fixes 2025-06-19 01:14:15 +02:00
J. Nick Koston
f0d82f75bc fixes 2025-06-19 01:14:05 +02:00
J. Nick Koston
349cb80e90 Merge remote-tracking branch 'origin/integration' into integration 2025-06-19 01:12:20 +02:00
J. Nick Koston
c263ee39af Merge branch 'gap_events' into integration 2025-06-19 01:12:07 +02:00
J. Nick Koston
e99bc52756 Fix missing BLE GAP events causing RSSI sensor and beacon failures 2025-06-19 01:09:13 +02:00
J. Nick Koston
7944b2b8e9 Merge branch 'ota_perf' into integration 2025-06-19 00:40:07 +02:00
J. Nick Koston
ca6ae746c1 be explict 2025-06-19 00:39:19 +02:00
J. Nick Koston
deabac18b2 Merge branch 'disable_ethernet_loop' into integration 2025-06-18 21:39:35 +02:00
J. Nick Koston
5cf8681c61 Merge branch 'ota_perf' into integration 2025-06-18 21:35:14 +02:00
J. Nick Koston
ca7ede8f96 more cleanups 2025-06-18 21:35:04 +02:00
J. Nick Koston
4969682d52 Merge branch 'ota_perf' into integration 2025-06-18 21:27:51 +02:00
J. Nick Koston
8002fe0dd5 remove safety check 2025-06-18 21:27:30 +02:00
J. Nick Koston
7dfdf965b7 remove safety check 2025-06-18 21:26:32 +02:00
J. Nick Koston
b408795dd6 Merge branch 'api_reads' into integration 2025-06-18 19:24:32 +02:00
J. Nick Koston
a5a099336b one more 2025-06-18 19:22:23 +02:00
J. Nick Koston
4ae56fc004 Merge branch 'api_reads' into integration 2025-06-18 18:40:35 +02:00
J. Nick Koston
3f71c09b7b Fix slow noise handshake by reading multiple messages per loop 2025-06-18 18:36:55 +02:00
J. Nick Koston
bd50a7f1ab cleanup 2025-06-18 14:33:58 +02:00
J. Nick Koston
51e4c45e5c Merge branch 'loop_done_enable_isr' into disable_ethernet_loop 2025-06-18 14:27:18 +02:00
J. Nick Koston
e3fae49add Merge branch 'binary_sensor_gpio_polling' into integration 2025-06-18 14:24:42 +02:00
J. Nick Koston
610215ab60 updates 2025-06-18 14:24:31 +02:00
J. Nick Koston
74acbda435 Merge branch 'loop_done_enable_isr' into binary_sensor_gpio_polling 2025-06-18 14:19:03 +02:00
J. Nick Koston
25c4af777c Merge branch 'loop_done_enable_isr' into integration 2025-06-18 14:18:35 +02:00
J. Nick Koston
ec186e6324 rename 2025-06-18 14:17:45 +02:00
J. Nick Koston
150b7a98f3 Merge branch 'dev' into ota_perf 2025-06-18 13:57:20 +02:00
J. Nick Koston
8ae7c1cff0 Merge branch 'ota_perf' into integration 2025-06-18 13:46:36 +02:00
J. Nick Koston
7f1d0eef98 Optimize OTA loop to avoid unnecessary stack allocations 2025-06-18 13:44:07 +02:00
J. Nick Koston
1179ab33f2 tweaks 2025-06-18 12:52:18 +02:00
J. Nick Koston
a09faa1c10 Merge branch 'dev' into disable_ethernet_loop 2025-06-18 12:36:22 +02:00
J. Nick Koston
c0319d9b2f Merge branch 'binary_sensor_gpio_polling' into integration 2025-06-18 12:28:59 +02:00
J. Nick Koston
4870cd2921 use enable_loop_soon_from_isr 2025-06-18 12:28:49 +02:00
J. Nick Koston
d4280ec68b Merge branch 'loop_done_enable_isr' into binary_sensor_gpio_polling 2025-06-18 12:23:55 +02:00
J. Nick Koston
52cdc11927 Merge remote-tracking branch 'origin/proxy_memory' into integration 2025-06-18 12:21:31 +02:00
J. Nick Koston
8345b8c9ce Update esphome/components/esp32_ble_client/ble_client_base.h
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-06-18 12:21:10 +02:00
J. Nick Koston
c56f0677c3 Merge remote-tracking branch 'upstream/proxy_memory' into integration 2025-06-18 12:16:23 +02:00
J. Nick Koston
00e9e1421e Merge branch 'dev' into proxy_memory 2025-06-18 12:16:12 +02:00
J. Nick Koston
93c72c6e6c Merge branch 'loop_done_enable_isr' into integration 2025-06-18 12:15:24 +02:00
J. Nick Koston
9cea930dbd Merge remote-tracking branch 'upstream/dev' into integration 2025-06-18 12:15:18 +02:00
J. Nick Koston
7b9bd70729 Add enable_loop_soon_from_isr 2025-06-18 12:09:12 +02:00
J. Nick Koston
5115c7a100 Merge branch 'bump_ruff_precommit' into integration 2025-06-18 00:15:23 +02:00
J. Nick Koston
5634494e64 Bump ruff in pre-commit to 0.12.0
matches https://github.com/esphome/esphome/pull/9120
2025-06-18 00:11:40 +02:00
J. Nick Koston
aa8bd4abf1 Bump ruff in pre-commit to 0.12.0
matches https://github.com/esphome/esphome/pull/9120
2025-06-18 00:10:30 +02:00
J. Nick Koston
17fd69dd7f Bump ruff in pre-commit to 0.12.0
matches https://github.com/esphome/esphome/pull/9120
2025-06-18 00:09:18 +02:00
J. Nick Koston
1d9dae374b Merge branch 'loop_done' into integration 2025-06-17 23:45:20 +02:00
J. Nick Koston
cb2241ad91 make sure components that disable in setup are disabled at start 2025-06-17 23:45:16 +02:00
J. Nick Koston
d8a7e9abc8 make sure components that disable in setup are disabled at start 2025-06-17 23:44:32 +02:00
J. Nick Koston
969abc3f29 make sure components that disable in setup are disabled at start 2025-06-17 23:40:46 +02:00
J. Nick Koston
766fdc8a1f make sure components that disable in setup are disabled at start 2025-06-17 23:40:31 +02:00
J. Nick Koston
4c37c20d76 cleaner fix 2025-06-17 22:30:35 +02:00
J. Nick Koston
7d314398e1 cleaner fix 2025-06-17 22:30:31 +02:00
J. Nick Koston
b69191e3a8 cleaner fix 2025-06-17 22:29:21 +02:00
J. Nick Koston
b27c6b3596 cleaner fix 2025-06-17 22:27:24 +02:00
J. Nick Koston
5453835963 make ble client disable/enable smarter 2025-06-17 18:13:09 +02:00
J. Nick Koston
4d55ba057c make ble client disable/enable smarter 2025-06-17 18:09:53 +02:00
J. Nick Koston
325c01242c tweak 2025-06-17 16:16:20 +02:00
J. Nick Koston
45b32bca89 tweak 2025-06-17 16:08:28 +02:00
J. Nick Koston
7620049214 tweak 2025-06-17 16:05:48 +02:00
J. Nick Koston
3553495a60 Merge remote-tracking branch 'origin/integration' into integration 2025-06-17 15:55:51 +02:00
J. Nick Koston
3ce6db61d5 Merge branch 'binary_sensor_gpio_polling' into integration 2025-06-17 15:55:28 +02:00
J. Nick Koston
798ff32c40 cleanup 2025-06-17 15:55:10 +02:00
J. Nick Koston
430cee8bda Merge branch 'integration' of https://github.com/esphome/esphome into integration 2025-06-17 15:05:27 +02:00
J. Nick Koston
1fe3fb25a6 Merge branch 'binary_sensor_gpio_polling' into integration 2025-06-17 14:38:08 +02:00
J. Nick Koston
685ed87581 preen 2025-06-17 14:38:00 +02:00
J. Nick Koston
ea3ea1eee7 tweak 2025-06-17 14:17:35 +02:00
J. Nick Koston
c9edcb909b Merge branch 'binary_sensor_gpio_polling' into integration 2025-06-17 13:42:02 +02:00
J. Nick Koston
35bfc9f069 tweak 2025-06-17 13:41:57 +02:00
J. Nick Koston
c4aec194b9 Merge branch 'binary_sensor_gpio_polling' into integration 2025-06-17 13:31:44 +02:00
J. Nick Koston
e8547b16f6 Avoid polling for GPIO binary sensors when possible 2025-06-17 13:20:41 +02:00
J. Nick Koston
2bbe08cee0 Avoid polling for GPIO binary sensors when possible 2025-06-17 13:18:45 +02:00
J. Nick Koston
0a0c369b88 Avoid polling for GPIO binary sensors when possible 2025-06-17 13:17:35 +02:00
J. Nick Koston
5d2f454a94 Avoid polling for GPIO binary sensors when possible 2025-06-17 13:13:58 +02:00
J. Nick Koston
04bcc5c879 Avoid polling for GPIO binary sensors when possible 2025-06-17 13:02:00 +02:00
J. Nick Koston
d4db16665f Avoid polling for GPIO binary sensors when possible 2025-06-17 12:41:17 +02:00
J. Nick Koston
20b7a494f6 Merge remote-tracking branch 'origin/proxy_memory' into integration 2025-06-17 12:05:43 +02:00
J. Nick Koston
fbdce3ad89 Optimize bluetooth_proxy memory usage on ESP32 2025-06-17 12:04:49 +02:00
J. Nick Koston
4fc8807f02 Merge branch 'light_memory' into integration 2025-06-17 11:49:58 +02:00
J. Nick Koston
83075bfb5c Optimize LightState memory layout 2025-06-17 11:49:15 +02:00
J. Nick Koston
4074ec0425 Merge branch 'switch_memory' into integration 2025-06-17 11:27:45 +02:00
J. Nick Koston
8e1694dd0f Reduce Switch component memory usage by 8 bytes per instance 2025-06-17 11:27:11 +02:00
J. Nick Koston
911df18855 Merge branch 'api_memory' into integration 2025-06-17 11:10:17 +02:00
J. Nick Koston
6b049e93f8 Optimize API component memory usage by reordering class members to reduce padding 2025-06-17 11:09:22 +02:00
J. Nick Koston
a335dcc379 Merge remote-tracking branch 'upstream/dev' into integration 2025-06-17 10:40:41 +02:00
J. Nick Koston
c6478c8a79 Merge branch 'reduce_duplicate_gen_code_api' into integration 2025-06-17 10:40:23 +02:00
J. Nick Koston
cc9d40cb60 tweaks 2025-06-17 10:40:12 +02:00
J. Nick Koston
0a6b7f9a1b Update script/api_protobuf/api_protobuf.py 2025-06-17 10:39:49 +02:00
J. Nick Koston
daa1fb9a7a Merge remote-tracking branch 'swoboda1337/bump_libretiny' into integration 2025-06-17 04:33:57 +02:00
Jonathan Swoboda
b7d543290b Bump LibreTiny 2025-06-16 21:40:06 -04:00
J. Nick Koston
ea852b60ac Merge branch 'esp32_ble_tracker_reduce_memory' into integration 2025-06-16 22:07:13 +02:00
J. Nick Koston
ed341988ea Use smaller atomic types for ESP32 BLE Tracker ring buffer indices 2025-06-16 22:06:04 +02:00
J. Nick Koston
057b6c8e30 Merge branch 'api_reduce_millis' into integration 2025-06-16 19:34:07 +02:00
J. Nick Koston
44444fe071 Optimize API server performance by using cached loop time 2025-06-16 19:33:29 +02:00
J. Nick Koston
797330d6ab Disable Ethernet loop polling when connected and stable 2025-06-16 17:28:04 +02:00
J. Nick Koston
a630d5b5f5 Merge branch 'ble_pool' into integration 2025-06-16 15:45:50 +02:00
J. Nick Koston
eb3dc82b5d naming 2025-06-16 15:45:38 +02:00
J. Nick Koston
34ed18d562 Merge branch 'ble_pool' into integration 2025-06-16 15:43:59 +02:00
J. Nick Koston
1ce02ee313 naming 2025-06-16 15:43:43 +02:00
J. Nick Koston
2a26a0188c ble pool 2025-06-16 15:29:37 +02:00
J. Nick Koston
50cb05d1b1 ble pool 2025-06-16 15:28:03 +02:00
J. Nick Koston
6e739ac453 ble pool 2025-06-16 15:23:04 +02:00
J. Nick Koston
7aa2fd9f0e ble pool 2025-06-16 15:19:10 +02:00
J. Nick Koston
8e254e1b03 ble pool 2025-06-16 15:18:19 +02:00
J. Nick Koston
1ad9d717ff ble pool 2025-06-16 15:17:57 +02:00
J. Nick Koston
104658e43a ble pool 2025-06-16 15:16:15 +02:00
J. Nick Koston
e7e4b995bf ble pool 2025-06-16 15:15:26 +02:00
J. Nick Koston
b35b54f2c2 ble pool 2025-06-16 15:11:42 +02:00
J. Nick Koston
f80aeb1d1d cleanup 2025-06-16 15:10:27 +02:00
J. Nick Koston
6a756ab3b6 cleanup 2025-06-16 15:09:49 +02:00
J. Nick Koston
58a697bed1 cleanup 2025-06-16 15:07:23 +02:00
J. Nick Koston
280960ac18 cleanup 2025-06-16 15:06:02 +02:00
J. Nick Koston
0640ff13aa ble pool 2025-06-16 15:04:40 +02:00
J. Nick Koston
545505691f ble pool 2025-06-16 15:02:10 +02:00
J. Nick Koston
11fcf81321 ble pool 2025-06-16 15:00:58 +02:00
J. Nick Koston
c565b37dc8 ble pool 2025-06-16 15:00:07 +02:00
J. Nick Koston
3d18495270 ble pool 2025-06-16 14:55:15 +02:00
J. Nick Koston
419e4e63e9 ble pool 2025-06-16 14:53:50 +02:00
J. Nick Koston
724aa2bf65 ble pool 2025-06-16 14:52:38 +02:00
J. Nick Koston
573fa8aeb3 ble pool 2025-06-16 14:52:28 +02:00
J. Nick Koston
8a672e34c5 ble pool 2025-06-16 14:47:05 +02:00
J. Nick Koston
bc49211dab ble pool 2025-06-16 14:43:29 +02:00
J. Nick Koston
4ef9c3667e Merge branch 'reduce_duplicate_gen_code_api' into integration 2025-06-16 06:06:19 -05:00
J. Nick Koston
6babe516ac move to proto.h to have less generated code 2025-06-16 06:05:19 -05:00
J. Nick Koston
e0b258ef7e Merge branch 'empty_methods' into integration 2025-06-15 22:30:02 -05:00
J. Nick Koston
ff0c3a89b1 Remove empty generated protobuf methods 2025-06-15 22:25:21 -05:00
J. Nick Koston
2511b81048 Merge branch 'reduce_duplicate_gen_code_api' into integration 2025-06-15 22:09:15 -05:00
J. Nick Koston
6ffcd94edc early return was worse for simple functions 2025-06-15 22:00:40 -05:00
J. Nick Koston
2fcf73c812 Reduce code duplication in auto-generated API protocol code 2025-06-15 21:53:33 -05:00
J. Nick Koston
dee0608af9 adjust 2025-06-15 20:47:53 -05:00
J. Nick Koston
d11860a383 Merge remote-tracking branch 'origin/loop_done' into integration 2025-06-15 20:44:24 -05:00
J. Nick Koston
1c05115bf5 Merge branch 'dev' into loop_done 2025-06-15 20:44:09 -05:00
J. Nick Koston
d7e7382d0b tests, address review comments 2025-06-15 20:43:30 -05:00
J. Nick Koston
872388f6e3 tests, address review comments 2025-06-15 20:43:01 -05:00
J. Nick Koston
1215ef920b Merge branch 'loop_done' into integration 2025-06-15 20:36:08 -05:00
J. Nick Koston
d19d5a23ea speed up test a bit 2025-06-15 20:36:00 -05:00
J. Nick Koston
f49a779f1d speed up test a bit 2025-06-15 20:35:52 -05:00
J. Nick Koston
d8bf5b80e1 Merge branch 'loop_done' into integration 2025-06-15 20:34:22 -05:00
J. Nick Koston
69483b9353 speed up test a bit 2025-06-15 20:34:13 -05:00
J. Nick Koston
14e8548989 speed up test a bit 2025-06-15 20:33:52 -05:00
J. Nick Koston
4abd93b661 tests, address review comments 2025-06-15 20:32:36 -05:00
J. Nick Koston
5d925af76f tests, address review comments 2025-06-15 20:31:25 -05:00
J. Nick Koston
b999c6064a tests, address review comments 2025-06-15 20:30:54 -05:00
J. Nick Koston
94e3576978 tests, address review comments 2025-06-15 20:30:43 -05:00
J. Nick Koston
7a22406a2d Merge remote-tracking branch 'origin/integration' into integration 2025-06-15 20:29:36 -05:00
J. Nick Koston
e60684494f Merge branch 'loop_done' into integration 2025-06-15 20:29:25 -05:00
J. Nick Koston
9db28ed779 cover 2025-06-15 20:29:12 -05:00
J. Nick Koston
6fd8c5cee7 tests, address review comments 2025-06-15 20:22:49 -05:00
J. Nick Koston
787ec43266 tests, address review comments 2025-06-15 20:22:29 -05:00
J. Nick Koston
a4efc63bf2 test 2025-06-15 19:57:20 -05:00
J. Nick Koston
80a8f1437e tests 2025-06-15 19:38:13 -05:00
J. Nick Koston
fcca94169d Merge remote-tracking branch 'origin/integration' into integration 2025-06-15 19:12:32 -05:00
J. Nick Koston
d1924088e3 Merge remote-tracking branch 'origin/loop_done' into integration 2025-06-15 19:11:57 -05:00
J. Nick Koston
fd31afe09c tidy 2025-06-15 18:58:42 -05:00
J. Nick Koston
7a763712c5 tidy 2025-06-15 18:58:32 -05:00
J. Nick Koston
7216be5da7 Merge branch 'loop_done' into integration 2025-06-15 18:44:36 -05:00
J. Nick Koston
711b0a291b comments 2025-06-15 18:44:28 -05:00
J. Nick Koston
dfc96496c8 comments 2025-06-15 18:44:15 -05:00
J. Nick Koston
2a1c5ef333 Merge branch 'loop_done' into integration 2025-06-15 18:42:49 -05:00
J. Nick Koston
9755209499 comments 2025-06-15 18:42:40 -05:00
J. Nick Koston
0b26e537d4 Merge branch 'loop_done' into integration 2025-06-15 18:40:46 -05:00
J. Nick Koston
98c6233ec3 Merge branch 'dev' into loop_done 2025-06-15 18:40:33 -05:00
J. Nick Koston
f711706b1a Fix ESP32 Improv component to re-enable loop when service starts again 2025-06-15 18:40:08 -05:00
J. Nick Koston
cee7789ab6 tweak 2025-06-15 18:37:05 -05:00
J. Nick Koston
8a06c4380d partition 2025-06-15 18:32:36 -05:00
J. Nick Koston
72ecf7a288 Merge remote-tracking branch 'upstream/dev' into integration 2025-06-15 16:48:20 -05:00
J. Nick Koston
ef98c7502d Merge remote-tracking branch 'origin/dev' into integration 2025-06-15 13:42:11 -05:00
J. Nick Koston
03d0e74b65 Merge remote-tracking branch 'upstream/less_templates' into integration 2025-06-15 10:48:53 -05:00
J. Nick Koston
5b8fdc0364 Merge branch 'dev' into less_templates 2025-06-15 10:42:41 -05:00
J. Nick Koston
593b4bd137 Update script/api_protobuf/api_protobuf.py 2025-06-15 10:42:28 -05:00
J. Nick Koston
267e12d058 lint 2025-06-15 10:09:54 -05:00
J. Nick Koston
4a5e39b651 Add common base classes for entity protobuf messages to reduce duplicate code 2025-06-15 09:40:45 -05:00
J. Nick Koston
ea24fa5b78 Merge branch 'loop_done' into integration 2025-06-15 01:52:27 -05:00
J. Nick Koston
bb2bb128f7 remove trailing . 2025-06-15 01:52:17 -05:00
J. Nick Koston
94e8a856d7 Merge branch 'loop_done' into integration 2025-06-15 01:47:22 -05:00
J. Nick Koston
4c19fbf98e lint 2025-06-15 01:47:10 -05:00
J. Nick Koston
60f8938bfa Merge branch 'loop_done' into integration 2025-06-15 01:34:12 -05:00
J. Nick Koston
55679662b5 ordering 2025-06-15 01:34:03 -05:00
J. Nick Koston
53df959e49 Merge branch 'loop_done' into integration 2025-06-15 01:26:56 -05:00
J. Nick Koston
8e6ef9966f Merge remote-tracking branch 'upstream/loop_done' into loop_done 2025-06-15 01:26:45 -05:00
J. Nick Koston
1d52fceafa rename, cleanup 2025-06-15 01:26:25 -05:00
J. Nick Koston
99186ed864 rename, cleanup 2025-06-15 01:25:59 -05:00
J. Nick Koston
383931d484 Merge branch 'ble_events_ring_buffer' into integration 2025-06-15 00:31:34 -05:00
J. Nick Koston
0b49a54cb3 comments 2025-06-15 00:31:25 -05:00
J. Nick Koston
705c0f1891 Merge branch 'ble_events_ring_buffer' into integration 2025-06-15 00:27:13 -05:00
J. Nick Koston
544c3ffc95 comments 2025-06-15 00:26:06 -05:00
J. Nick Koston
33f252a45d Implement a lock free ring buffer for BLEEvents to avoid drops 2025-06-15 00:22:24 -05:00
J. Nick Koston
f55d82a015 Merge branch 'ble_queue_lock_free' into integration 2025-06-15 00:16:02 -05:00
J. Nick Koston
8cf33fdef0 preen 2025-06-15 00:15:48 -05:00
J. Nick Koston
f858d98811 Merge branch 'ble_queue_lock_free' into integration 2025-06-15 00:12:47 -05:00
J. Nick Koston
2a6165d440 simplify 2025-06-15 00:12:34 -05:00
J. Nick Koston
4586528c40 merge 2025-06-15 00:01:15 -05:00
J. Nick Koston
23a07baa19 Merge branch 'ble_queue_lock_free' into integration 2025-06-14 23:58:53 -05:00
J. Nick Koston
f9040ca932 cleanup 2025-06-14 23:54:42 -05:00
J. Nick Koston
4cea7f0237 Update esphome/components/esp32_ble/ble.cpp 2025-06-14 23:49:38 -05:00
J. Nick Koston
b1847d5e98 Make ble events queue lock free 2025-06-14 23:48:26 -05:00
J. Nick Koston
9ce4d2e952 Merge remote-tracking branch 'upstream/dev' into integration 2025-06-14 23:21:51 -05:00
J. Nick Koston
247078e06d Merge remote-tracking branch 'origin/loop_done' into integration 2025-06-14 23:20:20 -05:00
J. Nick Koston
a0cd72de28 revert 2025-06-14 23:19:43 -05:00
J. Nick Koston
e467f569f0 Merge branch 'loop_done' into integration 2025-06-14 23:15:49 -05:00
J. Nick Koston
e31c7b7dfc one more 2025-06-14 23:15:06 -05:00
J. Nick Koston
dc2e0c832b Merge branch 'loop_done' into integration 2025-06-14 22:37:11 -05:00
J. Nick Koston
7ddf51bb51 fix 2025-06-14 22:36:29 -05:00
J. Nick Koston
8fb3856665 small fix 2025-06-14 22:17:27 -05:00
J. Nick Koston
183dd74f3e one more 2025-06-14 22:17:27 -05:00
J. Nick Koston
4f29039b41 mark_loop_done 2025-06-14 22:17:24 -05:00
J. Nick Koston
102fcbec20 small fix 2025-06-14 22:09:19 -05:00
J. Nick Koston
d00e5212c7 one more 2025-06-14 22:04:33 -05:00
J. Nick Koston
0e6bfb62cd mark_loop_done 2025-06-14 21:58:18 -05:00
J. Nick Koston
f576e8f635 remove cap 2025-06-14 21:40:16 -05:00
J. Nick Koston
e6dc10a440 address review comments 2025-06-14 21:34:21 -05:00
J. Nick Koston
aa930fb6b6 Merge branch 'ble_queue_lock_free' into integration 2025-06-14 20:09:56 -05:00
J. Nick Koston
f327ed87e9 Make ble events queue lock free 2025-06-14 20:08:43 -05:00
J. Nick Koston
2de9be0589 Merge branch 'loop_runtime_stats' into integration 2025-06-14 19:43:45 -05:00
J. Nick Koston
345cde8645 Merge branch 'ble_events_ring_buffer' into integration 2025-06-14 19:25:57 -05:00
J. Nick Koston
cf152af9ae Implement a lock free ring buffer for BLEEvents to avoid drops 2025-06-14 19:24:57 -05:00
J. Nick Koston
d6333dcfd9 Revert "Reorder Application to reduce padding"
This reverts commit 82c39580df.
2025-06-14 18:18:45 -05:00
J. Nick Koston
0121f799f0 Merge branch 'reorder_app_reduce_padding' into integration 2025-06-14 18:16:39 -05:00
J. Nick Koston
82c39580df Reorder Application to reduce padding 2025-06-14 18:15:40 -05:00
J. Nick Koston
53a578a46f Merge branch 'area_str' into integration 2025-06-14 18:01:44 -05:00
J. Nick Koston
62612ef80b Optimize Application area_ from std::string to const char* 2025-06-14 18:00:32 -05:00
J. Nick Koston
61ac874c4c Merge branch 'parse_on_off_uint8t' into integration 2025-06-14 17:46:25 -05:00
J. Nick Koston
976b200ff6 Make ParseOnOffState enum uint8_t 2025-06-14 17:44:22 -05:00
J. Nick Koston
852343b6d8 Merge remote-tracking branch 'upstream/has_state_' into integration 2025-06-14 17:32:40 -05:00
J. Nick Koston
c56af9d52b Merge branch 'component_state_oversized' into integration 2025-06-14 17:03:31 -05:00
J. Nick Koston
05f18e2828 Optimize Component and Application state storage from uint32_t to uint8_t 2025-06-14 17:01:57 -05:00
J. Nick Koston
72804caab2 Merge branch 'warn_if_blocking_over_' into integration 2025-06-14 16:43:26 -05:00
J. Nick Koston
80cbe5c7c9 Reduce Component blocking threshold memory usage by 2 bytes per component 2025-06-14 16:42:08 -05:00
J. Nick Koston
21892d1236 Merge branch 'error_message_memory' into integration 2025-06-14 16:29:43 -05:00
J. Nick Koston
13824624f8 Reduce Component memory usage by 20 bytes per component 2025-06-14 16:27:45 -05:00
J. Nick Koston
0fd72ecbab Merge remote-tracking branch 'upstream/batch_exceeds_max_packet_size' into integration 2025-06-14 15:46:22 -05:00
J. Nick Koston
f848cb1546 Merge remote-tracking branch 'upstream/footer_not_reserved' into integration 2025-06-14 15:46:13 -05:00
J. Nick Koston
633854081a Merge remote-tracking branch 'upstream/guard_wrong_total_size' into integration 2025-06-14 15:45:35 -05:00
J. Nick Koston
4fed9a581b Merge remote-tracking branch 'upstream/missing_force' into integration 2025-06-14 15:45:28 -05:00
J. Nick Koston
e9c1202aaa Merge remote-tracking branch 'upstream/ble_events' into integration 2025-06-14 15:45:18 -05:00
J. Nick Koston
0a7ae279d0 preen 2025-06-14 11:40:50 -05:00
J. Nick Koston
0de2696543 Optimize memory usage by lazy-allocating raw callbacks in sensors 2025-06-14 11:37:11 -05:00
J. Nick Koston
a7dc239b71 cleanup 2025-06-14 10:49:23 -05:00
J. Nick Koston
fe0e6990f5 cover 2025-06-14 10:14:41 -05:00
J. Nick Koston
5ba65e92d9 cover 2025-06-14 10:12:12 -05:00
J. Nick Koston
a1452b52c9 Reduce entity memory usage by eliminating field shadowing and bit-packing 2025-06-14 10:00:49 -05:00
J. Nick Koston
dd2aa23a5f cover 2025-06-13 19:28:59 -05:00
J. Nick Koston
0e0359ba7d Fix protobuf encoding size mismatch by passing force parameter in encode_string 2025-06-13 19:20:08 -05:00
J. Nick Koston
93b1b7aded assert 2025-06-13 18:32:21 -05:00
J. Nick Koston
9472dc6a53 Fix API message encoding to return actual size instead of calculated size 2025-06-13 18:24:51 -05:00
J. Nick Koston
67b681854e Fix API message encoding to return actual size instead of calculated size 2025-06-13 18:20:01 -05:00
J. Nick Koston
7b5990833e Merge branch 'dev' into batch_exceeds_max_packet_size 2025-06-13 17:01:10 -05:00
J. Nick Koston
b6d5d04589 More coverage 2025-06-13 16:59:36 -05:00
J. Nick Koston
fdfbb3e944 Fix footer space not being reserved for batched messages
This only affects noise protocol, and its not a correctness issue, its only
fixing an inefficent reserve
2025-06-13 15:54:31 -05:00
J. Nick Koston
faa7a3e37f tweak 2025-06-13 15:14:14 -05:00
J. Nick Koston
23748b82bb Ensure api can send batches where the first message exceeds MAX_PACKET_SIZE 2025-06-13 14:58:09 -05:00
J. Nick Koston
bccb6f578a Ensure we can send batches where the first message exceeds MAX_PACKET_SIZE 2025-06-13 14:55:17 -05:00
J. Nick Koston
de8a5d6e9e Merge branch 'dev' into ble_events 2025-06-13 10:46:45 -05:00
J. Nick Koston
a8eb3f7961 lint 2025-06-13 10:46:09 -05:00
J. Nick Koston
2dc85f5a42 Merge remote-tracking branch 'upstream/esp32_touch_isr' into esp32_touch_isr 2025-06-13 10:11:49 -05:00
J. Nick Koston
82518b351d lint 2025-06-13 10:11:38 -05:00
J. Nick Koston
68f34a1683 Merge branch 'dev' into esp32_touch_isr 2025-06-12 20:19:29 -05:00
J. Nick Koston
bc6b72a422 tweaks 2025-06-12 20:16:12 -05:00
J. Nick Koston
599e28e1cb fixes 2025-06-12 20:02:39 -05:00
J. Nick Koston
ee6b2ba6c6 fixes 2025-06-12 19:56:12 -05:00
J. Nick Koston
0877b3e2af suppress unused events 2025-06-12 19:18:22 -05:00
J. Nick Koston
d1edb1e32a fix 2025-06-12 18:34:00 -05:00
J. Nick Koston
d1e6b8dd10 comment 2025-06-12 18:33:27 -05:00
J. Nick Koston
b32fc3bfdd lint 2025-06-12 18:30:53 -05:00
J. Nick Koston
1e24417db0 help with setup 2025-06-12 18:09:39 -05:00
J. Nick Koston
fb9387ecc5 help with setup 2025-06-12 17:55:21 -05:00
J. Nick Koston
6c5f4cdb70 help with setup 2025-06-12 17:49:01 -05:00
J. Nick Koston
aabacb7454 help with setup 2025-06-12 17:47:25 -05:00
J. Nick Koston
b5da84479e help with setup 2025-06-12 17:43:08 -05:00
J. Nick Koston
88d9361050 help with setup 2025-06-12 17:34:24 -05:00
J. Nick Koston
1d90388ffc help with setup 2025-06-12 17:27:09 -05:00
J. Nick Koston
b3c43ce31f help with setup 2025-06-12 17:23:10 -05:00
J. Nick Koston
6d9d22d422 help with setup 2025-06-12 17:17:16 -05:00
J. Nick Koston
86be1f56d0 preen 2025-06-12 17:14:00 -05:00
J. Nick Koston
a0c81ffd7a preen 2025-06-12 17:08:47 -05:00
J. Nick Koston
ec1dc42e58 Revert "preen"
This reverts commit 866eaed73d.
2025-06-12 17:05:06 -05:00
J. Nick Koston
866eaed73d preen 2025-06-12 16:58:24 -05:00
J. Nick Koston
a18374e1ad cleanup 2025-06-12 16:33:15 -05:00
J. Nick Koston
f7afcb3b24 cleanup 2025-06-12 16:30:41 -05:00
J. Nick Koston
3adcae783c cleanup 2025-06-12 16:19:27 -05:00
J. Nick Koston
73b40dd2e7 cleanup 2025-06-12 16:19:15 -05:00
J. Nick Koston
1e12614f9a cleanup 2025-06-12 16:14:37 -05:00
J. Nick Koston
aeaa7c699a Merge branch 'dev' into esp32_touch_isr 2025-06-12 15:57:26 -05:00
J. Nick Koston
f1c56b7254 cleanup 2025-06-12 15:56:32 -05:00
J. Nick Koston
e72e0d0646 cleanup 2025-06-12 15:56:19 -05:00
J. Nick Koston
5719d334aa cleanup 2025-06-12 15:56:04 -05:00
J. Nick Koston
bcb6b85333 cleanup 2025-06-12 15:54:15 -05:00
J. Nick Koston
5d765413ef cleanup 2025-06-12 15:53:42 -05:00
J. Nick Koston
efb2e5e7a8 cleanup 2025-06-12 15:52:38 -05:00
J. Nick Koston
5d5e346199 cleanup 2025-06-12 15:50:21 -05:00
J. Nick Koston
08a74890da cleanup 2025-06-12 15:48:29 -05:00
J. Nick Koston
0545b9c7f2 cleanup 2025-06-12 15:48:00 -05:00
J. Nick Koston
bbf7d32676 cleanup 2025-06-12 15:47:31 -05:00
J. Nick Koston
e83f4ae974 cleanup 2025-06-12 15:46:56 -05:00
J. Nick Koston
9b0d01e03f cleanup 2025-06-12 15:45:47 -05:00
J. Nick Koston
eae0d90a1e adjust 2025-06-12 15:41:41 -05:00
J. Nick Koston
90c09a7650 split 2025-06-12 13:29:12 -05:00
J. Nick Koston
aecf080211 touch ups 2025-06-12 13:16:48 -05:00
J. Nick Koston
8517420356 touch ups 2025-06-12 13:14:29 -05:00
J. Nick Koston
376be1f009 touch ups 2025-06-12 13:12:40 -05:00
J. Nick Koston
0021e76649 working 2025-06-12 13:07:25 -05:00
J. Nick Koston
d440c4bc43 derbug 2025-06-12 13:00:55 -05:00
J. Nick Koston
50840b2105 derbug 2025-06-12 13:00:39 -05:00
J. Nick Koston
7502c6b6c0 debug 2025-06-12 12:44:28 -05:00
J. Nick Koston
919c32f0cc tweak 2025-06-12 12:20:47 -05:00
J. Nick Koston
a28c951272 more debug 2025-06-12 12:13:46 -05:00
J. Nick Koston
13d7c5a9a9 more debug 2025-06-12 12:12:55 -05:00
J. Nick Koston
5f1383344d tweak 2025-06-12 12:10:50 -05:00
J. Nick Koston
48f43d3eb1 tweak 2025-06-12 11:58:21 -05:00
J. Nick Koston
4ac2141307 adjust 2025-06-12 11:52:29 -05:00
J. Nick Koston
719d8cac97 split it 2025-06-12 11:45:50 -05:00
J. Nick Koston
99cbe53a8e split it 2025-06-12 11:43:47 -05:00
J. Nick Koston
a36af1bfac s3 fixes 2025-06-12 10:59:40 -05:00
J. Nick Koston
8b6aa319bf s3 fixes 2025-06-12 10:57:46 -05:00
J. Nick Koston
a16d321e1a downgrade logging 2025-06-12 10:38:47 -05:00
J. Nick Koston
74e70278e2 fixes 2025-06-12 10:34:59 -05:00
J. Nick Koston
1332e24a2c fixes 2025-06-12 10:31:13 -05:00
J. Nick Koston
5ab78ec461 fixes 2025-06-12 10:30:58 -05:00
J. Nick Koston
ce701d3c31 fixes 2025-06-12 10:29:11 -05:00
J. Nick Koston
5fca1be44d fixes 2025-06-12 10:27:22 -05:00
J. Nick Koston
0bd4c333bd cleanup 2025-06-12 10:21:41 -05:00
J. Nick Koston
c6ed880732 fixes 2025-06-12 10:19:25 -05:00
J. Nick Koston
da0f3c6cce fixes 2025-06-12 10:12:56 -05:00
J. Nick Koston
e5d12d346a fixes 2025-06-12 10:08:29 -05:00
J. Nick Koston
478e2e726b fixes 2025-06-12 10:01:35 -05:00
J. Nick Koston
dbdac3707b fixes 2025-06-12 10:00:49 -05:00
J. Nick Koston
bd89a88e34 fixes 2025-06-12 09:23:38 -05:00
J. Nick Koston
d322d83745 fixes 2025-06-12 09:21:03 -05:00
J. Nick Koston
463a581ab9 DEBUG! 2025-06-12 00:56:42 -05:00
J. Nick Koston
eae4bd222a track pads 2025-06-11 23:29:00 -05:00
J. Nick Koston
a7bb7fc14d fix 2025-06-11 22:55:15 -05:00
J. Nick Koston
c047aa47eb use ll for all 2025-06-11 22:46:40 -05:00
J. Nick Koston
61bca56316 try touch_ll_read_raw_data 2025-06-11 22:43:41 -05:00
J. Nick Koston
9a37323eb8 Use interrupt based approach for esp32_touch 2025-06-11 22:32:25 -05:00
J. Nick Koston
99a54369bf Merge remote-tracking branch 'upstream/dev' into loop_runtime_stats 2025-06-11 22:01:22 -05:00
J. Nick Koston
f7533dfc5c review 2025-06-11 16:25:31 -05:00
J. Nick Koston
ee7d95272d lets be sure 2025-06-11 13:32:55 -05:00
J. Nick Koston
2b9b1d12e6 lets be sure 2025-06-11 13:32:47 -05:00
J. Nick Koston
2cbb5c7d8e fix error 2025-06-11 13:16:44 -05:00
J. Nick Koston
9686c7babe Merge branch 'dev' into ble_events 2025-06-11 13:09:32 -05:00
J. Nick Koston
66bd4c96c4 safety 2025-06-11 13:05:30 -05:00
J. Nick Koston
dc47faa4b6 safety 2025-06-11 13:05:01 -05:00
J. Nick Koston
55ee0b116d lint 2025-06-11 13:03:50 -05:00
J. Nick Koston
c6957c08bc lint 2025-06-11 13:02:08 -05:00
J. Nick Koston
8fe6a323d8 remove workaround 2025-06-11 13:00:55 -05:00
J. Nick Koston
8e51590c32 remove workaround 2025-06-11 12:59:57 -05:00
J. Nick Koston
ae066d5627 cleanup 2025-06-11 11:55:28 -05:00
J. Nick Koston
6760279916 cleanup compacted code 2025-06-11 11:51:43 -05:00
J. Nick Koston
3c208050b0 comments 2025-06-11 11:47:34 -05:00
J. Nick Koston
bbc7c9fb37 dry 2025-06-11 11:46:17 -05:00
J. Nick Koston
e1c3862586 preen 2025-06-11 11:36:50 -05:00
J. Nick Koston
c24b7cb7bd v->d 2025-06-11 11:34:30 -05:00
J. Nick Koston
c91e16549d lint 2025-06-11 11:27:13 -05:00
J. Nick Koston
6e70aca458 wip 2025-06-11 11:23:13 -05:00
J. Nick Koston
d9ffd0ac8e wip 2025-06-11 11:22:01 -05:00
J. Nick Koston
4641f73d19 comments 2025-06-11 11:19:36 -05:00
J. Nick Koston
9f0051c21f cleanup 2025-06-11 11:17:10 -05:00
J. Nick Koston
0331cb09e8 reduce 2025-06-11 11:17:01 -05:00
J. Nick Koston
2f8946f86c cleanup 2025-06-11 11:14:10 -05:00
J. Nick Koston
88a3df4008 cleanup 2025-06-11 11:13:34 -05:00
J. Nick Koston
0adf514bd6 preen 2025-06-11 11:09:19 -05:00
J. Nick Koston
a1b5a2abcb tweak 2025-06-11 10:58:56 -05:00
J. Nick Koston
068c62c6fe adjust 2025-06-11 10:43:48 -05:00
J. Nick Koston
0e9f14f969 wip 2025-06-11 10:20:18 -05:00
J. Nick Koston
78315fd388 preen 2025-06-11 10:08:30 -05:00
J. Nick Koston
0ab69002df preen 2025-06-11 10:05:15 -05:00
J. Nick Koston
1eec1239ec wip 2025-06-11 09:56:02 -05:00
J. Nick Koston
60cc4c4ed0 Merge branch 'dev' into drop_unique_id 2025-06-11 08:26:41 -05:00
J. Nick Koston
34c100e997 Remove legacy unique_id field from entities
These are no longer used in Home Assistant. This will be a breaking
change for MQTT for the sensors that defined custom unique ids.
2025-06-07 22:17:07 -05:00
Daniel Vikstrom
57f4067fbf Move fnv1a_32bit_hash to helpers 2025-06-02 14:42:39 +02:00
Daniel Vikstrom
f4a9221232 Change hash method 2025-06-02 08:31:06 +02:00
J. Nick Koston
3d4a75148d Merge branch 'dev' into multi_device 2025-05-31 10:27:31 -05:00
J. Nick Koston
c2c5bd844d Merge branch 'dev' into multi_device 2025-05-29 13:43:21 -05:00
J. Nick Koston
98a2f23024 Merge remote-tracking branch 'upstream/dev' into loop_runtime_stats 2025-05-29 11:04:14 -05:00
J. Nick Koston
c955897d1b Merge remote-tracking branch 'upstream/dev' into loop_runtime_stats 2025-05-27 11:39:45 -05:00
Daniel Vikstrom
9624efa21e Fix proto generation and clang 2025-05-22 14:18:46 +02:00
DanielV
831638210d Merge branch 'dev' into multi_device 2025-05-22 08:41:54 +02:00
J. Nick Koston
cfdb0925ce Merge branch 'dev' into loop_runtime_stats 2025-05-13 23:42:19 -05:00
J. Nick Koston
83db3eddd9 revert ota 2025-05-13 01:07:43 -05:00
J. Nick Koston
cc2c5a544e revert ota 2025-05-13 01:07:38 -05:00
J. Nick Koston
8fba8c2800 revert ota 2025-05-13 01:05:37 -05:00
J. Nick Koston
51d1da8460 revert ota 2025-05-13 01:04:09 -05:00
J. Nick Koston
2f1257056d revert 2025-05-13 01:02:00 -05:00
J. Nick Koston
2f8f6967bf fix ota 2025-05-13 00:55:19 -05:00
J. Nick Koston
246527e618 runtime stats 2025-05-13 00:54:05 -05:00
J. Nick Koston
3857cc9c83 runtime stats 2025-05-13 00:51:14 -05:00
Daniel Vikström
a59a8c563e Attempt fixing circular import by lazy import 2025-05-06 12:30:04 +02:00
Daniel Vikström
856829bcbb More namespace and import fixes 2025-05-06 12:05:45 +02:00
Daniel Vikström
dd2b931f61 Fix namespace error 2025-05-06 11:46:23 +02:00
Daniel Vikström
39beccbbb0 remove from CODEOWNERS 2025-05-06 10:50:09 +02:00
Daniel Vikström
ff626b428f Attempt moving it to esphome config section 2025-05-06 10:48:26 +02:00
Daniel Vikström
3915e1f012 Revert "Improve stability for unrelated test"
This reverts commit 3922950951.
2025-05-06 03:36:03 +02:00
Daniel Vikström
7b460b6224 Restore ci-api-proto.yml 2025-05-06 03:34:33 +02:00
Daniel Vikström
8fb8e79730 Fix clang 2025-05-06 03:20:22 +02:00
Daniel Vikström
79bbc475f4 Fix generated files and revert entity config to device_id 2025-05-06 03:05:00 +02:00
Daniel Vikström
cef023283b Fix generated files 2025-05-06 02:55:44 +02:00
Daniel Vikström
d4fda79ada Attempt to replace device_id:str with device_uid:uint32 2025-05-06 02:07:59 +02:00
DanielV
ff0bdcf4cd Merge branch 'dev' into multi_device 2025-05-06 00:48:23 +02:00
DanielV
bfbc313144 Merge branch 'dev' into multi_device 2025-04-22 14:28:51 +02:00
Daniel Vikström
31f2376f15 Rename ref in codegen 2025-04-22 14:03:07 +02:00
DanielV
f76ecb6604 Merge pull request #10 from dala318/multi_device_2
Sub Devices (all entities)
2025-04-22 08:49:28 +02:00
Daniel Vikström
298cc58433 Activate the rest of entities 2025-04-19 23:18:26 +02:00
Daniel Vikström
825c0593e1 Fix generated code after merge 2025-04-19 19:07:50 +02:00
DanielV
87ed1dc3e3 Merge branch 'dev' into multi_device 2025-04-19 18:58:09 +02:00
DanielV
67e9db021c Merge branch 'dev' into multi_device 2025-04-14 22:21:50 +02:00
Daniel Vikström
3922950951 Improve stability for unrelated test 2025-04-14 21:37:27 +02:00
DanielV
9c4aa0ba53 Merge branch 'dev' into multi_device 2025-04-11 13:19:52 +02:00
Daniel Vikström
f5f1651b31 Fix clang 2025-04-10 09:35:08 +02:00
Daniel Vikström
32f4e4ca13 Cleaning up 2025-04-09 19:20:28 +02:00
Daniel Vikström
962e0c4c33 Make it a Class but only use the id in entities 2025-04-09 19:09:31 +02:00
Daniel Vikström
2c01bc5795 Fix clang-tidy 2025-04-09 15:22:40 +02:00
Daniel Vikström
0651f7cb3c Work on sub-device creation 2025-04-09 01:39:24 +02:00
Daniel Vikström
01ac59ce2a Store proto with all additions but commented out 2025-04-09 01:18:42 +02:00
Daniel Vikström
c1fd597757 Add CODEOWNER 2025-04-09 01:12:14 +02:00
Daniel Vikström
e79e244eee Fix generated proto-files 2025-04-09 01:09:45 +02:00
Daniel Vikström
68ecc08111 Register device_id to entity and separate struct for all device info 2025-04-09 00:11:05 +02:00
Daniel Vikström
3b5fbc359f Formating updates 2025-04-08 22:21:11 +02:00
Daniel Vikström
583e5ea47f Add code-owner tag 2025-04-08 22:21:08 +02:00
Daniel Vikström
7b647c3fae Add a single test 2025-04-08 22:21:07 +02:00
Daniel Vikström
a8b76c617c Some basic chain working 2025-04-08 22:07:09 +02:00
Daniel Vikström
1bd8985dff Add a device component 2025-04-08 22:00:09 +02:00
Daniel Vikström
25b5a6c4ae Add device_id to entity_base 2025-04-08 22:00:06 +02:00
164 changed files with 8073 additions and 1933 deletions

View File

@@ -11,7 +11,7 @@ ci:
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.12.12
rev: v0.13.0
hooks:
# Run the linter.
- id: ruff

View File

@@ -66,7 +66,7 @@ esphome/components/binary_sensor/* @esphome/core
esphome/components/bk72xx/* @kuba2k2
esphome/components/bl0906/* @athom-tech @jesserockz @tarontop
esphome/components/bl0939/* @ziceva
esphome/components/bl0940/* @tobias-
esphome/components/bl0940/* @dan-s-github @tobias-
esphome/components/bl0942/* @dbuezas @dwmw2
esphome/components/ble_client/* @buxtronix @clydebarrow
esphome/components/bluetooth_proxy/* @bdraco @jesserockz
@@ -88,7 +88,7 @@ esphome/components/bp1658cj/* @Cossid
esphome/components/bp5758d/* @Cossid
esphome/components/button/* @esphome/core
esphome/components/bytebuffer/* @clydebarrow
esphome/components/camera/* @DT-art1 @bdraco
esphome/components/camera/* @bdraco @DT-art1
esphome/components/camera_encoder/* @DT-art1
esphome/components/canbus/* @danielschramm @mvturnho
esphome/components/cap1188/* @mreditor97
@@ -145,9 +145,9 @@ esphome/components/es8156/* @kbx81
esphome/components/es8311/* @kahrendt @kroimon
esphome/components/es8388/* @P4uLT
esphome/components/esp32/* @esphome/core
esphome/components/esp32_ble/* @Rapsssito @bdraco @jesserockz
esphome/components/esp32_ble/* @bdraco @jesserockz @Rapsssito
esphome/components/esp32_ble_client/* @bdraco @jesserockz
esphome/components/esp32_ble_server/* @Rapsssito @clydebarrow @jesserockz
esphome/components/esp32_ble_server/* @clydebarrow @jesserockz @Rapsssito
esphome/components/esp32_ble_tracker/* @bdraco
esphome/components/esp32_camera_web_server/* @ayufan
esphome/components/esp32_can/* @Sympatron
@@ -167,7 +167,7 @@ esphome/components/ezo_pmp/* @carlos-sarmiento
esphome/components/factory_reset/* @anatoly-savchenkov
esphome/components/fastled_base/* @OttoWinter
esphome/components/feedback/* @ianchi
esphome/components/fingerprint_grow/* @OnFreund @alexborro @loongyh
esphome/components/fingerprint_grow/* @alexborro @loongyh @OnFreund
esphome/components/font/* @clydebarrow @esphome/core
esphome/components/fs3000/* @kahrendt
esphome/components/ft5x06/* @clydebarrow
@@ -203,7 +203,7 @@ esphome/components/heatpumpir/* @rob-deutsch
esphome/components/hitachi_ac424/* @sourabhjaiswal
esphome/components/hm3301/* @freekode
esphome/components/hmac_md5/* @dwmw2
esphome/components/homeassistant/* @OttoWinter @esphome/core
esphome/components/homeassistant/* @esphome/core @OttoWinter
esphome/components/homeassistant/number/* @landonr
esphome/components/homeassistant/switch/* @Links2004
esphome/components/honeywell_hih_i2c/* @Benichou34
@@ -228,13 +228,13 @@ esphome/components/iaqcore/* @yozik04
esphome/components/ili9xxx/* @clydebarrow @nielsnl68
esphome/components/improv_base/* @esphome/core
esphome/components/improv_serial/* @esphome/core
esphome/components/ina226/* @Sergio303 @latonita
esphome/components/ina226/* @latonita @Sergio303
esphome/components/ina260/* @mreditor97
esphome/components/ina2xx_base/* @latonita
esphome/components/ina2xx_i2c/* @latonita
esphome/components/ina2xx_spi/* @latonita
esphome/components/inkbird_ibsth1_mini/* @fkirill
esphome/components/inkplate6/* @jesserockz
esphome/components/inkplate/* @jesserockz @JosipKuci
esphome/components/integration/* @OttoWinter
esphome/components/internal_temperature/* @Mat931
esphome/components/interval/* @esphome/core
@@ -277,8 +277,8 @@ esphome/components/max7219digit/* @rspaargaren
esphome/components/max9611/* @mckaymatthew
esphome/components/mcp23008/* @jesserockz
esphome/components/mcp23017/* @jesserockz
esphome/components/mcp23s08/* @SenexCrenshaw @jesserockz
esphome/components/mcp23s17/* @SenexCrenshaw @jesserockz
esphome/components/mcp23s08/* @jesserockz @SenexCrenshaw
esphome/components/mcp23s17/* @jesserockz @SenexCrenshaw
esphome/components/mcp23x08_base/* @jesserockz
esphome/components/mcp23x17_base/* @jesserockz
esphome/components/mcp23xxx_base/* @jesserockz
@@ -299,6 +299,7 @@ esphome/components/mics_4514/* @jesserockz
esphome/components/midea/* @dudanov
esphome/components/midea_ir/* @dudanov
esphome/components/mipi_dsi/* @clydebarrow
esphome/components/mipi_rgb/* @clydebarrow
esphome/components/mipi_spi/* @clydebarrow
esphome/components/mitsubishi/* @RubyBailey
esphome/components/mixer/speaker/* @kahrendt
@@ -342,7 +343,7 @@ esphome/components/ota/* @esphome/core
esphome/components/output/* @esphome/core
esphome/components/packet_transport/* @clydebarrow
esphome/components/pca6416a/* @Mat931
esphome/components/pca9554/* @clydebarrow @hwstar
esphome/components/pca9554/* @bdraco @clydebarrow @hwstar
esphome/components/pcf85063/* @brogon
esphome/components/pcf8563/* @KoenBreeman
esphome/components/pi4ioe5v6408/* @jesserockz
@@ -353,9 +354,9 @@ esphome/components/pm2005/* @andrewjswan
esphome/components/pmsa003i/* @sjtrny
esphome/components/pmsx003/* @ximex
esphome/components/pmwcs3/* @SeByDocKy
esphome/components/pn532/* @OttoWinter @jesserockz
esphome/components/pn532_i2c/* @OttoWinter @jesserockz
esphome/components/pn532_spi/* @OttoWinter @jesserockz
esphome/components/pn532/* @jesserockz @OttoWinter
esphome/components/pn532_i2c/* @jesserockz @OttoWinter
esphome/components/pn532_spi/* @jesserockz @OttoWinter
esphome/components/pn7150/* @jesserockz @kbx81
esphome/components/pn7150_i2c/* @jesserockz @kbx81
esphome/components/pn7160/* @jesserockz @kbx81
@@ -364,7 +365,7 @@ esphome/components/pn7160_spi/* @jesserockz @kbx81
esphome/components/power_supply/* @esphome/core
esphome/components/preferences/* @esphome/core
esphome/components/psram/* @esphome/core
esphome/components/pulse_meter/* @TrentHouliston @cstaahl @stevebaxter
esphome/components/pulse_meter/* @cstaahl @stevebaxter @TrentHouliston
esphome/components/pvvx_mithermometer/* @pasiz
esphome/components/pylontech/* @functionpointer
esphome/components/qmp6988/* @andrewpc
@@ -405,7 +406,7 @@ esphome/components/sensirion_common/* @martgras
esphome/components/sensor/* @esphome/core
esphome/components/sfa30/* @ghsensdev
esphome/components/sgp40/* @SenexCrenshaw
esphome/components/sgp4x/* @SenexCrenshaw @martgras
esphome/components/sgp4x/* @martgras @SenexCrenshaw
esphome/components/shelly_dimmer/* @edge90 @rnauber
esphome/components/sht3xd/* @mrtoy-me
esphome/components/sht4x/* @sjtrny

View File

@@ -48,7 +48,7 @@ PROJECT_NAME = ESPHome
# could be handy for archiving the generated documentation or if some version
# control system is used.
PROJECT_NUMBER = 2025.9.0-dev
PROJECT_NUMBER = 2025.10.0-dev
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a

View File

@@ -396,27 +396,29 @@ def check_permissions(port: str):
)
def upload_program(config: ConfigType, args: ArgsProtocol, host: str) -> int | str:
def upload_program(
config: ConfigType, args: ArgsProtocol, devices: list[str]
) -> tuple[int, str | None]:
host = devices[0]
try:
module = importlib.import_module("esphome.components." + CORE.target_platform)
if getattr(module, "upload_program")(config, args, host):
return 0
return 0, host
except AttributeError:
pass
if get_port_type(host) == "SERIAL":
check_permissions(host)
exit_code = 1
if CORE.target_platform in (PLATFORM_ESP32, PLATFORM_ESP8266):
file = getattr(args, "file", None)
return upload_using_esptool(config, host, file, args.upload_speed)
exit_code = upload_using_esptool(config, host, file, args.upload_speed)
elif CORE.target_platform == PLATFORM_RP2040 or CORE.is_libretiny:
exit_code = upload_using_platformio(config, host)
# else: Unknown target platform, exit_code remains 1
if CORE.target_platform in (PLATFORM_RP2040):
return upload_using_platformio(config, host)
if CORE.is_libretiny:
return upload_using_platformio(config, host)
return 1 # Unknown target platform
return exit_code, host if exit_code == 0 else None
ota_conf = {}
for ota_item in config.get(CONF_OTA, []):
@@ -433,10 +435,10 @@ def upload_program(config: ConfigType, args: ArgsProtocol, host: str) -> int | s
remote_port = int(ota_conf[CONF_PORT])
password = ota_conf.get(CONF_PASSWORD, "")
binary = args.file if getattr(args, "file", None) is not None else CORE.firmware_bin
# Check if we should use MQTT for address resolution
# This happens when no device was specified, or the current host is "MQTT"/"OTA"
devices: list[str] = args.device or []
if (
CONF_MQTT in config # pylint: disable=too-many-boolean-expressions
and (not devices or host in ("MQTT", "OTA"))
@@ -447,17 +449,23 @@ def upload_program(config: ConfigType, args: ArgsProtocol, host: str) -> int | s
):
from esphome import mqtt
host = mqtt.get_esphome_device_ip(
config, args.username, args.password, args.client_id
)
devices = [
mqtt.get_esphome_device_ip(
config, args.username, args.password, args.client_id
)
]
if getattr(args, "file", None) is not None:
return espota2.run_ota(host, remote_port, password, args.file)
return espota2.run_ota(host, remote_port, password, CORE.firmware_bin)
return espota2.run_ota(devices, remote_port, password, binary)
def show_logs(config: ConfigType, args: ArgsProtocol, devices: list[str]) -> int | None:
try:
module = importlib.import_module("esphome.components." + CORE.target_platform)
if getattr(module, "show_logs")(config, args, devices):
return 0
except AttributeError:
pass
if "logger" not in config:
raise EsphomeError("Logger is not configured!")
@@ -527,6 +535,13 @@ def command_vscode(args: ArgsProtocol) -> int | None:
def command_compile(args: ArgsProtocol, config: ConfigType) -> int | None:
# Set memory analysis options in config
if args.analyze_memory:
config.setdefault(CONF_ESPHOME, {})["analyze_memory"] = True
if args.memory_report:
config.setdefault(CONF_ESPHOME, {})["memory_report_file"] = args.memory_report
exit_code = write_cpp(config)
if exit_code != 0:
return exit_code
@@ -551,17 +566,11 @@ def command_upload(args: ArgsProtocol, config: ConfigType) -> int | None:
purpose="uploading",
)
# Try each device until one succeeds
exit_code = 1
for device in devices:
_LOGGER.info("Uploading to %s", device)
exit_code = upload_program(config, args, device)
if exit_code == 0:
_LOGGER.info("Successfully uploaded program.")
return 0
if len(devices) > 1:
_LOGGER.warning("Failed to upload to %s", device)
exit_code, _ = upload_program(config, args, devices)
if exit_code == 0:
_LOGGER.info("Successfully uploaded program.")
else:
_LOGGER.warning("Failed to upload to %s", devices)
return exit_code
@@ -614,19 +623,11 @@ def command_run(args: ArgsProtocol, config: ConfigType) -> int | None:
purpose="uploading",
)
# Try each device for upload until one succeeds
successful_device: str | None = None
for device in devices:
_LOGGER.info("Uploading to %s", device)
exit_code = upload_program(config, args, device)
if exit_code == 0:
_LOGGER.info("Successfully uploaded program.")
successful_device = device
break
if len(devices) > 1:
_LOGGER.warning("Failed to upload to %s", device)
if successful_device is None:
exit_code, successful_device = upload_program(config, args, devices)
if exit_code == 0:
_LOGGER.info("Successfully uploaded program.")
else:
_LOGGER.warning("Failed to upload to %s", devices)
return exit_code
if args.no_logs:
@@ -937,6 +938,17 @@ def parse_args(argv):
help="Only generate source code, do not compile.",
action="store_true",
)
parser_compile.add_argument(
"--analyze-memory",
help="Analyze and display memory usage by component after compilation.",
action="store_true",
)
parser_compile.add_argument(
"--memory-report",
help="Save memory analysis report to a file (supports .json or .txt).",
type=str,
metavar="FILE",
)
parser_upload = subparsers.add_parser(
"upload",

1618
esphome/analyze_memory.py Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -241,6 +241,8 @@ float ADCSensor::sample_autorange_() {
cali_config.bitwidth = ADC_BITWIDTH_DEFAULT;
err = adc_cali_create_scheme_curve_fitting(&cali_config, &handle);
ESP_LOGVV(TAG, "Autorange atten=%d: Calibration handle creation %s (err=%d)", atten,
(err == ESP_OK) ? "SUCCESS" : "FAILED", err);
#else
adc_cali_line_fitting_config_t cali_config = {
.unit_id = this->adc_unit_,
@@ -251,10 +253,14 @@ float ADCSensor::sample_autorange_() {
#endif
};
err = adc_cali_create_scheme_line_fitting(&cali_config, &handle);
ESP_LOGVV(TAG, "Autorange atten=%d: Calibration handle creation %s (err=%d)", atten,
(err == ESP_OK) ? "SUCCESS" : "FAILED", err);
#endif
int raw;
err = adc_oneshot_read(this->adc_handle_, this->channel_, &raw);
ESP_LOGVV(TAG, "Autorange atten=%d: Raw ADC read %s, value=%d (err=%d)", atten,
(err == ESP_OK) ? "SUCCESS" : "FAILED", raw, err);
if (err != ESP_OK) {
ESP_LOGW(TAG, "ADC read failed in autorange with error %d", err);
@@ -275,8 +281,10 @@ float ADCSensor::sample_autorange_() {
err = adc_cali_raw_to_voltage(handle, raw, &voltage_mv);
if (err == ESP_OK) {
voltage = voltage_mv / 1000.0f;
ESP_LOGVV(TAG, "Autorange atten=%d: CALIBRATED - raw=%d -> %dmV -> %.6fV", atten, raw, voltage_mv, voltage);
} else {
voltage = raw * 3.3f / 4095.0f;
ESP_LOGVV(TAG, "Autorange atten=%d: UNCALIBRATED FALLBACK - raw=%d -> %.6fV (3.3V ref)", atten, raw, voltage);
}
// Clean up calibration handle
#if USE_ESP32_VARIANT_ESP32C3 || USE_ESP32_VARIANT_ESP32C5 || USE_ESP32_VARIANT_ESP32C6 || \
@@ -287,6 +295,7 @@ float ADCSensor::sample_autorange_() {
#endif
} else {
voltage = raw * 3.3f / 4095.0f;
ESP_LOGVV(TAG, "Autorange atten=%d: NO CALIBRATION - raw=%d -> %.6fV (3.3V ref)", atten, raw, voltage);
}
return {raw, voltage};
@@ -324,18 +333,32 @@ float ADCSensor::sample_autorange_() {
}
const int adc_half = 2048;
uint32_t c12 = std::min(raw12, adc_half);
uint32_t c6 = adc_half - std::abs(raw6 - adc_half);
uint32_t c2 = adc_half - std::abs(raw2 - adc_half);
uint32_t c0 = std::min(4095 - raw0, adc_half);
uint32_t csum = c12 + c6 + c2 + c0;
const uint32_t c12 = std::min(raw12, adc_half);
const int32_t c6_signed = adc_half - std::abs(raw6 - adc_half);
const uint32_t c6 = (c6_signed > 0) ? c6_signed : 0; // Clamp to prevent underflow
const int32_t c2_signed = adc_half - std::abs(raw2 - adc_half);
const uint32_t c2 = (c2_signed > 0) ? c2_signed : 0; // Clamp to prevent underflow
const uint32_t c0 = std::min(4095 - raw0, adc_half);
const uint32_t csum = c12 + c6 + c2 + c0;
ESP_LOGVV(TAG, "Autorange summary:");
ESP_LOGVV(TAG, " Raw readings: 12db=%d, 6db=%d, 2.5db=%d, 0db=%d", raw12, raw6, raw2, raw0);
ESP_LOGVV(TAG, " Voltages: 12db=%.6f, 6db=%.6f, 2.5db=%.6f, 0db=%.6f", mv12, mv6, mv2, mv0);
ESP_LOGVV(TAG, " Coefficients: c12=%u, c6=%u, c2=%u, c0=%u, sum=%u", c12, c6, c2, c0, csum);
if (csum == 0) {
ESP_LOGE(TAG, "Invalid weight sum in autorange calculation");
return NAN;
}
return (mv12 * c12 + mv6 * c6 + mv2 * c2 + mv0 * c0) / csum;
const float final_result = (mv12 * c12 + mv6 * c6 + mv2 * c2 + mv0 * c0) / csum;
ESP_LOGV(TAG, "Autorange final: (%.6f*%u + %.6f*%u + %.6f*%u + %.6f*%u)/%u = %.6fV", mv12, c12, mv6, c6, mv2, c2, mv0,
c0, csum, final_result);
return final_result;
}
} // namespace adc

View File

@@ -818,6 +818,7 @@ message GetTimeResponse {
option (no_delay) = true;
fixed32 epoch_seconds = 1;
string timezone = 2;
}
// ==================== USER-DEFINES SERVICES ====================

View File

@@ -1070,8 +1070,14 @@ void APIConnection::camera_image(const CameraImageRequest &msg) {
#ifdef USE_HOMEASSISTANT_TIME
void APIConnection::on_get_time_response(const GetTimeResponse &value) {
if (homeassistant::global_homeassistant_time != nullptr)
if (homeassistant::global_homeassistant_time != nullptr) {
homeassistant::global_homeassistant_time->set_epoch_time(value.epoch_seconds);
#ifdef USE_TIME_TIMEZONE
if (!value.timezone.empty() && value.timezone != homeassistant::global_homeassistant_time->get_timezone()) {
homeassistant::global_homeassistant_time->set_timezone(value.timezone);
}
#endif
}
}
#endif

View File

@@ -10,6 +10,10 @@
#include <cstring>
#include <cinttypes>
#ifdef USE_ESP8266
#include <pgmspace.h>
#endif
namespace esphome::api {
static const char *const TAG = "api.plaintext";
@@ -197,11 +201,20 @@ APIError APIPlaintextFrameHelper::read_packet(ReadPacketBuffer *buffer) {
// We must send at least 3 bytes to be read, so we add
// a message after the indicator byte to ensures its long
// enough and can aid in debugging.
const char msg[] = "\x00"
"Bad indicator byte";
static constexpr uint8_t INDICATOR_MSG_SIZE = 19;
#ifdef USE_ESP8266
static const char MSG_PROGMEM[] PROGMEM = "\x00"
"Bad indicator byte";
char msg[INDICATOR_MSG_SIZE];
memcpy_P(msg, MSG_PROGMEM, INDICATOR_MSG_SIZE);
iov[0].iov_base = (void *) msg;
iov[0].iov_len = 19;
this->write_raw_(iov, 1, 19);
#else
static const char MSG[] = "\x00"
"Bad indicator byte";
iov[0].iov_base = (void *) MSG;
#endif
iov[0].iov_len = INDICATOR_MSG_SIZE;
this->write_raw_(iov, 1, INDICATOR_MSG_SIZE);
}
return aerr;
}

View File

@@ -901,6 +901,16 @@ bool HomeAssistantStateResponse::decode_length(uint32_t field_id, ProtoLengthDel
return true;
}
#endif
bool GetTimeResponse::decode_length(uint32_t field_id, ProtoLengthDelimited value) {
switch (field_id) {
case 2:
this->timezone = value.as_string();
break;
default:
return false;
}
return true;
}
bool GetTimeResponse::decode_32bit(uint32_t field_id, Proto32Bit value) {
switch (field_id) {
case 1:
@@ -911,8 +921,14 @@ bool GetTimeResponse::decode_32bit(uint32_t field_id, Proto32Bit value) {
}
return true;
}
void GetTimeResponse::encode(ProtoWriteBuffer buffer) const { buffer.encode_fixed32(1, this->epoch_seconds); }
void GetTimeResponse::calculate_size(ProtoSize &size) const { size.add_fixed32(1, this->epoch_seconds); }
void GetTimeResponse::encode(ProtoWriteBuffer buffer) const {
buffer.encode_fixed32(1, this->epoch_seconds);
buffer.encode_string(2, this->timezone_ref_);
}
void GetTimeResponse::calculate_size(ProtoSize &size) const {
size.add_fixed32(1, this->epoch_seconds);
size.add_length(1, this->timezone_ref_.size());
}
#ifdef USE_API_SERVICES
void ListEntitiesServicesArgument::encode(ProtoWriteBuffer buffer) const {
buffer.encode_string(1, this->name_ref_);

View File

@@ -1174,11 +1174,14 @@ class GetTimeRequest final : public ProtoMessage {
class GetTimeResponse final : public ProtoDecodableMessage {
public:
static constexpr uint8_t MESSAGE_TYPE = 37;
static constexpr uint8_t ESTIMATED_SIZE = 5;
static constexpr uint8_t ESTIMATED_SIZE = 14;
#ifdef HAS_PROTO_MESSAGE_DUMP
const char *message_name() const override { return "get_time_response"; }
#endif
uint32_t epoch_seconds{0};
std::string timezone{};
StringRef timezone_ref_{};
void set_timezone(const StringRef &ref) { this->timezone_ref_ = ref; }
void encode(ProtoWriteBuffer buffer) const override;
void calculate_size(ProtoSize &size) const override;
#ifdef HAS_PROTO_MESSAGE_DUMP
@@ -1187,6 +1190,7 @@ class GetTimeResponse final : public ProtoDecodableMessage {
protected:
bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
};
#ifdef USE_API_SERVICES
class ListEntitiesServicesArgument final : public ProtoMessage {

View File

@@ -1110,7 +1110,17 @@ void HomeAssistantStateResponse::dump_to(std::string &out) const {
}
#endif
void GetTimeRequest::dump_to(std::string &out) const { out.append("GetTimeRequest {}"); }
void GetTimeResponse::dump_to(std::string &out) const { dump_field(out, "epoch_seconds", this->epoch_seconds); }
void GetTimeResponse::dump_to(std::string &out) const {
MessageDumpHelper helper(out, "GetTimeResponse");
dump_field(out, "epoch_seconds", this->epoch_seconds);
out.append(" timezone: ");
if (!this->timezone_ref_.empty()) {
out.append("'").append(this->timezone_ref_.c_str()).append("'");
} else {
out.append("'").append(this->timezone).append("'");
}
out.append("\n");
}
#ifdef USE_API_SERVICES
void ListEntitiesServicesArgument::dump_to(std::string &out) const {
MessageDumpHelper helper(out, "ListEntitiesServicesArgument");

View File

@@ -16,6 +16,7 @@ from esphome.const import (
DEVICE_CLASS_ENERGY,
DEVICE_CLASS_POWER,
DEVICE_CLASS_POWER_FACTOR,
DEVICE_CLASS_REACTIVE_POWER,
DEVICE_CLASS_VOLTAGE,
ICON_CURRENT_AC,
ICON_LIGHTBULB,
@@ -78,6 +79,7 @@ CONFIG_SCHEMA = (
unit_of_measurement=UNIT_VOLT_AMPS_REACTIVE,
icon=ICON_LIGHTBULB,
accuracy_decimals=2,
device_class=DEVICE_CLASS_REACTIVE_POWER,
state_class=STATE_CLASS_MEASUREMENT,
),
cv.Optional(CONF_POWER_FACTOR): sensor.sensor_schema(

View File

@@ -17,10 +17,12 @@ from esphome.const import (
CONF_REACTIVE_POWER,
CONF_REVERSE_ACTIVE_ENERGY,
CONF_VOLTAGE,
DEVICE_CLASS_APPARENT_POWER,
DEVICE_CLASS_CURRENT,
DEVICE_CLASS_ENERGY,
DEVICE_CLASS_POWER,
DEVICE_CLASS_POWER_FACTOR,
DEVICE_CLASS_REACTIVE_POWER,
DEVICE_CLASS_TEMPERATURE,
DEVICE_CLASS_VOLTAGE,
ENTITY_CATEGORY_DIAGNOSTIC,
@@ -100,13 +102,13 @@ ATM90E32_PHASE_SCHEMA = cv.Schema(
unit_of_measurement=UNIT_VOLT_AMPS_REACTIVE,
icon=ICON_LIGHTBULB,
accuracy_decimals=2,
device_class=DEVICE_CLASS_POWER,
device_class=DEVICE_CLASS_REACTIVE_POWER,
state_class=STATE_CLASS_MEASUREMENT,
),
cv.Optional(CONF_APPARENT_POWER): sensor.sensor_schema(
unit_of_measurement=UNIT_VOLT_AMPS,
accuracy_decimals=2,
device_class=DEVICE_CLASS_POWER,
device_class=DEVICE_CLASS_APPARENT_POWER,
state_class=STATE_CLASS_MEASUREMENT,
),
cv.Optional(CONF_POWER_FACTOR): sensor.sensor_schema(

View File

@@ -493,7 +493,7 @@ void BedJetHub::dump_config() {
" ble_client.app_id: %d\n"
" ble_client.conn_id: %d",
this->get_name().c_str(), this->parent()->app_id, this->parent()->get_conn_id());
LOG_UPDATE_INTERVAL(this)
LOG_UPDATE_INTERVAL(this);
ESP_LOGCONFIG(TAG, " Child components (%d):", this->children_.size());
for (auto *child : this->children_) {
ESP_LOGCONFIG(TAG, " - %s", child->describe().c_str());

View File

@@ -1 +1,6 @@
CODEOWNERS = ["@tobias-"]
import esphome.codegen as cg
CODEOWNERS = ["@tobias-", "@dan-s-github"]
CONF_BL0940_ID = "bl0940_id"
bl0940_ns = cg.esphome_ns.namespace("bl0940")

View File

@@ -7,28 +7,26 @@ namespace bl0940 {
static const char *const TAG = "bl0940";
static const uint8_t BL0940_READ_COMMAND = 0x50; // 0x58 according to documentation
static const uint8_t BL0940_FULL_PACKET = 0xAA;
static const uint8_t BL0940_PACKET_HEADER = 0x55; // 0x58 according to documentation
static const uint8_t BL0940_PACKET_HEADER = 0x55; // 0x58 according to en doc but 0x55 in cn doc
static const uint8_t BL0940_WRITE_COMMAND = 0xA0; // 0xA8 according to documentation
static const uint8_t BL0940_REG_I_FAST_RMS_CTRL = 0x10;
static const uint8_t BL0940_REG_MODE = 0x18;
static const uint8_t BL0940_REG_SOFT_RESET = 0x19;
static const uint8_t BL0940_REG_USR_WRPROT = 0x1A;
static const uint8_t BL0940_REG_TPS_CTRL = 0x1B;
const uint8_t BL0940_INIT[5][6] = {
static const uint8_t BL0940_INIT[5][5] = {
// Reset to default
{BL0940_WRITE_COMMAND, BL0940_REG_SOFT_RESET, 0x5A, 0x5A, 0x5A, 0x38},
{BL0940_REG_SOFT_RESET, 0x5A, 0x5A, 0x5A, 0x38},
// Enable User Operation Write
{BL0940_WRITE_COMMAND, BL0940_REG_USR_WRPROT, 0x55, 0x00, 0x00, 0xF0},
{BL0940_REG_USR_WRPROT, 0x55, 0x00, 0x00, 0xF0},
// 0x0100 = CF_UNABLE energy pulse, AC_FREQ_SEL 50Hz, RMS_UPDATE_SEL 800mS
{BL0940_WRITE_COMMAND, BL0940_REG_MODE, 0x00, 0x10, 0x00, 0x37},
{BL0940_REG_MODE, 0x00, 0x10, 0x00, 0x37},
// 0x47FF = Over-current and leakage alarm on, Automatic temperature measurement, Interval 100mS
{BL0940_WRITE_COMMAND, BL0940_REG_TPS_CTRL, 0xFF, 0x47, 0x00, 0xFE},
{BL0940_REG_TPS_CTRL, 0xFF, 0x47, 0x00, 0xFE},
// 0x181C = Half cycle, Fast RMS threshold 6172
{BL0940_WRITE_COMMAND, BL0940_REG_I_FAST_RMS_CTRL, 0x1C, 0x18, 0x00, 0x1B}};
{BL0940_REG_I_FAST_RMS_CTRL, 0x1C, 0x18, 0x00, 0x1B}};
void BL0940::loop() {
DataPacket buffer;
@@ -36,8 +34,8 @@ void BL0940::loop() {
return;
}
if (read_array((uint8_t *) &buffer, sizeof(buffer))) {
if (validate_checksum(&buffer)) {
received_package_(&buffer);
if (this->validate_checksum_(&buffer)) {
this->received_package_(&buffer);
}
} else {
ESP_LOGW(TAG, "Junk on wire. Throwing away partial message");
@@ -46,35 +44,151 @@ void BL0940::loop() {
}
}
bool BL0940::validate_checksum(const DataPacket *data) {
uint8_t checksum = BL0940_READ_COMMAND;
bool BL0940::validate_checksum_(DataPacket *data) {
uint8_t checksum = this->read_command_;
// Whole package but checksum
for (uint32_t i = 0; i < sizeof(data->raw) - 1; i++) {
checksum += data->raw[i];
uint8_t *raw = (uint8_t *) data;
for (uint32_t i = 0; i < sizeof(*data) - 1; i++) {
checksum += raw[i];
}
checksum ^= 0xFF;
if (checksum != data->checksum) {
ESP_LOGW(TAG, "BL0940 invalid checksum! 0x%02X != 0x%02X", checksum, data->checksum);
ESP_LOGW(TAG, "Invalid checksum! 0x%02X != 0x%02X", checksum, data->checksum);
}
return checksum == data->checksum;
}
void BL0940::update() {
this->flush();
this->write_byte(BL0940_READ_COMMAND);
this->write_byte(this->read_command_);
this->write_byte(BL0940_FULL_PACKET);
}
void BL0940::setup() {
#ifdef USE_NUMBER
// add calibration callbacks
if (this->voltage_calibration_number_ != nullptr) {
this->voltage_calibration_number_->add_on_state_callback(
[this](float state) { this->voltage_calibration_callback_(state); });
if (this->voltage_calibration_number_->has_state()) {
this->voltage_calibration_callback_(this->voltage_calibration_number_->state);
}
}
if (this->current_calibration_number_ != nullptr) {
this->current_calibration_number_->add_on_state_callback(
[this](float state) { this->current_calibration_callback_(state); });
if (this->current_calibration_number_->has_state()) {
this->current_calibration_callback_(this->current_calibration_number_->state);
}
}
if (this->power_calibration_number_ != nullptr) {
this->power_calibration_number_->add_on_state_callback(
[this](float state) { this->power_calibration_callback_(state); });
if (this->power_calibration_number_->has_state()) {
this->power_calibration_callback_(this->power_calibration_number_->state);
}
}
if (this->energy_calibration_number_ != nullptr) {
this->energy_calibration_number_->add_on_state_callback(
[this](float state) { this->energy_calibration_callback_(state); });
if (this->energy_calibration_number_->has_state()) {
this->energy_calibration_callback_(this->energy_calibration_number_->state);
}
}
#endif
// calculate calibrated reference values
this->voltage_reference_cal_ = this->voltage_reference_ / this->voltage_cal_;
this->current_reference_cal_ = this->current_reference_ / this->current_cal_;
this->power_reference_cal_ = this->power_reference_ / this->power_cal_;
this->energy_reference_cal_ = this->energy_reference_ / this->energy_cal_;
for (auto *i : BL0940_INIT) {
this->write_array(i, 6);
this->write_byte(this->write_command_), this->write_array(i, 5);
delay(1);
}
this->flush();
}
float BL0940::update_temp_(sensor::Sensor *sensor, ube16_t temperature) const {
auto tb = (float) (temperature.h << 8 | temperature.l);
float BL0940::calculate_power_reference_() {
// calculate power reference based on voltage and current reference
return this->voltage_reference_cal_ * this->current_reference_cal_ * 4046 / 324004 / 79931;
}
float BL0940::calculate_energy_reference_() {
// formula: 3600000 * 4046 * RL * R1 * 1000 / (1638.4 * 256) / Vref² / (R1 + R2)
// or: power_reference_ * 3600000 / (1638.4 * 256)
return this->power_reference_cal_ * 3600000 / (1638.4 * 256);
}
float BL0940::calculate_calibration_value_(float state) { return (100 + state) / 100; }
void BL0940::reset_calibration() {
#ifdef USE_NUMBER
if (this->current_calibration_number_ != nullptr && this->current_cal_ != 1) {
this->current_calibration_number_->make_call().set_value(0).perform();
}
if (this->voltage_calibration_number_ != nullptr && this->voltage_cal_ != 1) {
this->voltage_calibration_number_->make_call().set_value(0).perform();
}
if (this->power_calibration_number_ != nullptr && this->power_cal_ != 1) {
this->power_calibration_number_->make_call().set_value(0).perform();
}
if (this->energy_calibration_number_ != nullptr && this->energy_cal_ != 1) {
this->energy_calibration_number_->make_call().set_value(0).perform();
}
#endif
ESP_LOGD(TAG, "external calibration values restored to initial state");
}
void BL0940::current_calibration_callback_(float state) {
this->current_cal_ = this->calculate_calibration_value_(state);
ESP_LOGV(TAG, "update current calibration state: %f", this->current_cal_);
this->recalibrate_();
}
void BL0940::voltage_calibration_callback_(float state) {
this->voltage_cal_ = this->calculate_calibration_value_(state);
ESP_LOGV(TAG, "update voltage calibration state: %f", this->voltage_cal_);
this->recalibrate_();
}
void BL0940::power_calibration_callback_(float state) {
this->power_cal_ = this->calculate_calibration_value_(state);
ESP_LOGV(TAG, "update power calibration state: %f", this->power_cal_);
this->recalibrate_();
}
void BL0940::energy_calibration_callback_(float state) {
this->energy_cal_ = this->calculate_calibration_value_(state);
ESP_LOGV(TAG, "update energy calibration state: %f", this->energy_cal_);
this->recalibrate_();
}
void BL0940::recalibrate_() {
ESP_LOGV(TAG, "Recalibrating reference values");
this->voltage_reference_cal_ = this->voltage_reference_ / this->voltage_cal_;
this->current_reference_cal_ = this->current_reference_ / this->current_cal_;
if (this->voltage_cal_ != 1 || this->current_cal_ != 1) {
this->power_reference_ = this->calculate_power_reference_();
}
this->power_reference_cal_ = this->power_reference_ / this->power_cal_;
if (this->voltage_cal_ != 1 || this->current_cal_ != 1 || this->power_cal_ != 1) {
this->energy_reference_ = this->calculate_energy_reference_();
}
this->energy_reference_cal_ = this->energy_reference_ / this->energy_cal_;
ESP_LOGD(TAG,
"Recalibrated reference values:\n"
"Voltage: %f\n, Current: %f\n, Power: %f\n, Energy: %f\n",
this->voltage_reference_cal_, this->current_reference_cal_, this->power_reference_cal_,
this->energy_reference_cal_);
}
float BL0940::update_temp_(sensor::Sensor *sensor, uint16_le_t temperature) const {
auto tb = (float) temperature;
float converted_temp = ((float) 170 / 448) * (tb / 2 - 32) - 45;
if (sensor != nullptr) {
if (sensor->has_state() && std::abs(converted_temp - sensor->get_state()) > max_temperature_diff_) {
@@ -87,33 +201,40 @@ float BL0940::update_temp_(sensor::Sensor *sensor, ube16_t temperature) const {
return converted_temp;
}
void BL0940::received_package_(const DataPacket *data) const {
void BL0940::received_package_(DataPacket *data) {
// Bad header
if (data->frame_header != BL0940_PACKET_HEADER) {
ESP_LOGI(TAG, "Invalid data. Header mismatch: %d", data->frame_header);
return;
}
float v_rms = (float) to_uint32_t(data->v_rms) / voltage_reference_;
float i_rms = (float) to_uint32_t(data->i_rms) / current_reference_;
float watt = (float) to_int32_t(data->watt) / power_reference_;
uint32_t cf_cnt = to_uint32_t(data->cf_cnt);
float total_energy_consumption = (float) cf_cnt / energy_reference_;
// cf_cnt is only 24 bits, so track overflows
uint32_t cf_cnt = (uint24_t) data->cf_cnt;
cf_cnt |= this->prev_cf_cnt_ & 0xff000000;
if (cf_cnt < this->prev_cf_cnt_) {
cf_cnt += 0x1000000;
}
this->prev_cf_cnt_ = cf_cnt;
float tps1 = update_temp_(internal_temperature_sensor_, data->tps1);
float tps2 = update_temp_(external_temperature_sensor_, data->tps2);
float v_rms = (uint24_t) data->v_rms / this->voltage_reference_cal_;
float i_rms = (uint24_t) data->i_rms / this->current_reference_cal_;
float watt = (int24_t) data->watt / this->power_reference_cal_;
float total_energy_consumption = cf_cnt / this->energy_reference_cal_;
if (voltage_sensor_ != nullptr) {
voltage_sensor_->publish_state(v_rms);
float tps1 = update_temp_(this->internal_temperature_sensor_, data->tps1);
float tps2 = update_temp_(this->external_temperature_sensor_, data->tps2);
if (this->voltage_sensor_ != nullptr) {
this->voltage_sensor_->publish_state(v_rms);
}
if (current_sensor_ != nullptr) {
current_sensor_->publish_state(i_rms);
if (this->current_sensor_ != nullptr) {
this->current_sensor_->publish_state(i_rms);
}
if (power_sensor_ != nullptr) {
power_sensor_->publish_state(watt);
if (this->power_sensor_ != nullptr) {
this->power_sensor_->publish_state(watt);
}
if (energy_sensor_ != nullptr) {
energy_sensor_->publish_state(total_energy_consumption);
if (this->energy_sensor_ != nullptr) {
this->energy_sensor_->publish_state(total_energy_consumption);
}
ESP_LOGV(TAG, "BL0940: U %fV, I %fA, P %fW, Cnt %" PRId32 ", ∫P %fkWh, T1 %f°C, T2 %f°C", v_rms, i_rms, watt, cf_cnt,
@@ -121,7 +242,27 @@ void BL0940::received_package_(const DataPacket *data) const {
}
void BL0940::dump_config() { // NOLINT(readability-function-cognitive-complexity)
ESP_LOGCONFIG(TAG, "BL0940:");
ESP_LOGCONFIG(TAG,
"BL0940:\n"
" LEGACY MODE: %s\n"
" READ CMD: 0x%02X\n"
" WRITE CMD: 0x%02X\n"
" ------------------\n"
" Current reference: %f\n"
" Energy reference: %f\n"
" Power reference: %f\n"
" Voltage reference: %f\n",
TRUEFALSE(this->legacy_mode_enabled_), this->read_command_, this->write_command_,
this->current_reference_, this->energy_reference_, this->power_reference_, this->voltage_reference_);
#ifdef USE_NUMBER
ESP_LOGCONFIG(TAG,
"BL0940:\n"
" Current calibration: %f\n"
" Energy calibration: %f\n"
" Power calibration: %f\n"
" Voltage calibration: %f\n",
this->current_cal_, this->energy_cal_, this->power_cal_, this->voltage_cal_);
#endif
LOG_SENSOR("", "Voltage", this->voltage_sensor_);
LOG_SENSOR("", "Current", this->current_sensor_);
LOG_SENSOR("", "Power", this->power_sensor_);
@@ -130,9 +271,5 @@ void BL0940::dump_config() { // NOLINT(readability-function-cognitive-complexit
LOG_SENSOR("", "External temperature", this->external_temperature_sensor_);
}
uint32_t BL0940::to_uint32_t(ube24_t input) { return input.h << 16 | input.m << 8 | input.l; }
int32_t BL0940::to_int32_t(sbe24_t input) { return input.h << 16 | input.m << 8 | input.l; }
} // namespace bl0940
} // namespace esphome

View File

@@ -1,66 +1,48 @@
#pragma once
#include "esphome/core/component.h"
#include "esphome/components/uart/uart.h"
#include "esphome/core/datatypes.h"
#include "esphome/core/defines.h"
#ifdef USE_BUTTON
#include "esphome/components/button/button.h"
#endif
#ifdef USE_NUMBER
#include "esphome/components/number/number.h"
#endif
#include "esphome/components/sensor/sensor.h"
#include "esphome/components/uart/uart.h"
namespace esphome {
namespace bl0940 {
static const float BL0940_PREF = 1430;
static const float BL0940_UREF = 33000;
static const float BL0940_IREF = 275000; // 2750 from tasmota. Seems to generate values 100 times too high
// Measured to 297J per click according to power consumption of 5 minutes
// Converted to kWh (3.6MJ per kwH). Used to be 256 * 1638.4
static const float BL0940_EREF = 3.6e6 / 297;
struct ube24_t { // NOLINT(readability-identifier-naming,altera-struct-pack-align)
uint8_t l;
uint8_t m;
uint8_t h;
} __attribute__((packed));
struct ube16_t { // NOLINT(readability-identifier-naming,altera-struct-pack-align)
uint8_t l;
uint8_t h;
} __attribute__((packed));
struct sbe24_t { // NOLINT(readability-identifier-naming,altera-struct-pack-align)
uint8_t l;
uint8_t m;
int8_t h;
} __attribute__((packed));
// Caveat: All these values are big endian (low - middle - high)
union DataPacket { // NOLINT(altera-struct-pack-align)
uint8_t raw[35];
struct {
uint8_t frame_header; // value of 0x58 according to docs. 0x55 according to Tasmota real world tests. Reality wins.
ube24_t i_fast_rms; // 0x00
ube24_t i_rms; // 0x04
ube24_t RESERVED0; // reserved
ube24_t v_rms; // 0x06
ube24_t RESERVED1; // reserved
sbe24_t watt; // 0x08
ube24_t RESERVED2; // reserved
ube24_t cf_cnt; // 0x0A
ube24_t RESERVED3; // reserved
ube16_t tps1; // 0x0c
uint8_t RESERVED4; // value of 0x00
ube16_t tps2; // 0x0c
uint8_t RESERVED5; // value of 0x00
uint8_t checksum; // checksum
};
struct DataPacket {
uint8_t frame_header; // Packet header (0x58 in EN docs, 0x55 in CN docs and Tasmota tests)
uint24_le_t i_fast_rms; // Fast RMS current
uint24_le_t i_rms; // RMS current
uint24_t RESERVED0; // Reserved
uint24_le_t v_rms; // RMS voltage
uint24_t RESERVED1; // Reserved
int24_le_t watt; // Active power (can be negative for bidirectional measurement)
uint24_t RESERVED2; // Reserved
uint24_le_t cf_cnt; // Energy pulse count
uint24_t RESERVED3; // Reserved
uint16_le_t tps1; // Internal temperature sensor 1
uint8_t RESERVED4; // Reserved (should be 0x00)
uint16_le_t tps2; // Internal temperature sensor 2
uint8_t RESERVED5; // Reserved (should be 0x00)
uint8_t checksum; // Packet checksum
} __attribute__((packed));
class BL0940 : public PollingComponent, public uart::UARTDevice {
public:
// Sensor setters
void set_voltage_sensor(sensor::Sensor *voltage_sensor) { voltage_sensor_ = voltage_sensor; }
void set_current_sensor(sensor::Sensor *current_sensor) { current_sensor_ = current_sensor; }
void set_power_sensor(sensor::Sensor *power_sensor) { power_sensor_ = power_sensor; }
void set_energy_sensor(sensor::Sensor *energy_sensor) { energy_sensor_ = energy_sensor; }
// Temperature sensor setters
void set_internal_temperature_sensor(sensor::Sensor *internal_temperature_sensor) {
internal_temperature_sensor_ = internal_temperature_sensor;
}
@@ -68,42 +50,105 @@ class BL0940 : public PollingComponent, public uart::UARTDevice {
external_temperature_sensor_ = external_temperature_sensor;
}
void loop() override;
// Configuration setters
void set_legacy_mode(bool enable) { this->legacy_mode_enabled_ = enable; }
void set_read_command(uint8_t read_command) { this->read_command_ = read_command; }
void set_write_command(uint8_t write_command) { this->write_command_ = write_command; }
// Reference value setters (used for calibration and conversion)
void set_current_reference(float current_ref) { this->current_reference_ = current_ref; }
void set_energy_reference(float energy_ref) { this->energy_reference_ = energy_ref; }
void set_power_reference(float power_ref) { this->power_reference_ = power_ref; }
void set_voltage_reference(float voltage_ref) { this->voltage_reference_ = voltage_ref; }
#ifdef USE_NUMBER
// Calibration number setters (for Home Assistant number entities)
void set_current_calibration_number(number::Number *num) { this->current_calibration_number_ = num; }
void set_voltage_calibration_number(number::Number *num) { this->voltage_calibration_number_ = num; }
void set_power_calibration_number(number::Number *num) { this->power_calibration_number_ = num; }
void set_energy_calibration_number(number::Number *num) { this->energy_calibration_number_ = num; }
#endif
#ifdef USE_BUTTON
// Resets all calibration values to defaults (can be triggered by a button)
void reset_calibration();
#endif
// Core component methods
void loop() override;
void update() override;
void setup() override;
void dump_config() override;
protected:
sensor::Sensor *voltage_sensor_{nullptr};
sensor::Sensor *current_sensor_{nullptr};
// NB This may be negative as the circuits is seemingly able to measure
// power in both directions
sensor::Sensor *power_sensor_{nullptr};
sensor::Sensor *energy_sensor_{nullptr};
sensor::Sensor *internal_temperature_sensor_{nullptr};
sensor::Sensor *external_temperature_sensor_{nullptr};
// --- Sensor pointers ---
sensor::Sensor *voltage_sensor_{nullptr}; // Voltage sensor
sensor::Sensor *current_sensor_{nullptr}; // Current sensor
sensor::Sensor *power_sensor_{nullptr}; // Power sensor (can be negative for bidirectional)
sensor::Sensor *energy_sensor_{nullptr}; // Energy sensor
sensor::Sensor *internal_temperature_sensor_{nullptr}; // Internal temperature sensor
sensor::Sensor *external_temperature_sensor_{nullptr}; // External temperature sensor
// Max difference between two measurements of the temperature. Used to avoid noise.
float max_temperature_diff_{0};
// Divide by this to turn into Watt
float power_reference_ = BL0940_PREF;
// Divide by this to turn into Volt
float voltage_reference_ = BL0940_UREF;
// Divide by this to turn into Ampere
float current_reference_ = BL0940_IREF;
// Divide by this to turn into kWh
float energy_reference_ = BL0940_EREF;
#ifdef USE_NUMBER
// --- Calibration number entities (for dynamic calibration via HA UI) ---
number::Number *voltage_calibration_number_{nullptr};
number::Number *current_calibration_number_{nullptr};
number::Number *power_calibration_number_{nullptr};
number::Number *energy_calibration_number_{nullptr};
#endif
float update_temp_(sensor::Sensor *sensor, ube16_t packed_temperature) const;
// --- Internal state ---
uint32_t prev_cf_cnt_ = 0; // Previous energy pulse count (for energy calculation)
float max_temperature_diff_{0}; // Max allowed temperature difference between two measurements (noise filter)
static uint32_t to_uint32_t(ube24_t input);
// --- Reference values for conversion ---
float power_reference_; // Divider for raw power to get Watts
float power_reference_cal_; // Calibrated power reference
float voltage_reference_; // Divider for raw voltage to get Volts
float voltage_reference_cal_; // Calibrated voltage reference
float current_reference_; // Divider for raw current to get Amperes
float current_reference_cal_; // Calibrated current reference
float energy_reference_; // Divider for raw energy to get kWh
float energy_reference_cal_; // Calibrated energy reference
static int32_t to_int32_t(sbe24_t input);
// --- Home Assistant calibration values (multipliers, default 1) ---
float current_cal_{1};
float voltage_cal_{1};
float power_cal_{1};
float energy_cal_{1};
static bool validate_checksum(const DataPacket *data);
// --- Protocol commands ---
uint8_t read_command_;
uint8_t write_command_;
void received_package_(const DataPacket *data) const;
// --- Mode flags ---
bool legacy_mode_enabled_ = true;
// --- Methods ---
// Converts packed temperature value to float and updates the sensor
float update_temp_(sensor::Sensor *sensor, uint16_le_t packed_temperature) const;
// Validates the checksum of a received data packet
bool validate_checksum_(DataPacket *data);
// Handles a received data packet
void received_package_(DataPacket *data);
// Calculates reference values for calibration and conversion
float calculate_energy_reference_();
float calculate_power_reference_();
float calculate_calibration_value_(float state);
// Calibration update callbacks (used with number entities)
void current_calibration_callback_(float state);
void voltage_calibration_callback_(float state);
void power_calibration_callback_(float state);
void energy_calibration_callback_(float state);
void reset_calibration_callback_();
// Recalculates all reference values after calibration changes
void recalibrate_();
};
} // namespace bl0940
} // namespace esphome

View File

@@ -0,0 +1,27 @@
import esphome.codegen as cg
from esphome.components import button
import esphome.config_validation as cv
from esphome.const import ENTITY_CATEGORY_CONFIG, ICON_RESTART
from .. import CONF_BL0940_ID, bl0940_ns
from ..sensor import BL0940
CalibrationResetButton = bl0940_ns.class_(
"CalibrationResetButton", button.Button, cg.Component
)
CONFIG_SCHEMA = cv.All(
button.button_schema(
CalibrationResetButton,
entity_category=ENTITY_CATEGORY_CONFIG,
icon=ICON_RESTART,
)
.extend({cv.GenerateID(CONF_BL0940_ID): cv.use_id(BL0940)})
.extend(cv.COMPONENT_SCHEMA)
)
async def to_code(config):
var = await button.new_button(config)
await cg.register_component(var, config)
await cg.register_parented(var, config[CONF_BL0940_ID])

View File

@@ -0,0 +1,20 @@
#include "calibration_reset_button.h"
#include "../bl0940.h"
#include "esphome/core/hal.h"
#include "esphome/core/log.h"
#include "esphome/core/application.h"
namespace esphome {
namespace bl0940 {
static const char *const TAG = "bl0940.button.calibration_reset";
void CalibrationResetButton::dump_config() { LOG_BUTTON("", "Calibration Reset Button", this); }
void CalibrationResetButton::press_action() {
ESP_LOGI(TAG, "Resetting calibration defaults...");
this->parent_->reset_calibration();
}
} // namespace bl0940
} // namespace esphome

View File

@@ -0,0 +1,19 @@
#pragma once
#include "esphome/core/component.h"
#include "esphome/components/button/button.h"
namespace esphome {
namespace bl0940 {
class BL0940; // Forward declaration of BL0940 class
class CalibrationResetButton : public button::Button, public Component, public Parented<BL0940> {
public:
void dump_config() override;
void press_action() override;
};
} // namespace bl0940
} // namespace esphome

View File

@@ -0,0 +1,94 @@
import esphome.codegen as cg
from esphome.components import number
import esphome.config_validation as cv
from esphome.const import (
CONF_MAX_VALUE,
CONF_MIN_VALUE,
CONF_MODE,
CONF_RESTORE_VALUE,
CONF_STEP,
ENTITY_CATEGORY_CONFIG,
UNIT_PERCENT,
)
from .. import CONF_BL0940_ID, bl0940_ns
from ..sensor import BL0940
# Define calibration types
CONF_CURRENT_CALIBRATION = "current_calibration"
CONF_VOLTAGE_CALIBRATION = "voltage_calibration"
CONF_POWER_CALIBRATION = "power_calibration"
CONF_ENERGY_CALIBRATION = "energy_calibration"
BL0940Number = bl0940_ns.class_("BL0940Number")
CalibrationNumber = bl0940_ns.class_(
"CalibrationNumber", number.Number, cg.PollingComponent
)
def validate_min_max(config):
if config[CONF_MAX_VALUE] <= config[CONF_MIN_VALUE]:
raise cv.Invalid("max_value must be greater than min_value")
return config
CALIBRATION_SCHEMA = cv.All(
number.number_schema(
CalibrationNumber,
entity_category=ENTITY_CATEGORY_CONFIG,
unit_of_measurement=UNIT_PERCENT,
)
.extend(
{
cv.Optional(CONF_MODE, default="BOX"): cv.enum(number.NUMBER_MODES),
cv.Optional(CONF_MAX_VALUE, default=10): cv.All(
cv.float_, cv.Range(max=50)
),
cv.Optional(CONF_MIN_VALUE, default=-10): cv.All(
cv.float_, cv.Range(min=-50)
),
cv.Optional(CONF_STEP, default=0.1): cv.positive_float,
cv.Optional(CONF_RESTORE_VALUE): cv.boolean,
}
)
.extend(cv.COMPONENT_SCHEMA),
validate_min_max,
)
# Configuration schema for BL0940 numbers
CONFIG_SCHEMA = cv.Schema(
{
cv.GenerateID(): cv.declare_id(BL0940Number),
cv.GenerateID(CONF_BL0940_ID): cv.use_id(BL0940),
cv.Optional(CONF_CURRENT_CALIBRATION): CALIBRATION_SCHEMA,
cv.Optional(CONF_VOLTAGE_CALIBRATION): CALIBRATION_SCHEMA,
cv.Optional(CONF_POWER_CALIBRATION): CALIBRATION_SCHEMA,
cv.Optional(CONF_ENERGY_CALIBRATION): CALIBRATION_SCHEMA,
}
)
async def to_code(config):
# Get the BL0940 component instance
bl0940 = await cg.get_variable(config[CONF_BL0940_ID])
# Process all calibration types
for cal_type, setter_method in [
(CONF_CURRENT_CALIBRATION, "set_current_calibration_number"),
(CONF_VOLTAGE_CALIBRATION, "set_voltage_calibration_number"),
(CONF_POWER_CALIBRATION, "set_power_calibration_number"),
(CONF_ENERGY_CALIBRATION, "set_energy_calibration_number"),
]:
if conf := config.get(cal_type):
var = await number.new_number(
conf,
min_value=conf.get(CONF_MIN_VALUE),
max_value=conf.get(CONF_MAX_VALUE),
step=conf.get(CONF_STEP),
)
await cg.register_component(var, conf)
if restore_value := config.get(CONF_RESTORE_VALUE):
cg.add(var.set_restore_value(restore_value))
cg.add(getattr(bl0940, setter_method)(var))

View File

@@ -0,0 +1,29 @@
#include "calibration_number.h"
#include "esphome/core/log.h"
namespace esphome {
namespace bl0940 {
static const char *const TAG = "bl0940.number";
void CalibrationNumber::setup() {
float value = 0.0f;
if (this->restore_value_) {
this->pref_ = global_preferences->make_preference<float>(this->get_object_id_hash());
if (!this->pref_.load(&value)) {
value = 0.0f;
}
}
this->publish_state(value);
}
void CalibrationNumber::control(float value) {
this->publish_state(value);
if (this->restore_value_)
this->pref_.save(&value);
}
void CalibrationNumber::dump_config() { LOG_NUMBER("", "Calibration Number", this); }
} // namespace bl0940
} // namespace esphome

View File

@@ -0,0 +1,26 @@
#pragma once
#include "esphome/components/number/number.h"
#include "esphome/core/component.h"
#include "esphome/core/preferences.h"
namespace esphome {
namespace bl0940 {
class CalibrationNumber : public number::Number, public Component {
public:
void setup() override;
void dump_config() override;
float get_setup_priority() const override { return setup_priority::HARDWARE; }
void set_restore_value(bool restore_value) { this->restore_value_ = restore_value; }
protected:
void control(float value) override;
bool restore_value_{true};
ESPPreferenceObject pref_;
};
} // namespace bl0940
} // namespace esphome

View File

@@ -8,6 +8,7 @@ from esphome.const import (
CONF_ID,
CONF_INTERNAL_TEMPERATURE,
CONF_POWER,
CONF_REFERENCE_VOLTAGE,
CONF_VOLTAGE,
DEVICE_CLASS_CURRENT,
DEVICE_CLASS_ENERGY,
@@ -23,12 +24,133 @@ from esphome.const import (
UNIT_WATT,
)
from . import bl0940_ns
DEPENDENCIES = ["uart"]
bl0940_ns = cg.esphome_ns.namespace("bl0940")
BL0940 = bl0940_ns.class_("BL0940", cg.PollingComponent, uart.UARTDevice)
CONF_LEGACY_MODE = "legacy_mode"
CONF_READ_COMMAND = "read_command"
CONF_WRITE_COMMAND = "write_command"
CONF_RESISTOR_SHUNT = "resistor_shunt"
CONF_RESISTOR_ONE = "resistor_one"
CONF_RESISTOR_TWO = "resistor_two"
CONF_CURRENT_REFERENCE = "current_reference"
CONF_ENERGY_REFERENCE = "energy_reference"
CONF_POWER_REFERENCE = "power_reference"
CONF_VOLTAGE_REFERENCE = "voltage_reference"
DEFAULT_BL0940_READ_COMMAND = 0x58
DEFAULT_BL0940_WRITE_COMMAND = 0xA1
# Values according to BL0940 application note:
# https://www.belling.com.cn/media/file_object/bel_product/BL0940/guide/BL0940_APPNote_TSSOP14_V1.04_EN.pdf
DEFAULT_BL0940_VREF = 1.218 # Vref = 1.218
DEFAULT_BL0940_RL = 1 # RL = 1 mΩ
DEFAULT_BL0940_R1 = 0.51 # R1 = 0.51 kΩ
DEFAULT_BL0940_R2 = 1950 # R2 = 5 x 390 kΩ -> 1950 kΩ
# ----------------------------------------------------
# values from initial implementation
DEFAULT_BL0940_LEGACY_READ_COMMAND = 0x50
DEFAULT_BL0940_LEGACY_WRITE_COMMAND = 0xA0
DEFAULT_BL0940_LEGACY_UREF = 33000
DEFAULT_BL0940_LEGACY_IREF = 275000
DEFAULT_BL0940_LEGACY_PREF = 1430
# Measured to 297J per click according to power consumption of 5 minutes
# Converted to kWh (3.6MJ per kwH). Used to be 256 * 1638.4
DEFAULT_BL0940_LEGACY_EREF = 3.6e6 / 297
# ----------------------------------------------------
# methods to calculate voltage and current reference values
def calculate_voltage_reference(vref, r_one, r_two):
# formula: 79931 / Vref * (R1 * 1000) / (R1 + R2)
return 79931 / vref * (r_one * 1000) / (r_one + r_two)
def calculate_current_reference(vref, r_shunt):
# formula: 324004 * RL / Vref
return 324004 * r_shunt / vref
def calculate_power_reference(voltage_reference, current_reference):
# calculate power reference based on voltage and current reference
return voltage_reference * current_reference * 4046 / 324004 / 79931
def calculate_energy_reference(power_reference):
# formula: power_reference * 3600000 / (1638.4 * 256)
return power_reference * 3600000 / (1638.4 * 256)
def validate_legacy_mode(config):
# Only allow schematic calibration options if legacy_mode is False
if config.get(CONF_LEGACY_MODE, True):
forbidden = [
CONF_REFERENCE_VOLTAGE,
CONF_RESISTOR_SHUNT,
CONF_RESISTOR_ONE,
CONF_RESISTOR_TWO,
]
for key in forbidden:
if key in config:
raise cv.Invalid(
f"Option '{key}' is only allowed when legacy_mode: false"
)
return config
def set_command_defaults(config):
# Set defaults for read_command and write_command based on legacy_mode
legacy = config.get(CONF_LEGACY_MODE, True)
if legacy:
config.setdefault(CONF_READ_COMMAND, DEFAULT_BL0940_LEGACY_READ_COMMAND)
config.setdefault(CONF_WRITE_COMMAND, DEFAULT_BL0940_LEGACY_WRITE_COMMAND)
else:
config.setdefault(CONF_READ_COMMAND, DEFAULT_BL0940_READ_COMMAND)
config.setdefault(CONF_WRITE_COMMAND, DEFAULT_BL0940_WRITE_COMMAND)
return config
def set_reference_values(config):
# Set default reference values based on legacy_mode
if config.get(CONF_LEGACY_MODE, True):
config.setdefault(CONF_VOLTAGE_REFERENCE, DEFAULT_BL0940_LEGACY_UREF)
config.setdefault(CONF_CURRENT_REFERENCE, DEFAULT_BL0940_LEGACY_IREF)
config.setdefault(CONF_POWER_REFERENCE, DEFAULT_BL0940_LEGACY_PREF)
config.setdefault(CONF_ENERGY_REFERENCE, DEFAULT_BL0940_LEGACY_PREF)
else:
vref = config.get(CONF_VOLTAGE_REFERENCE, DEFAULT_BL0940_VREF)
r_one = config.get(CONF_RESISTOR_ONE, DEFAULT_BL0940_R1)
r_two = config.get(CONF_RESISTOR_TWO, DEFAULT_BL0940_R2)
r_shunt = config.get(CONF_RESISTOR_SHUNT, DEFAULT_BL0940_RL)
config.setdefault(
CONF_VOLTAGE_REFERENCE, calculate_voltage_reference(vref, r_one, r_two)
)
config.setdefault(
CONF_CURRENT_REFERENCE, calculate_current_reference(vref, r_shunt)
)
config.setdefault(
CONF_POWER_REFERENCE,
calculate_power_reference(
config.get(CONF_VOLTAGE_REFERENCE), config.get(CONF_CURRENT_REFERENCE)
),
)
config.setdefault(
CONF_ENERGY_REFERENCE,
calculate_energy_reference(config.get(CONF_POWER_REFERENCE)),
)
return config
CONFIG_SCHEMA = (
cv.Schema(
{
@@ -69,10 +191,24 @@ CONFIG_SCHEMA = (
device_class=DEVICE_CLASS_TEMPERATURE,
state_class=STATE_CLASS_MEASUREMENT,
),
cv.Optional(CONF_LEGACY_MODE, default=True): cv.boolean,
cv.Optional(CONF_READ_COMMAND): cv.hex_uint8_t,
cv.Optional(CONF_WRITE_COMMAND): cv.hex_uint8_t,
cv.Optional(CONF_REFERENCE_VOLTAGE): cv.float_,
cv.Optional(CONF_RESISTOR_SHUNT): cv.float_,
cv.Optional(CONF_RESISTOR_ONE): cv.float_,
cv.Optional(CONF_RESISTOR_TWO): cv.float_,
cv.Optional(CONF_CURRENT_REFERENCE): cv.float_,
cv.Optional(CONF_ENERGY_REFERENCE): cv.float_,
cv.Optional(CONF_POWER_REFERENCE): cv.float_,
cv.Optional(CONF_VOLTAGE_REFERENCE): cv.float_,
}
)
.extend(cv.polling_component_schema("60s"))
.extend(uart.UART_DEVICE_SCHEMA)
.add_extra(validate_legacy_mode)
.add_extra(set_command_defaults)
.add_extra(set_reference_values)
)
@@ -99,3 +235,16 @@ async def to_code(config):
if external_temperature_config := config.get(CONF_EXTERNAL_TEMPERATURE):
sens = await sensor.new_sensor(external_temperature_config)
cg.add(var.set_external_temperature_sensor(sens))
# enable legacy mode
cg.add(var.set_legacy_mode(config.get(CONF_LEGACY_MODE)))
# Set bl0940 commands after validator has determined which defaults to use if not set
cg.add(var.set_read_command(config.get(CONF_READ_COMMAND)))
cg.add(var.set_write_command(config.get(CONF_WRITE_COMMAND)))
# Set reference values after validator has set the values either from defaults or calculated
cg.add(var.set_current_reference(config.get(CONF_CURRENT_REFERENCE)))
cg.add(var.set_voltage_reference(config.get(CONF_VOLTAGE_REFERENCE)))
cg.add(var.set_power_reference(config.get(CONF_POWER_REFERENCE)))
cg.add(var.set_energy_reference(config.get(CONF_ENERGY_REFERENCE)))

View File

@@ -7,103 +7,83 @@ namespace esphome {
namespace captive_portal {
const uint8_t INDEX_GZ[] PROGMEM = {
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xdd, 0x58, 0x6d, 0x6f, 0xdb, 0x38, 0x12, 0xfe, 0xde,
0x5f, 0x31, 0xa7, 0x36, 0x6b, 0x6b, 0x1b, 0x51, 0x22, 0xe5, 0xb7, 0xd8, 0x92, 0x16, 0x69, 0xae, 0x8b, 0x5d, 0xa0,
0xdd, 0x2d, 0x90, 0x6c, 0xef, 0x43, 0x51, 0x20, 0xb4, 0x34, 0xb2, 0xd8, 0x48, 0xa4, 0x4e, 0xa4, 0x5f, 0x52, 0xc3,
0xf7, 0xdb, 0x0f, 0x94, 0x6c, 0xc7, 0xe9, 0x35, 0x87, 0xeb, 0xe2, 0x0e, 0x87, 0xdd, 0x18, 0x21, 0x86, 0xe4, 0xcc,
0x70, 0xe6, 0xf1, 0x0c, 0x67, 0xcc, 0xe8, 0x2f, 0x99, 0x4a, 0xcd, 0x7d, 0x8d, 0x50, 0x98, 0xaa, 0x4c, 0x22, 0x3b,
0x42, 0xc9, 0xe5, 0x22, 0x46, 0x99, 0x44, 0x05, 0xf2, 0x2c, 0x89, 0x2a, 0x34, 0x1c, 0xd2, 0x82, 0x37, 0x1a, 0x4d,
0xfc, 0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x07, 0xb5, 0x81, 0x9b, 0x22,
0xa7, 0x18, 0x06, 0x7a, 0xcd, 0x05, 0x8c, 0x61, 0x8c, 0x82, 0x25, 0x3a, 0x79, 0x75, 0xb2, 0xf6, 0xc4, 0xaf, 0x68,
0xfc, 0xda, 0xd1, 0xf8, 0xe9, 0xa3, 0xe1, 0xa6, 0xfb, 0x1f, 0x53, 0x58, 0x46, 0xb2, 0xf9, 0x0a, 0x00, 0x00};
} // namespace captive_portal
} // namespace esphome

View File

@@ -152,7 +152,7 @@ void CCS811Component::send_env_data_() {
void CCS811Component::dump_config() {
ESP_LOGCONFIG(TAG, "CCS811");
LOG_I2C_DEVICE(this)
LOG_UPDATE_INTERVAL(this)
LOG_UPDATE_INTERVAL(this);
LOG_SENSOR(" ", "CO2 Sensor", this->co2_);
LOG_SENSOR(" ", "TVOC Sensor", this->tvoc_);
LOG_TEXT_SENSOR(" ", "Firmware Version Sensor", this->version_)

View File

@@ -52,7 +52,7 @@ void DebugComponent::on_shutdown() {
char buffer[REBOOT_MAX_LEN]{};
auto pref = global_preferences->make_preference(REBOOT_MAX_LEN, fnv1_hash(REBOOT_KEY + App.get_name()));
if (component != nullptr) {
strncpy(buffer, component->get_component_source(), REBOOT_MAX_LEN - 1);
strncpy(buffer, LOG_STR_ARG(component->get_component_log_str()), REBOOT_MAX_LEN - 1);
buffer[REBOOT_MAX_LEN - 1] = '\0';
}
ESP_LOGD(TAG, "Storing reboot source: %s", buffer);

View File

@@ -54,13 +54,13 @@ struct ISRPinArg {
ISRInternalGPIOPin ESP32InternalGPIOPin::to_isr() const {
auto *arg = new ISRPinArg{}; // NOLINT(cppcoreguidelines-owning-memory)
arg->pin = this->pin_;
arg->pin = this->get_pin_num();
arg->flags = gpio::FLAG_NONE;
arg->inverted = inverted_;
arg->inverted = this->pin_flags_.inverted;
#if defined(USE_ESP32_VARIANT_ESP32)
arg->use_rtc = rtc_gpio_is_valid_gpio(this->pin_);
arg->use_rtc = rtc_gpio_is_valid_gpio(this->get_pin_num());
if (arg->use_rtc)
arg->rtc_pin = rtc_io_number_get(this->pin_);
arg->rtc_pin = rtc_io_number_get(this->get_pin_num());
#endif
return ISRInternalGPIOPin((void *) arg);
}
@@ -69,23 +69,23 @@ void ESP32InternalGPIOPin::attach_interrupt(void (*func)(void *), void *arg, gpi
gpio_int_type_t idf_type = GPIO_INTR_ANYEDGE;
switch (type) {
case gpio::INTERRUPT_RISING_EDGE:
idf_type = inverted_ ? GPIO_INTR_NEGEDGE : GPIO_INTR_POSEDGE;
idf_type = this->pin_flags_.inverted ? GPIO_INTR_NEGEDGE : GPIO_INTR_POSEDGE;
break;
case gpio::INTERRUPT_FALLING_EDGE:
idf_type = inverted_ ? GPIO_INTR_POSEDGE : GPIO_INTR_NEGEDGE;
idf_type = this->pin_flags_.inverted ? GPIO_INTR_POSEDGE : GPIO_INTR_NEGEDGE;
break;
case gpio::INTERRUPT_ANY_EDGE:
idf_type = GPIO_INTR_ANYEDGE;
break;
case gpio::INTERRUPT_LOW_LEVEL:
idf_type = inverted_ ? GPIO_INTR_HIGH_LEVEL : GPIO_INTR_LOW_LEVEL;
idf_type = this->pin_flags_.inverted ? GPIO_INTR_HIGH_LEVEL : GPIO_INTR_LOW_LEVEL;
break;
case gpio::INTERRUPT_HIGH_LEVEL:
idf_type = inverted_ ? GPIO_INTR_LOW_LEVEL : GPIO_INTR_HIGH_LEVEL;
idf_type = this->pin_flags_.inverted ? GPIO_INTR_LOW_LEVEL : GPIO_INTR_HIGH_LEVEL;
break;
}
gpio_set_intr_type(pin_, idf_type);
gpio_intr_enable(pin_);
gpio_set_intr_type(this->get_pin_num(), idf_type);
gpio_intr_enable(this->get_pin_num());
if (!isr_service_installed) {
auto res = gpio_install_isr_service(ESP_INTR_FLAG_LEVEL3);
if (res != ESP_OK) {
@@ -94,31 +94,31 @@ void ESP32InternalGPIOPin::attach_interrupt(void (*func)(void *), void *arg, gpi
}
isr_service_installed = true;
}
gpio_isr_handler_add(pin_, func, arg);
gpio_isr_handler_add(this->get_pin_num(), func, arg);
}
std::string ESP32InternalGPIOPin::dump_summary() const {
char buffer[32];
snprintf(buffer, sizeof(buffer), "GPIO%" PRIu32, static_cast<uint32_t>(pin_));
snprintf(buffer, sizeof(buffer), "GPIO%" PRIu32, static_cast<uint32_t>(this->pin_));
return buffer;
}
void ESP32InternalGPIOPin::setup() {
gpio_config_t conf{};
conf.pin_bit_mask = 1ULL << static_cast<uint32_t>(pin_);
conf.mode = flags_to_mode(flags_);
conf.pull_up_en = flags_ & gpio::FLAG_PULLUP ? GPIO_PULLUP_ENABLE : GPIO_PULLUP_DISABLE;
conf.pull_down_en = flags_ & gpio::FLAG_PULLDOWN ? GPIO_PULLDOWN_ENABLE : GPIO_PULLDOWN_DISABLE;
conf.pin_bit_mask = 1ULL << static_cast<uint32_t>(this->pin_);
conf.mode = flags_to_mode(this->flags_);
conf.pull_up_en = this->flags_ & gpio::FLAG_PULLUP ? GPIO_PULLUP_ENABLE : GPIO_PULLUP_DISABLE;
conf.pull_down_en = this->flags_ & gpio::FLAG_PULLDOWN ? GPIO_PULLDOWN_ENABLE : GPIO_PULLDOWN_DISABLE;
conf.intr_type = GPIO_INTR_DISABLE;
gpio_config(&conf);
if (flags_ & gpio::FLAG_OUTPUT) {
gpio_set_drive_capability(pin_, drive_strength_);
if (this->flags_ & gpio::FLAG_OUTPUT) {
gpio_set_drive_capability(this->get_pin_num(), this->get_drive_strength());
}
}
void ESP32InternalGPIOPin::pin_mode(gpio::Flags flags) {
// can't call gpio_config here because that logs in esp-idf which may cause issues
gpio_set_direction(pin_, flags_to_mode(flags));
gpio_set_direction(this->get_pin_num(), flags_to_mode(flags));
gpio_pull_mode_t pull_mode = GPIO_FLOATING;
if ((flags & gpio::FLAG_PULLUP) && (flags & gpio::FLAG_PULLDOWN)) {
pull_mode = GPIO_PULLUP_PULLDOWN;
@@ -127,12 +127,16 @@ void ESP32InternalGPIOPin::pin_mode(gpio::Flags flags) {
} else if (flags & gpio::FLAG_PULLDOWN) {
pull_mode = GPIO_PULLDOWN_ONLY;
}
gpio_set_pull_mode(pin_, pull_mode);
gpio_set_pull_mode(this->get_pin_num(), pull_mode);
}
bool ESP32InternalGPIOPin::digital_read() { return bool(gpio_get_level(pin_)) != inverted_; }
void ESP32InternalGPIOPin::digital_write(bool value) { gpio_set_level(pin_, value != inverted_ ? 1 : 0); }
void ESP32InternalGPIOPin::detach_interrupt() const { gpio_intr_disable(pin_); }
bool ESP32InternalGPIOPin::digital_read() {
return bool(gpio_get_level(this->get_pin_num())) != this->pin_flags_.inverted;
}
void ESP32InternalGPIOPin::digital_write(bool value) {
gpio_set_level(this->get_pin_num(), value != this->pin_flags_.inverted ? 1 : 0);
}
void ESP32InternalGPIOPin::detach_interrupt() const { gpio_intr_disable(this->get_pin_num()); }
} // namespace esp32

View File

@@ -7,12 +7,18 @@
namespace esphome {
namespace esp32 {
// Static assertions to ensure our bit-packed fields can hold the enum values
static_assert(GPIO_NUM_MAX <= 256, "gpio_num_t has too many values for uint8_t");
static_assert(GPIO_DRIVE_CAP_MAX <= 4, "gpio_drive_cap_t has too many values for 2-bit field");
class ESP32InternalGPIOPin : public InternalGPIOPin {
public:
void set_pin(gpio_num_t pin) { pin_ = pin; }
void set_inverted(bool inverted) { inverted_ = inverted; }
void set_drive_strength(gpio_drive_cap_t drive_strength) { drive_strength_ = drive_strength; }
void set_flags(gpio::Flags flags) { flags_ = flags; }
void set_pin(gpio_num_t pin) { this->pin_ = static_cast<uint8_t>(pin); }
void set_inverted(bool inverted) { this->pin_flags_.inverted = inverted; }
void set_drive_strength(gpio_drive_cap_t drive_strength) {
this->pin_flags_.drive_strength = static_cast<uint8_t>(drive_strength);
}
void set_flags(gpio::Flags flags) { this->flags_ = flags; }
void setup() override;
void pin_mode(gpio::Flags flags) override;
@@ -21,17 +27,26 @@ class ESP32InternalGPIOPin : public InternalGPIOPin {
std::string dump_summary() const override;
void detach_interrupt() const override;
ISRInternalGPIOPin to_isr() const override;
uint8_t get_pin() const override { return (uint8_t) pin_; }
gpio::Flags get_flags() const override { return flags_; }
bool is_inverted() const override { return inverted_; }
uint8_t get_pin() const override { return this->pin_; }
gpio::Flags get_flags() const override { return this->flags_; }
bool is_inverted() const override { return this->pin_flags_.inverted; }
gpio_num_t get_pin_num() const { return static_cast<gpio_num_t>(this->pin_); }
gpio_drive_cap_t get_drive_strength() const { return static_cast<gpio_drive_cap_t>(this->pin_flags_.drive_strength); }
protected:
void attach_interrupt(void (*func)(void *), void *arg, gpio::InterruptType type) const override;
gpio_num_t pin_;
gpio_drive_cap_t drive_strength_;
gpio::Flags flags_;
bool inverted_;
// Memory layout: 8 bytes total on 32-bit systems
// - 3 bytes for members below
// - 1 byte padding for alignment
// - 4 bytes for vtable pointer
uint8_t pin_; // GPIO pin number (0-255, actual max ~54 on ESP32)
gpio::Flags flags_; // GPIO flags (1 byte)
struct PinFlags {
uint8_t inverted : 1; // Invert pin logic (1 bit)
uint8_t drive_strength : 2; // Drive strength 0-3 (2 bits)
uint8_t reserved : 5; // Reserved for future use (5 bits)
} pin_flags_; // Total: 1 byte
// NOLINTNEXTLINE(cppcoreguidelines-avoid-non-const-global-variables)
static bool isr_service_installed;
};

View File

@@ -43,13 +43,6 @@ void BLEClientBase::setup() {
void BLEClientBase::set_state(espbt::ClientState st) {
ESP_LOGV(TAG, "[%d] [%s] Set state %d", this->connection_index_, this->address_str_.c_str(), (int) st);
ESPBTClient::set_state(st);
if (st == espbt::ClientState::READY_TO_CONNECT) {
// Enable loop for state processing
this->enable_loop();
// Connect immediately instead of waiting for next loop
this->connect();
}
}
void BLEClientBase::loop() {
@@ -65,8 +58,8 @@ void BLEClientBase::loop() {
}
this->set_state(espbt::ClientState::IDLE);
}
// If its idle, we can disable the loop as set_state
// will enable it again when we need to connect.
// If idle, we can disable the loop as connect()
// will enable it again when a connection is needed.
else if (this->state_ == espbt::ClientState::IDLE) {
this->disable_loop();
}
@@ -108,9 +101,20 @@ bool BLEClientBase::parse_device(const espbt::ESPBTDevice &device) {
#endif
void BLEClientBase::connect() {
// Prevent duplicate connection attempts
if (this->state_ == espbt::ClientState::CONNECTING || this->state_ == espbt::ClientState::CONNECTED ||
this->state_ == espbt::ClientState::ESTABLISHED) {
ESP_LOGW(TAG, "[%d] [%s] Connection already in progress, state=%s", this->connection_index_,
this->address_str_.c_str(), espbt::client_state_to_string(this->state_));
return;
}
ESP_LOGI(TAG, "[%d] [%s] 0x%02x Connecting", this->connection_index_, this->address_str_.c_str(),
this->remote_addr_type_);
this->paired_ = false;
// Enable loop for state processing
this->enable_loop();
// Immediately transition to CONNECTING to prevent duplicate connection attempts
this->set_state(espbt::ClientState::CONNECTING);
// Determine connection parameters based on connection type
if (this->connection_type_ == espbt::ConnectionType::V3_WITHOUT_CACHE) {
@@ -168,7 +172,7 @@ void BLEClientBase::unconditional_disconnect() {
this->log_gattc_warning_("esp_ble_gattc_close", err);
}
if (this->state_ == espbt::ClientState::READY_TO_CONNECT || this->state_ == espbt::ClientState::DISCOVERED) {
if (this->state_ == espbt::ClientState::DISCOVERED) {
this->set_address(0);
this->set_state(espbt::ClientState::IDLE);
} else {
@@ -212,8 +216,6 @@ void BLEClientBase::handle_connection_result_(esp_err_t ret) {
if (ret) {
this->log_gattc_warning_("esp_ble_gattc_open", ret);
this->set_state(espbt::ClientState::IDLE);
} else {
this->set_state(espbt::ClientState::CONNECTING);
}
}

View File

@@ -51,8 +51,6 @@ const char *client_state_to_string(ClientState state) {
return "IDLE";
case ClientState::DISCOVERED:
return "DISCOVERED";
case ClientState::READY_TO_CONNECT:
return "READY_TO_CONNECT";
case ClientState::CONNECTING:
return "CONNECTING";
case ClientState::CONNECTED:
@@ -795,7 +793,7 @@ void ESP32BLETracker::try_promote_discovered_clients_() {
#ifdef USE_ESP32_BLE_SOFTWARE_COEXISTENCE
this->update_coex_preference_(true);
#endif
client->set_state(ClientState::READY_TO_CONNECT);
client->connect();
break;
}
}

View File

@@ -159,8 +159,6 @@ enum class ClientState : uint8_t {
IDLE,
// Device advertisement found.
DISCOVERED,
// Device is discovered and the scanner is stopped
READY_TO_CONNECT,
// Connection in progress.
CONNECTING,
// Initial connection established.
@@ -313,7 +311,6 @@ class ESP32BLETracker : public Component,
counts.discovered++;
break;
case ClientState::CONNECTING:
case ClientState::READY_TO_CONNECT:
counts.connecting++;
break;
default:

View File

@@ -2,11 +2,11 @@
#include "esphome/core/defines.h"
#ifdef USE_OTA
#include "esphome/components/ota/ota_backend.h"
#include "esphome/components/socket/socket.h"
#include "esphome/core/helpers.h"
#include "esphome/core/log.h"
#include "esphome/core/preferences.h"
#include "esphome/components/ota/ota_backend.h"
#include "esphome/components/socket/socket.h"
namespace esphome {

View File

@@ -4,6 +4,7 @@
#include <cstdint>
#include <cstring>
#include <limits>
#include <type_traits>
#include "esphome/core/hal.h"
namespace esphome::gpio_expander {
@@ -11,18 +12,27 @@ namespace esphome::gpio_expander {
/// @brief A class to cache the read state of a GPIO expander.
/// This class caches reads between GPIO Pins which are on the same bank.
/// This means that for reading whole Port (ex. 8 pins) component needs only one
/// I2C/SPI read per main loop call. It assumes, that one bit in byte identifies one GPIO pin
/// I2C/SPI read per main loop call. It assumes that one bit in byte identifies one GPIO pin.
///
/// Template parameters:
/// T - Type which represents internal register. Could be uint8_t or uint16_t. Adjust to
/// match size of your internal GPIO bank register.
/// N - Number of pins
template<typename T, T N> class CachedGpioExpander {
/// T - Type which represents internal bank register. Could be uint8_t or uint16_t.
/// Choose based on how your I/O expander reads pins:
/// * uint8_t: For chips that read banks separately (8 pins at a time)
/// Examples: MCP23017 (2x8-bit banks), TCA9555 (2x8-bit banks)
/// * uint16_t: For chips that read all pins at once (up to 16 pins)
/// Examples: PCF8574/8575 (8/16 pins), PCA9554/9555 (8/16 pins)
/// N - Total number of pins (maximum 65535)
/// P - Type for pin number parameters (automatically selected based on N:
/// uint8_t for N<=256, uint16_t for N>256). Can be explicitly specified
/// if needed (e.g., for components like SN74HC165 with >256 pins)
template<typename T, uint16_t N, typename P = typename std::conditional<(N > 256), uint16_t, uint8_t>::type>
class CachedGpioExpander {
public:
/// @brief Read the state of the given pin. This will invalidate the cache for the given pin number.
/// @param pin Pin number to read
/// @return Pin state
bool digital_read(T pin) {
const uint8_t bank = pin / BANK_SIZE;
bool digital_read(P pin) {
const P bank = pin / BANK_SIZE;
const T pin_mask = (1 << (pin % BANK_SIZE));
// Check if specific pin cache is valid
if (this->read_cache_valid_[bank] & pin_mask) {
@@ -38,21 +48,31 @@ template<typename T, T N> class CachedGpioExpander {
return this->digital_read_cache(pin);
}
void digital_write(T pin, bool value) { this->digital_write_hw(pin, value); }
void digital_write(P pin, bool value) { this->digital_write_hw(pin, value); }
protected:
/// @brief Call component low level function to read GPIO state from device
virtual bool digital_read_hw(T pin) = 0;
/// @brief Call component read function from internal cache.
virtual bool digital_read_cache(T pin) = 0;
/// @brief Call component low level function to write GPIO state to device
virtual void digital_write_hw(T pin, bool value) = 0;
/// @brief Read GPIO bank from hardware into internal state
/// @param pin Pin number (used to determine which bank to read)
/// @return true if read succeeded, false on communication error
/// @note This does NOT return the pin state. It returns whether the read operation succeeded.
/// The actual pin state should be returned by digital_read_cache().
virtual bool digital_read_hw(P pin) = 0;
/// @brief Get cached pin value from internal state
/// @param pin Pin number to read
/// @return Pin state (true = HIGH, false = LOW)
virtual bool digital_read_cache(P pin) = 0;
/// @brief Write GPIO state to hardware
/// @param pin Pin number to write
/// @param value Pin state to write (true = HIGH, false = LOW)
virtual void digital_write_hw(P pin, bool value) = 0;
/// @brief Invalidate cache. This function should be called in component loop().
void reset_pin_cache_() { memset(this->read_cache_valid_, 0x00, CACHE_SIZE_BYTES); }
static constexpr uint8_t BITS_PER_BYTE = 8;
static constexpr uint8_t BANK_SIZE = sizeof(T) * BITS_PER_BYTE;
static constexpr uint16_t BITS_PER_BYTE = 8;
static constexpr uint16_t BANK_SIZE = sizeof(T) * BITS_PER_BYTE;
static constexpr size_t BANKS = N / BANK_SIZE;
static constexpr size_t CACHE_SIZE_BYTES = BANKS * sizeof(T);

View File

@@ -57,7 +57,7 @@ void GroveGasMultichannelV2Component::update() {
void GroveGasMultichannelV2Component::dump_config() {
ESP_LOGCONFIG(TAG, "Grove Multichannel Gas Sensor V2");
LOG_I2C_DEVICE(this)
LOG_UPDATE_INTERVAL(this)
LOG_UPDATE_INTERVAL(this);
LOG_SENSOR(" ", "Nitrogen Dioxide", this->nitrogen_dioxide_sensor_);
LOG_SENSOR(" ", "Ethanol", this->ethanol_sensor_);
LOG_SENSOR(" ", "Carbon Monoxide", this->carbon_monoxide_sensor_);

View File

@@ -42,7 +42,7 @@ void HLW8012Component::dump_config() {
" Current resistor: %.1f mΩ\n"
" Voltage Divider: %.1f",
this->change_mode_every_, this->current_resistor_ * 1000.0f, this->voltage_divider_);
LOG_UPDATE_INTERVAL(this)
LOG_UPDATE_INTERVAL(this);
LOG_SENSOR(" ", "Voltage", this->voltage_sensor_);
LOG_SENSOR(" ", "Current", this->current_sensor_);
LOG_SENSOR(" ", "Power", this->power_sensor_);

View File

@@ -107,7 +107,7 @@ void IDFI2CBus::dump_config() {
if (s.second) {
ESP_LOGCONFIG(TAG, "Found device at address 0x%02X", s.first);
} else {
ESP_LOGE(TAG, "Unknown error at address 0x%02X", s.first);
ESP_LOGCONFIG(TAG, "Unknown error at address 0x%02X", s.first);
}
}
}

View File

@@ -4,6 +4,9 @@ from esphome.components.esp32 import add_idf_sdkconfig_option, get_esp32_variant
from esphome.components.esp32.const import (
VARIANT_ESP32,
VARIANT_ESP32C3,
VARIANT_ESP32C5,
VARIANT_ESP32C6,
VARIANT_ESP32H2,
VARIANT_ESP32P4,
VARIANT_ESP32S2,
VARIANT_ESP32S3,
@@ -62,12 +65,15 @@ I2S_ROLE_OPTIONS = {
CONF_SECONDARY: i2s_role_t.I2S_ROLE_SLAVE, # NOLINT
}
# https://github.com/espressif/esp-idf/blob/master/components/soc/{variant}/include/soc/soc_caps.h
# https://github.com/espressif/esp-idf/blob/master/components/soc/{variant}/include/soc/soc_caps.h (SOC_I2S_NUM)
I2S_PORTS = {
VARIANT_ESP32: 2,
VARIANT_ESP32S2: 1,
VARIANT_ESP32S3: 2,
VARIANT_ESP32C3: 1,
VARIANT_ESP32C5: 1,
VARIANT_ESP32C6: 1,
VARIANT_ESP32H2: 1,
VARIANT_ESP32P4: 3,
}

View File

@@ -0,0 +1 @@
CODEOWNERS = ["@jesserockz", "@JosipKuci"]

View File

@@ -0,0 +1,105 @@
WAVEFORMS = {
"inkplate_6": (
(0, 1, 1, 0, 0, 1, 1, 0, 0),
(0, 1, 2, 1, 1, 2, 1, 0, 0),
(1, 1, 1, 2, 2, 1, 0, 0, 0),
(0, 0, 0, 1, 1, 1, 2, 0, 0),
(2, 1, 1, 1, 2, 1, 2, 0, 0),
(2, 2, 1, 1, 2, 1, 2, 0, 0),
(1, 1, 1, 2, 1, 2, 2, 0, 0),
(0, 0, 0, 0, 0, 0, 2, 0, 0),
),
"inkplate_10": (
(0, 0, 0, 0, 0, 0, 0, 1, 0),
(0, 0, 0, 2, 2, 2, 1, 1, 0),
(0, 0, 2, 1, 1, 2, 2, 1, 0),
(0, 1, 2, 2, 1, 2, 2, 1, 0),
(0, 0, 2, 1, 2, 2, 2, 1, 0),
(0, 2, 2, 2, 2, 2, 2, 1, 0),
(0, 0, 0, 0, 0, 2, 1, 2, 0),
(0, 0, 0, 2, 2, 2, 2, 2, 0),
),
"inkplate_6_plus": (
(0, 0, 0, 0, 0, 2, 1, 1, 0),
(0, 0, 2, 1, 1, 1, 2, 1, 0),
(0, 2, 2, 2, 1, 1, 2, 1, 0),
(0, 0, 2, 2, 2, 1, 2, 1, 0),
(0, 0, 0, 0, 2, 2, 2, 1, 0),
(0, 0, 2, 1, 2, 1, 1, 2, 0),
(0, 0, 2, 2, 2, 1, 1, 2, 0),
(0, 0, 0, 0, 2, 2, 2, 2, 0),
),
"inkplate_6_v2": (
(1, 0, 1, 0, 1, 1, 1, 0, 0),
(0, 0, 0, 1, 1, 1, 1, 0, 0),
(1, 1, 1, 1, 0, 2, 1,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0, 3, 3, 2, 2, 1, 1, 2, 0),
(0, 2, 1, 2, 1, 2, 1, 2, 0),
(0, 3, 3, 3, 2, 2, 2, 2, 0),
),
(
(0, 0, 0, 0, 0, 0, 0, 1, 0),
(0, 0, 0, 2, 2, 2, 1, 1, 0),
(0, 0, 2, 1, 1, 2, 2, 1, 0),
(1, 1, 2, 2, 1, 2, 2, 1, 0),
(0, 0, 2, 1, 2, 2, 2, 1, 0),
(0, 1, 2, 2, 2, 2, 2, 1, 0),
(0, 0, 0, 2, 2, 2, 1, 2, 0),
(0, 0, 0, 2, 2, 2, 2, 2, 0),
),
(
(0, 0, 0, 0, 0, 0, 0, 1, 0),
(0, 0, 0, 2, 2, 2, 1, 1, 0),
(2, 2, 2, 1, 0, 2, 1, 0, 0),
(2, 1, 1, 2, 1, 1, 1, 2, 0),
(2, 2, 2, 1, 1, 1, 0, 2, 0),
(2, 2, 2, 1, 1, 2, 1, 2, 0),
(0, 0, 0, 0, 2, 1, 2, 2, 0),
(0, 0, 0, 0, 2, 2, 2, 2, 0),
),
)

View File

@@ -0,0 +1,238 @@
from esphome import pins
import esphome.codegen as cg
from esphome.components import display, i2c
from esphome.components.esp32 import CONF_CPU_FREQUENCY
import esphome.config_validation as cv
from esphome.const import (
CONF_FULL_UPDATE_EVERY,
CONF_ID,
CONF_LAMBDA,
CONF_MIRROR_X,
CONF_MIRROR_Y,
CONF_MODEL,
CONF_OE_PIN,
CONF_PAGES,
CONF_TRANSFORM,
CONF_WAKEUP_PIN,
PLATFORM_ESP32,
)
import esphome.final_validate as fv
from .const import INKPLATE_10_CUSTOM_WAVEFORMS, WAVEFORMS
DEPENDENCIES = ["i2c", "esp32"]
AUTO_LOAD = ["psram"]
CONF_DISPLAY_DATA_0_PIN = "display_data_0_pin"
CONF_DISPLAY_DATA_1_PIN = "display_data_1_pin"
CONF_DISPLAY_DATA_2_PIN = "display_data_2_pin"
CONF_DISPLAY_DATA_3_PIN = "display_data_3_pin"
CONF_DISPLAY_DATA_4_PIN = "display_data_4_pin"
CONF_DISPLAY_DATA_5_PIN = "display_data_5_pin"
CONF_DISPLAY_DATA_6_PIN = "display_data_6_pin"
CONF_DISPLAY_DATA_7_PIN = "display_data_7_pin"
CONF_CL_PIN = "cl_pin"
CONF_CKV_PIN = "ckv_pin"
CONF_GREYSCALE = "greyscale"
CONF_GMOD_PIN = "gmod_pin"
CONF_GPIO0_ENABLE_PIN = "gpio0_enable_pin"
CONF_LE_PIN = "le_pin"
CONF_PARTIAL_UPDATING = "partial_updating"
CONF_POWERUP_PIN = "powerup_pin"
CONF_SPH_PIN = "sph_pin"
CONF_SPV_PIN = "spv_pin"
CONF_VCOM_PIN = "vcom_pin"
inkplate_ns = cg.esphome_ns.namespace("inkplate")
Inkplate = inkplate_ns.class_(
"Inkplate",
cg.PollingComponent,
i2c.I2CDevice,
display.Display,
display.DisplayBuffer,
)
InkplateModel = inkplate_ns.enum("InkplateModel")
MODELS = {
"inkplate_6": InkplateModel.INKPLATE_6,
"inkplate_10": InkplateModel.INKPLATE_10,
"inkplate_6_plus": InkplateModel.INKPLATE_6_PLUS,
"inkplate_6_v2": InkplateModel.INKPLATE_6_V2,
"inkplate_5": InkplateModel.INKPLATE_5,
"inkplate_5_v2": InkplateModel.INKPLATE_5_V2,
}
CONF_CUSTOM_WAVEFORM = "custom_waveform"
def _validate_custom_waveform(config):
if CONF_CUSTOM_WAVEFORM in config and config[CONF_MODEL] != "inkplate_10":
raise cv.Invalid("Custom waveforms are only supported on the Inkplate 10")
return config
CONFIG_SCHEMA = cv.All(
display.FULL_DISPLAY_SCHEMA.extend(
{
cv.GenerateID(): cv.declare_id(Inkplate),
cv.Optional(CONF_GREYSCALE, default=False): cv.boolean,
cv.Optional(CONF_CUSTOM_WAVEFORM): cv.All(
cv.uint8_t, cv.Range(min=1, max=len(INKPLATE_10_CUSTOM_WAVEFORMS))
),
cv.Optional(CONF_TRANSFORM): cv.Schema(
{
cv.Optional(CONF_MIRROR_X, default=False): cv.boolean,
cv.Optional(CONF_MIRROR_Y, default=False): cv.boolean,
}
),
cv.Optional(CONF_PARTIAL_UPDATING, default=True): cv.boolean,
cv.Optional(CONF_FULL_UPDATE_EVERY, default=10): cv.uint32_t,
cv.Optional(CONF_MODEL, default="inkplate_6"): cv.enum(
MODELS, lower=True, space="_"
),
# Control pins
cv.Required(CONF_CKV_PIN): pins.gpio_output_pin_schema,
cv.Required(CONF_GMOD_PIN): pins.gpio_output_pin_schema,
cv.Required(CONF_GPIO0_ENABLE_PIN): pins.gpio_output_pin_schema,
cv.Required(CONF_OE_PIN): pins.gpio_output_pin_schema,
cv.Required(CONF_POWERUP_PIN): pins.gpio_output_pin_schema,
cv.Required(CONF_SPH_PIN): pins.gpio_output_pin_schema,
cv.Required(CONF_SPV_PIN): pins.gpio_output_pin_schema,
cv.Required(CONF_VCOM_PIN): pins.gpio_output_pin_schema,
cv.Required(CONF_WAKEUP_PIN): pins.gpio_output_pin_schema,
cv.Optional(CONF_CL_PIN, default=0): pins.internal_gpio_output_pin_schema,
cv.Optional(CONF_LE_PIN, default=2): pins.internal_gpio_output_pin_schema,
# Data pins
cv.Optional(
CONF_DISPLAY_DATA_0_PIN, default=4
): pins.internal_gpio_output_pin_schema,
cv.Optional(
CONF_DISPLAY_DATA_1_PIN, default=5
): pins.internal_gpio_output_pin_schema,
cv.Optional(
CONF_DISPLAY_DATA_2_PIN, default=18
): pins.internal_gpio_output_pin_schema,
cv.Optional(
CONF_DISPLAY_DATA_3_PIN, default=19
): pins.internal_gpio_output_pin_schema,
cv.Optional(
CONF_DISPLAY_DATA_4_PIN, default=23
): pins.internal_gpio_output_pin_schema,
cv.Optional(
CONF_DISPLAY_DATA_5_PIN, default=25
): pins.internal_gpio_output_pin_schema,
cv.Optional(
CONF_DISPLAY_DATA_6_PIN, default=26
): pins.internal_gpio_output_pin_schema,
cv.Optional(
CONF_DISPLAY_DATA_7_PIN, default=27
): pins.internal_gpio_output_pin_schema,
}
)
.extend(cv.polling_component_schema("5s"))
.extend(i2c.i2c_device_schema(0x48)),
cv.has_at_most_one_key(CONF_PAGES, CONF_LAMBDA),
_validate_custom_waveform,
)
def _validate_cpu_frequency(config):
esp32_config = fv.full_config.get()[PLATFORM_ESP32]
if esp32_config[CONF_CPU_FREQUENCY] != "240MHZ":
raise cv.Invalid(
"Inkplate requires 240MHz CPU frequency (set in esp32 component)"
)
return config
FINAL_VALIDATE_SCHEMA = _validate_cpu_frequency
async def to_code(config):
var = cg.new_Pvariable(config[CONF_ID])
await display.register_display(var, config)
await i2c.register_i2c_device(var, config)
if CONF_LAMBDA in config:
lambda_ = await cg.process_lambda(
config[CONF_LAMBDA], [(display.DisplayRef, "it")], return_type=cg.void
)
cg.add(var.set_writer(lambda_))
cg.add(var.set_greyscale(config[CONF_GREYSCALE]))
if transform := config.get(CONF_TRANSFORM):
cg.add(var.set_mirror_x(transform[CONF_MIRROR_X]))
cg.add(var.set_mirror_y(transform[CONF_MIRROR_Y]))
cg.add(var.set_partial_updating(config[CONF_PARTIAL_UPDATING]))
cg.add(var.set_full_update_every(config[CONF_FULL_UPDATE_EVERY]))
cg.add(var.set_model(config[CONF_MODEL]))
if custom_waveform := config.get(CONF_CUSTOM_WAVEFORM):
waveform = INKPLATE_10_CUSTOM_WAVEFORMS[custom_waveform - 1]
waveform = [element for tupl in waveform for element in tupl]
cg.add(var.set_waveform(waveform, True))
else:
waveform = WAVEFORMS[config[CONF_MODEL]]
waveform = [element for tupl in waveform for element in tupl]
cg.add(var.set_waveform(waveform, False))
ckv = await cg.gpio_pin_expression(config[CONF_CKV_PIN])
cg.add(var.set_ckv_pin(ckv))
gmod = await cg.gpio_pin_expression(config[CONF_GMOD_PIN])
cg.add(var.set_gmod_pin(gmod))
gpio0_enable = await cg.gpio_pin_expression(config[CONF_GPIO0_ENABLE_PIN])
cg.add(var.set_gpio0_enable_pin(gpio0_enable))
oe = await cg.gpio_pin_expression(config[CONF_OE_PIN])
cg.add(var.set_oe_pin(oe))
powerup = await cg.gpio_pin_expression(config[CONF_POWERUP_PIN])
cg.add(var.set_powerup_pin(powerup))
sph = await cg.gpio_pin_expression(config[CONF_SPH_PIN])
cg.add(var.set_sph_pin(sph))
spv = await cg.gpio_pin_expression(config[CONF_SPV_PIN])
cg.add(var.set_spv_pin(spv))
vcom = await cg.gpio_pin_expression(config[CONF_VCOM_PIN])
cg.add(var.set_vcom_pin(vcom))
wakeup = await cg.gpio_pin_expression(config[CONF_WAKEUP_PIN])
cg.add(var.set_wakeup_pin(wakeup))
cl = await cg.gpio_pin_expression(config[CONF_CL_PIN])
cg.add(var.set_cl_pin(cl))
le = await cg.gpio_pin_expression(config[CONF_LE_PIN])
cg.add(var.set_le_pin(le))
display_data_0 = await cg.gpio_pin_expression(config[CONF_DISPLAY_DATA_0_PIN])
cg.add(var.set_display_data_0_pin(display_data_0))
display_data_1 = await cg.gpio_pin_expression(config[CONF_DISPLAY_DATA_1_PIN])
cg.add(var.set_display_data_1_pin(display_data_1))
display_data_2 = await cg.gpio_pin_expression(config[CONF_DISPLAY_DATA_2_PIN])
cg.add(var.set_display_data_2_pin(display_data_2))
display_data_3 = await cg.gpio_pin_expression(config[CONF_DISPLAY_DATA_3_PIN])
cg.add(var.set_display_data_3_pin(display_data_3))
display_data_4 = await cg.gpio_pin_expression(config[CONF_DISPLAY_DATA_4_PIN])
cg.add(var.set_display_data_4_pin(display_data_4))
display_data_5 = await cg.gpio_pin_expression(config[CONF_DISPLAY_DATA_5_PIN])
cg.add(var.set_display_data_5_pin(display_data_5))
display_data_6 = await cg.gpio_pin_expression(config[CONF_DISPLAY_DATA_6_PIN])
cg.add(var.set_display_data_6_pin(display_data_6))
display_data_7 = await cg.gpio_pin_expression(config[CONF_DISPLAY_DATA_7_PIN])
cg.add(var.set_display_data_7_pin(display_data_7))

View File

@@ -6,11 +6,11 @@
#include <hal/gpio_hal.h>
namespace esphome {
namespace inkplate6 {
namespace inkplate {
static const char *const TAG = "inkplate";
void Inkplate6::setup() {
void Inkplate::setup() {
for (uint32_t i = 0; i < 256; i++) {
this->pin_lut_[i] = ((i & 0b00000011) << 4) | (((i & 0b00001100) >> 2) << 18) | (((i & 0b00010000) >> 4) << 23) |
(((i & 0b11100000) >> 5) << 25);
@@ -56,7 +56,7 @@ void Inkplate6::setup() {
/**
* Allocate buffers. May be called after setup to re-initialise if e.g. greyscale is changed.
*/
void Inkplate6::initialize_() {
void Inkplate::initialize_() {
RAMAllocator<uint8_t> allocator;
RAMAllocator<uint32_t> allocator32;
uint32_t buffer_size = this->get_buffer_length_();
@@ -81,29 +81,25 @@ void Inkplate6::initialize_() {
return;
}
if (this->greyscale_) {
uint8_t glut_size = 9;
this->glut_ = allocator32.allocate(256 * glut_size);
this->glut_ = allocator32.allocate(256 * GLUT_SIZE);
if (this->glut_ == nullptr) {
ESP_LOGE(TAG, "Could not allocate glut!");
this->mark_failed();
return;
}
this->glut2_ = allocator32.allocate(256 * glut_size);
this->glut2_ = allocator32.allocate(256 * GLUT_SIZE);
if (this->glut2_ == nullptr) {
ESP_LOGE(TAG, "Could not allocate glut2!");
this->mark_failed();
return;
}
const auto *const waveform3_bit = waveform3BitAll[this->model_];
for (int i = 0; i < glut_size; i++) {
for (uint8_t i = 0; i < GLUT_SIZE; i++) {
for (uint32_t j = 0; j < 256; j++) {
uint8_t z = (waveform3_bit[j & 0x07][i] << 2) | (waveform3_bit[(j >> 4) & 0x07][i]);
uint8_t z = (this->waveform_[j & 0x07][i] << 2) | (this->waveform_[(j >> 4) & 0x07][i]);
this->glut_[i * 256 + j] = ((z & 0b00000011) << 4) | (((z & 0b00001100) >> 2) << 18) |
(((z & 0b00010000) >> 4) << 23) | (((z & 0b11100000) >> 5) << 25);
z = ((waveform3_bit[j & 0x07][i] << 2) | (waveform3_bit[(j >> 4) & 0x07][i])) << 4;
z = ((this->waveform_[j & 0x07][i] << 2) | (this->waveform_[(j >> 4) & 0x07][i])) << 4;
this->glut2_[i * 256 + j] = ((z & 0b00000011) << 4) | (((z & 0b00001100) >> 2) << 18) |
(((z & 0b00010000) >> 4) << 23) | (((z & 0b11100000) >> 5) << 25);
}
@@ -130,9 +126,9 @@ void Inkplate6::initialize_() {
memset(this->buffer_, 0, buffer_size);
}
float Inkplate6::get_setup_priority() const { return setup_priority::PROCESSOR; }
float Inkplate::get_setup_priority() const { return setup_priority::PROCESSOR; }
size_t Inkplate6::get_buffer_length_() {
size_t Inkplate::get_buffer_length_() {
if (this->greyscale_) {
return size_t(this->get_width_internal()) * size_t(this->get_height_internal()) / 2u;
} else {
@@ -140,7 +136,7 @@ size_t Inkplate6::get_buffer_length_() {
}
}
void Inkplate6::update() {
void Inkplate::update() {
this->do_update_();
if (this->full_update_every_ > 0 && this->partial_updates_ >= this->full_update_every_) {
@@ -150,7 +146,7 @@ void Inkplate6::update() {
this->display();
}
void HOT Inkplate6::draw_absolute_pixel_internal(int x, int y, Color color) {
void HOT Inkplate::draw_absolute_pixel_internal(int x, int y, Color color) {
if (x >= this->get_width_internal() || y >= this->get_height_internal() || x < 0 || y < 0)
return;
@@ -171,18 +167,18 @@ void HOT Inkplate6::draw_absolute_pixel_internal(int x, int y, Color color) {
// uint8_t gs = (uint8_t)(px*7);
uint8_t gs = ((color.red * 2126 / 10000) + (color.green * 7152 / 10000) + (color.blue * 722 / 10000)) >> 5;
this->buffer_[pos] = (pixelMaskGLUT[x_sub] & current) | (x_sub ? gs : gs << 4);
this->buffer_[pos] = (PIXEL_MASK_GLUT[x_sub] & current) | (x_sub ? gs : gs << 4);
} else {
int x1 = x / 8;
int x_sub = x % 8;
uint32_t pos = (x1 + y * (this->get_width_internal() / 8));
uint8_t current = this->partial_buffer_[pos];
this->partial_buffer_[pos] = (~pixelMaskLUT[x_sub] & current) | (color.is_on() ? 0 : pixelMaskLUT[x_sub]);
this->partial_buffer_[pos] = (~PIXEL_MASK_LUT[x_sub] & current) | (color.is_on() ? 0 : PIXEL_MASK_LUT[x_sub]);
}
}
void Inkplate6::dump_config() {
void Inkplate::dump_config() {
LOG_DISPLAY("", "Inkplate", this);
ESP_LOGCONFIG(TAG,
" Greyscale: %s\n"
@@ -214,7 +210,7 @@ void Inkplate6::dump_config() {
LOG_UPDATE_INTERVAL(this);
}
void Inkplate6::eink_off_() {
void Inkplate::eink_off_() {
ESP_LOGV(TAG, "Eink off called");
if (!panel_on_)
return;
@@ -242,7 +238,7 @@ void Inkplate6::eink_off_() {
pins_z_state_();
}
void Inkplate6::eink_on_() {
void Inkplate::eink_on_() {
ESP_LOGV(TAG, "Eink on called");
if (panel_on_)
return;
@@ -284,7 +280,7 @@ void Inkplate6::eink_on_() {
this->oe_pin_->digital_write(true);
}
bool Inkplate6::read_power_status_() {
bool Inkplate::read_power_status_() {
uint8_t data;
auto err = this->read_register(0x0F, &data, 1);
if (err == i2c::ERROR_OK) {
@@ -293,7 +289,7 @@ bool Inkplate6::read_power_status_() {
return false;
}
void Inkplate6::fill(Color color) {
void Inkplate::fill(Color color) {
ESP_LOGV(TAG, "Fill called");
uint32_t start_time = millis();
@@ -308,7 +304,7 @@ void Inkplate6::fill(Color color) {
ESP_LOGV(TAG, "Fill finished (%ums)", millis() - start_time);
}
void Inkplate6::display() {
void Inkplate::display() {
ESP_LOGV(TAG, "Display called");
uint32_t start_time = millis();
@@ -324,7 +320,7 @@ void Inkplate6::display() {
ESP_LOGV(TAG, "Display finished (full) (%ums)", millis() - start_time);
}
void Inkplate6::display1b_() {
void Inkplate::display1b_() {
ESP_LOGV(TAG, "Display1b called");
uint32_t start_time = millis();
@@ -334,32 +330,71 @@ void Inkplate6::display1b_() {
uint8_t buffer_value;
const uint8_t *buffer_ptr;
eink_on_();
if (this->model_ == INKPLATE_6_PLUS) {
clean_fast_(0, 1);
clean_fast_(1, 15);
clean_fast_(2, 1);
clean_fast_(0, 5);
clean_fast_(2, 1);
clean_fast_(1, 15);
} else {
clean_fast_(0, 1);
clean_fast_(1, 21);
clean_fast_(2, 1);
clean_fast_(0, 12);
clean_fast_(2, 1);
clean_fast_(1, 21);
clean_fast_(2, 1);
clean_fast_(0, 12);
clean_fast_(2, 1);
uint8_t rep = 4;
switch (this->model_) {
case INKPLATE_10:
clean_fast_(0, 1);
clean_fast_(1, 10);
clean_fast_(2, 1);
clean_fast_(0, 10);
clean_fast_(2, 1);
clean_fast_(1, 10);
clean_fast_(2, 1);
clean_fast_(0, 10);
rep = 5;
break;
case INKPLATE_6_PLUS:
clean_fast_(0, 1);
clean_fast_(1, 15);
clean_fast_(2, 1);
clean_fast_(0, 5);
clean_fast_(2, 1);
clean_fast_(1, 15);
break;
case INKPLATE_6:
case INKPLATE_6_V2:
clean_fast_(0, 1);
clean_fast_(1, 18);
clean_fast_(2, 1);
clean_fast_(0, 18);
clean_fast_(2, 1);
clean_fast_(1, 18);
clean_fast_(2, 1);
clean_fast_(0, 18);
clean_fast_(2, 1);
if (this->model_ == INKPLATE_6_V2)
rep = 5;
break;
case INKPLATE_5:
clean_fast_(0, 1);
clean_fast_(1, 14);
clean_fast_(2, 1);
clean_fast_(0, 14);
clean_fast_(2, 1);
clean_fast_(1, 14);
clean_fast_(2, 1);
clean_fast_(0, 14);
clean_fast_(2, 1);
rep = 5;
break;
case INKPLATE_5_V2:
clean_fast_(0, 1);
clean_fast_(1, 11);
clean_fast_(2, 1);
clean_fast_(0, 11);
clean_fast_(2, 1);
clean_fast_(1, 11);
clean_fast_(2, 1);
clean_fast_(0, 11);
rep = 3;
break;
}
uint32_t clock = (1 << this->cl_pin_->get_pin());
uint32_t data_mask = this->get_data_pin_mask_();
ESP_LOGV(TAG, "Display1b start loops (%ums)", millis() - start_time);
int rep = (this->model_ == INKPLATE_6_V2) ? 5 : 4;
for (int k = 0; k < rep; k++) {
for (uint8_t k = 0; k < rep; k++) {
buffer_ptr = &this->buffer_[this->get_buffer_length_() - 1];
vscan_start_();
for (int i = 0, im = this->get_height_internal(); i < im; i++) {
@@ -452,28 +487,75 @@ void Inkplate6::display1b_() {
ESP_LOGV(TAG, "Display1b finished (%ums)", millis() - start_time);
}
void Inkplate6::display3b_() {
void Inkplate::display3b_() {
ESP_LOGV(TAG, "Display3b called");
uint32_t start_time = millis();
eink_on_();
if (this->model_ == INKPLATE_6_PLUS) {
clean_fast_(0, 1);
clean_fast_(1, 15);
clean_fast_(2, 1);
clean_fast_(0, 5);
clean_fast_(2, 1);
clean_fast_(1, 15);
} else {
clean_fast_(0, 1);
clean_fast_(1, 21);
clean_fast_(2, 1);
clean_fast_(0, 12);
clean_fast_(2, 1);
clean_fast_(1, 21);
clean_fast_(2, 1);
clean_fast_(0, 12);
clean_fast_(2, 1);
switch (this->model_) {
case INKPLATE_10:
if (this->custom_waveform_) {
clean_fast_(1, 1);
clean_fast_(0, 7);
clean_fast_(2, 1);
clean_fast_(1, 12);
clean_fast_(2, 1);
clean_fast_(0, 7);
clean_fast_(2, 1);
clean_fast_(1, 12);
} else {
clean_fast_(1, 1);
clean_fast_(0, 10);
clean_fast_(2, 1);
clean_fast_(1, 10);
clean_fast_(2, 1);
clean_fast_(0, 10);
clean_fast_(2, 1);
clean_fast_(1, 10);
}
break;
case INKPLATE_6_PLUS:
clean_fast_(0, 1);
clean_fast_(1, 15);
clean_fast_(2, 1);
clean_fast_(0, 5);
clean_fast_(2, 1);
clean_fast_(1, 15);
break;
case INKPLATE_6:
case INKPLATE_6_V2:
clean_fast_(0, 1);
clean_fast_(1, 18);
clean_fast_(2, 1);
clean_fast_(0, 18);
clean_fast_(2, 1);
clean_fast_(1, 18);
clean_fast_(2, 1);
clean_fast_(0, 18);
clean_fast_(2, 1);
break;
case INKPLATE_5:
clean_fast_(0, 1);
clean_fast_(1, 14);
clean_fast_(2, 1);
clean_fast_(0, 14);
clean_fast_(2, 1);
clean_fast_(1, 14);
clean_fast_(2, 1);
clean_fast_(0, 14);
clean_fast_(2, 1);
break;
case INKPLATE_5_V2:
clean_fast_(0, 1);
clean_fast_(1, 11);
clean_fast_(2, 1);
clean_fast_(0, 11);
clean_fast_(2, 1);
clean_fast_(1, 11);
clean_fast_(2, 1);
clean_fast_(0, 11);
break;
}
uint32_t clock = (1 << this->cl_pin_->get_pin());
@@ -518,7 +600,7 @@ void Inkplate6::display3b_() {
ESP_LOGV(TAG, "Display3b finished (%ums)", millis() - start_time);
}
bool Inkplate6::partial_update_() {
bool Inkplate::partial_update_() {
ESP_LOGV(TAG, "Partial update called");
uint32_t start_time = millis();
if (this->greyscale_)
@@ -560,7 +642,7 @@ bool Inkplate6::partial_update_() {
GPIO.out_w1ts = this->pin_lut_[data] | clock;
GPIO.out_w1tc = data_mask | clock;
}
// New Inkplate6 panel doesn't need last clock
// New Inkplate panel doesn't need last clock
if (this->model_ != INKPLATE_6_V2) {
GPIO.out_w1ts = clock;
GPIO.out_w1tc = data_mask | clock;
@@ -580,7 +662,7 @@ bool Inkplate6::partial_update_() {
return true;
}
void Inkplate6::vscan_start_() {
void Inkplate::vscan_start_() {
this->ckv_pin_->digital_write(true);
delayMicroseconds(7);
this->spv_pin_->digital_write(false);
@@ -604,7 +686,7 @@ void Inkplate6::vscan_start_() {
this->ckv_pin_->digital_write(true);
}
void Inkplate6::hscan_start_(uint32_t d) {
void Inkplate::hscan_start_(uint32_t d) {
uint8_t clock = (1 << this->cl_pin_->get_pin());
this->sph_pin_->digital_write(false);
GPIO.out_w1ts = d | clock;
@@ -613,14 +695,14 @@ void Inkplate6::hscan_start_(uint32_t d) {
this->ckv_pin_->digital_write(true);
}
void Inkplate6::vscan_end_() {
void Inkplate::vscan_end_() {
this->ckv_pin_->digital_write(false);
this->le_pin_->digital_write(true);
this->le_pin_->digital_write(false);
delayMicroseconds(0);
}
void Inkplate6::clean() {
void Inkplate::clean() {
ESP_LOGV(TAG, "Clean called");
uint32_t start_time = millis();
@@ -634,7 +716,7 @@ void Inkplate6::clean() {
ESP_LOGV(TAG, "Clean finished (%ums)", millis() - start_time);
}
void Inkplate6::clean_fast_(uint8_t c, uint8_t rep) {
void Inkplate::clean_fast_(uint8_t c, uint8_t rep) {
ESP_LOGV(TAG, "Clean fast called with: (%d, %d)", c, rep);
uint32_t start_time = millis();
@@ -666,7 +748,7 @@ void Inkplate6::clean_fast_(uint8_t c, uint8_t rep) {
GPIO.out_w1ts = clock;
GPIO.out_w1tc = clock;
}
// New Inkplate6 panel doesn't need last clock
// New Inkplate panel doesn't need last clock
if (this->model_ != INKPLATE_6_V2) {
GPIO.out_w1ts = send | clock;
GPIO.out_w1tc = clock;
@@ -679,7 +761,7 @@ void Inkplate6::clean_fast_(uint8_t c, uint8_t rep) {
ESP_LOGV(TAG, "Clean fast finished (%ums)", millis() - start_time);
}
void Inkplate6::pins_z_state_() {
void Inkplate::pins_z_state_() {
this->cl_pin_->pin_mode(gpio::FLAG_INPUT);
this->le_pin_->pin_mode(gpio::FLAG_INPUT);
this->ckv_pin_->pin_mode(gpio::FLAG_INPUT);
@@ -699,7 +781,7 @@ void Inkplate6::pins_z_state_() {
this->display_data_7_pin_->pin_mode(gpio::FLAG_INPUT);
}
void Inkplate6::pins_as_outputs_() {
void Inkplate::pins_as_outputs_() {
this->cl_pin_->pin_mode(gpio::FLAG_OUTPUT);
this->le_pin_->pin_mode(gpio::FLAG_OUTPUT);
this->ckv_pin_->pin_mode(gpio::FLAG_OUTPUT);
@@ -719,5 +801,5 @@ void Inkplate6::pins_as_outputs_() {
this->display_data_7_pin_->pin_mode(gpio::FLAG_OUTPUT);
}
} // namespace inkplate6
} // namespace inkplate
} // namespace esphome

View File

@@ -5,8 +5,10 @@
#include "esphome/core/component.h"
#include "esphome/core/hal.h"
#include <array>
namespace esphome {
namespace inkplate6 {
namespace inkplate {
enum InkplateModel : uint8_t {
INKPLATE_6 = 0,
@@ -17,79 +19,35 @@ enum InkplateModel : uint8_t {
INKPLATE_5_V2 = 5,
};
class Inkplate6 : public display::DisplayBuffer, public i2c::I2CDevice {
static constexpr uint8_t GLUT_SIZE = 9;
static constexpr uint8_t GLUT_COUNT = 8;
static constexpr uint8_t LUT2[16] = {0xAA, 0xA9, 0xA6, 0xA5, 0x9A, 0x99, 0x96, 0x95,
0x6A, 0x69, 0x66, 0x65, 0x5A, 0x59, 0x56, 0x55};
static constexpr uint8_t LUTW[16] = {0xFF, 0xFE, 0xFB, 0xFA, 0xEF, 0xEE, 0xEB, 0xEA,
0xBF, 0xBE, 0xBB, 0xBA, 0xAF, 0xAE, 0xAB, 0xAA};
static constexpr uint8_t LUTB[16] = {0xFF, 0xFD, 0xF7, 0xF5, 0xDF, 0xDD, 0xD7, 0xD5,
0x7F, 0x7D, 0x77, 0x75, 0x5F, 0x5D, 0x57, 0x55};
static constexpr uint8_t PIXEL_MASK_LUT[8] = {0x1, 0x2, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80};
static constexpr uint8_t PIXEL_MASK_GLUT[2] = {0x0F, 0xF0};
class Inkplate : public display::DisplayBuffer, public i2c::I2CDevice {
public:
const uint8_t LUT2[16] = {0xAA, 0xA9, 0xA6, 0xA5, 0x9A, 0x99, 0x96, 0x95,
0x6A, 0x69, 0x66, 0x65, 0x5A, 0x59, 0x56, 0x55};
const uint8_t LUTW[16] = {0xFF, 0xFE, 0xFB, 0xFA, 0xEF, 0xEE, 0xEB, 0xEA,
0xBF, 0xBE, 0xBB, 0xBA, 0xAF, 0xAE, 0xAB, 0xAA};
const uint8_t LUTB[16] = {0xFF, 0xFD, 0xF7, 0xF5, 0xDF, 0xDD, 0xD7, 0xD5,
0x7F, 0x7D, 0x77, 0x75, 0x5F, 0x5D, 0x57, 0x55};
const uint8_t pixelMaskLUT[8] = {0x1, 0x2, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80};
const uint8_t pixelMaskGLUT[2] = {0x0F, 0xF0};
const uint8_t waveform3BitAll[6][8][9] = {// INKPLATE_6
{{0, 1, 1, 0, 0, 1, 1, 0, 0},
{0, 1, 2, 1, 1, 2, 1, 0, 0},
{1, 1, 1, 2, 2, 1, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 2, 0, 0},
{2, 1, 1, 1, 2, 1, 2, 0, 0},
{2, 2, 1, 1, 2, 1, 2, 0, 0},
{1, 1, 1, 2, 1, 2, 2, 0, 0},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{1, 1, 2, 2, 1, 2, 1, 1, 0},
{0, 1, 2, 2, 1, 1, 2, 1, 0},
{0, 0, 1, 1, 1, 1, 1, 2, 0},
{1, 2, 1, 2, 1, 1, 1, 2, 0},
{0, 1, 1, 1, 2, 0, 1, 2, 0},
{1, 1, 1, 2, 2, 2, 1, 2, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0}}};
void set_greyscale(bool greyscale) {
this->greyscale_ = greyscale;
this->block_partial_ = true;
if (this->is_ready())
this->initialize_();
}
void set_waveform(const std::array<uint8_t, GLUT_COUNT * GLUT_SIZE> &waveform, bool is_custom) {
static_assert(sizeof(this->waveform_) == sizeof(uint8_t) * GLUT_COUNT * GLUT_SIZE,
"waveform_ buffer size must match input waveform array size");
memmove(this->waveform_, waveform.data(), sizeof(this->waveform_));
this->custom_waveform_ = is_custom;
}
void set_mirror_y(bool mirror_y) { this->mirror_y_ = mirror_y; }
void set_mirror_x(bool mirror_x) { this->mirror_x_ = mirror_x; }
@@ -225,6 +183,8 @@ class Inkplate6 : public display::DisplayBuffer, public i2c::I2CDevice {
bool mirror_y_{false};
bool mirror_x_{false};
bool partial_updating_;
bool custom_waveform_{false};
uint8_t waveform_[GLUT_COUNT][GLUT_SIZE];
InkplateModel model_;
@@ -250,5 +210,5 @@ class Inkplate6 : public display::DisplayBuffer, public i2c::I2CDevice {
GPIOPin *wakeup_pin_;
};
} // namespace inkplate6
} // namespace inkplate
} // namespace esphome

View File

@@ -1 +0,0 @@
CODEOWNERS = ["@jesserockz"]

View File

@@ -1,214 +1,5 @@
from esphome import pins
import esphome.codegen as cg
from esphome.components import display, i2c
from esphome.components.esp32 import CONF_CPU_FREQUENCY
import esphome.config_validation as cv
from esphome.const import (
CONF_FULL_UPDATE_EVERY,
CONF_ID,
CONF_LAMBDA,
CONF_MIRROR_X,
CONF_MIRROR_Y,
CONF_MODEL,
CONF_OE_PIN,
CONF_PAGES,
CONF_TRANSFORM,
CONF_WAKEUP_PIN,
PLATFORM_ESP32,
CONFIG_SCHEMA = cv.invalid(
"The inkplate6 display component has been renamed to inkplate."
)
import esphome.final_validate as fv
DEPENDENCIES = ["i2c", "esp32"]
AUTO_LOAD = ["psram"]
CONF_DISPLAY_DATA_0_PIN = "display_data_0_pin"
CONF_DISPLAY_DATA_1_PIN = "display_data_1_pin"
CONF_DISPLAY_DATA_2_PIN = "display_data_2_pin"
CONF_DISPLAY_DATA_3_PIN = "display_data_3_pin"
CONF_DISPLAY_DATA_4_PIN = "display_data_4_pin"
CONF_DISPLAY_DATA_5_PIN = "display_data_5_pin"
CONF_DISPLAY_DATA_6_PIN = "display_data_6_pin"
CONF_DISPLAY_DATA_7_PIN = "display_data_7_pin"
CONF_CL_PIN = "cl_pin"
CONF_CKV_PIN = "ckv_pin"
CONF_GREYSCALE = "greyscale"
CONF_GMOD_PIN = "gmod_pin"
CONF_GPIO0_ENABLE_PIN = "gpio0_enable_pin"
CONF_LE_PIN = "le_pin"
CONF_PARTIAL_UPDATING = "partial_updating"
CONF_POWERUP_PIN = "powerup_pin"
CONF_SPH_PIN = "sph_pin"
CONF_SPV_PIN = "spv_pin"
CONF_VCOM_PIN = "vcom_pin"
inkplate6_ns = cg.esphome_ns.namespace("inkplate6")
Inkplate6 = inkplate6_ns.class_(
"Inkplate6",
cg.PollingComponent,
i2c.I2CDevice,
display.Display,
display.DisplayBuffer,
)
InkplateModel = inkplate6_ns.enum("InkplateModel")
MODELS = {
"inkplate_6": InkplateModel.INKPLATE_6,
"inkplate_10": InkplateModel.INKPLATE_10,
"inkplate_6_plus": InkplateModel.INKPLATE_6_PLUS,
"inkplate_6_v2": InkplateModel.INKPLATE_6_V2,
"inkplate_5": InkplateModel.INKPLATE_5,
"inkplate_5_v2": InkplateModel.INKPLATE_5_V2,
}
CONFIG_SCHEMA = cv.All(
display.FULL_DISPLAY_SCHEMA.extend(
{
cv.GenerateID(): cv.declare_id(Inkplate6),
cv.Optional(CONF_GREYSCALE, default=False): cv.boolean,
cv.Optional(CONF_TRANSFORM): cv.Schema(
{
cv.Optional(CONF_MIRROR_X, default=False): cv.boolean,
cv.Optional(CONF_MIRROR_Y, default=False): cv.boolean,
}
),
cv.Optional(CONF_PARTIAL_UPDATING, default=True): cv.boolean,
cv.Optional(CONF_FULL_UPDATE_EVERY, default=10): cv.uint32_t,
cv.Optional(CONF_MODEL, default="inkplate_6"): cv.enum(
MODELS, lower=True, space="_"
),
# Control pins
cv.Required(CONF_CKV_PIN): pins.gpio_output_pin_schema,
cv.Required(CONF_GMOD_PIN): pins.gpio_output_pin_schema,
cv.Required(CONF_GPIO0_ENABLE_PIN): pins.gpio_output_pin_schema,
cv.Required(CONF_OE_PIN): pins.gpio_output_pin_schema,
cv.Required(CONF_POWERUP_PIN): pins.gpio_output_pin_schema,
cv.Required(CONF_SPH_PIN): pins.gpio_output_pin_schema,
cv.Required(CONF_SPV_PIN): pins.gpio_output_pin_schema,
cv.Required(CONF_VCOM_PIN): pins.gpio_output_pin_schema,
cv.Required(CONF_WAKEUP_PIN): pins.gpio_output_pin_schema,
cv.Optional(CONF_CL_PIN, default=0): pins.internal_gpio_output_pin_schema,
cv.Optional(CONF_LE_PIN, default=2): pins.internal_gpio_output_pin_schema,
# Data pins
cv.Optional(
CONF_DISPLAY_DATA_0_PIN, default=4
): pins.internal_gpio_output_pin_schema,
cv.Optional(
CONF_DISPLAY_DATA_1_PIN, default=5
): pins.internal_gpio_output_pin_schema,
cv.Optional(
CONF_DISPLAY_DATA_2_PIN, default=18
): pins.internal_gpio_output_pin_schema,
cv.Optional(
CONF_DISPLAY_DATA_3_PIN, default=19
): pins.internal_gpio_output_pin_schema,
cv.Optional(
CONF_DISPLAY_DATA_4_PIN, default=23
): pins.internal_gpio_output_pin_schema,
cv.Optional(
CONF_DISPLAY_DATA_5_PIN, default=25
): pins.internal_gpio_output_pin_schema,
cv.Optional(
CONF_DISPLAY_DATA_6_PIN, default=26
): pins.internal_gpio_output_pin_schema,
cv.Optional(
CONF_DISPLAY_DATA_7_PIN, default=27
): pins.internal_gpio_output_pin_schema,
}
)
.extend(cv.polling_component_schema("5s"))
.extend(i2c.i2c_device_schema(0x48)),
cv.has_at_most_one_key(CONF_PAGES, CONF_LAMBDA),
)
def _validate_cpu_frequency(config):
esp32_config = fv.full_config.get()[PLATFORM_ESP32]
if esp32_config[CONF_CPU_FREQUENCY] != "240MHZ":
raise cv.Invalid(
"Inkplate requires 240MHz CPU frequency (set in esp32 component)"
)
return config
FINAL_VALIDATE_SCHEMA = _validate_cpu_frequency
async def to_code(config):
var = cg.new_Pvariable(config[CONF_ID])
await display.register_display(var, config)
await i2c.register_i2c_device(var, config)
if CONF_LAMBDA in config:
lambda_ = await cg.process_lambda(
config[CONF_LAMBDA], [(display.DisplayRef, "it")], return_type=cg.void
)
cg.add(var.set_writer(lambda_))
cg.add(var.set_greyscale(config[CONF_GREYSCALE]))
if transform := config.get(CONF_TRANSFORM):
cg.add(var.set_mirror_x(transform[CONF_MIRROR_X]))
cg.add(var.set_mirror_y(transform[CONF_MIRROR_Y]))
cg.add(var.set_partial_updating(config[CONF_PARTIAL_UPDATING]))
cg.add(var.set_full_update_every(config[CONF_FULL_UPDATE_EVERY]))
cg.add(var.set_model(config[CONF_MODEL]))
ckv = await cg.gpio_pin_expression(config[CONF_CKV_PIN])
cg.add(var.set_ckv_pin(ckv))
gmod = await cg.gpio_pin_expression(config[CONF_GMOD_PIN])
cg.add(var.set_gmod_pin(gmod))
gpio0_enable = await cg.gpio_pin_expression(config[CONF_GPIO0_ENABLE_PIN])
cg.add(var.set_gpio0_enable_pin(gpio0_enable))
oe = await cg.gpio_pin_expression(config[CONF_OE_PIN])
cg.add(var.set_oe_pin(oe))
powerup = await cg.gpio_pin_expression(config[CONF_POWERUP_PIN])
cg.add(var.set_powerup_pin(powerup))
sph = await cg.gpio_pin_expression(config[CONF_SPH_PIN])
cg.add(var.set_sph_pin(sph))
spv = await cg.gpio_pin_expression(config[CONF_SPV_PIN])
cg.add(var.set_spv_pin(spv))
vcom = await cg.gpio_pin_expression(config[CONF_VCOM_PIN])
cg.add(var.set_vcom_pin(vcom))
wakeup = await cg.gpio_pin_expression(config[CONF_WAKEUP_PIN])
cg.add(var.set_wakeup_pin(wakeup))
cl = await cg.gpio_pin_expression(config[CONF_CL_PIN])
cg.add(var.set_cl_pin(cl))
le = await cg.gpio_pin_expression(config[CONF_LE_PIN])
cg.add(var.set_le_pin(le))
display_data_0 = await cg.gpio_pin_expression(config[CONF_DISPLAY_DATA_0_PIN])
cg.add(var.set_display_data_0_pin(display_data_0))
display_data_1 = await cg.gpio_pin_expression(config[CONF_DISPLAY_DATA_1_PIN])
cg.add(var.set_display_data_1_pin(display_data_1))
display_data_2 = await cg.gpio_pin_expression(config[CONF_DISPLAY_DATA_2_PIN])
cg.add(var.set_display_data_2_pin(display_data_2))
display_data_3 = await cg.gpio_pin_expression(config[CONF_DISPLAY_DATA_3_PIN])
cg.add(var.set_display_data_3_pin(display_data_3))
display_data_4 = await cg.gpio_pin_expression(config[CONF_DISPLAY_DATA_4_PIN])
cg.add(var.set_display_data_4_pin(display_data_4))
display_data_5 = await cg.gpio_pin_expression(config[CONF_DISPLAY_DATA_5_PIN])
cg.add(var.set_display_data_5_pin(display_data_5))
display_data_6 = await cg.gpio_pin_expression(config[CONF_DISPLAY_DATA_6_PIN])
cg.add(var.set_display_data_6_pin(display_data_6))
display_data_7 = await cg.gpio_pin_expression(config[CONF_DISPLAY_DATA_7_PIN])
cg.add(var.set_display_data_7_pin(display_data_7))

View File

@@ -12,6 +12,7 @@
#include "light_transformer.h"
#include <vector>
#include <strings.h>
namespace esphome {
namespace light {

View File

@@ -246,14 +246,35 @@ void Logger::add_on_log_callback(std::function<void(uint8_t, const char *, const
this->log_callback_.add(std::move(callback));
}
float Logger::get_setup_priority() const { return setup_priority::BUS + 500.0f; }
#ifdef USE_STORE_LOG_STR_IN_FLASH
// ESP8266: PSTR() cannot be used in array initializers, so we need to declare
// each string separately as a global constant first
static const char LOG_LEVEL_NONE[] PROGMEM = "NONE";
static const char LOG_LEVEL_ERROR[] PROGMEM = "ERROR";
static const char LOG_LEVEL_WARN[] PROGMEM = "WARN";
static const char LOG_LEVEL_INFO[] PROGMEM = "INFO";
static const char LOG_LEVEL_CONFIG[] PROGMEM = "CONFIG";
static const char LOG_LEVEL_DEBUG[] PROGMEM = "DEBUG";
static const char LOG_LEVEL_VERBOSE[] PROGMEM = "VERBOSE";
static const char LOG_LEVEL_VERY_VERBOSE[] PROGMEM = "VERY_VERBOSE";
static const LogString *const LOG_LEVELS[] = {
reinterpret_cast<const LogString *>(LOG_LEVEL_NONE), reinterpret_cast<const LogString *>(LOG_LEVEL_ERROR),
reinterpret_cast<const LogString *>(LOG_LEVEL_WARN), reinterpret_cast<const LogString *>(LOG_LEVEL_INFO),
reinterpret_cast<const LogString *>(LOG_LEVEL_CONFIG), reinterpret_cast<const LogString *>(LOG_LEVEL_DEBUG),
reinterpret_cast<const LogString *>(LOG_LEVEL_VERBOSE), reinterpret_cast<const LogString *>(LOG_LEVEL_VERY_VERBOSE),
};
#else
static const char *const LOG_LEVELS[] = {"NONE", "ERROR", "WARN", "INFO", "CONFIG", "DEBUG", "VERBOSE", "VERY_VERBOSE"};
#endif
void Logger::dump_config() {
ESP_LOGCONFIG(TAG,
"Logger:\n"
" Max Level: %s\n"
" Initial Level: %s",
LOG_LEVELS[ESPHOME_LOG_LEVEL], LOG_LEVELS[this->current_level_]);
LOG_STR_ARG(LOG_LEVELS[ESPHOME_LOG_LEVEL]), LOG_STR_ARG(LOG_LEVELS[this->current_level_]));
#ifndef USE_HOST
ESP_LOGCONFIG(TAG,
" Log Baud Rate: %" PRIu32 "\n"
@@ -267,14 +288,14 @@ void Logger::dump_config() {
#endif
for (auto &it : this->log_levels_) {
ESP_LOGCONFIG(TAG, " Level for '%s': %s", it.first.c_str(), LOG_LEVELS[it.second]);
ESP_LOGCONFIG(TAG, " Level for '%s': %s", it.first.c_str(), LOG_STR_ARG(LOG_LEVELS[it.second]));
}
}
void Logger::set_log_level(uint8_t level) {
if (level > ESPHOME_LOG_LEVEL) {
level = ESPHOME_LOG_LEVEL;
ESP_LOGW(TAG, "Cannot set log level higher than pre-compiled %s", LOG_LEVELS[ESPHOME_LOG_LEVEL]);
ESP_LOGW(TAG, "Cannot set log level higher than pre-compiled %s", LOG_STR_ARG(LOG_LEVELS[ESPHOME_LOG_LEVEL]));
}
this->current_level_ = level;
this->level_callback_.call(level);

View File

@@ -11,6 +11,7 @@ from esphome.const import (
CONF_OUTPUT,
)
AUTO_LOAD = ["gpio_expander"]
DEPENDENCIES = ["i2c"]
MULTI_CONF = True

View File

@@ -22,14 +22,29 @@ void MCP23016::setup() {
this->write_reg_(MCP23016_IODIR0, 0xFF);
this->write_reg_(MCP23016_IODIR1, 0xFF);
}
bool MCP23016::digital_read(uint8_t pin) {
uint8_t bit = pin % 8;
void MCP23016::loop() {
// Invalidate cache at the start of each loop
this->reset_pin_cache_();
}
bool MCP23016::digital_read_hw(uint8_t pin) {
uint8_t reg_addr = pin < 8 ? MCP23016_GP0 : MCP23016_GP1;
uint8_t value = 0;
this->read_reg_(reg_addr, &value);
return value & (1 << bit);
if (!this->read_reg_(reg_addr, &value)) {
return false;
}
// Update the appropriate part of input_mask_
if (pin < 8) {
this->input_mask_ = (this->input_mask_ & 0xFF00) | value;
} else {
this->input_mask_ = (this->input_mask_ & 0x00FF) | (uint16_t(value) << 8);
}
return true;
}
void MCP23016::digital_write(uint8_t pin, bool value) {
bool MCP23016::digital_read_cache(uint8_t pin) { return this->input_mask_ & (1 << pin); }
void MCP23016::digital_write_hw(uint8_t pin, bool value) {
uint8_t reg_addr = pin < 8 ? MCP23016_OLAT0 : MCP23016_OLAT1;
this->update_reg_(pin, value, reg_addr);
}
@@ -41,7 +56,7 @@ void MCP23016::pin_mode(uint8_t pin, gpio::Flags flags) {
this->update_reg_(pin, false, iodir);
}
}
float MCP23016::get_setup_priority() const { return setup_priority::HARDWARE; }
float MCP23016::get_setup_priority() const { return setup_priority::IO; }
bool MCP23016::read_reg_(uint8_t reg, uint8_t *value) {
if (this->is_failed())
return false;

View File

@@ -3,6 +3,7 @@
#include "esphome/core/component.h"
#include "esphome/core/hal.h"
#include "esphome/components/i2c/i2c.h"
#include "esphome/components/gpio_expander/cached_gpio.h"
namespace esphome {
namespace mcp23016 {
@@ -24,19 +25,22 @@ enum MCP23016GPIORegisters {
MCP23016_IOCON1 = 0x0B,
};
class MCP23016 : public Component, public i2c::I2CDevice {
class MCP23016 : public Component, public i2c::I2CDevice, public gpio_expander::CachedGpioExpander<uint8_t, 16> {
public:
MCP23016() = default;
void setup() override;
bool digital_read(uint8_t pin);
void digital_write(uint8_t pin, bool value);
void loop() override;
void pin_mode(uint8_t pin, gpio::Flags flags);
float get_setup_priority() const override;
protected:
// Virtual methods from CachedGpioExpander
bool digital_read_hw(uint8_t pin) override;
bool digital_read_cache(uint8_t pin) override;
void digital_write_hw(uint8_t pin, bool value) override;
// read a given register
bool read_reg_(uint8_t reg, uint8_t *value);
// write a value to a given register
@@ -46,6 +50,8 @@ class MCP23016 : public Component, public i2c::I2CDevice {
uint8_t olat_0_{0x00};
uint8_t olat_1_{0x00};
// Cache for input values (16-bit combined for both banks)
uint16_t input_mask_{0x00};
};
class MCP23016GPIOPin : public GPIOPin {

View File

@@ -222,6 +222,12 @@ def delay(ms):
class DriverChip:
"""
A class representing a MIPI DBI driver chip model.
The parameters supplied as defaults will be used to provide default values for the display configuration.
Setting swap_xy to cv.UNDEFINED will indicate that the model does not support swapping X and Y axes.
"""
models: dict[str, Self] = {}
def __init__(
@@ -232,7 +238,7 @@ class DriverChip:
):
name = name.upper()
self.name = name
self.initsequence = initsequence or defaults.get("init_sequence")
self.initsequence = initsequence
self.defaults = defaults
DriverChip.models[name] = self
@@ -246,6 +252,17 @@ class DriverChip:
return models
def extend(self, name, **kwargs) -> "DriverChip":
"""
Extend the current model with additional parameters or a modified init sequence.
Parameters supplied here will override the defaults of the current model.
if the initsequence is not provided, the current model's initsequence will be used.
If add_init_sequence is provided, it will be appended to the current initsequence.
:param name:
:param kwargs:
:return:
"""
initsequence = list(kwargs.pop("initsequence", self.initsequence))
initsequence.extend(kwargs.pop("add_init_sequence", ()))
defaults = self.defaults.copy()
if (
CONF_WIDTH in defaults
@@ -260,23 +277,39 @@ class DriverChip:
):
defaults[CONF_NATIVE_HEIGHT] = defaults[CONF_HEIGHT]
defaults.update(kwargs)
return DriverChip(name, initsequence=self.initsequence, **defaults)
return self.__class__(name, initsequence=tuple(initsequence), **defaults)
def get_default(self, key, fallback: Any = False) -> Any:
return self.defaults.get(key, fallback)
@property
def transforms(self) -> set[str]:
"""
Return the available transforms for this model.
"""
if self.get_default("no_transform", False):
return set()
if self.get_default(CONF_SWAP_XY) != cv.UNDEFINED:
return {CONF_MIRROR_X, CONF_MIRROR_Y, CONF_SWAP_XY}
return {CONF_MIRROR_X, CONF_MIRROR_Y}
def option(self, name, fallback=False) -> cv.Optional:
return cv.Optional(name, default=self.get_default(name, fallback))
def rotation_as_transform(self, config) -> bool:
"""
Check if a rotation can be implemented in hardware using the MADCTL register.
A rotation of 180 is always possible, 90 and 270 are possible if the model supports swapping X and Y.
A rotation of 180 is always possible if x and y mirroring are supported, 90 and 270 are possible if the model supports swapping X and Y.
"""
transforms = self.transforms
rotation = config.get(CONF_ROTATION, 0)
return rotation and (
self.get_default(CONF_SWAP_XY) != cv.UNDEFINED or rotation == 180
)
if rotation == 0 or not transforms:
return False
if rotation == 180:
return CONF_MIRROR_X in transforms and CONF_MIRROR_Y in transforms
if rotation == 90:
return CONF_SWAP_XY in transforms and CONF_MIRROR_X in transforms
return CONF_SWAP_XY in transforms and CONF_MIRROR_Y in transforms
def get_dimensions(self, config) -> tuple[int, int, int, int]:
if CONF_DIMENSIONS in config:
@@ -301,10 +334,10 @@ class DriverChip:
# if mirroring axes and there are offsets, also mirror the offsets to cater for situations where
# the offset is asymmetric
if transform[CONF_MIRROR_X]:
if transform.get(CONF_MIRROR_X):
native_width = self.get_default(CONF_NATIVE_WIDTH, width + offset_width * 2)
offset_width = native_width - width - offset_width
if transform[CONF_MIRROR_Y]:
if transform.get(CONF_MIRROR_Y):
native_height = self.get_default(
CONF_NATIVE_HEIGHT, height + offset_height * 2
)
@@ -314,7 +347,7 @@ class DriverChip:
90,
270,
)
if transform[CONF_SWAP_XY] is True or rotated:
if transform.get(CONF_SWAP_XY) is True or rotated:
width, height = height, width
offset_height, offset_width = offset_width, offset_height
return width, height, offset_width, offset_height
@@ -324,27 +357,50 @@ class DriverChip:
transform = config.get(
CONF_TRANSFORM,
{
CONF_MIRROR_X: self.get_default(CONF_MIRROR_X, False),
CONF_MIRROR_Y: self.get_default(CONF_MIRROR_Y, False),
CONF_SWAP_XY: self.get_default(CONF_SWAP_XY, False),
CONF_MIRROR_X: self.get_default(CONF_MIRROR_X),
CONF_MIRROR_Y: self.get_default(CONF_MIRROR_Y),
CONF_SWAP_XY: self.get_default(CONF_SWAP_XY),
},
)
# fill in defaults if not provided
mirror_x = transform.get(CONF_MIRROR_X, self.get_default(CONF_MIRROR_X))
mirror_y = transform.get(CONF_MIRROR_Y, self.get_default(CONF_MIRROR_Y))
swap_xy = transform.get(CONF_SWAP_XY, self.get_default(CONF_SWAP_XY))
transform[CONF_MIRROR_X] = mirror_x
transform[CONF_MIRROR_Y] = mirror_y
transform[CONF_SWAP_XY] = swap_xy
# Can we use the MADCTL register to set the rotation?
if can_transform and CONF_TRANSFORM not in config:
rotation = config[CONF_ROTATION]
if rotation == 180:
transform[CONF_MIRROR_X] = not transform[CONF_MIRROR_X]
transform[CONF_MIRROR_Y] = not transform[CONF_MIRROR_Y]
transform[CONF_MIRROR_X] = not mirror_x
transform[CONF_MIRROR_Y] = not mirror_y
elif rotation == 90:
transform[CONF_SWAP_XY] = not transform[CONF_SWAP_XY]
transform[CONF_MIRROR_X] = not transform[CONF_MIRROR_X]
transform[CONF_SWAP_XY] = not swap_xy
transform[CONF_MIRROR_X] = not mirror_x
else:
transform[CONF_SWAP_XY] = not transform[CONF_SWAP_XY]
transform[CONF_MIRROR_Y] = not transform[CONF_MIRROR_Y]
transform[CONF_SWAP_XY] = not swap_xy
transform[CONF_MIRROR_Y] = not mirror_y
transform[CONF_TRANSFORM] = True
return transform
def add_madctl(self, sequence: list, config: dict):
# Add the MADCTL command to the sequence based on the configuration.
use_flip = config.get(CONF_USE_AXIS_FLIPS)
madctl = 0
transform = self.get_transform(config)
if transform[CONF_MIRROR_X]:
madctl |= MADCTL_XFLIP if use_flip else MADCTL_MX
if transform[CONF_MIRROR_Y]:
madctl |= MADCTL_YFLIP if use_flip else MADCTL_MY
if transform.get(CONF_SWAP_XY) is True: # Exclude Undefined
madctl |= MADCTL_MV
if config[CONF_COLOR_ORDER] == MODE_BGR:
madctl |= MADCTL_BGR
sequence.append((MADCTL, madctl))
return madctl
def get_sequence(self, config) -> tuple[tuple[int, ...], int]:
"""
Create the init sequence for the display.
@@ -367,21 +423,9 @@ class DriverChip:
pixel_mode = PIXEL_MODES[pixel_mode]
sequence.append((PIXFMT, pixel_mode))
# Does the chip use the flipping bits for mirroring rather than the reverse order bits?
use_flip = config.get(CONF_USE_AXIS_FLIPS)
madctl = 0
transform = self.get_transform(config)
if self.rotation_as_transform(config):
LOGGER.info("Using hardware transform to implement rotation")
if transform.get(CONF_MIRROR_X):
madctl |= MADCTL_XFLIP if use_flip else MADCTL_MX
if transform.get(CONF_MIRROR_Y):
madctl |= MADCTL_YFLIP if use_flip else MADCTL_MY
if transform.get(CONF_SWAP_XY) is True: # Exclude Undefined
madctl |= MADCTL_MV
if config[CONF_COLOR_ORDER] == MODE_BGR:
madctl |= MADCTL_BGR
sequence.append((MADCTL, madctl))
madctl = self.add_madctl(sequence, config)
if config[CONF_INVERT_COLORS]:
sequence.append((INVON,))
else:

View File

@@ -0,0 +1,2 @@
CODEOWNERS = ["@clydebarrow"]
DOMAIN = "mipi_rgb"

View File

@@ -0,0 +1,321 @@
import importlib
import pkgutil
from esphome import pins
import esphome.codegen as cg
from esphome.components import display, spi
from esphome.components.const import (
BYTE_ORDER_BIG,
BYTE_ORDER_LITTLE,
CONF_BYTE_ORDER,
CONF_DRAW_ROUNDING,
)
from esphome.components.display import CONF_SHOW_TEST_CARD
from esphome.components.esp32 import const, only_on_variant
from esphome.components.mipi import (
COLOR_ORDERS,
CONF_DE_PIN,
CONF_HSYNC_BACK_PORCH,
CONF_HSYNC_FRONT_PORCH,
CONF_HSYNC_PULSE_WIDTH,
CONF_PCLK_PIN,
CONF_PIXEL_MODE,
CONF_USE_AXIS_FLIPS,
CONF_VSYNC_BACK_PORCH,
CONF_VSYNC_FRONT_PORCH,
CONF_VSYNC_PULSE_WIDTH,
MODE_BGR,
PIXEL_MODE_16BIT,
PIXEL_MODE_18BIT,
DriverChip,
dimension_schema,
map_sequence,
power_of_two,
requires_buffer,
)
from esphome.components.rpi_dpi_rgb.display import (
CONF_PCLK_FREQUENCY,
CONF_PCLK_INVERTED,
)
import esphome.config_validation as cv
from esphome.const import (
CONF_BLUE,
CONF_COLOR_ORDER,
CONF_CS_PIN,
CONF_DATA_PINS,
CONF_DATA_RATE,
CONF_DC_PIN,
CONF_DIMENSIONS,
CONF_ENABLE_PIN,
CONF_GREEN,
CONF_HSYNC_PIN,
CONF_ID,
CONF_IGNORE_STRAPPING_WARNING,
CONF_INIT_SEQUENCE,
CONF_INVERT_COLORS,
CONF_LAMBDA,
CONF_MIRROR_X,
CONF_MIRROR_Y,
CONF_MODEL,
CONF_NUMBER,
CONF_RED,
CONF_RESET_PIN,
CONF_ROTATION,
CONF_SPI_ID,
CONF_SWAP_XY,
CONF_TRANSFORM,
CONF_VSYNC_PIN,
CONF_WIDTH,
)
from esphome.final_validate import full_config
from ..spi import CONF_SPI_MODE, SPI_DATA_RATE_SCHEMA, SPI_MODE_OPTIONS, SPIComponent
from . import models
DEPENDENCIES = ["esp32", "psram"]
mipi_rgb_ns = cg.esphome_ns.namespace("mipi_rgb")
mipi_rgb = mipi_rgb_ns.class_("MipiRgb", display.Display, cg.Component)
mipi_rgb_spi = mipi_rgb_ns.class_(
"MipiRgbSpi", mipi_rgb, display.Display, cg.Component, spi.SPIDevice
)
ColorOrder = display.display_ns.enum("ColorMode")
DATA_PIN_SCHEMA = pins.internal_gpio_output_pin_schema
DriverChip("CUSTOM")
# Import all models dynamically from the models package
for module_info in pkgutil.iter_modules(models.__path__):
importlib.import_module(f".models.{module_info.name}", package=__package__)
MODELS = DriverChip.get_models()
def data_pin_validate(value):
"""
It is safe to use strapping pins as RGB output data bits, as they are outputs only,
and not initialised until after boot.
"""
if not isinstance(value, dict):
try:
return DATA_PIN_SCHEMA(
{CONF_NUMBER: value, CONF_IGNORE_STRAPPING_WARNING: True}
)
except cv.Invalid:
pass
return DATA_PIN_SCHEMA(value)
def data_pin_set(length):
return cv.All(
[data_pin_validate],
cv.Length(min=length, max=length, msg=f"Exactly {length} data pins required"),
)
def model_schema(config):
model = MODELS[config[CONF_MODEL].upper()]
if transforms := model.transforms:
transform = cv.Schema({cv.Required(x): cv.boolean for x in transforms})
for x in (CONF_SWAP_XY, CONF_MIRROR_X, CONF_MIRROR_Y):
if x not in transforms:
transform = transform.extend(
{cv.Optional(x): cv.invalid(f"{x} not supported by this model")}
)
else:
transform = cv.invalid("This model does not support transforms")
# RPI model does not use an init sequence, indicates with empty list
if model.initsequence is None:
# Custom model requires an init sequence
iseqconf = cv.Required(CONF_INIT_SEQUENCE)
uses_spi = True
else:
iseqconf = cv.Optional(CONF_INIT_SEQUENCE)
uses_spi = CONF_INIT_SEQUENCE in config or len(model.initsequence) != 0
swap_xy = config.get(CONF_TRANSFORM, {}).get(CONF_SWAP_XY, False)
# Dimensions are optional if the model has a default width and the swap_xy transform is not overridden
cv_dimensions = (
cv.Optional if model.get_default(CONF_WIDTH) and not swap_xy else cv.Required
)
pixel_modes = (PIXEL_MODE_16BIT, PIXEL_MODE_18BIT, "16", "18")
schema = display.FULL_DISPLAY_SCHEMA.extend(
{
model.option(CONF_RESET_PIN, cv.UNDEFINED): pins.gpio_output_pin_schema,
cv.GenerateID(): cv.declare_id(mipi_rgb_spi if uses_spi else mipi_rgb),
cv_dimensions(CONF_DIMENSIONS): dimension_schema(
model.get_default(CONF_DRAW_ROUNDING, 1)
),
model.option(CONF_ENABLE_PIN, cv.UNDEFINED): cv.ensure_list(
pins.gpio_output_pin_schema
),
model.option(CONF_COLOR_ORDER, MODE_BGR): cv.enum(COLOR_ORDERS, upper=True),
model.option(CONF_DRAW_ROUNDING, 2): power_of_two,
model.option(CONF_PIXEL_MODE, PIXEL_MODE_16BIT): cv.one_of(
*pixel_modes, lower=True
),
model.option(CONF_TRANSFORM, cv.UNDEFINED): transform,
cv.Required(CONF_MODEL): cv.one_of(model.name, upper=True),
model.option(CONF_INVERT_COLORS, False): cv.boolean,
model.option(CONF_USE_AXIS_FLIPS, True): cv.boolean,
model.option(CONF_PCLK_FREQUENCY, "40MHz"): cv.All(
cv.frequency, cv.Range(min=4e6, max=100e6)
),
model.option(CONF_PCLK_INVERTED, True): cv.boolean,
iseqconf: cv.ensure_list(map_sequence),
model.option(CONF_BYTE_ORDER, BYTE_ORDER_BIG): cv.one_of(
BYTE_ORDER_LITTLE, BYTE_ORDER_BIG, lower=True
),
model.option(CONF_HSYNC_PULSE_WIDTH): cv.int_,
model.option(CONF_HSYNC_BACK_PORCH): cv.int_,
model.option(CONF_HSYNC_FRONT_PORCH): cv.int_,
model.option(CONF_VSYNC_PULSE_WIDTH): cv.int_,
model.option(CONF_VSYNC_BACK_PORCH): cv.int_,
model.option(CONF_VSYNC_FRONT_PORCH): cv.int_,
model.option(CONF_DATA_PINS): cv.Any(
data_pin_set(16),
cv.Schema(
{
cv.Required(CONF_RED): data_pin_set(5),
cv.Required(CONF_GREEN): data_pin_set(6),
cv.Required(CONF_BLUE): data_pin_set(5),
}
),
),
model.option(
CONF_DE_PIN, cv.UNDEFINED
): pins.internal_gpio_output_pin_schema,
model.option(CONF_PCLK_PIN): pins.internal_gpio_output_pin_schema,
model.option(CONF_HSYNC_PIN): pins.internal_gpio_output_pin_schema,
model.option(CONF_VSYNC_PIN): pins.internal_gpio_output_pin_schema,
model.option(CONF_RESET_PIN, cv.UNDEFINED): pins.gpio_output_pin_schema,
}
)
if uses_spi:
schema = schema.extend(
{
cv.GenerateID(CONF_SPI_ID): cv.use_id(SPIComponent),
model.option(CONF_DC_PIN, cv.UNDEFINED): pins.gpio_output_pin_schema,
model.option(CONF_DATA_RATE, "1MHz"): SPI_DATA_RATE_SCHEMA,
model.option(CONF_SPI_MODE, "MODE0"): cv.enum(
SPI_MODE_OPTIONS, upper=True
),
model.option(CONF_CS_PIN, cv.UNDEFINED): pins.gpio_output_pin_schema,
}
)
return schema
def _config_schema(config):
config = cv.Schema(
{
cv.Required(CONF_MODEL): cv.one_of(*MODELS, upper=True),
},
extra=cv.ALLOW_EXTRA,
)(config)
schema = model_schema(config)
return cv.All(
schema,
only_on_variant(supported=[const.VARIANT_ESP32S3]),
cv.only_with_esp_idf,
)(config)
CONFIG_SCHEMA = _config_schema
def _final_validate(config):
global_config = full_config.get()
from esphome.components.lvgl import DOMAIN as LVGL_DOMAIN
if not requires_buffer(config) and LVGL_DOMAIN not in global_config:
# If no drawing methods are configured, and LVGL is not enabled, show a test card
config[CONF_SHOW_TEST_CARD] = True
if CONF_SPI_ID in config:
config = spi.final_validate_device_schema(
"mipi_rgb", require_miso=False, require_mosi=True
)(config)
return config
FINAL_VALIDATE_SCHEMA = _final_validate
async def to_code(config):
model = MODELS[config[CONF_MODEL].upper()]
width, height, _offset_width, _offset_height = model.get_dimensions(config)
var = cg.new_Pvariable(config[CONF_ID], width, height)
cg.add(var.set_model(model.name))
if enable_pin := config.get(CONF_ENABLE_PIN):
enable = [await cg.gpio_pin_expression(pin) for pin in enable_pin]
cg.add(var.set_enable_pins(enable))
if CONF_SPI_ID in config:
await spi.register_spi_device(var, config)
sequence, madctl = model.get_sequence(config)
cg.add(var.set_init_sequence(sequence))
cg.add(var.set_madctl(madctl))
cg.add(var.set_color_mode(COLOR_ORDERS[config[CONF_COLOR_ORDER]]))
cg.add(var.set_invert_colors(config[CONF_INVERT_COLORS]))
cg.add(var.set_hsync_pulse_width(config[CONF_HSYNC_PULSE_WIDTH]))
cg.add(var.set_hsync_back_porch(config[CONF_HSYNC_BACK_PORCH]))
cg.add(var.set_hsync_front_porch(config[CONF_HSYNC_FRONT_PORCH]))
cg.add(var.set_vsync_pulse_width(config[CONF_VSYNC_PULSE_WIDTH]))
cg.add(var.set_vsync_back_porch(config[CONF_VSYNC_BACK_PORCH]))
cg.add(var.set_vsync_front_porch(config[CONF_VSYNC_FRONT_PORCH]))
cg.add(var.set_pclk_inverted(config[CONF_PCLK_INVERTED]))
cg.add(var.set_pclk_frequency(config[CONF_PCLK_FREQUENCY]))
index = 0
dpins = []
if CONF_RED in config[CONF_DATA_PINS]:
red_pins = config[CONF_DATA_PINS][CONF_RED]
green_pins = config[CONF_DATA_PINS][CONF_GREEN]
blue_pins = config[CONF_DATA_PINS][CONF_BLUE]
if config[CONF_COLOR_ORDER] == "BGR":
dpins.extend(red_pins)
dpins.extend(green_pins)
dpins.extend(blue_pins)
else:
dpins.extend(blue_pins)
dpins.extend(green_pins)
dpins.extend(red_pins)
# swap bytes to match big-endian format
dpins = dpins[8:16] + dpins[0:8]
else:
dpins = config[CONF_DATA_PINS]
for index, pin in enumerate(dpins):
data_pin = await cg.gpio_pin_expression(pin)
cg.add(var.add_data_pin(data_pin, index))
if dc_pin := config.get(CONF_DC_PIN):
dc = await cg.gpio_pin_expression(dc_pin)
cg.add(var.set_dc_pin(dc))
if reset_pin := config.get(CONF_RESET_PIN):
reset = await cg.gpio_pin_expression(reset_pin)
cg.add(var.set_reset_pin(reset))
if model.rotation_as_transform(config):
config[CONF_ROTATION] = 0
if de_pin := config.get(CONF_DE_PIN):
pin = await cg.gpio_pin_expression(de_pin)
cg.add(var.set_de_pin(pin))
pin = await cg.gpio_pin_expression(config[CONF_PCLK_PIN])
cg.add(var.set_pclk_pin(pin))
pin = await cg.gpio_pin_expression(config[CONF_HSYNC_PIN])
cg.add(var.set_hsync_pin(pin))
pin = await cg.gpio_pin_expression(config[CONF_VSYNC_PIN])
cg.add(var.set_vsync_pin(pin))
await display.register_display(var, config)
if lamb := config.get(CONF_LAMBDA):
lambda_ = await cg.process_lambda(
lamb, [(display.DisplayRef, "it")], return_type=cg.void
)
cg.add(var.set_writer(lambda_))

View File

@@ -0,0 +1,388 @@
#ifdef USE_ESP32_VARIANT_ESP32S3
#include "mipi_rgb.h"
#include "esphome/core/log.h"
#include "esphome/core/hal.h"
#include "esp_lcd_panel_rgb.h"
namespace esphome {
namespace mipi_rgb {
static const uint8_t DELAY_FLAG = 0xFF;
static constexpr uint8_t MADCTL_MY = 0x80; // Bit 7 Bottom to top
static constexpr uint8_t MADCTL_MX = 0x40; // Bit 6 Right to left
static constexpr uint8_t MADCTL_MV = 0x20; // Bit 5 Swap axes
static constexpr uint8_t MADCTL_ML = 0x10; // Bit 4 Refresh bottom to top
static constexpr uint8_t MADCTL_BGR = 0x08; // Bit 3 Blue-Green-Red pixel order
static constexpr uint8_t MADCTL_XFLIP = 0x02; // Mirror the display horizontally
static constexpr uint8_t MADCTL_YFLIP = 0x01; // Mirror the display vertically
void MipiRgb::setup_enables_() {
if (!this->enable_pins_.empty()) {
for (auto *pin : this->enable_pins_) {
pin->setup();
pin->digital_write(true);
}
delay(10);
}
if (this->reset_pin_ != nullptr) {
this->reset_pin_->setup();
this->reset_pin_->digital_write(true);
delay(5);
this->reset_pin_->digital_write(false);
delay(5);
this->reset_pin_->digital_write(true);
}
}
#ifdef USE_SPI
void MipiRgbSpi::setup() {
this->setup_enables_();
this->spi_setup();
this->write_init_sequence_();
this->common_setup_();
}
void MipiRgbSpi::write_command_(uint8_t value) {
this->enable();
if (this->dc_pin_ == nullptr) {
this->write(value, 9);
} else {
this->dc_pin_->digital_write(false);
this->write_byte(value);
this->dc_pin_->digital_write(true);
}
this->disable();
}
void MipiRgbSpi::write_data_(uint8_t value) {
this->enable();
if (this->dc_pin_ == nullptr) {
this->write(value | 0x100, 9);
} else {
this->dc_pin_->digital_write(true);
this->write_byte(value);
}
this->disable();
}
/**
* this relies upon the init sequence being well-formed, which is guaranteed by the Python init code.
*/
void MipiRgbSpi::write_init_sequence_() {
size_t index = 0;
auto &vec = this->init_sequence_;
while (index != vec.size()) {
if (vec.size() - index < 2) {
this->mark_failed("Malformed init sequence");
return;
}
uint8_t cmd = vec[index++];
uint8_t x = vec[index++];
if (x == DELAY_FLAG) {
ESP_LOGD(TAG, "Delay %dms", cmd);
delay(cmd);
} else {
uint8_t num_args = x & 0x7F;
if (vec.size() - index < num_args) {
this->mark_failed("Malformed init sequence");
return;
}
if (cmd == SLEEP_OUT) {
delay(120); // NOLINT
}
const auto *ptr = vec.data() + index;
ESP_LOGD(TAG, "Write command %02X, length %d, byte(s) %s", cmd, num_args,
format_hex_pretty(ptr, num_args, '.', false).c_str());
index += num_args;
this->write_command_(cmd);
while (num_args-- != 0)
this->write_data_(*ptr++);
if (cmd == SLEEP_OUT)
delay(10);
}
}
// this->spi_teardown(); // SPI not needed after this
this->init_sequence_.clear();
delay(10);
}
void MipiRgbSpi::dump_config() {
MipiRgb::dump_config();
LOG_PIN(" CS Pin: ", this->cs_);
LOG_PIN(" DC Pin: ", this->dc_pin_);
ESP_LOGCONFIG(TAG,
" SPI Data rate: %uMHz"
"\n Mirror X: %s"
"\n Mirror Y: %s"
"\n Swap X/Y: %s"
"\n Color Order: %s",
(unsigned) (this->data_rate_ / 1000000), YESNO(this->madctl_ & (MADCTL_XFLIP | MADCTL_MX)),
YESNO(this->madctl_ & (MADCTL_YFLIP | MADCTL_MY | MADCTL_ML)), YESNO(this->madctl_ & MADCTL_MV),
this->madctl_ & MADCTL_BGR ? "BGR" : "RGB");
}
#endif // USE_SPI
void MipiRgb::setup() {
this->setup_enables_();
this->common_setup_();
}
void MipiRgb::common_setup_() {
esp_lcd_rgb_panel_config_t config{};
config.flags.fb_in_psram = 1;
config.bounce_buffer_size_px = this->width_ * 10;
config.num_fbs = 1;
config.timings.h_res = this->width_;
config.timings.v_res = this->height_;
config.timings.hsync_pulse_width = this->hsync_pulse_width_;
config.timings.hsync_back_porch = this->hsync_back_porch_;
config.timings.hsync_front_porch = this->hsync_front_porch_;
config.timings.vsync_pulse_width = this->vsync_pulse_width_;
config.timings.vsync_back_porch = this->vsync_back_porch_;
config.timings.vsync_front_porch = this->vsync_front_porch_;
config.timings.flags.pclk_active_neg = this->pclk_inverted_;
config.timings.pclk_hz = this->pclk_frequency_;
config.clk_src = LCD_CLK_SRC_PLL160M;
size_t data_pin_count = sizeof(this->data_pins_) / sizeof(this->data_pins_[0]);
for (size_t i = 0; i != data_pin_count; i++) {
config.data_gpio_nums[i] = this->data_pins_[i]->get_pin();
}
config.data_width = data_pin_count;
config.disp_gpio_num = -1;
config.hsync_gpio_num = this->hsync_pin_->get_pin();
config.vsync_gpio_num = this->vsync_pin_->get_pin();
if (this->de_pin_) {
config.de_gpio_num = this->de_pin_->get_pin();
} else {
config.de_gpio_num = -1;
}
config.pclk_gpio_num = this->pclk_pin_->get_pin();
esp_err_t err = esp_lcd_new_rgb_panel(&config, &this->handle_);
if (err == ESP_OK)
err = esp_lcd_panel_reset(this->handle_);
if (err == ESP_OK)
err = esp_lcd_panel_init(this->handle_);
if (err != ESP_OK) {
auto msg = str_sprintf("lcd setup failed: %s", esp_err_to_name(err));
this->mark_failed(msg.c_str());
}
ESP_LOGCONFIG(TAG, "MipiRgb setup complete");
}
void MipiRgb::loop() {
if (this->handle_ != nullptr)
esp_lcd_rgb_panel_restart(this->handle_);
}
void MipiRgb::update() {
if (this->is_failed())
return;
if (this->auto_clear_enabled_) {
this->clear();
}
if (this->show_test_card_) {
this->test_card();
} else if (this->page_ != nullptr) {
this->page_->get_writer()(*this);
} else if (this->writer_.has_value()) {
(*this->writer_)(*this);
} else {
this->stop_poller();
}
if (this->buffer_ == nullptr || this->x_low_ > this->x_high_ || this->y_low_ > this->y_high_)
return;
ESP_LOGV(TAG, "x_low %d, y_low %d, x_high %d, y_high %d", this->x_low_, this->y_low_, this->x_high_, this->y_high_);
int w = this->x_high_ - this->x_low_ + 1;
int h = this->y_high_ - this->y_low_ + 1;
this->write_to_display_(this->x_low_, this->y_low_, w, h, reinterpret_cast<const uint8_t *>(this->buffer_),
this->x_low_, this->y_low_, this->width_ - w - this->x_low_);
// invalidate watermarks
this->x_low_ = this->width_;
this->y_low_ = this->height_;
this->x_high_ = 0;
this->y_high_ = 0;
}
void MipiRgb::draw_pixels_at(int x_start, int y_start, int w, int h, const uint8_t *ptr, display::ColorOrder order,
display::ColorBitness bitness, bool big_endian, int x_offset, int y_offset, int x_pad) {
if (w <= 0 || h <= 0 || this->is_failed())
return;
// if color mapping is required, pass the buck.
// note that endianness is not considered here - it is assumed to match!
if (bitness != display::COLOR_BITNESS_565) {
Display::draw_pixels_at(x_start, y_start, w, h, ptr, order, bitness, big_endian, x_offset, y_offset, x_pad);
this->write_to_display_(x_start, y_start, w, h, reinterpret_cast<const uint8_t *>(this->buffer_), x_start, y_start,
this->width_ - w - x_start);
} else {
this->write_to_display_(x_start, y_start, w, h, ptr, x_offset, y_offset, x_pad);
}
}
void MipiRgb::write_to_display_(int x_start, int y_start, int w, int h, const uint8_t *ptr, int x_offset, int y_offset,
int x_pad) {
esp_err_t err = ESP_OK;
auto stride = (x_offset + w + x_pad) * 2;
ptr += y_offset * stride + x_offset * 2; // skip to the first pixel
// x_ and y_offset are offsets into the source buffer, unrelated to our own offsets into the display.
if (x_offset == 0 && x_pad == 0) {
err = esp_lcd_panel_draw_bitmap(this->handle_, x_start, y_start, x_start + w, y_start + h, ptr);
} else {
// draw line by line
for (int y = 0; y != h; y++) {
err = esp_lcd_panel_draw_bitmap(this->handle_, x_start, y + y_start, x_start + w, y + y_start + 1, ptr);
if (err != ESP_OK)
break;
ptr += stride; // next line
}
}
if (err != ESP_OK)
ESP_LOGE(TAG, "lcd_lcd_panel_draw_bitmap failed: %s", esp_err_to_name(err));
}
bool MipiRgb::check_buffer_() {
if (this->is_failed())
return false;
if (this->buffer_ != nullptr)
return true;
// this is dependent on the enum values.
RAMAllocator<uint16_t> allocator;
this->buffer_ = allocator.allocate(this->height_ * this->width_);
if (this->buffer_ == nullptr) {
this->mark_failed("Could not allocate buffer for display!");
return false;
}
return true;
}
void MipiRgb::draw_pixel_at(int x, int y, Color color) {
if (!this->get_clipping().inside(x, y) || this->is_failed())
return;
switch (this->rotation_) {
case display::DISPLAY_ROTATION_0_DEGREES:
break;
case display::DISPLAY_ROTATION_90_DEGREES:
std::swap(x, y);
x = this->width_ - x - 1;
break;
case display::DISPLAY_ROTATION_180_DEGREES:
x = this->width_ - x - 1;
y = this->height_ - y - 1;
break;
case display::DISPLAY_ROTATION_270_DEGREES:
std::swap(x, y);
y = this->height_ - y - 1;
break;
}
if (x >= this->get_width_internal() || x < 0 || y >= this->get_height_internal() || y < 0) {
return;
}
if (!this->check_buffer_())
return;
size_t pos = (y * this->width_) + x;
uint8_t hi_byte = static_cast<uint8_t>(color.r & 0xF8) | (color.g >> 5);
uint8_t lo_byte = static_cast<uint8_t>((color.g & 0x1C) << 3) | (color.b >> 3);
uint16_t new_color = hi_byte | (lo_byte << 8); // big endian
if (this->buffer_[pos] == new_color)
return;
this->buffer_[pos] = new_color;
// low and high watermark may speed up drawing from buffer
if (x < this->x_low_)
this->x_low_ = x;
if (y < this->y_low_)
this->y_low_ = y;
if (x > this->x_high_)
this->x_high_ = x;
if (y > this->y_high_)
this->y_high_ = y;
}
void MipiRgb::fill(Color color) {
if (!this->check_buffer_())
return;
auto *ptr_16 = reinterpret_cast<uint16_t *>(this->buffer_);
uint8_t hi_byte = static_cast<uint8_t>(color.r & 0xF8) | (color.g >> 5);
uint8_t lo_byte = static_cast<uint8_t>((color.g & 0x1C) << 3) | (color.b >> 3);
uint16_t new_color = lo_byte | (hi_byte << 8); // little endian
std::fill_n(ptr_16, this->width_ * this->height_, new_color);
}
int MipiRgb::get_width() {
switch (this->rotation_) {
case display::DISPLAY_ROTATION_90_DEGREES:
case display::DISPLAY_ROTATION_270_DEGREES:
return this->get_height_internal();
case display::DISPLAY_ROTATION_0_DEGREES:
case display::DISPLAY_ROTATION_180_DEGREES:
default:
return this->get_width_internal();
}
}
int MipiRgb::get_height() {
switch (this->rotation_) {
case display::DISPLAY_ROTATION_0_DEGREES:
case display::DISPLAY_ROTATION_180_DEGREES:
return this->get_height_internal();
case display::DISPLAY_ROTATION_90_DEGREES:
case display::DISPLAY_ROTATION_270_DEGREES:
default:
return this->get_width_internal();
}
}
static std::string get_pin_name(GPIOPin *pin) {
if (pin == nullptr)
return "None";
return pin->dump_summary();
}
void MipiRgb::dump_pins_(uint8_t start, uint8_t end, const char *name, uint8_t offset) {
for (uint8_t i = start; i != end; i++) {
ESP_LOGCONFIG(TAG, " %s pin %d: %s", name, offset++, this->data_pins_[i]->dump_summary().c_str());
}
}
void MipiRgb::dump_config() {
ESP_LOGCONFIG(TAG,
"MIPI_RGB LCD"
"\n Model: %s"
"\n Width: %u"
"\n Height: %u"
"\n Rotation: %d degrees"
"\n HSync Pulse Width: %u"
"\n HSync Back Porch: %u"
"\n HSync Front Porch: %u"
"\n VSync Pulse Width: %u"
"\n VSync Back Porch: %u"
"\n VSync Front Porch: %u"
"\n Invert Colors: %s"
"\n Pixel Clock: %dMHz"
"\n Reset Pin: %s"
"\n DE Pin: %s"
"\n PCLK Pin: %s"
"\n HSYNC Pin: %s"
"\n VSYNC Pin: %s",
this->model_, this->width_, this->height_, this->rotation_, this->hsync_pulse_width_,
this->hsync_back_porch_, this->hsync_front_porch_, this->vsync_pulse_width_, this->vsync_back_porch_,
this->vsync_front_porch_, YESNO(this->invert_colors_), this->pclk_frequency_ / 1000000,
get_pin_name(this->reset_pin_).c_str(), get_pin_name(this->de_pin_).c_str(),
get_pin_name(this->pclk_pin_).c_str(), get_pin_name(this->hsync_pin_).c_str(),
get_pin_name(this->vsync_pin_).c_str());
if (this->madctl_ & MADCTL_BGR) {
this->dump_pins_(8, 13, "Blue", 0);
this->dump_pins_(13, 16, "Green", 0);
this->dump_pins_(0, 3, "Green", 3);
this->dump_pins_(3, 8, "Red", 0);
} else {
this->dump_pins_(8, 13, "Red", 0);
this->dump_pins_(13, 16, "Green", 0);
this->dump_pins_(0, 3, "Green", 3);
this->dump_pins_(3, 8, "Blue", 0);
}
}
} // namespace mipi_rgb
} // namespace esphome
#endif // USE_ESP32_VARIANT_ESP32S3

View File

@@ -0,0 +1,127 @@
#pragma once
#ifdef USE_ESP32_VARIANT_ESP32S3
#include "esphome/core/gpio.h"
#include "esphome/components/display/display.h"
#include "esp_lcd_panel_ops.h"
#ifdef USE_SPI
#include "esphome/components/spi/spi.h"
#endif
namespace esphome {
namespace mipi_rgb {
constexpr static const char *const TAG = "display.mipi_rgb";
const uint8_t SW_RESET_CMD = 0x01;
const uint8_t SLEEP_OUT = 0x11;
const uint8_t SDIR_CMD = 0xC7;
const uint8_t MADCTL_CMD = 0x36;
const uint8_t INVERT_OFF = 0x20;
const uint8_t INVERT_ON = 0x21;
const uint8_t DISPLAY_ON = 0x29;
const uint8_t CMD2_BKSEL = 0xFF;
const uint8_t CMD2_BK0[5] = {0x77, 0x01, 0x00, 0x00, 0x10};
class MipiRgb : public display::Display {
public:
MipiRgb(int width, int height) : width_(width), height_(height) {}
void setup() override;
void loop() override;
void update() override;
void fill(Color color);
void draw_pixels_at(int x_start, int y_start, int w, int h, const uint8_t *ptr, display::ColorOrder order,
display::ColorBitness bitness, bool big_endian, int x_offset, int y_offset, int x_pad) override;
void write_to_display_(int x_start, int y_start, int w, int h, const uint8_t *ptr, int x_offset, int y_offset,
int x_pad);
bool check_buffer_();
display::ColorOrder get_color_mode() { return this->color_mode_; }
void set_color_mode(display::ColorOrder color_mode) { this->color_mode_ = color_mode; }
void set_invert_colors(bool invert_colors) { this->invert_colors_ = invert_colors; }
void set_madctl(uint8_t madctl) { this->madctl_ = madctl; }
void add_data_pin(InternalGPIOPin *data_pin, size_t index) { this->data_pins_[index] = data_pin; };
void set_de_pin(InternalGPIOPin *de_pin) { this->de_pin_ = de_pin; }
void set_pclk_pin(InternalGPIOPin *pclk_pin) { this->pclk_pin_ = pclk_pin; }
void set_vsync_pin(InternalGPIOPin *vsync_pin) { this->vsync_pin_ = vsync_pin; }
void set_hsync_pin(InternalGPIOPin *hsync_pin) { this->hsync_pin_ = hsync_pin; }
void set_reset_pin(GPIOPin *reset_pin) { this->reset_pin_ = reset_pin; }
void set_width(uint16_t width) { this->width_ = width; }
void set_pclk_frequency(uint32_t pclk_frequency) { this->pclk_frequency_ = pclk_frequency; }
void set_pclk_inverted(bool inverted) { this->pclk_inverted_ = inverted; }
void set_model(const char *model) { this->model_ = model; }
int get_width() override;
int get_height() override;
void set_hsync_back_porch(uint16_t hsync_back_porch) { this->hsync_back_porch_ = hsync_back_porch; }
void set_hsync_front_porch(uint16_t hsync_front_porch) { this->hsync_front_porch_ = hsync_front_porch; }
void set_hsync_pulse_width(uint16_t hsync_pulse_width) { this->hsync_pulse_width_ = hsync_pulse_width; }
void set_vsync_pulse_width(uint16_t vsync_pulse_width) { this->vsync_pulse_width_ = vsync_pulse_width; }
void set_vsync_back_porch(uint16_t vsync_back_porch) { this->vsync_back_porch_ = vsync_back_porch; }
void set_vsync_front_porch(uint16_t vsync_front_porch) { this->vsync_front_porch_ = vsync_front_porch; }
void set_enable_pins(std::vector<GPIOPin *> enable_pins) { this->enable_pins_ = std::move(enable_pins); }
display::DisplayType get_display_type() override { return display::DisplayType::DISPLAY_TYPE_COLOR; }
int get_width_internal() override { return this->width_; }
int get_height_internal() override { return this->height_; }
void dump_pins_(uint8_t start, uint8_t end, const char *name, uint8_t offset);
void dump_config() override;
void draw_pixel_at(int x, int y, Color color) override;
// this will be horribly slow.
protected:
void setup_enables_();
void common_setup_();
InternalGPIOPin *de_pin_{nullptr};
InternalGPIOPin *pclk_pin_{nullptr};
InternalGPIOPin *hsync_pin_{nullptr};
InternalGPIOPin *vsync_pin_{nullptr};
GPIOPin *reset_pin_{nullptr};
InternalGPIOPin *data_pins_[16] = {};
uint16_t hsync_pulse_width_ = 10;
uint16_t hsync_back_porch_ = 10;
uint16_t hsync_front_porch_ = 20;
uint16_t vsync_pulse_width_ = 10;
uint16_t vsync_back_porch_ = 10;
uint16_t vsync_front_porch_ = 10;
uint32_t pclk_frequency_ = 16 * 1000 * 1000;
bool pclk_inverted_{true};
uint8_t madctl_{};
const char *model_{"Unknown"};
bool invert_colors_{};
display::ColorOrder color_mode_{display::COLOR_ORDER_BGR};
size_t width_;
size_t height_;
uint16_t *buffer_{nullptr};
std::vector<GPIOPin *> enable_pins_{};
uint16_t x_low_{1};
uint16_t y_low_{1};
uint16_t x_high_{0};
uint16_t y_high_{0};
esp_lcd_panel_handle_t handle_{};
};
#ifdef USE_SPI
class MipiRgbSpi : public MipiRgb,
public spi::SPIDevice<spi::BIT_ORDER_MSB_FIRST, spi::CLOCK_POLARITY_LOW, spi::CLOCK_PHASE_LEADING,
spi::DATA_RATE_1MHZ> {
public:
MipiRgbSpi(int width, int height) : MipiRgb(width, height) {}
void set_init_sequence(const std::vector<uint8_t> &init_sequence) { this->init_sequence_ = init_sequence; }
void set_dc_pin(GPIOPin *dc_pin) { this->dc_pin_ = dc_pin; }
void setup() override;
protected:
void write_command_(uint8_t value);
void write_data_(uint8_t value);
void write_init_sequence_();
void dump_config();
GPIOPin *dc_pin_{nullptr};
std::vector<uint8_t> init_sequence_;
};
#endif
} // namespace mipi_rgb
} // namespace esphome
#endif

View File

@@ -0,0 +1,24 @@
from .st7701s import st7701s
st7701s.extend(
"GUITION-4848S040",
width=480,
height=480,
data_rate="2MHz",
cs_pin=39,
de_pin=18,
hsync_pin=16,
vsync_pin=17,
pclk_pin=21,
pclk_frequency="12MHz",
pixel_mode="18bit",
mirror_x=True,
mirror_y=True,
data_pins={
"red": [11, 12, 13, 14, 0],
"green": [8, 20, 3, 46, 9, 10],
"blue": [4, 5, 6, 7, 15],
},
# Additional configuration for Guition 4848S040, 16 bit bus config
add_init_sequence=((0xCD, 0x00),),
)

View File

@@ -0,0 +1,228 @@
from esphome.config_validation import UNDEFINED
from .st7701s import ST7701S
# fmt: off
ST7701S(
"T-PANEL-S3",
width=480,
height=480,
color_order="BGR",
invert_colors=False,
swap_xy=UNDEFINED,
spi_mode="MODE3",
cs_pin={"xl9535": None, "number": 17},
reset_pin={"xl9535": None, "number": 5},
hsync_pin=39,
vsync_pin=40,
pclk_pin=41,
data_pins={
"red": [12, 13, 42, 46, 45],
"green": [6, 7, 8, 9, 10, 11],
"blue": [1, 2, 3, 4, 5],
},
hsync_front_porch=20,
hsync_back_porch=0,
hsync_pulse_width=2,
vsync_front_porch=30,
vsync_back_porch=1,
vsync_pulse_width=8,
pclk_frequency="6MHz",
pclk_inverted=False,
initsequence=(
(0xFF, 0x77, 0x01, 0x00, 0x00, 0x13), (0xEF, 0x08), (0xFF, 0x77, 0x01, 0x00, 0x00, 0x10),
(0xC0, 0x3B, 0x00), (0xC1, 0x0B, 0x02), (0xC2, 0x30, 0x02, 0x37), (0xCC, 0x10),
(0xB0, 0x00, 0x0F, 0x16, 0x0E, 0x11, 0x07, 0x09, 0x09, 0x08, 0x23, 0x05, 0x11, 0x0F, 0x28, 0x2D, 0x18),
(0xB1, 0x00, 0x0F, 0x16, 0x0E, 0x11, 0x07, 0x09, 0x08, 0x09, 0x23, 0x05, 0x11, 0x0F, 0x28, 0x2D, 0x18),
(0xFF, 0x77, 0x01, 0x00, 0x00, 0x11),
(0xB0, 0x4D), (0xB1, 0x33), (0xB2, 0x87), (0xB5, 0x4B), (0xB7, 0x8C), (0xB8, 0x20), (0xC1, 0x78),
(0xC2, 0x78), (0xD0, 0x88), (0xE0, 0x00, 0x00, 0x02),
(0xE1, 0x02, 0xF0, 0x00, 0x00, 0x03, 0xF0, 0x00, 0x00, 0x00, 0x44, 0x44),
(0xE2, 0x10, 0x10, 0x40, 0x40, 0xF2, 0xF0, 0x00, 0x00, 0xF2, 0xF0, 0x00, 0x00),
(0xE3, 0x00, 0x00, 0x11, 0x11), (0xE4, 0x44, 0x44),
(0xE5, 0x07, 0xEF, 0xF0, 0xF0, 0x09, 0xF1, 0xF0, 0xF0, 0x03, 0xF3, 0xF0, 0xF0, 0x05, 0xED, 0xF0, 0xF0),
(0xE6, 0x00, 0x00, 0x11, 0x11), (0xE7, 0x44, 0x44),
(0xE8, 0x08, 0xF0, 0xF0, 0xF0, 0x0A, 0xF2, 0xF0, 0xF0, 0x04, 0xF4, 0xF0, 0xF0, 0x06, 0xEE, 0xF0, 0xF0),
(0xEB, 0x00, 0x00, 0xE4, 0xE4, 0x44, 0x88, 0x40),
(0xEC, 0x78, 0x00),
(0xED, 0x20, 0xF9, 0x87, 0x76, 0x65, 0x54, 0x4F, 0xFF, 0xFF, 0xF4, 0x45, 0x56, 0x67, 0x78, 0x9F, 0x02),
(0xEF, 0x10, 0x0D, 0x04, 0x08, 0x3F, 0x1F),
(0xFF, 0x77, 0x01, 0x00, 0x00, 0x10),
),
)
t_rgb = ST7701S(
"T-RGB-2.1",
width=480,
height=480,
color_order="BGR",
pixel_mode="18bit",
invert_colors=False,
swap_xy=UNDEFINED,
spi_mode="MODE3",
cs_pin={"xl9535": None, "number": 3},
de_pin=45,
hsync_pin=47,
vsync_pin=41,
pclk_pin=42,
data_pins={
"red": [7, 6, 5, 3, 2],
"green": [14, 13, 12, 11, 10, 9],
"blue": [21, 18, 17, 16, 15],
},
hsync_front_porch=50,
hsync_pulse_width=1,
hsync_back_porch=30,
vsync_front_porch=20,
vsync_pulse_width=1,
vsync_back_porch=30,
pclk_frequency="12MHz",
pclk_inverted=False,
initsequence=(
(0xFF, 0x77, 0x01, 0x00, 0x00, 0x10),
(0xC0, 0x3B, 0x00),
(0xC1, 0x0B, 0x02),
(0xC2, 0x07, 0x02),
(0xCC, 0x10),
(0xCD, 0x08),
(0xB0,
0x00, 0x11, 0x16, 0x0e,
0x11, 0x06, 0x05, 0x09,
0x08, 0x21, 0x06, 0x13,
0x10, 0x29, 0x31, 0x18),
(0xB1,
0x00, 0x11, 0x16, 0x0e,
0x11, 0x07, 0x05, 0x09,
0x09, 0x21, 0x05, 0x13,
0x11, 0x2a, 0x31, 0x18),
(0xFF, 0x77, 0x01, 0x00, 0x00, 0x11),
(0xB0, 0x6D),
(0xB1, 0x37),
(0xB2, 0x81),
(0xB3, 0x80),
(0xB5, 0x43),
(0xB7, 0x85),
(0xB8, 0x20),
(0xC1, 0x78),
(0xC2, 0x78),
(0xC3, 0x8C),
(0xD0, 0x88),
(0xE0, 0x00, 0x00, 0x02),
(0xE1,
0x03, 0xA0, 0x00, 0x00,
0x04, 0xA0, 0x00, 0x00,
0x00, 0x20, 0x20),
(0xE2,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00),
(0xE3, 0x00, 0x00, 0x11, 0x00),
(0xE4, 0x22, 0x00),
(0xE5,
0x05, 0xEC, 0xA0, 0xA0,
0x07, 0xEE, 0xA0, 0xA0,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00),
(0xE6, 0x00, 0x00, 0x11, 0x00),
(0xE7, 0x22, 0x00),
(0xE8,
0x06, 0xED, 0xA0, 0xA0,
0x08, 0xEF, 0xA0, 0xA0,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00),
(0xEB, 0x00, 0x00, 0x40, 0x40, 0x00, 0x00, 0x10),
(0xED,
0xFF, 0xFF, 0xFF, 0xBA,
0x0A, 0xBF, 0x45, 0xFF,
0xFF, 0x54, 0xFB, 0xA0,
0xAB, 0xFF, 0xFF, 0xFF),
(0xEF, 0x10, 0x0D, 0x04, 0x08, 0x3F, 0x1F),
(0xFF, 0x77, 0x01, 0x00, 0x00, 0x13),
(0xEF, 0x08),
(0xFF, 0x77, 0x01, 0x00, 0x00, 0x10)
)
)
t_rgb.extend(
"T-RGB-2.8",
initsequence=(
(0xFF, 0x77, 0x01, 0x00, 0x00, 0x13),
(0xEF, 0x08),
(0xFF, 0x77, 0x01, 0x00, 0x00, 0x10),
(0xC0, 0x3B, 0x00),
(0xC1, 0x10, 0x0C),
(0xC2, 0x07, 0x0A),
(0xC7, 0x00),
(0xC7, 0x10),
(0xCD, 0x08),
(0xB0,
0x05, 0x12, 0x98, 0x0e, 0x0F,
0x07, 0x07, 0x09, 0x09, 0x23,
0x05, 0x52, 0x0F, 0x67, 0x2C, 0x11),
(0xB1,
0x0B, 0x11, 0x97, 0x0C, 0x12,
0x06, 0x06, 0x08, 0x08, 0x22,
0x03, 0x51, 0x11, 0x66, 0x2B, 0x0F),
(0xFF, 0x77, 0x01, 0x00, 0x00, 0x11),
(0xB0, 0x5D),
(0xB1, 0x2D),
(0xB2, 0x81),
(0xB3, 0x80),
(0xB5, 0x4E),
(0xB7, 0x85),
(0xB8, 0x20),
(0xC1, 0x78),
(0xC2, 0x78),
(0xD0, 0x88),
(0xE0, 0x00, 0x00, 0x02),
(0xE1,
0x06, 0x30, 0x08, 0x30, 0x05,
0x30, 0x07, 0x30, 0x00, 0x33,
0x33),
(0xE2,
0x11, 0x11, 0x33, 0x33, 0xf4,
0x00, 0x00, 0x00, 0xf4, 0x00,
0x00, 0x00),
(0xE3, 0x00, 0x00, 0x11, 0x11),
(0xE4, 0x44, 0x44),
(0xE5,
0x0d, 0xf5, 0x30, 0xf0, 0x0f,
0xf7, 0x30, 0xf0, 0x09, 0xf1,
0x30, 0xf0, 0x0b, 0xf3, 0x30, 0xf0),
(0xE6, 0x00, 0x00, 0x11, 0x11),
(0xE7, 0x44, 0x44),
(0xE8,
0x0c, 0xf4, 0x30, 0xf0,
0x0e, 0xf6, 0x30, 0xf0,
0x08, 0xf0, 0x30, 0xf0,
0x0a, 0xf2, 0x30, 0xf0),
(0xe9, 0x36),
(0xEB, 0x00, 0x01, 0xe4, 0xe4, 0x44, 0x88, 0x40),
(0xED,
0xff, 0x10, 0xaf, 0x76,
0x54, 0x2b, 0xcf, 0xff,
0xff, 0xfc, 0xb2, 0x45,
0x67, 0xfa, 0x01, 0xff),
(0xEF, 0x08, 0x08, 0x08, 0x45, 0x3f, 0x54),
(0xFF, 0x77, 0x01, 0x00, 0x00, 0x10),
)
)

View File

@@ -0,0 +1,9 @@
from esphome.components.mipi import DriverChip
from esphome.config_validation import UNDEFINED
# A driver chip for Raspberry Pi MIPI RGB displays. These require no init sequence
DriverChip(
"RPI",
swap_xy=UNDEFINED,
initsequence=(),
)

View File

@@ -0,0 +1,214 @@
from esphome.components.mipi import (
MADCTL,
MADCTL_ML,
MADCTL_XFLIP,
MODE_BGR,
DriverChip,
)
from esphome.config_validation import UNDEFINED
from esphome.const import CONF_COLOR_ORDER, CONF_HEIGHT, CONF_MIRROR_X, CONF_MIRROR_Y
SDIR_CMD = 0xC7
class ST7701S(DriverChip):
# The ST7701s does not use the standard MADCTL bits for x/y mirroring
def add_madctl(self, sequence: list, config: dict):
transform = self.get_transform(config)
madctl = 0x00
if config[CONF_COLOR_ORDER] == MODE_BGR:
madctl |= 0x08
if transform.get(CONF_MIRROR_Y):
madctl |= MADCTL_ML
sequence.append((MADCTL, madctl))
sdir = 0
if transform.get(CONF_MIRROR_X):
sdir |= 0x04
madctl |= MADCTL_XFLIP
sequence.append((SDIR_CMD, sdir))
return madctl
@property
def transforms(self) -> set[str]:
"""
The ST7701 never supports axis swapping, and mirroring the y-axis only works for full height.
"""
if self.get_default(CONF_HEIGHT) != 864:
return {CONF_MIRROR_X}
return {CONF_MIRROR_X, CONF_MIRROR_Y}
# fmt: off
st7701s = ST7701S(
"ST7701S",
width=480,
height=864,
swap_xy=UNDEFINED,
hsync_front_porch=20,
hsync_back_porch=10,
hsync_pulse_width=10,
vsync_front_porch=10,
vsync_back_porch=10,
vsync_pulse_width=10,
pclk_frequency="16MHz",
pclk_inverted=True,
initsequence=(
(0xFF, 0x77, 0x01, 0x00, 0x00, 0x10), # Page 0
(0xC0, 0x3B, 0x00), (0xC1, 0x0D, 0x02), (0xC2, 0x31, 0x05),
(0xB0, 0x00, 0x11, 0x18, 0x0E, 0x11, 0x06, 0x07, 0x08, 0x07, 0x22, 0x04, 0x12, 0x0F, 0xAA, 0x31, 0x18,),
(0xB1, 0x00, 0x11, 0x19, 0x0E, 0x12, 0x07, 0x08, 0x08, 0x08, 0x22, 0x04, 0x11, 0x11, 0xA9, 0x32, 0x18,),
(0xFF, 0x77, 0x01, 0x00, 0x00, 0x11), # page 1
(0xB0, 0x60), (0xB1, 0x32), (0xB2, 0x07), (0xB3, 0x80), (0xB5, 0x49), (0xB7, 0x85), (0xB8, 0x21), (0xC1, 0x78),
(0xC2, 0x78), (0xE0, 0x00, 0x1B, 0x02),
(0xE1, 0x08, 0xA0, 0x00, 0x00, 0x07, 0xA0, 0x00, 0x00, 0x00, 0x44, 0x44),
(0xE2, 0x11, 0x11, 0x44, 0x44, 0xED, 0xA0, 0x00, 0x00, 0xEC, 0xA0, 0x00, 0x00),
(0xE3, 0x00, 0x00, 0x11, 0x11),
(0xE4, 0x44, 0x44),
(0xE5, 0x0A, 0xE9, 0xD8, 0xA0, 0x0C, 0xEB, 0xD8, 0xA0, 0x0E, 0xED, 0xD8, 0xA0, 0x10, 0xEF, 0xD8, 0xA0,),
(0xE6, 0x00, 0x00, 0x11, 0x11), (0xE7, 0x44, 0x44),
(0xE8, 0x09, 0xE8, 0xD8, 0xA0, 0x0B, 0xEA, 0xD8, 0xA0, 0x0D, 0xEC, 0xD8, 0xA0, 0x0F, 0xEE, 0xD8, 0xA0,),
(0xEB, 0x02, 0x00, 0xE4, 0xE4, 0x88, 0x00, 0x40), (0xEC, 0x3C, 0x00),
(0xED, 0xAB, 0x89, 0x76, 0x54, 0x02, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x20, 0x45, 0x67, 0x98, 0xBA,),
(0xFF, 0x77, 0x01, 0x00, 0x00, 0x13), # Page 3
(0xE5, 0xE4),
(0xFF, 0x77, 0x01, 0x00, 0x00, 0x10), # Page 0
(0xCD, 0x08),
)
)
st7701s.extend(
"MAKERFABS-4",
width=480,
height=480,
color_order="RGB",
invert_colors=True,
pixel_mode="18bit",
cs_pin=1,
de_pin={
"number": 45,
"ignore_strapping_warning": True
},
hsync_pin=5,
vsync_pin=4,
pclk_pin=21,
data_pins={
"red": [39, 40, 41, 42, 2],
"green": [0, 9, 14, 47, 48, 3],
"blue": [6, 7, 15, 16, 8]
}
)
st7701s.extend(
"SEEED-INDICATOR-D1",
width=480,
height=480,
mirror_x=True,
mirror_y=True,
invert_colors=True,
pixel_mode="18bit",
spi_mode="MODE3",
data_rate="2MHz",
hsync_front_porch=10,
hsync_pulse_width=8,
hsync_back_porch=50,
vsync_front_porch=10,
vsync_pulse_width=8,
vsync_back_porch=20,
cs_pin={"pca9554": None, "number": 4},
de_pin=18,
hsync_pin=16,
vsync_pin=17,
pclk_pin=21,
pclk_inverted=False,
data_pins={
"red": [4, 3, 2, 1, 0],
"green": [10, 9, 8, 7, 6, 5],
"blue": [15, 14, 13, 12, 11]
},
)
st7701s.extend(
"UEDX48480021-MD80ET",
width=480,
height=480,
pixel_mode="18bit",
cs_pin=18,
reset_pin=8,
de_pin=17,
vsync_pin={"number": 3, "ignore_strapping_warning": True},
hsync_pin={"number": 46, "ignore_strapping_warning": True},
pclk_pin=9,
data_pins={
"red": [40, 41, 42, 2, 1],
"green": [21, 47, 48, 45, 38, 39],
"blue": [10, 11, {"number": 12, "allow_other_uses": True}, {"number": 13, "allow_other_uses": True}, 14]
},
initsequence=(
(0xFF, 0x77, 0x01, 0x00, 0x00, 0x13), (0xEF, 0x08), (0xFF, 0x77, 0x01, 0x00, 0x00, 0x10),
(0xC0, 0x3B, 0x00), (0xC1, 0x0B, 0x02), (0xC2, 0x07, 0x02), (0xC7, 0x00), (0xCC, 0x10), (0xCD, 0x08),
(0xB0, 0x00, 0x11, 0x16, 0x0E, 0x11, 0x06, 0x05, 0x09, 0x08, 0x21, 0x06, 0x13, 0x10, 0x29, 0x31, 0x18),
(0xB1, 0x00, 0x11, 0x16, 0x0E, 0x11, 0x07, 0x05, 0x09, 0x09, 0x21, 0x05, 0x13, 0x11, 0x2A, 0x31, 0x18),
(0xFF, 0x77, 0x01, 0x00, 0x00, 0x11),
(0xB0, 0x6D), (0xB1, 0x37), (0xB2, 0x8B), (0xB3, 0x80), (0xB5, 0x43), (0xB7, 0x85),
(0xB8, 0x20), (0xC0, 0x09), (0xC1, 0x78), (0xC2, 0x78), (0xD0, 0x88),
(0xE0, 0x00, 0x00, 0x02),
(0xE1, 0x03, 0xA0, 0x00, 0x00, 0x04, 0xA0, 0x00, 0x00, 0x00, 0x20, 0x20),
(0xE2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
(0xE3, 0x00, 0x00, 0x11, 0x00),
(0xE4, 0x22, 0x00),
(0xE5, 0x05, 0xEC, 0xF6, 0xCA, 0x07, 0xEE, 0xF6, 0xCA, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
(0xE6, 0x00, 0x00, 0x11, 0x00),
(0xE7, 0x22, 0x00),
(0xE8, 0x06, 0xED, 0xF6, 0xCA, 0x08, 0xEF, 0xF6, 0xCA, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
(0xE9, 0x36, 0x00),
(0xEB, 0x00, 0x00, 0x40, 0x40, 0x00, 0x00, 0x00),
(0xED, 0xFF, 0xFF, 0xFF, 0xBA, 0x0A, 0xFF, 0x45, 0xFF, 0xFF, 0x54, 0xFF, 0xA0, 0xAB, 0xFF, 0xFF, 0xFF),
(0xEF, 0x08, 0x08, 0x08, 0x45, 0x3F, 0x54),
(0xFF, 0x77, 0x01, 0x00, 0x00, 0x13), (0xE8, 0x00, 0x0E), (0xFF, 0x77, 0x01, 0x00, 0x00, 0x00),
(0x11, 0x00), (0xFF, 0x77, 0x01, 0x00, 0x00, 0x13), (0xE8, 0x00, 0x0C),
(0xE8, 0x00, 0x00), (0xFF, 0x77, 0x01, 0x00, 0x00, 0x00)
)
)
st7701s.extend(
"ZX2D10GE01R-V4848",
width=480,
height=480,
pixel_mode="18bit",
cs_pin=21,
de_pin=39,
vsync_pin=48,
hsync_pin=40,
pclk_pin={"number": 45, "ignore_strapping_warning": True},
pclk_frequency="15MHz",
pclk_inverted=True,
hsync_pulse_width=10,
hsync_back_porch=10,
hsync_front_porch=10,
vsync_pulse_width=2,
vsync_back_porch=12,
vsync_front_porch=14,
data_pins={
"red": [10, 16, 9, 15, 46],
"green": [8, 13, 18, 12, 11, 17],
"blue": [{"number": 47, "allow_other_uses": True}, {"number": 41, "allow_other_uses": True}, 0, 42, 14]
},
initsequence=(
(0xFF, 0x77, 0x01, 0x00, 0x00, 0x13), (0xEF, 0x08), (0xFF, 0x77, 0x01, 0x00, 0x00, 0x10), (0xC0, 0x3B, 0x00),
(0xC1, 0x0B, 0x02), (0xC2, 0x07, 0x02), (0xCC, 0x10), (0xCD, 0x08),
(0xB0, 0x00, 0x11, 0x16, 0x0e, 0x11, 0x06, 0x05, 0x09, 0x08, 0x21, 0x06, 0x13, 0x10, 0x29, 0x31, 0x18),
(0xB1, 0x00, 0x11, 0x16, 0x0e, 0x11, 0x07, 0x05, 0x09, 0x09, 0x21, 0x05, 0x13, 0x11, 0x2a, 0x31, 0x18),
(0xFF, 0x77, 0x01, 0x00, 0x00, 0x11), (0xB0, 0x6d), (0xB1, 0x37), (0xB2, 0x81), (0xB3, 0x80), (0xB5, 0x43),
(0xB7, 0x85), (0xB8, 0x20), (0xC1, 0x78), (0xC2, 0x78), (0xD0, 0x88), (0xE0, 0x00, 0x00, 0x02),
(0xE1, 0x03, 0xA0, 0x00, 0x00, 0x04, 0xA0, 0x00, 0x00, 0x00, 0x20, 0x20),
(0xE2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
(0xE3, 0x00, 0x00, 0x11, 0x00), (0xE4, 0x22, 0x00),
(0xE5, 0x05, 0xEC, 0xA0, 0xA0, 0x07, 0xEE, 0xA0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
(0xE6, 0x00, 0x00, 0x11, 0x00), (0xE7, 0x22, 0x00),
(0xE8, 0x06, 0xED, 0xA0, 0xA0, 0x08, 0xEF, 0xA0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
(0xEB, 0x00, 0x00, 0x40, 0x40, 0x00, 0x00, 0x00),
(0xED, 0xFF, 0xFF, 0xFF, 0xBA, 0x0A, 0xBF, 0x45, 0xFF, 0xFF, 0x54, 0xFB, 0xA0, 0xAB, 0xFF, 0xFF, 0xFF),
(0xEF, 0x10, 0x0D, 0x04, 0x08, 0x3F, 0x1F),
(0xFF, 0x77, 0x01, 0x00, 0x00, 0x13), (0xEF, 0x08), (0xFF, 0x77, 0x01, 0x00, 0x00, 0x00)
)
)

View File

@@ -0,0 +1,64 @@
from esphome.components.mipi import DriverChip
from esphome.config_validation import UNDEFINED
from .st7701s import st7701s
wave_4_3 = DriverChip(
"ESP32-S3-TOUCH-LCD-4.3",
swap_xy=UNDEFINED,
initsequence=(),
width=800,
height=480,
pclk_frequency="16MHz",
reset_pin={"ch422g": None, "number": 3},
enable_pin={"ch422g": None, "number": 2},
de_pin=5,
hsync_pin={"number": 46, "ignore_strapping_warning": True},
vsync_pin={"number": 3, "ignore_strapping_warning": True},
pclk_pin=7,
pclk_inverted=True,
hsync_front_porch=210,
hsync_pulse_width=30,
hsync_back_porch=30,
vsync_front_porch=4,
vsync_pulse_width=4,
vsync_back_porch=4,
data_pins={
"red": [1, 2, 42, 41, 40],
"green": [39, 0, 45, 48, 47, 21],
"blue": [14, 38, 18, 17, 10],
},
)
wave_4_3.extend(
"ESP32-S3-TOUCH-LCD-7-800X480",
enable_pin=[{"ch422g": None, "number": 2}, {"ch422g": None, "number": 6}],
hsync_back_porch=8,
hsync_front_porch=8,
hsync_pulse_width=4,
vsync_back_porch=16,
vsync_front_porch=16,
vsync_pulse_width=4,
)
st7701s.extend(
"WAVESHARE-4-480x480",
data_rate="2MHz",
spi_mode="MODE3",
color_order="BGR",
pixel_mode="18bit",
width=480,
height=480,
invert_colors=True,
cs_pin=42,
de_pin=40,
hsync_pin=38,
vsync_pin=39,
pclk_pin=41,
pclk_frequency="12MHz",
pclk_inverted=False,
data_pins={
"red": [46, 3, 8, 18, 17],
"green": [14, 13, 12, 11, 10, 9],
"blue": [5, 45, 48, 47, 21],
},
)

View File

@@ -19,13 +19,14 @@ void MS5611Component::setup() {
this->mark_failed();
return;
}
delay(100); // NOLINT
for (uint8_t offset = 0; offset < 6; offset++) {
if (!this->read_byte_16(MS5611_CMD_READ_PROM + (offset * 2), &this->prom_[offset])) {
this->mark_failed();
return;
this->set_timeout(100, [this]() {
for (uint8_t offset = 0; offset < 6; offset++) {
if (!this->read_byte_16(MS5611_CMD_READ_PROM + (offset * 2), &this->prom_[offset])) {
this->mark_failed();
return;
}
}
}
});
}
void MS5611Component::dump_config() {
ESP_LOGCONFIG(TAG, "MS5611:");

View File

@@ -11,7 +11,10 @@ static const char *const TAG = "nextion.upload";
bool Nextion::upload_end_(bool successful) {
if (successful) {
ESP_LOGD(TAG, "Upload successful");
delay(1500); // NOLINT
for (uint8_t i = 0; i <= 5; i++) {
delay(1000); // NOLINT
App.feed_wdt(); // Feed the watchdog timer.
}
App.safe_reboot();
} else {
ESP_LOGE(TAG, "Upload failed");

View File

@@ -14,6 +14,7 @@ from esphome.const import (
CODEOWNERS = ["@Mat931"]
DEPENDENCIES = ["i2c"]
AUTO_LOAD = ["gpio_expander"]
MULTI_CONF = True
pca6416a_ns = cg.esphome_ns.namespace("pca6416a")

View File

@@ -51,6 +51,11 @@ void PCA6416AComponent::setup() {
this->status_has_error());
}
void PCA6416AComponent::loop() {
// Invalidate cache at the start of each loop
this->reset_pin_cache_();
}
void PCA6416AComponent::dump_config() {
if (this->has_pullup_) {
ESP_LOGCONFIG(TAG, "PCAL6416A:");
@@ -63,15 +68,25 @@ void PCA6416AComponent::dump_config() {
}
}
bool PCA6416AComponent::digital_read(uint8_t pin) {
uint8_t bit = pin % 8;
bool PCA6416AComponent::digital_read_hw(uint8_t pin) {
uint8_t reg_addr = pin < 8 ? PCA6416A_INPUT0 : PCA6416A_INPUT1;
uint8_t value = 0;
this->read_register_(reg_addr, &value);
return value & (1 << bit);
if (!this->read_register_(reg_addr, &value)) {
return false;
}
// Update the appropriate part of input_mask_
if (pin < 8) {
this->input_mask_ = (this->input_mask_ & 0xFF00) | value;
} else {
this->input_mask_ = (this->input_mask_ & 0x00FF) | (uint16_t(value) << 8);
}
return true;
}
void PCA6416AComponent::digital_write(uint8_t pin, bool value) {
bool PCA6416AComponent::digital_read_cache(uint8_t pin) { return this->input_mask_ & (1 << pin); }
void PCA6416AComponent::digital_write_hw(uint8_t pin, bool value) {
uint8_t reg_addr = pin < 8 ? PCA6416A_OUTPUT0 : PCA6416A_OUTPUT1;
this->update_register_(pin, value, reg_addr);
}

View File

@@ -3,20 +3,20 @@
#include "esphome/core/component.h"
#include "esphome/core/hal.h"
#include "esphome/components/i2c/i2c.h"
#include "esphome/components/gpio_expander/cached_gpio.h"
namespace esphome {
namespace pca6416a {
class PCA6416AComponent : public Component, public i2c::I2CDevice {
class PCA6416AComponent : public Component,
public i2c::I2CDevice,
public gpio_expander::CachedGpioExpander<uint8_t, 16> {
public:
PCA6416AComponent() = default;
/// Check i2c availability and setup masks
void setup() override;
/// Helper function to read the value of a pin.
bool digital_read(uint8_t pin);
/// Helper function to write the value of a pin.
void digital_write(uint8_t pin, bool value);
void loop() override;
/// Helper function to set the pin mode of a pin.
void pin_mode(uint8_t pin, gpio::Flags flags);
@@ -25,6 +25,11 @@ class PCA6416AComponent : public Component, public i2c::I2CDevice {
void dump_config() override;
protected:
// Virtual methods from CachedGpioExpander
bool digital_read_hw(uint8_t pin) override;
bool digital_read_cache(uint8_t pin) override;
void digital_write_hw(uint8_t pin, bool value) override;
bool read_register_(uint8_t reg, uint8_t *value);
bool write_register_(uint8_t reg, uint8_t value);
void update_register_(uint8_t pin, bool pin_value, uint8_t reg_addr);
@@ -32,6 +37,8 @@ class PCA6416AComponent : public Component, public i2c::I2CDevice {
/// The mask to write as output state - 1 means HIGH, 0 means LOW
uint8_t output_0_{0x00};
uint8_t output_1_{0x00};
/// Cache for input values (16-bit combined for both banks)
uint16_t input_mask_{0x00};
/// Storage for last I2C error seen
esphome::i2c::ErrorCode last_error_;
/// Only the PCAL6416A has pull-up resistors

View File

@@ -11,7 +11,8 @@ from esphome.const import (
CONF_OUTPUT,
)
CODEOWNERS = ["@hwstar", "@clydebarrow"]
CODEOWNERS = ["@hwstar", "@clydebarrow", "@bdraco"]
AUTO_LOAD = ["gpio_expander"]
DEPENDENCIES = ["i2c"]
MULTI_CONF = True
CONF_PIN_COUNT = "pin_count"

View File

@@ -37,10 +37,9 @@ void PCA9554Component::setup() {
}
void PCA9554Component::loop() {
// The read_inputs_() method will cache the input values from the chip.
this->read_inputs_();
// Clear all the previously read flags.
this->was_previously_read_ = 0x00;
// Invalidate the cache at the start of each loop.
// The actual read will happen on demand when digital_read() is called
this->reset_pin_cache_();
}
void PCA9554Component::dump_config() {
@@ -54,21 +53,17 @@ void PCA9554Component::dump_config() {
}
}
bool PCA9554Component::digital_read(uint8_t pin) {
// Note: We want to try and avoid doing any I2C bus read transactions here
// to conserve I2C bus bandwidth. So what we do is check to see if we
// have seen a read during the time esphome is running this loop. If we have,
// we do an I2C bus transaction to get the latest value. If we haven't
// we return a cached value which was read at the time loop() was called.
if (this->was_previously_read_ & (1 << pin))
this->read_inputs_(); // Force a read of a new value
// Indicate we saw a read request for this pin in case a
// read happens later in the same loop.
this->was_previously_read_ |= (1 << pin);
bool PCA9554Component::digital_read_hw(uint8_t pin) {
// Read all pins from hardware into input_mask_
return this->read_inputs_(); // Return true if I2C read succeeded, false on error
}
bool PCA9554Component::digital_read_cache(uint8_t pin) {
// Return the cached pin state from input_mask_
return this->input_mask_ & (1 << pin);
}
void PCA9554Component::digital_write(uint8_t pin, bool value) {
void PCA9554Component::digital_write_hw(uint8_t pin, bool value) {
if (value) {
this->output_mask_ |= (1 << pin);
} else {
@@ -127,8 +122,7 @@ bool PCA9554Component::write_register_(uint8_t reg, uint16_t value) {
float PCA9554Component::get_setup_priority() const { return setup_priority::IO; }
// Run our loop() method very early in the loop, so that we cache read values before
// before other components call our digital_read() method.
// Run our loop() method early to invalidate cache before any other components access the pins
float PCA9554Component::get_loop_priority() const { return 9.0f; } // Just after WIFI
void PCA9554GPIOPin::setup() { pin_mode(flags_); }

View File

@@ -3,22 +3,21 @@
#include "esphome/core/component.h"
#include "esphome/core/hal.h"
#include "esphome/components/i2c/i2c.h"
#include "esphome/components/gpio_expander/cached_gpio.h"
namespace esphome {
namespace pca9554 {
class PCA9554Component : public Component, public i2c::I2CDevice {
class PCA9554Component : public Component,
public i2c::I2CDevice,
public gpio_expander::CachedGpioExpander<uint16_t, 16> {
public:
PCA9554Component() = default;
/// Check i2c availability and setup masks
void setup() override;
/// Poll for input changes periodically
/// Invalidate cache at start of each loop
void loop() override;
/// Helper function to read the value of a pin.
bool digital_read(uint8_t pin);
/// Helper function to write the value of a pin.
void digital_write(uint8_t pin, bool value);
/// Helper function to set the pin mode of a pin.
void pin_mode(uint8_t pin, gpio::Flags flags);
@@ -32,9 +31,13 @@ class PCA9554Component : public Component, public i2c::I2CDevice {
protected:
bool read_inputs_();
bool write_register_(uint8_t reg, uint16_t value);
// Virtual methods from CachedGpioExpander
bool digital_read_hw(uint8_t pin) override;
bool digital_read_cache(uint8_t pin) override;
void digital_write_hw(uint8_t pin, bool value) override;
/// number of bits the expander has
size_t pin_count_{8};
/// width of registers
@@ -45,8 +48,6 @@ class PCA9554Component : public Component, public i2c::I2CDevice {
uint16_t output_mask_{0x00};
/// The state of the actual input pin states - 1 means HIGH, 0 means LOW
uint16_t input_mask_{0x00};
/// Flags to check if read previously during this loop
uint16_t was_previously_read_ = {0x00};
/// Storage for last I2C error seen
esphome::i2c::ErrorCode last_error_;
};

View File

@@ -11,6 +11,7 @@ from esphome.const import (
CONF_OUTPUT,
)
AUTO_LOAD = ["gpio_expander"]
DEPENDENCIES = ["i2c"]
MULTI_CONF = True

View File

@@ -16,6 +16,10 @@ void PCF8574Component::setup() {
this->write_gpio_();
this->read_gpio_();
}
void PCF8574Component::loop() {
// Invalidate the cache at the start of each loop
this->reset_pin_cache_();
}
void PCF8574Component::dump_config() {
ESP_LOGCONFIG(TAG, "PCF8574:");
LOG_I2C_DEVICE(this)
@@ -24,17 +28,19 @@ void PCF8574Component::dump_config() {
ESP_LOGE(TAG, ESP_LOG_MSG_COMM_FAIL);
}
}
bool PCF8574Component::digital_read(uint8_t pin) {
this->read_gpio_();
return this->input_mask_ & (1 << pin);
bool PCF8574Component::digital_read_hw(uint8_t pin) {
// Read all pins from hardware into input_mask_
return this->read_gpio_(); // Return true if I2C read succeeded, false on error
}
void PCF8574Component::digital_write(uint8_t pin, bool value) {
bool PCF8574Component::digital_read_cache(uint8_t pin) { return this->input_mask_ & (1 << pin); }
void PCF8574Component::digital_write_hw(uint8_t pin, bool value) {
if (value) {
this->output_mask_ |= (1 << pin);
} else {
this->output_mask_ &= ~(1 << pin);
}
this->write_gpio_();
}
void PCF8574Component::pin_mode(uint8_t pin, gpio::Flags flags) {
@@ -91,6 +97,9 @@ bool PCF8574Component::write_gpio_() {
}
float PCF8574Component::get_setup_priority() const { return setup_priority::IO; }
// Run our loop() method early to invalidate cache before any other components access the pins
float PCF8574Component::get_loop_priority() const { return 9.0f; } // Just after WIFI
void PCF8574GPIOPin::setup() { pin_mode(flags_); }
void PCF8574GPIOPin::pin_mode(gpio::Flags flags) { this->parent_->pin_mode(this->pin_, flags); }
bool PCF8574GPIOPin::digital_read() { return this->parent_->digital_read(this->pin_) != this->inverted_; }

View File

@@ -3,11 +3,16 @@
#include "esphome/core/component.h"
#include "esphome/core/hal.h"
#include "esphome/components/i2c/i2c.h"
#include "esphome/components/gpio_expander/cached_gpio.h"
namespace esphome {
namespace pcf8574 {
class PCF8574Component : public Component, public i2c::I2CDevice {
// PCF8574(8 pins)/PCF8575(16 pins) always read/write all pins in a single I2C transaction
// so we use uint16_t as bank type to ensure all pins are in one bank and cached together
class PCF8574Component : public Component,
public i2c::I2CDevice,
public gpio_expander::CachedGpioExpander<uint16_t, 16> {
public:
PCF8574Component() = default;
@@ -15,20 +20,22 @@ class PCF8574Component : public Component, public i2c::I2CDevice {
/// Check i2c availability and setup masks
void setup() override;
/// Helper function to read the value of a pin.
bool digital_read(uint8_t pin);
/// Helper function to write the value of a pin.
void digital_write(uint8_t pin, bool value);
/// Invalidate cache at start of each loop
void loop() override;
/// Helper function to set the pin mode of a pin.
void pin_mode(uint8_t pin, gpio::Flags flags);
float get_setup_priority() const override;
float get_loop_priority() const override;
void dump_config() override;
protected:
bool read_gpio_();
bool digital_read_hw(uint8_t pin) override;
bool digital_read_cache(uint8_t pin) override;
void digital_write_hw(uint8_t pin, bool value) override;
bool read_gpio_();
bool write_gpio_();
/// Mask for the pin mode - 1 means output, 0 means input

View File

@@ -18,7 +18,7 @@ void IRAM_ATTR PulseWidthSensorStore::gpio_intr(PulseWidthSensorStore *arg) {
void PulseWidthSensor::dump_config() {
LOG_SENSOR("", "Pulse Width", this);
LOG_UPDATE_INTERVAL(this)
LOG_UPDATE_INTERVAL(this);
LOG_PIN(" Pin: ", this->pin_);
}
void PulseWidthSensor::update() {

View File

@@ -196,8 +196,8 @@ FILTER_SOURCE_FILES = filter_source_files_from_platform(
PlatformFramework.ESP32_ARDUINO,
PlatformFramework.ESP32_IDF,
},
"remote_receiver_esp8266.cpp": {PlatformFramework.ESP8266_ARDUINO},
"remote_receiver_libretiny.cpp": {
"remote_receiver.cpp": {
PlatformFramework.ESP8266_ARDUINO,
PlatformFramework.BK72XX_ARDUINO,
PlatformFramework.RTL87XX_ARDUINO,
PlatformFramework.LN882X_ARDUINO,

View File

@@ -3,12 +3,12 @@
#include "esphome/core/helpers.h"
#include "esphome/core/log.h"
#ifdef USE_ESP8266
#if defined(USE_LIBRETINY) || defined(USE_ESP8266)
namespace esphome {
namespace remote_receiver {
static const char *const TAG = "remote_receiver.esp8266";
static const char *const TAG = "remote_receiver";
void IRAM_ATTR HOT RemoteReceiverComponentStore::gpio_intr(RemoteReceiverComponentStore *arg) {
const uint32_t now = micros();

View File

@@ -1,125 +0,0 @@
#include "remote_receiver.h"
#include "esphome/core/hal.h"
#include "esphome/core/helpers.h"
#include "esphome/core/log.h"
#ifdef USE_LIBRETINY
namespace esphome {
namespace remote_receiver {
static const char *const TAG = "remote_receiver.libretiny";
void IRAM_ATTR HOT RemoteReceiverComponentStore::gpio_intr(RemoteReceiverComponentStore *arg) {
const uint32_t now = micros();
// If the lhs is 1 (rising edge) we should write to an uneven index and vice versa
const uint32_t next = (arg->buffer_write_at + 1) % arg->buffer_size;
const bool level = arg->pin.digital_read();
if (level != next % 2)
return;
// If next is buffer_read, we have hit an overflow
if (next == arg->buffer_read_at)
return;
const uint32_t last_change = arg->buffer[arg->buffer_write_at];
const uint32_t time_since_change = now - last_change;
if (time_since_change <= arg->filter_us)
return;
arg->buffer[arg->buffer_write_at = next] = now;
}
void RemoteReceiverComponent::setup() {
this->pin_->setup();
auto &s = this->store_;
s.filter_us = this->filter_us_;
s.pin = this->pin_->to_isr();
s.buffer_size = this->buffer_size_;
this->high_freq_.start();
if (s.buffer_size % 2 != 0) {
// Make sure divisible by two. This way, we know that every 0bxxx0 index is a space and every 0bxxx1 index is a mark
s.buffer_size++;
}
s.buffer = new uint32_t[s.buffer_size];
void *buf = (void *) s.buffer;
memset(buf, 0, s.buffer_size * sizeof(uint32_t));
// First index is a space.
if (this->pin_->digital_read()) {
s.buffer_write_at = s.buffer_read_at = 1;
} else {
s.buffer_write_at = s.buffer_read_at = 0;
}
this->pin_->attach_interrupt(RemoteReceiverComponentStore::gpio_intr, &this->store_, gpio::INTERRUPT_ANY_EDGE);
}
void RemoteReceiverComponent::dump_config() {
ESP_LOGCONFIG(TAG, "Remote Receiver:");
LOG_PIN(" Pin: ", this->pin_);
if (this->pin_->digital_read()) {
ESP_LOGW(TAG, "Remote Receiver Signal starts with a HIGH value. Usually this means you have to "
"invert the signal using 'inverted: True' in the pin schema!");
}
ESP_LOGCONFIG(TAG,
" Buffer Size: %u\n"
" Tolerance: %u%s\n"
" Filter out pulses shorter than: %u us\n"
" Signal is done after %u us of no changes",
this->buffer_size_, this->tolerance_,
(this->tolerance_mode_ == remote_base::TOLERANCE_MODE_TIME) ? " us" : "%", this->filter_us_,
this->idle_us_);
}
void RemoteReceiverComponent::loop() {
auto &s = this->store_;
// copy write at to local variables, as it's volatile
const uint32_t write_at = s.buffer_write_at;
const uint32_t dist = (s.buffer_size + write_at - s.buffer_read_at) % s.buffer_size;
// signals must at least one rising and one leading edge
if (dist <= 1)
return;
const uint32_t now = micros();
if (now - s.buffer[write_at] < this->idle_us_) {
// The last change was fewer than the configured idle time ago.
return;
}
ESP_LOGVV(TAG, "read_at=%u write_at=%u dist=%u now=%u end=%u", s.buffer_read_at, write_at, dist, now,
s.buffer[write_at]);
// Skip first value, it's from the previous idle level
s.buffer_read_at = (s.buffer_read_at + 1) % s.buffer_size;
uint32_t prev = s.buffer_read_at;
s.buffer_read_at = (s.buffer_read_at + 1) % s.buffer_size;
const uint32_t reserve_size = 1 + (s.buffer_size + write_at - s.buffer_read_at) % s.buffer_size;
this->temp_.clear();
this->temp_.reserve(reserve_size);
int32_t multiplier = s.buffer_read_at % 2 == 0 ? 1 : -1;
for (uint32_t i = 0; prev != write_at; i++) {
int32_t delta = s.buffer[s.buffer_read_at] - s.buffer[prev];
if (uint32_t(delta) >= this->idle_us_) {
// already found a space longer than idle. There must have been two pulses
break;
}
ESP_LOGVV(TAG, " i=%u buffer[%u]=%u - buffer[%u]=%u -> %d", i, s.buffer_read_at, s.buffer[s.buffer_read_at], prev,
s.buffer[prev], multiplier * delta);
this->temp_.push_back(multiplier * delta);
prev = s.buffer_read_at;
s.buffer_read_at = (s.buffer_read_at + 1) % s.buffer_size;
multiplier *= -1;
}
s.buffer_read_at = (s.buffer_size + s.buffer_read_at - 1) % s.buffer_size;
this->temp_.push_back(this->idle_us_ * multiplier);
this->call_listeners_dumpers_();
}
} // namespace remote_receiver
} // namespace esphome
#endif

View File

@@ -131,8 +131,8 @@ FILTER_SOURCE_FILES = filter_source_files_from_platform(
PlatformFramework.ESP32_ARDUINO,
PlatformFramework.ESP32_IDF,
},
"remote_transmitter_esp8266.cpp": {PlatformFramework.ESP8266_ARDUINO},
"remote_transmitter_libretiny.cpp": {
"remote_transmitter.cpp": {
PlatformFramework.ESP8266_ARDUINO,
PlatformFramework.BK72XX_ARDUINO,
PlatformFramework.RTL87XX_ARDUINO,
PlatformFramework.LN882X_ARDUINO,

View File

@@ -2,10 +2,107 @@
#include "esphome/core/log.h"
#include "esphome/core/application.h"
#if defined(USE_LIBRETINY) || defined(USE_ESP8266)
namespace esphome {
namespace remote_transmitter {
static const char *const TAG = "remote_transmitter";
void RemoteTransmitterComponent::setup() {
this->pin_->setup();
this->pin_->digital_write(false);
}
void RemoteTransmitterComponent::dump_config() {
ESP_LOGCONFIG(TAG,
"Remote Transmitter:\n"
" Carrier Duty: %u%%",
this->carrier_duty_percent_);
LOG_PIN(" Pin: ", this->pin_);
}
void RemoteTransmitterComponent::calculate_on_off_time_(uint32_t carrier_frequency, uint32_t *on_time_period,
uint32_t *off_time_period) {
if (carrier_frequency == 0) {
*on_time_period = 0;
*off_time_period = 0;
return;
}
uint32_t period = (1000000UL + carrier_frequency / 2) / carrier_frequency; // round(1000000/freq)
period = std::max(uint32_t(1), period);
*on_time_period = (period * this->carrier_duty_percent_) / 100;
*off_time_period = period - *on_time_period;
}
void RemoteTransmitterComponent::await_target_time_() {
const uint32_t current_time = micros();
if (this->target_time_ == 0) {
this->target_time_ = current_time;
} else if ((int32_t) (this->target_time_ - current_time) > 0) {
delayMicroseconds(this->target_time_ - current_time);
}
}
void RemoteTransmitterComponent::mark_(uint32_t on_time, uint32_t off_time, uint32_t usec) {
this->await_target_time_();
this->pin_->digital_write(true);
const uint32_t target = this->target_time_ + usec;
if (this->carrier_duty_percent_ < 100 && (on_time > 0 || off_time > 0)) {
while (true) { // Modulate with carrier frequency
this->target_time_ += on_time;
if ((int32_t) (this->target_time_ - target) >= 0)
break;
this->await_target_time_();
this->pin_->digital_write(false);
this->target_time_ += off_time;
if ((int32_t) (this->target_time_ - target) >= 0)
break;
this->await_target_time_();
this->pin_->digital_write(true);
}
}
this->target_time_ = target;
}
void RemoteTransmitterComponent::space_(uint32_t usec) {
this->await_target_time_();
this->pin_->digital_write(false);
this->target_time_ += usec;
}
void RemoteTransmitterComponent::digital_write(bool value) { this->pin_->digital_write(value); }
void RemoteTransmitterComponent::send_internal(uint32_t send_times, uint32_t send_wait) {
ESP_LOGD(TAG, "Sending remote code");
uint32_t on_time, off_time;
this->calculate_on_off_time_(this->temp_.get_carrier_frequency(), &on_time, &off_time);
this->target_time_ = 0;
this->transmit_trigger_->trigger();
for (uint32_t i = 0; i < send_times; i++) {
InterruptLock lock;
for (int32_t item : this->temp_.get_data()) {
if (item > 0) {
const auto length = uint32_t(item);
this->mark_(on_time, off_time, length);
} else {
const auto length = uint32_t(-item);
this->space_(length);
}
App.feed_wdt();
}
this->await_target_time_(); // wait for duration of last pulse
this->pin_->digital_write(false);
if (i + 1 < send_times)
this->target_time_ += send_wait;
}
this->complete_trigger_->trigger();
}
} // namespace remote_transmitter
} // namespace esphome
#endif

View File

@@ -1,107 +0,0 @@
#include "remote_transmitter.h"
#include "esphome/core/log.h"
#include "esphome/core/application.h"
#ifdef USE_ESP8266
namespace esphome {
namespace remote_transmitter {
static const char *const TAG = "remote_transmitter";
void RemoteTransmitterComponent::setup() {
this->pin_->setup();
this->pin_->digital_write(false);
}
void RemoteTransmitterComponent::dump_config() {
ESP_LOGCONFIG(TAG,
"Remote Transmitter:\n"
" Carrier Duty: %u%%",
this->carrier_duty_percent_);
LOG_PIN(" Pin: ", this->pin_);
}
void RemoteTransmitterComponent::calculate_on_off_time_(uint32_t carrier_frequency, uint32_t *on_time_period,
uint32_t *off_time_period) {
if (carrier_frequency == 0) {
*on_time_period = 0;
*off_time_period = 0;
return;
}
uint32_t period = (1000000UL + carrier_frequency / 2) / carrier_frequency; // round(1000000/freq)
period = std::max(uint32_t(1), period);
*on_time_period = (period * this->carrier_duty_percent_) / 100;
*off_time_period = period - *on_time_period;
}
void RemoteTransmitterComponent::await_target_time_() {
const uint32_t current_time = micros();
if (this->target_time_ == 0) {
this->target_time_ = current_time;
} else if ((int32_t) (this->target_time_ - current_time) > 0) {
delayMicroseconds(this->target_time_ - current_time);
}
}
void RemoteTransmitterComponent::mark_(uint32_t on_time, uint32_t off_time, uint32_t usec) {
this->await_target_time_();
this->pin_->digital_write(true);
const uint32_t target = this->target_time_ + usec;
if (this->carrier_duty_percent_ < 100 && (on_time > 0 || off_time > 0)) {
while (true) { // Modulate with carrier frequency
this->target_time_ += on_time;
if ((int32_t) (this->target_time_ - target) >= 0)
break;
this->await_target_time_();
this->pin_->digital_write(false);
this->target_time_ += off_time;
if ((int32_t) (this->target_time_ - target) >= 0)
break;
this->await_target_time_();
this->pin_->digital_write(true);
}
}
this->target_time_ = target;
}
void RemoteTransmitterComponent::space_(uint32_t usec) {
this->await_target_time_();
this->pin_->digital_write(false);
this->target_time_ += usec;
}
void RemoteTransmitterComponent::digital_write(bool value) { this->pin_->digital_write(value); }
void RemoteTransmitterComponent::send_internal(uint32_t send_times, uint32_t send_wait) {
ESP_LOGD(TAG, "Sending remote code");
uint32_t on_time, off_time;
this->calculate_on_off_time_(this->temp_.get_carrier_frequency(), &on_time, &off_time);
this->target_time_ = 0;
this->transmit_trigger_->trigger();
for (uint32_t i = 0; i < send_times; i++) {
for (int32_t item : this->temp_.get_data()) {
if (item > 0) {
const auto length = uint32_t(item);
this->mark_(on_time, off_time, length);
} else {
const auto length = uint32_t(-item);
this->space_(length);
}
App.feed_wdt();
}
this->await_target_time_(); // wait for duration of last pulse
this->pin_->digital_write(false);
if (i + 1 < send_times)
this->target_time_ += send_wait;
}
this->complete_trigger_->trigger();
}
} // namespace remote_transmitter
} // namespace esphome
#endif

View File

@@ -1,110 +0,0 @@
#include "remote_transmitter.h"
#include "esphome/core/log.h"
#include "esphome/core/application.h"
#ifdef USE_LIBRETINY
namespace esphome {
namespace remote_transmitter {
static const char *const TAG = "remote_transmitter";
void RemoteTransmitterComponent::setup() {
this->pin_->setup();
this->pin_->digital_write(false);
}
void RemoteTransmitterComponent::dump_config() {
ESP_LOGCONFIG(TAG,
"Remote Transmitter:\n"
" Carrier Duty: %u%%",
this->carrier_duty_percent_);
LOG_PIN(" Pin: ", this->pin_);
}
void RemoteTransmitterComponent::calculate_on_off_time_(uint32_t carrier_frequency, uint32_t *on_time_period,
uint32_t *off_time_period) {
if (carrier_frequency == 0) {
*on_time_period = 0;
*off_time_period = 0;
return;
}
uint32_t period = (1000000UL + carrier_frequency / 2) / carrier_frequency; // round(1000000/freq)
period = std::max(uint32_t(1), period);
*on_time_period = (period * this->carrier_duty_percent_) / 100;
*off_time_period = period - *on_time_period;
}
void RemoteTransmitterComponent::await_target_time_() {
const uint32_t current_time = micros();
if (this->target_time_ == 0) {
this->target_time_ = current_time;
} else {
while ((int32_t) (this->target_time_ - micros()) > 0) {
// busy loop that ensures micros is constantly called
}
}
}
void RemoteTransmitterComponent::mark_(uint32_t on_time, uint32_t off_time, uint32_t usec) {
this->await_target_time_();
this->pin_->digital_write(true);
const uint32_t target = this->target_time_ + usec;
if (this->carrier_duty_percent_ < 100 && (on_time > 0 || off_time > 0)) {
while (true) { // Modulate with carrier frequency
this->target_time_ += on_time;
if ((int32_t) (this->target_time_ - target) >= 0)
break;
this->await_target_time_();
this->pin_->digital_write(false);
this->target_time_ += off_time;
if ((int32_t) (this->target_time_ - target) >= 0)
break;
this->await_target_time_();
this->pin_->digital_write(true);
}
}
this->target_time_ = target;
}
void RemoteTransmitterComponent::space_(uint32_t usec) {
this->await_target_time_();
this->pin_->digital_write(false);
this->target_time_ += usec;
}
void RemoteTransmitterComponent::digital_write(bool value) { this->pin_->digital_write(value); }
void RemoteTransmitterComponent::send_internal(uint32_t send_times, uint32_t send_wait) {
ESP_LOGD(TAG, "Sending remote code");
uint32_t on_time, off_time;
this->calculate_on_off_time_(this->temp_.get_carrier_frequency(), &on_time, &off_time);
this->target_time_ = 0;
this->transmit_trigger_->trigger();
for (uint32_t i = 0; i < send_times; i++) {
InterruptLock lock;
for (int32_t item : this->temp_.get_data()) {
if (item > 0) {
const auto length = uint32_t(item);
this->mark_(on_time, off_time, length);
} else {
const auto length = uint32_t(-item);
this->space_(length);
}
App.feed_wdt();
}
this->await_target_time_(); // wait for duration of last pulse
this->pin_->digital_write(false);
if (i + 1 < send_times)
this->target_time_ += send_wait;
}
this->complete_trigger_->trigger();
}
} // namespace remote_transmitter
} // namespace esphome
#endif

View File

@@ -17,16 +17,8 @@ void RuntimeStatsCollector::record_component_time(Component *component, uint32_t
if (component == nullptr)
return;
// Check if we have cached the name for this component
auto name_it = this->component_names_cache_.find(component);
if (name_it == this->component_names_cache_.end()) {
// First time seeing this component, cache its name
const char *source = component->get_component_source();
this->component_names_cache_[component] = source;
this->component_stats_[source].record_time(duration_ms);
} else {
this->component_stats_[name_it->second].record_time(duration_ms);
}
// Record stats using component pointer as key
this->component_stats_[component].record_time(duration_ms);
if (this->next_log_time_ == 0) {
this->next_log_time_ = current_time + this->log_interval_;
@@ -42,9 +34,10 @@ void RuntimeStatsCollector::log_stats_() {
std::vector<ComponentStatPair> stats_to_display;
for (const auto &it : this->component_stats_) {
Component *component = it.first;
const ComponentRuntimeStats &stats = it.second;
if (stats.get_period_count() > 0) {
ComponentStatPair pair = {it.first, &stats};
ComponentStatPair pair = {component, &stats};
stats_to_display.push_back(pair);
}
}
@@ -54,12 +47,9 @@ void RuntimeStatsCollector::log_stats_() {
// Log top components by period runtime
for (const auto &it : stats_to_display) {
const char *source = it.name;
const ComponentRuntimeStats *stats = it.stats;
ESP_LOGI(TAG, " %s: count=%" PRIu32 ", avg=%.2fms, max=%" PRIu32 "ms, total=%" PRIu32 "ms", source,
stats->get_period_count(), stats->get_period_avg_time_ms(), stats->get_period_max_time_ms(),
stats->get_period_time_ms());
ESP_LOGI(TAG, " %s: count=%" PRIu32 ", avg=%.2fms, max=%" PRIu32 "ms, total=%" PRIu32 "ms",
LOG_STR_ARG(it.component->get_component_log_str()), it.stats->get_period_count(),
it.stats->get_period_avg_time_ms(), it.stats->get_period_max_time_ms(), it.stats->get_period_time_ms());
}
// Log total stats since boot
@@ -72,12 +62,9 @@ void RuntimeStatsCollector::log_stats_() {
});
for (const auto &it : stats_to_display) {
const char *source = it.name;
const ComponentRuntimeStats *stats = it.stats;
ESP_LOGI(TAG, " %s: count=%" PRIu32 ", avg=%.2fms, max=%" PRIu32 "ms, total=%" PRIu32 "ms", source,
stats->get_total_count(), stats->get_total_avg_time_ms(), stats->get_total_max_time_ms(),
stats->get_total_time_ms());
ESP_LOGI(TAG, " %s: count=%" PRIu32 ", avg=%.2fms, max=%" PRIu32 "ms, total=%" PRIu32 "ms",
LOG_STR_ARG(it.component->get_component_log_str()), it.stats->get_total_count(),
it.stats->get_total_avg_time_ms(), it.stats->get_total_max_time_ms(), it.stats->get_total_time_ms());
}
}

View File

@@ -79,7 +79,7 @@ class ComponentRuntimeStats {
// For sorting components by run time
struct ComponentStatPair {
const char *name;
Component *component;
const ComponentRuntimeStats *stats;
bool operator>(const ComponentStatPair &other) const {
@@ -109,15 +109,9 @@ class RuntimeStatsCollector {
}
}
// Use const char* keys for efficiency
// Custom comparator for const char* keys in map
// Without this, std::map would compare pointer addresses instead of string contents,
// causing identical component names at different addresses to be treated as different keys
struct CStrCompare {
bool operator()(const char *a, const char *b) const { return std::strcmp(a, b) < 0; }
};
std::map<const char *, ComponentRuntimeStats, CStrCompare> component_stats_;
std::map<Component *, const char *> component_names_cache_;
// Map from component to its stats
// We use Component* as the key since each component is unique
std::map<Component *, ComponentRuntimeStats> component_stats_;
uint32_t log_interval_;
uint32_t next_log_time_;
};

View File

@@ -25,7 +25,7 @@ CONF_SCAN_TIME = "scan_time"
CONF_DEBOUNCE_TIME = "debounce_time"
CONF_SX1509_ID = "sx1509_id"
AUTO_LOAD = ["key_provider"]
AUTO_LOAD = ["key_provider", "gpio_expander"]
DEPENDENCIES = ["i2c"]
MULTI_CONF = True

View File

@@ -39,6 +39,9 @@ void SX1509Component::dump_config() {
}
void SX1509Component::loop() {
// Reset cache at the start of each loop
this->reset_pin_cache_();
if (this->has_keypad_) {
if (millis() - this->last_loop_timestamp_ < min_loop_period_)
return;
@@ -73,18 +76,20 @@ void SX1509Component::loop() {
}
}
bool SX1509Component::digital_read(uint8_t pin) {
bool SX1509Component::digital_read_hw(uint8_t pin) {
// Always read all pins when any input pin is accessed
return this->read_byte_16(REG_DATA_B, &this->input_mask_);
}
bool SX1509Component::digital_read_cache(uint8_t pin) {
// Return cached value for input pins, false for output pins
if (this->ddr_mask_ & (1 << pin)) {
uint16_t temp_reg_data;
if (!this->read_byte_16(REG_DATA_B, &temp_reg_data))
return false;
if (temp_reg_data & (1 << pin))
return true;
return (this->input_mask_ & (1 << pin)) != 0;
}
return false;
}
void SX1509Component::digital_write(uint8_t pin, bool bit_value) {
void SX1509Component::digital_write_hw(uint8_t pin, bool bit_value) {
if ((~this->ddr_mask_) & (1 << pin)) {
// If the pin is an output, write high/low
uint16_t temp_reg_data = 0;

View File

@@ -2,6 +2,7 @@
#include "esphome/components/i2c/i2c.h"
#include "esphome/components/key_provider/key_provider.h"
#include "esphome/components/gpio_expander/cached_gpio.h"
#include "esphome/core/component.h"
#include "esphome/core/hal.h"
#include "sx1509_gpio_pin.h"
@@ -30,7 +31,10 @@ class SX1509Processor {
class SX1509KeyTrigger : public Trigger<uint8_t> {};
class SX1509Component : public Component, public i2c::I2CDevice, public key_provider::KeyProvider {
class SX1509Component : public Component,
public i2c::I2CDevice,
public gpio_expander::CachedGpioExpander<uint16_t, 16>,
public key_provider::KeyProvider {
public:
SX1509Component() = default;
@@ -39,11 +43,9 @@ class SX1509Component : public Component, public i2c::I2CDevice, public key_prov
float get_setup_priority() const override { return setup_priority::HARDWARE; }
void loop() override;
bool digital_read(uint8_t pin);
uint16_t read_key_data();
void set_pin_value(uint8_t pin, uint8_t i_on) { this->write_byte(REG_I_ON[pin], i_on); };
void pin_mode(uint8_t pin, gpio::Flags flags);
void digital_write(uint8_t pin, bool bit_value);
uint32_t get_clock() { return this->clk_x_; };
void set_rows_cols(uint8_t rows, uint8_t cols) {
this->rows_ = rows;
@@ -61,10 +63,15 @@ class SX1509Component : public Component, public i2c::I2CDevice, public key_prov
void setup_led_driver(uint8_t pin);
protected:
// Virtual methods from CachedGpioExpander
bool digital_read_hw(uint8_t pin) override;
bool digital_read_cache(uint8_t pin) override;
void digital_write_hw(uint8_t pin, bool value) override;
uint32_t clk_x_ = 2000000;
uint8_t frequency_ = 0;
uint16_t ddr_mask_ = 0x00;
uint16_t input_mask_ = 0x00;
uint16_t input_mask_ = 0x00; // Cache for input values (16-bit for all pins)
uint16_t port_mask_ = 0x00;
uint16_t output_state_ = 0x00;
bool has_keypad_ = false;

View File

@@ -32,6 +32,7 @@ from esphome.const import (
CONF_FAN_WITH_COOLING,
CONF_FAN_WITH_HEATING,
CONF_HEAT_ACTION,
CONF_HEAT_COOL_MODE,
CONF_HEAT_DEADBAND,
CONF_HEAT_MODE,
CONF_HEAT_OVERRUN,
@@ -150,7 +151,7 @@ def generate_comparable_preset(config, name):
def validate_thermostat(config):
# verify corresponding action(s) exist(s) for any defined climate mode or action
requirements = {
CONF_AUTO_MODE: [
CONF_HEAT_COOL_MODE: [
CONF_COOL_ACTION,
CONF_HEAT_ACTION,
CONF_MIN_COOLING_OFF_TIME,
@@ -540,6 +541,9 @@ CONFIG_SCHEMA = cv.All(
cv.Optional(CONF_FAN_ONLY_MODE): automation.validate_automation(
single=True
),
cv.Optional(CONF_HEAT_COOL_MODE): automation.validate_automation(
single=True
),
cv.Optional(CONF_HEAT_MODE): automation.validate_automation(single=True),
cv.Optional(CONF_OFF_MODE): automation.validate_automation(single=True),
cv.Optional(CONF_FAN_MODE_ON_ACTION): automation.validate_automation(
@@ -644,7 +648,6 @@ async def to_code(config):
var = await climate.new_climate(config)
await cg.register_component(var, config)
heat_cool_mode_available = CONF_HEAT_ACTION in config and CONF_COOL_ACTION in config
two_points_available = CONF_HEAT_ACTION in config and (
CONF_COOL_ACTION in config
or (config[CONF_FAN_ONLY_COOLING] and CONF_FAN_ONLY_ACTION in config)
@@ -739,11 +742,6 @@ async def to_code(config):
var.get_idle_action_trigger(), [], config[CONF_IDLE_ACTION]
)
if heat_cool_mode_available is True:
cg.add(var.set_supports_heat_cool(True))
else:
cg.add(var.set_supports_heat_cool(False))
if CONF_COOL_ACTION in config:
await automation.build_automation(
var.get_cool_action_trigger(), [], config[CONF_COOL_ACTION]
@@ -780,6 +778,7 @@ async def to_code(config):
await automation.build_automation(
var.get_auto_mode_trigger(), [], config[CONF_AUTO_MODE]
)
cg.add(var.set_supports_auto(True))
if CONF_COOL_MODE in config:
await automation.build_automation(
var.get_cool_mode_trigger(), [], config[CONF_COOL_MODE]
@@ -800,6 +799,11 @@ async def to_code(config):
var.get_heat_mode_trigger(), [], config[CONF_HEAT_MODE]
)
cg.add(var.set_supports_heat(True))
if CONF_HEAT_COOL_MODE in config:
await automation.build_automation(
var.get_heat_cool_mode_trigger(), [], config[CONF_HEAT_COOL_MODE]
)
cg.add(var.set_supports_heat_cool(True))
if CONF_OFF_MODE in config:
await automation.build_automation(
var.get_off_mode_trigger(), [], config[CONF_OFF_MODE]

View File

@@ -1,4 +1,6 @@
#include "thermostat_climate.h"
#include "esphome/core/application.h"
#include "esphome/core/helpers.h"
#include "esphome/core/log.h"
namespace esphome {
@@ -9,11 +11,11 @@ static const char *const TAG = "thermostat.climate";
void ThermostatClimate::setup() {
if (this->use_startup_delay_) {
// start timers so that no actions are called for a moment
this->start_timer_(thermostat::TIMER_COOLING_OFF);
this->start_timer_(thermostat::TIMER_FANNING_OFF);
this->start_timer_(thermostat::TIMER_HEATING_OFF);
this->start_timer_(thermostat::THERMOSTAT_TIMER_COOLING_OFF);
this->start_timer_(thermostat::THERMOSTAT_TIMER_FANNING_OFF);
this->start_timer_(thermostat::THERMOSTAT_TIMER_HEATING_OFF);
if (this->supports_fan_only_action_uses_fan_mode_timer_)
this->start_timer_(thermostat::TIMER_FAN_MODE);
this->start_timer_(thermostat::THERMOSTAT_TIMER_FAN_MODE);
}
// add a callback so that whenever the sensor state changes we can take action
this->sensor_->add_on_state_callback([this](float state) {
@@ -64,7 +66,7 @@ void ThermostatClimate::setup() {
void ThermostatClimate::loop() {
for (auto &timer : this->timer_) {
if (timer.active && (timer.started + timer.time < millis())) {
if (timer.active && (timer.started + timer.time < App.get_loop_component_start_time())) {
timer.active = false;
timer.func();
}
@@ -127,26 +129,35 @@ bool ThermostatClimate::hysteresis_valid() {
return true;
}
bool ThermostatClimate::limit_setpoints_for_heat_cool() {
return this->mode == climate::CLIMATE_MODE_HEAT_COOL ||
(this->mode == climate::CLIMATE_MODE_AUTO && this->supports_heat_cool_);
}
void ThermostatClimate::validate_target_temperature() {
if (std::isnan(this->target_temperature)) {
// default to the midpoint between visual min and max
this->target_temperature =
((this->get_traits().get_visual_max_temperature() - this->get_traits().get_visual_min_temperature()) / 2) +
this->get_traits().get_visual_min_temperature();
} else {
// target_temperature must be between the visual minimum and the visual maximum
if (this->target_temperature < this->get_traits().get_visual_min_temperature())
this->target_temperature = this->get_traits().get_visual_min_temperature();
if (this->target_temperature > this->get_traits().get_visual_max_temperature())
this->target_temperature = this->get_traits().get_visual_max_temperature();
this->target_temperature = clamp(this->target_temperature, this->get_traits().get_visual_min_temperature(),
this->get_traits().get_visual_max_temperature());
}
}
void ThermostatClimate::validate_target_temperatures() {
if (this->supports_two_points_) {
void ThermostatClimate::validate_target_temperatures(const bool pin_target_temperature_high) {
if (!this->supports_two_points_) {
this->validate_target_temperature();
} else if (pin_target_temperature_high) {
// if target_temperature_high is set less than target_temperature_low, move down target_temperature_low
this->validate_target_temperature_low();
this->validate_target_temperature_high();
} else {
this->validate_target_temperature();
// if target_temperature_low is set greater than target_temperature_high, move up target_temperature_high
this->validate_target_temperature_high();
this->validate_target_temperature_low();
}
}
@@ -154,18 +165,13 @@ void ThermostatClimate::validate_target_temperature_low() {
if (std::isnan(this->target_temperature_low)) {
this->target_temperature_low = this->get_traits().get_visual_min_temperature();
} else {
// target_temperature_low must not be lower than the visual minimum
if (this->target_temperature_low < this->get_traits().get_visual_min_temperature())
this->target_temperature_low = this->get_traits().get_visual_min_temperature();
// target_temperature_low must not be greater than the visual maximum minus set_point_minimum_differential_
if (this->target_temperature_low >
this->get_traits().get_visual_max_temperature() - this->set_point_minimum_differential_) {
this->target_temperature_low =
this->get_traits().get_visual_max_temperature() - this->set_point_minimum_differential_;
}
// if target_temperature_low is set greater than target_temperature_high, move up target_temperature_high
if (this->target_temperature_low > this->target_temperature_high - this->set_point_minimum_differential_)
this->target_temperature_high = this->target_temperature_low + this->set_point_minimum_differential_;
float target_temperature_low_upper_limit =
this->limit_setpoints_for_heat_cool()
? clamp(this->target_temperature_high - this->set_point_minimum_differential_,
this->get_traits().get_visual_min_temperature(), this->get_traits().get_visual_max_temperature())
: this->get_traits().get_visual_max_temperature();
this->target_temperature_low = clamp(this->target_temperature_low, this->get_traits().get_visual_min_temperature(),
target_temperature_low_upper_limit);
}
}
@@ -173,62 +179,64 @@ void ThermostatClimate::validate_target_temperature_high() {
if (std::isnan(this->target_temperature_high)) {
this->target_temperature_high = this->get_traits().get_visual_max_temperature();
} else {
// target_temperature_high must not be lower than the visual maximum
if (this->target_temperature_high > this->get_traits().get_visual_max_temperature())
this->target_temperature_high = this->get_traits().get_visual_max_temperature();
// target_temperature_high must not be lower than the visual minimum plus set_point_minimum_differential_
if (this->target_temperature_high <
this->get_traits().get_visual_min_temperature() + this->set_point_minimum_differential_) {
this->target_temperature_high =
this->get_traits().get_visual_min_temperature() + this->set_point_minimum_differential_;
}
// if target_temperature_high is set less than target_temperature_low, move down target_temperature_low
if (this->target_temperature_high < this->target_temperature_low + this->set_point_minimum_differential_)
this->target_temperature_low = this->target_temperature_high - this->set_point_minimum_differential_;
float target_temperature_high_lower_limit =
this->limit_setpoints_for_heat_cool()
? clamp(this->target_temperature_low + this->set_point_minimum_differential_,
this->get_traits().get_visual_min_temperature(), this->get_traits().get_visual_max_temperature())
: this->get_traits().get_visual_min_temperature();
this->target_temperature_high = clamp(this->target_temperature_high, target_temperature_high_lower_limit,
this->get_traits().get_visual_max_temperature());
}
}
void ThermostatClimate::control(const climate::ClimateCall &call) {
bool target_temperature_high_changed = false;
if (call.get_preset().has_value()) {
// setup_complete_ blocks modifying/resetting the temps immediately after boot
if (this->setup_complete_) {
this->change_preset_(*call.get_preset());
this->change_preset_(call.get_preset().value());
} else {
this->preset = *call.get_preset();
this->preset = call.get_preset().value();
}
}
if (call.get_custom_preset().has_value()) {
// setup_complete_ blocks modifying/resetting the temps immediately after boot
if (this->setup_complete_) {
this->change_custom_preset_(*call.get_custom_preset());
this->change_custom_preset_(call.get_custom_preset().value());
} else {
this->custom_preset = *call.get_custom_preset();
this->custom_preset = call.get_custom_preset().value();
}
}
if (call.get_mode().has_value())
this->mode = *call.get_mode();
if (call.get_fan_mode().has_value())
this->fan_mode = *call.get_fan_mode();
if (call.get_swing_mode().has_value())
this->swing_mode = *call.get_swing_mode();
if (call.get_mode().has_value()) {
this->mode = call.get_mode().value();
}
if (call.get_fan_mode().has_value()) {
this->fan_mode = call.get_fan_mode().value();
}
if (call.get_swing_mode().has_value()) {
this->swing_mode = call.get_swing_mode().value();
}
if (this->supports_two_points_) {
if (call.get_target_temperature_low().has_value()) {
this->target_temperature_low = *call.get_target_temperature_low();
validate_target_temperature_low();
this->target_temperature_low = call.get_target_temperature_low().value();
}
if (call.get_target_temperature_high().has_value()) {
this->target_temperature_high = *call.get_target_temperature_high();
validate_target_temperature_high();
target_temperature_high_changed = this->target_temperature_high != call.get_target_temperature_high().value();
this->target_temperature_high = call.get_target_temperature_high().value();
}
// ensure the two set points are valid and adjust one of them if necessary
this->validate_target_temperatures(target_temperature_high_changed ||
(this->prev_mode_ == climate::CLIMATE_MODE_COOL));
} else {
if (call.get_target_temperature().has_value()) {
this->target_temperature = *call.get_target_temperature();
validate_target_temperature();
this->target_temperature = call.get_target_temperature().value();
this->validate_target_temperature();
}
}
// make any changes happen
refresh();
this->refresh();
}
climate::ClimateTraits ThermostatClimate::traits() {
@@ -237,47 +245,47 @@ climate::ClimateTraits ThermostatClimate::traits() {
if (this->humidity_sensor_ != nullptr)
traits.set_supports_current_humidity(true);
if (supports_auto_)
if (this->supports_auto_)
traits.add_supported_mode(climate::CLIMATE_MODE_AUTO);
if (supports_heat_cool_)
if (this->supports_heat_cool_)
traits.add_supported_mode(climate::CLIMATE_MODE_HEAT_COOL);
if (supports_cool_)
if (this->supports_cool_)
traits.add_supported_mode(climate::CLIMATE_MODE_COOL);
if (supports_dry_)
if (this->supports_dry_)
traits.add_supported_mode(climate::CLIMATE_MODE_DRY);
if (supports_fan_only_)
if (this->supports_fan_only_)
traits.add_supported_mode(climate::CLIMATE_MODE_FAN_ONLY);
if (supports_heat_)
if (this->supports_heat_)
traits.add_supported_mode(climate::CLIMATE_MODE_HEAT);
if (supports_fan_mode_on_)
if (this->supports_fan_mode_on_)
traits.add_supported_fan_mode(climate::CLIMATE_FAN_ON);
if (supports_fan_mode_off_)
if (this->supports_fan_mode_off_)
traits.add_supported_fan_mode(climate::CLIMATE_FAN_OFF);
if (supports_fan_mode_auto_)
if (this->supports_fan_mode_auto_)
traits.add_supported_fan_mode(climate::CLIMATE_FAN_AUTO);
if (supports_fan_mode_low_)
if (this->supports_fan_mode_low_)
traits.add_supported_fan_mode(climate::CLIMATE_FAN_LOW);
if (supports_fan_mode_medium_)
if (this->supports_fan_mode_medium_)
traits.add_supported_fan_mode(climate::CLIMATE_FAN_MEDIUM);
if (supports_fan_mode_high_)
if (this->supports_fan_mode_high_)
traits.add_supported_fan_mode(climate::CLIMATE_FAN_HIGH);
if (supports_fan_mode_middle_)
if (this->supports_fan_mode_middle_)
traits.add_supported_fan_mode(climate::CLIMATE_FAN_MIDDLE);
if (supports_fan_mode_focus_)
if (this->supports_fan_mode_focus_)
traits.add_supported_fan_mode(climate::CLIMATE_FAN_FOCUS);
if (supports_fan_mode_diffuse_)
if (this->supports_fan_mode_diffuse_)
traits.add_supported_fan_mode(climate::CLIMATE_FAN_DIFFUSE);
if (supports_fan_mode_quiet_)
if (this->supports_fan_mode_quiet_)
traits.add_supported_fan_mode(climate::CLIMATE_FAN_QUIET);
if (supports_swing_mode_both_)
if (this->supports_swing_mode_both_)
traits.add_supported_swing_mode(climate::CLIMATE_SWING_BOTH);
if (supports_swing_mode_horizontal_)
if (this->supports_swing_mode_horizontal_)
traits.add_supported_swing_mode(climate::CLIMATE_SWING_HORIZONTAL);
if (supports_swing_mode_off_)
if (this->supports_swing_mode_off_)
traits.add_supported_swing_mode(climate::CLIMATE_SWING_OFF);
if (supports_swing_mode_vertical_)
if (this->supports_swing_mode_vertical_)
traits.add_supported_swing_mode(climate::CLIMATE_SWING_VERTICAL);
for (auto &it : this->preset_config_) {
@@ -299,14 +307,15 @@ climate::ClimateAction ThermostatClimate::compute_action_(const bool ignore_time
return climate::CLIMATE_ACTION_OFF;
}
// do not change the action if an "ON" timer is running
if ((!ignore_timers) &&
(timer_active_(thermostat::TIMER_IDLE_ON) || timer_active_(thermostat::TIMER_COOLING_ON) ||
timer_active_(thermostat::TIMER_FANNING_ON) || timer_active_(thermostat::TIMER_HEATING_ON))) {
if ((!ignore_timers) && (this->timer_active_(thermostat::THERMOSTAT_TIMER_IDLE_ON) ||
this->timer_active_(thermostat::THERMOSTAT_TIMER_COOLING_ON) ||
this->timer_active_(thermostat::THERMOSTAT_TIMER_FANNING_ON) ||
this->timer_active_(thermostat::THERMOSTAT_TIMER_HEATING_ON))) {
return this->action;
}
// ensure set point(s) is/are valid before computing the action
this->validate_target_temperatures();
this->validate_target_temperatures(this->prev_mode_ == climate::CLIMATE_MODE_COOL);
// everything has been validated so we can now safely compute the action
switch (this->mode) {
// if the climate mode is OFF then the climate action must be OFF
@@ -340,6 +349,22 @@ climate::ClimateAction ThermostatClimate::compute_action_(const bool ignore_time
target_action = climate::CLIMATE_ACTION_HEATING;
}
break;
case climate::CLIMATE_MODE_AUTO:
if (this->supports_two_points_) {
if (this->cooling_required_() && this->heating_required_()) {
// this is bad and should never happen, so just stop.
// target_action = climate::CLIMATE_ACTION_IDLE;
} else if (this->cooling_required_()) {
target_action = climate::CLIMATE_ACTION_COOLING;
} else if (this->heating_required_()) {
target_action = climate::CLIMATE_ACTION_HEATING;
}
} else if (this->supports_cool_ && this->cooling_required_()) {
target_action = climate::CLIMATE_ACTION_COOLING;
} else if (this->supports_heat_ && this->heating_required_()) {
target_action = climate::CLIMATE_ACTION_HEATING;
}
break;
default:
break;
}
@@ -362,7 +387,7 @@ climate::ClimateAction ThermostatClimate::compute_supplemental_action_() {
}
// ensure set point(s) is/are valid before computing the action
this->validate_target_temperatures();
this->validate_target_temperatures(this->prev_mode_ == climate::CLIMATE_MODE_COOL);
// everything has been validated so we can now safely compute the action
switch (this->mode) {
// if the climate mode is OFF then the climate action must be OFF
@@ -420,18 +445,18 @@ void ThermostatClimate::switch_to_action_(climate::ClimateAction action, bool pu
case climate::CLIMATE_ACTION_OFF:
case climate::CLIMATE_ACTION_IDLE:
if (this->idle_action_ready_()) {
this->start_timer_(thermostat::TIMER_IDLE_ON);
this->start_timer_(thermostat::THERMOSTAT_TIMER_IDLE_ON);
if (this->action == climate::CLIMATE_ACTION_COOLING)
this->start_timer_(thermostat::TIMER_COOLING_OFF);
this->start_timer_(thermostat::THERMOSTAT_TIMER_COOLING_OFF);
if (this->action == climate::CLIMATE_ACTION_FAN) {
if (this->supports_fan_only_action_uses_fan_mode_timer_) {
this->start_timer_(thermostat::TIMER_FAN_MODE);
this->start_timer_(thermostat::THERMOSTAT_TIMER_FAN_MODE);
} else {
this->start_timer_(thermostat::TIMER_FANNING_OFF);
this->start_timer_(thermostat::THERMOSTAT_TIMER_FANNING_OFF);
}
}
if (this->action == climate::CLIMATE_ACTION_HEATING)
this->start_timer_(thermostat::TIMER_HEATING_OFF);
this->start_timer_(thermostat::THERMOSTAT_TIMER_HEATING_OFF);
// trig = this->idle_action_trigger_;
ESP_LOGVV(TAG, "Switching to IDLE/OFF action");
this->cooling_max_runtime_exceeded_ = false;
@@ -441,10 +466,10 @@ void ThermostatClimate::switch_to_action_(climate::ClimateAction action, bool pu
break;
case climate::CLIMATE_ACTION_COOLING:
if (this->cooling_action_ready_()) {
this->start_timer_(thermostat::TIMER_COOLING_ON);
this->start_timer_(thermostat::TIMER_COOLING_MAX_RUN_TIME);
this->start_timer_(thermostat::THERMOSTAT_TIMER_COOLING_ON);
this->start_timer_(thermostat::THERMOSTAT_TIMER_COOLING_MAX_RUN_TIME);
if (this->supports_fan_with_cooling_) {
this->start_timer_(thermostat::TIMER_FANNING_ON);
this->start_timer_(thermostat::THERMOSTAT_TIMER_FANNING_ON);
trig_fan = this->fan_only_action_trigger_;
}
this->cooling_max_runtime_exceeded_ = false;
@@ -455,10 +480,10 @@ void ThermostatClimate::switch_to_action_(climate::ClimateAction action, bool pu
break;
case climate::CLIMATE_ACTION_HEATING:
if (this->heating_action_ready_()) {
this->start_timer_(thermostat::TIMER_HEATING_ON);
this->start_timer_(thermostat::TIMER_HEATING_MAX_RUN_TIME);
this->start_timer_(thermostat::THERMOSTAT_TIMER_HEATING_ON);
this->start_timer_(thermostat::THERMOSTAT_TIMER_HEATING_MAX_RUN_TIME);
if (this->supports_fan_with_heating_) {
this->start_timer_(thermostat::TIMER_FANNING_ON);
this->start_timer_(thermostat::THERMOSTAT_TIMER_FANNING_ON);
trig_fan = this->fan_only_action_trigger_;
}
this->heating_max_runtime_exceeded_ = false;
@@ -470,9 +495,9 @@ void ThermostatClimate::switch_to_action_(climate::ClimateAction action, bool pu
case climate::CLIMATE_ACTION_FAN:
if (this->fanning_action_ready_()) {
if (this->supports_fan_only_action_uses_fan_mode_timer_) {
this->start_timer_(thermostat::TIMER_FAN_MODE);
this->start_timer_(thermostat::THERMOSTAT_TIMER_FAN_MODE);
} else {
this->start_timer_(thermostat::TIMER_FANNING_ON);
this->start_timer_(thermostat::THERMOSTAT_TIMER_FANNING_ON);
}
trig = this->fan_only_action_trigger_;
ESP_LOGVV(TAG, "Switching to FAN_ONLY action");
@@ -481,8 +506,8 @@ void ThermostatClimate::switch_to_action_(climate::ClimateAction action, bool pu
break;
case climate::CLIMATE_ACTION_DRYING:
if (this->drying_action_ready_()) {
this->start_timer_(thermostat::TIMER_COOLING_ON);
this->start_timer_(thermostat::TIMER_FANNING_ON);
this->start_timer_(thermostat::THERMOSTAT_TIMER_COOLING_ON);
this->start_timer_(thermostat::THERMOSTAT_TIMER_FANNING_ON);
trig = this->dry_action_trigger_;
ESP_LOGVV(TAG, "Switching to DRYING action");
action_ready = true;
@@ -525,14 +550,14 @@ void ThermostatClimate::switch_to_supplemental_action_(climate::ClimateAction ac
switch (action) {
case climate::CLIMATE_ACTION_OFF:
case climate::CLIMATE_ACTION_IDLE:
this->cancel_timer_(thermostat::TIMER_COOLING_MAX_RUN_TIME);
this->cancel_timer_(thermostat::TIMER_HEATING_MAX_RUN_TIME);
this->cancel_timer_(thermostat::THERMOSTAT_TIMER_COOLING_MAX_RUN_TIME);
this->cancel_timer_(thermostat::THERMOSTAT_TIMER_HEATING_MAX_RUN_TIME);
break;
case climate::CLIMATE_ACTION_COOLING:
this->cancel_timer_(thermostat::TIMER_COOLING_MAX_RUN_TIME);
this->cancel_timer_(thermostat::THERMOSTAT_TIMER_COOLING_MAX_RUN_TIME);
break;
case climate::CLIMATE_ACTION_HEATING:
this->cancel_timer_(thermostat::TIMER_HEATING_MAX_RUN_TIME);
this->cancel_timer_(thermostat::THERMOSTAT_TIMER_HEATING_MAX_RUN_TIME);
break;
default:
return;
@@ -547,15 +572,15 @@ void ThermostatClimate::trigger_supplemental_action_() {
switch (this->supplemental_action_) {
case climate::CLIMATE_ACTION_COOLING:
if (!this->timer_active_(thermostat::TIMER_COOLING_MAX_RUN_TIME)) {
this->start_timer_(thermostat::TIMER_COOLING_MAX_RUN_TIME);
if (!this->timer_active_(thermostat::THERMOSTAT_TIMER_COOLING_MAX_RUN_TIME)) {
this->start_timer_(thermostat::THERMOSTAT_TIMER_COOLING_MAX_RUN_TIME);
}
trig = this->supplemental_cool_action_trigger_;
ESP_LOGVV(TAG, "Calling supplemental COOLING action");
break;
case climate::CLIMATE_ACTION_HEATING:
if (!this->timer_active_(thermostat::TIMER_HEATING_MAX_RUN_TIME)) {
this->start_timer_(thermostat::TIMER_HEATING_MAX_RUN_TIME);
if (!this->timer_active_(thermostat::THERMOSTAT_TIMER_HEATING_MAX_RUN_TIME)) {
this->start_timer_(thermostat::THERMOSTAT_TIMER_HEATING_MAX_RUN_TIME);
}
trig = this->supplemental_heat_action_trigger_;
ESP_LOGVV(TAG, "Calling supplemental HEATING action");
@@ -633,7 +658,7 @@ void ThermostatClimate::switch_to_fan_mode_(climate::ClimateFanMode fan_mode, bo
this->prev_fan_mode_trigger_->stop_action();
this->prev_fan_mode_trigger_ = nullptr;
}
this->start_timer_(thermostat::TIMER_FAN_MODE);
this->start_timer_(thermostat::THERMOSTAT_TIMER_FAN_MODE);
if (trig != nullptr) {
trig->trigger();
}
@@ -653,13 +678,13 @@ void ThermostatClimate::switch_to_mode_(climate::ClimateMode mode, bool publish_
this->prev_mode_trigger_->stop_action();
this->prev_mode_trigger_ = nullptr;
}
Trigger<> *trig = this->auto_mode_trigger_;
Trigger<> *trig = this->off_mode_trigger_;
switch (mode) {
case climate::CLIMATE_MODE_OFF:
trig = this->off_mode_trigger_;
case climate::CLIMATE_MODE_AUTO:
trig = this->auto_mode_trigger_;
break;
case climate::CLIMATE_MODE_HEAT_COOL:
// trig = this->auto_mode_trigger_;
trig = this->heat_cool_mode_trigger_;
break;
case climate::CLIMATE_MODE_COOL:
trig = this->cool_mode_trigger_;
@@ -673,11 +698,12 @@ void ThermostatClimate::switch_to_mode_(climate::ClimateMode mode, bool publish_
case climate::CLIMATE_MODE_DRY:
trig = this->dry_mode_trigger_;
break;
case climate::CLIMATE_MODE_OFF:
default:
// we cannot report an invalid mode back to HA (even if it asked for one)
// and must assume some valid value
mode = climate::CLIMATE_MODE_HEAT_COOL;
// trig = this->auto_mode_trigger_;
mode = climate::CLIMATE_MODE_OFF;
// trig = this->off_mode_trigger_;
}
if (trig != nullptr) {
trig->trigger();
@@ -685,8 +711,9 @@ void ThermostatClimate::switch_to_mode_(climate::ClimateMode mode, bool publish_
this->mode = mode;
this->prev_mode_ = mode;
this->prev_mode_trigger_ = trig;
if (publish_state)
if (publish_state) {
this->publish_state();
}
}
void ThermostatClimate::switch_to_swing_mode_(climate::ClimateSwingMode swing_mode, bool publish_state) {
@@ -732,35 +759,44 @@ void ThermostatClimate::switch_to_swing_mode_(climate::ClimateSwingMode swing_mo
bool ThermostatClimate::idle_action_ready_() {
if (this->supports_fan_only_action_uses_fan_mode_timer_) {
return !(this->timer_active_(thermostat::TIMER_COOLING_ON) || this->timer_active_(thermostat::TIMER_FAN_MODE) ||
this->timer_active_(thermostat::TIMER_HEATING_ON));
return !(this->timer_active_(thermostat::THERMOSTAT_TIMER_COOLING_ON) ||
this->timer_active_(thermostat::THERMOSTAT_TIMER_FAN_MODE) ||
this->timer_active_(thermostat::THERMOSTAT_TIMER_HEATING_ON));
}
return !(this->timer_active_(thermostat::TIMER_COOLING_ON) || this->timer_active_(thermostat::TIMER_FANNING_ON) ||
this->timer_active_(thermostat::TIMER_HEATING_ON));
return !(this->timer_active_(thermostat::THERMOSTAT_TIMER_COOLING_ON) ||
this->timer_active_(thermostat::THERMOSTAT_TIMER_FANNING_ON) ||
this->timer_active_(thermostat::THERMOSTAT_TIMER_HEATING_ON));
}
bool ThermostatClimate::cooling_action_ready_() {
return !(this->timer_active_(thermostat::TIMER_IDLE_ON) || this->timer_active_(thermostat::TIMER_FANNING_OFF) ||
this->timer_active_(thermostat::TIMER_COOLING_OFF) || this->timer_active_(thermostat::TIMER_HEATING_ON));
return !(this->timer_active_(thermostat::THERMOSTAT_TIMER_IDLE_ON) ||
this->timer_active_(thermostat::THERMOSTAT_TIMER_FANNING_OFF) ||
this->timer_active_(thermostat::THERMOSTAT_TIMER_COOLING_OFF) ||
this->timer_active_(thermostat::THERMOSTAT_TIMER_HEATING_ON));
}
bool ThermostatClimate::drying_action_ready_() {
return !(this->timer_active_(thermostat::TIMER_IDLE_ON) || this->timer_active_(thermostat::TIMER_FANNING_OFF) ||
this->timer_active_(thermostat::TIMER_COOLING_OFF) || this->timer_active_(thermostat::TIMER_HEATING_ON));
return !(this->timer_active_(thermostat::THERMOSTAT_TIMER_IDLE_ON) ||
this->timer_active_(thermostat::THERMOSTAT_TIMER_FANNING_OFF) ||
this->timer_active_(thermostat::THERMOSTAT_TIMER_COOLING_OFF) ||
this->timer_active_(thermostat::THERMOSTAT_TIMER_HEATING_ON));
}
bool ThermostatClimate::fan_mode_ready_() { return !(this->timer_active_(thermostat::TIMER_FAN_MODE)); }
bool ThermostatClimate::fan_mode_ready_() { return !(this->timer_active_(thermostat::THERMOSTAT_TIMER_FAN_MODE)); }
bool ThermostatClimate::fanning_action_ready_() {
if (this->supports_fan_only_action_uses_fan_mode_timer_) {
return !(this->timer_active_(thermostat::TIMER_FAN_MODE));
return !(this->timer_active_(thermostat::THERMOSTAT_TIMER_FAN_MODE));
}
return !(this->timer_active_(thermostat::TIMER_IDLE_ON) || this->timer_active_(thermostat::TIMER_FANNING_OFF));
return !(this->timer_active_(thermostat::THERMOSTAT_TIMER_IDLE_ON) ||
this->timer_active_(thermostat::THERMOSTAT_TIMER_FANNING_OFF));
}
bool ThermostatClimate::heating_action_ready_() {
return !(this->timer_active_(thermostat::TIMER_IDLE_ON) || this->timer_active_(thermostat::TIMER_COOLING_ON) ||
this->timer_active_(thermostat::TIMER_FANNING_OFF) || this->timer_active_(thermostat::TIMER_HEATING_OFF));
return !(this->timer_active_(thermostat::THERMOSTAT_TIMER_IDLE_ON) ||
this->timer_active_(thermostat::THERMOSTAT_TIMER_COOLING_ON) ||
this->timer_active_(thermostat::THERMOSTAT_TIMER_FANNING_OFF) ||
this->timer_active_(thermostat::THERMOSTAT_TIMER_HEATING_OFF));
}
void ThermostatClimate::start_timer_(const ThermostatClimateTimerIndex timer_index) {
@@ -958,37 +994,25 @@ bool ThermostatClimate::supplemental_heating_required_() {
(this->supplemental_action_ == climate::CLIMATE_ACTION_HEATING));
}
void ThermostatClimate::dump_preset_config_(const char *preset_name, const ThermostatClimateTargetTempConfig &config,
bool is_default_preset) {
ESP_LOGCONFIG(TAG, " %s Is Default: %s", preset_name, YESNO(is_default_preset));
void ThermostatClimate::dump_preset_config_(const char *preset_name, const ThermostatClimateTargetTempConfig &config) {
if (this->supports_heat_) {
if (this->supports_two_points_) {
ESP_LOGCONFIG(TAG, " %s Default Target Temperature Low: %.1f°C", preset_name,
config.default_temperature_low);
} else {
ESP_LOGCONFIG(TAG, " %s Default Target Temperature Low: %.1f°C", preset_name, config.default_temperature);
}
ESP_LOGCONFIG(TAG, " Default Target Temperature Low: %.1f°C",
this->supports_two_points_ ? config.default_temperature_low : config.default_temperature);
}
if ((this->supports_cool_) || (this->supports_fan_only_)) {
if (this->supports_two_points_) {
ESP_LOGCONFIG(TAG, " %s Default Target Temperature High: %.1f°C", preset_name,
config.default_temperature_high);
} else {
ESP_LOGCONFIG(TAG, " %s Default Target Temperature High: %.1f°C", preset_name, config.default_temperature);
}
ESP_LOGCONFIG(TAG, " Default Target Temperature High: %.1f°C",
this->supports_two_points_ ? config.default_temperature_high : config.default_temperature);
}
if (config.mode_.has_value()) {
ESP_LOGCONFIG(TAG, " %s Default Mode: %s", preset_name,
LOG_STR_ARG(climate::climate_mode_to_string(*config.mode_)));
ESP_LOGCONFIG(TAG, " Default Mode: %s", LOG_STR_ARG(climate::climate_mode_to_string(*config.mode_)));
}
if (config.fan_mode_.has_value()) {
ESP_LOGCONFIG(TAG, " %s Default Fan Mode: %s", preset_name,
ESP_LOGCONFIG(TAG, " Default Fan Mode: %s",
LOG_STR_ARG(climate::climate_fan_mode_to_string(*config.fan_mode_)));
}
if (config.swing_mode_.has_value()) {
ESP_LOGCONFIG(TAG, " %s Default Swing Mode: %s", preset_name,
ESP_LOGCONFIG(TAG, " Default Swing Mode: %s",
LOG_STR_ARG(climate::climate_swing_mode_to_string(*config.swing_mode_)));
}
}
@@ -1106,6 +1130,7 @@ ThermostatClimate::ThermostatClimate()
heat_action_trigger_(new Trigger<>()),
supplemental_heat_action_trigger_(new Trigger<>()),
heat_mode_trigger_(new Trigger<>()),
heat_cool_mode_trigger_(new Trigger<>()),
auto_mode_trigger_(new Trigger<>()),
idle_action_trigger_(new Trigger<>()),
off_mode_trigger_(new Trigger<>()),
@@ -1147,43 +1172,43 @@ void ThermostatClimate::set_heat_overrun(float overrun) { this->heating_overrun_
void ThermostatClimate::set_supplemental_cool_delta(float delta) { this->supplemental_cool_delta_ = delta; }
void ThermostatClimate::set_supplemental_heat_delta(float delta) { this->supplemental_heat_delta_ = delta; }
void ThermostatClimate::set_cooling_maximum_run_time_in_sec(uint32_t time) {
this->timer_[thermostat::TIMER_COOLING_MAX_RUN_TIME].time =
this->timer_[thermostat::THERMOSTAT_TIMER_COOLING_MAX_RUN_TIME].time =
1000 * (time < this->min_timer_duration_ ? this->min_timer_duration_ : time);
}
void ThermostatClimate::set_cooling_minimum_off_time_in_sec(uint32_t time) {
this->timer_[thermostat::TIMER_COOLING_OFF].time =
this->timer_[thermostat::THERMOSTAT_TIMER_COOLING_OFF].time =
1000 * (time < this->min_timer_duration_ ? this->min_timer_duration_ : time);
}
void ThermostatClimate::set_cooling_minimum_run_time_in_sec(uint32_t time) {
this->timer_[thermostat::TIMER_COOLING_ON].time =
this->timer_[thermostat::THERMOSTAT_TIMER_COOLING_ON].time =
1000 * (time < this->min_timer_duration_ ? this->min_timer_duration_ : time);
}
void ThermostatClimate::set_fan_mode_minimum_switching_time_in_sec(uint32_t time) {
this->timer_[thermostat::TIMER_FAN_MODE].time =
this->timer_[thermostat::THERMOSTAT_TIMER_FAN_MODE].time =
1000 * (time < this->min_timer_duration_ ? this->min_timer_duration_ : time);
}
void ThermostatClimate::set_fanning_minimum_off_time_in_sec(uint32_t time) {
this->timer_[thermostat::TIMER_FANNING_OFF].time =
this->timer_[thermostat::THERMOSTAT_TIMER_FANNING_OFF].time =
1000 * (time < this->min_timer_duration_ ? this->min_timer_duration_ : time);
}
void ThermostatClimate::set_fanning_minimum_run_time_in_sec(uint32_t time) {
this->timer_[thermostat::TIMER_FANNING_ON].time =
this->timer_[thermostat::THERMOSTAT_TIMER_FANNING_ON].time =
1000 * (time < this->min_timer_duration_ ? this->min_timer_duration_ : time);
}
void ThermostatClimate::set_heating_maximum_run_time_in_sec(uint32_t time) {
this->timer_[thermostat::TIMER_HEATING_MAX_RUN_TIME].time =
this->timer_[thermostat::THERMOSTAT_TIMER_HEATING_MAX_RUN_TIME].time =
1000 * (time < this->min_timer_duration_ ? this->min_timer_duration_ : time);
}
void ThermostatClimate::set_heating_minimum_off_time_in_sec(uint32_t time) {
this->timer_[thermostat::TIMER_HEATING_OFF].time =
this->timer_[thermostat::THERMOSTAT_TIMER_HEATING_OFF].time =
1000 * (time < this->min_timer_duration_ ? this->min_timer_duration_ : time);
}
void ThermostatClimate::set_heating_minimum_run_time_in_sec(uint32_t time) {
this->timer_[thermostat::TIMER_HEATING_ON].time =
this->timer_[thermostat::THERMOSTAT_TIMER_HEATING_ON].time =
1000 * (time < this->min_timer_duration_ ? this->min_timer_duration_ : time);
}
void ThermostatClimate::set_idle_minimum_time_in_sec(uint32_t time) {
this->timer_[thermostat::TIMER_IDLE_ON].time =
this->timer_[thermostat::THERMOSTAT_TIMER_IDLE_ON].time =
1000 * (time < this->min_timer_duration_ ? this->min_timer_duration_ : time);
}
void ThermostatClimate::set_sensor(sensor::Sensor *sensor) { this->sensor_ = sensor; }
@@ -1274,6 +1299,7 @@ Trigger<> *ThermostatClimate::get_cool_mode_trigger() const { return this->cool_
Trigger<> *ThermostatClimate::get_dry_mode_trigger() const { return this->dry_mode_trigger_; }
Trigger<> *ThermostatClimate::get_fan_only_mode_trigger() const { return this->fan_only_mode_trigger_; }
Trigger<> *ThermostatClimate::get_heat_mode_trigger() const { return this->heat_mode_trigger_; }
Trigger<> *ThermostatClimate::get_heat_cool_mode_trigger() const { return this->heat_cool_mode_trigger_; }
Trigger<> *ThermostatClimate::get_off_mode_trigger() const { return this->off_mode_trigger_; }
Trigger<> *ThermostatClimate::get_fan_mode_on_trigger() const { return this->fan_mode_on_trigger_; }
Trigger<> *ThermostatClimate::get_fan_mode_off_trigger() const { return this->fan_mode_off_trigger_; }
@@ -1295,64 +1321,69 @@ Trigger<> *ThermostatClimate::get_preset_change_trigger() const { return this->p
void ThermostatClimate::dump_config() {
LOG_CLIMATE("", "Thermostat", this);
ESP_LOGCONFIG(TAG,
" On boot, restore from: %s\n"
" Use Start-up Delay: %s",
this->on_boot_restore_from_ == thermostat::DEFAULT_PRESET ? "DEFAULT_PRESET" : "MEMORY",
YESNO(this->use_startup_delay_));
if (this->supports_two_points_) {
ESP_LOGCONFIG(TAG, " Minimum Set Point Differential: %.1f°C", this->set_point_minimum_differential_);
}
ESP_LOGCONFIG(TAG, " Use Start-up Delay: %s", YESNO(this->use_startup_delay_));
if (this->supports_cool_) {
ESP_LOGCONFIG(TAG,
" Cooling Parameters:\n"
" Deadband: %.1f°C\n"
" Overrun: %.1f°C",
this->cooling_deadband_, this->cooling_overrun_);
if ((this->supplemental_cool_delta_ > 0) || (this->timer_duration_(thermostat::TIMER_COOLING_MAX_RUN_TIME) > 0)) {
ESP_LOGCONFIG(TAG,
" Supplemental Delta: %.1f°C\n"
" Maximum Run Time: %" PRIu32 "s",
this->supplemental_cool_delta_,
this->timer_duration_(thermostat::TIMER_COOLING_MAX_RUN_TIME) / 1000);
}
ESP_LOGCONFIG(TAG,
" Overrun: %.1f°C\n"
" Minimum Off Time: %" PRIu32 "s\n"
" Minimum Run Time: %" PRIu32 "s",
this->timer_duration_(thermostat::TIMER_COOLING_OFF) / 1000,
this->timer_duration_(thermostat::TIMER_COOLING_ON) / 1000);
this->cooling_deadband_, this->cooling_overrun_,
this->timer_duration_(thermostat::THERMOSTAT_TIMER_COOLING_OFF) / 1000,
this->timer_duration_(thermostat::THERMOSTAT_TIMER_COOLING_ON) / 1000);
if ((this->supplemental_cool_delta_ > 0) ||
(this->timer_duration_(thermostat::THERMOSTAT_TIMER_COOLING_MAX_RUN_TIME) > 0)) {
ESP_LOGCONFIG(TAG,
" Maximum Run Time: %" PRIu32 "s\n"
" Supplemental Delta: %.1f°C",
this->timer_duration_(thermostat::THERMOSTAT_TIMER_COOLING_MAX_RUN_TIME) / 1000,
this->supplemental_cool_delta_);
}
}
if (this->supports_heat_) {
ESP_LOGCONFIG(TAG,
" Heating Parameters:\n"
" Deadband: %.1f°C\n"
" Overrun: %.1f°C",
this->heating_deadband_, this->heating_overrun_);
if ((this->supplemental_heat_delta_ > 0) || (this->timer_duration_(thermostat::TIMER_HEATING_MAX_RUN_TIME) > 0)) {
ESP_LOGCONFIG(TAG,
" Supplemental Delta: %.1f°C\n"
" Maximum Run Time: %" PRIu32 "s",
this->supplemental_heat_delta_,
this->timer_duration_(thermostat::TIMER_HEATING_MAX_RUN_TIME) / 1000);
}
ESP_LOGCONFIG(TAG,
" Overrun: %.1f°C\n"
" Minimum Off Time: %" PRIu32 "s\n"
" Minimum Run Time: %" PRIu32 "s",
this->timer_duration_(thermostat::TIMER_HEATING_OFF) / 1000,
this->timer_duration_(thermostat::TIMER_HEATING_ON) / 1000);
this->heating_deadband_, this->heating_overrun_,
this->timer_duration_(thermostat::THERMOSTAT_TIMER_HEATING_OFF) / 1000,
this->timer_duration_(thermostat::THERMOSTAT_TIMER_HEATING_ON) / 1000);
if ((this->supplemental_heat_delta_ > 0) ||
(this->timer_duration_(thermostat::THERMOSTAT_TIMER_HEATING_MAX_RUN_TIME) > 0)) {
ESP_LOGCONFIG(TAG,
" Maximum Run Time: %" PRIu32 "s\n"
" Supplemental Delta: %.1f°C",
this->timer_duration_(thermostat::THERMOSTAT_TIMER_HEATING_MAX_RUN_TIME) / 1000,
this->supplemental_heat_delta_);
}
}
if (this->supports_fan_only_) {
ESP_LOGCONFIG(TAG,
" Fanning Minimum Off Time: %" PRIu32 "s\n"
" Fanning Minimum Run Time: %" PRIu32 "s",
this->timer_duration_(thermostat::TIMER_FANNING_OFF) / 1000,
this->timer_duration_(thermostat::TIMER_FANNING_ON) / 1000);
" Fan Parameters:\n"
" Minimum Off Time: %" PRIu32 "s\n"
" Minimum Run Time: %" PRIu32 "s",
this->timer_duration_(thermostat::THERMOSTAT_TIMER_FANNING_OFF) / 1000,
this->timer_duration_(thermostat::THERMOSTAT_TIMER_FANNING_ON) / 1000);
}
if (this->supports_fan_mode_on_ || this->supports_fan_mode_off_ || this->supports_fan_mode_auto_ ||
this->supports_fan_mode_low_ || this->supports_fan_mode_medium_ || this->supports_fan_mode_high_ ||
this->supports_fan_mode_middle_ || this->supports_fan_mode_focus_ || this->supports_fan_mode_diffuse_ ||
this->supports_fan_mode_quiet_) {
ESP_LOGCONFIG(TAG, " Minimum Fan Mode Switching Time: %" PRIu32 "s",
this->timer_duration_(thermostat::TIMER_FAN_MODE) / 1000);
this->timer_duration_(thermostat::THERMOSTAT_TIMER_FAN_MODE) / 1000);
}
ESP_LOGCONFIG(TAG, " Minimum Idle Time: %" PRIu32 "s", this->timer_[thermostat::TIMER_IDLE_ON].time / 1000);
ESP_LOGCONFIG(TAG,
" Minimum Idle Time: %" PRIu32 "s\n"
" Supported MODES:\n"
" AUTO: %s\n"
" HEAT/COOL: %s\n"
@@ -1362,8 +1393,9 @@ void ThermostatClimate::dump_config() {
" FAN_ONLY: %s\n"
" FAN_ONLY_ACTION_USES_FAN_MODE_TIMER: %s\n"
" FAN_ONLY_COOLING: %s",
YESNO(this->supports_auto_), YESNO(this->supports_heat_cool_), YESNO(this->supports_heat_),
YESNO(this->supports_cool_), YESNO(this->supports_dry_), YESNO(this->supports_fan_only_),
this->timer_[thermostat::THERMOSTAT_TIMER_IDLE_ON].time / 1000, YESNO(this->supports_auto_),
YESNO(this->supports_heat_cool_), YESNO(this->supports_heat_), YESNO(this->supports_cool_),
YESNO(this->supports_dry_), YESNO(this->supports_fan_only_),
YESNO(this->supports_fan_only_action_uses_fan_mode_timer_), YESNO(this->supports_fan_only_cooling_));
if (this->supports_cool_) {
ESP_LOGCONFIG(TAG, " FAN_WITH_COOLING: %s", YESNO(this->supports_fan_with_cooling_));
@@ -1382,40 +1414,39 @@ void ThermostatClimate::dump_config() {
" MIDDLE: %s\n"
" FOCUS: %s\n"
" DIFFUSE: %s\n"
" QUIET: %s",
YESNO(this->supports_fan_mode_on_), YESNO(this->supports_fan_mode_off_),
YESNO(this->supports_fan_mode_auto_), YESNO(this->supports_fan_mode_low_),
YESNO(this->supports_fan_mode_medium_), YESNO(this->supports_fan_mode_high_),
YESNO(this->supports_fan_mode_middle_), YESNO(this->supports_fan_mode_focus_),
YESNO(this->supports_fan_mode_diffuse_), YESNO(this->supports_fan_mode_quiet_));
ESP_LOGCONFIG(TAG,
" QUIET: %s\n"
" Supported SWING MODES:\n"
" BOTH: %s\n"
" OFF: %s\n"
" HORIZONTAL: %s\n"
" VERTICAL: %s\n"
" Supports TWO SET POINTS: %s",
YESNO(this->supports_fan_mode_on_), YESNO(this->supports_fan_mode_off_),
YESNO(this->supports_fan_mode_auto_), YESNO(this->supports_fan_mode_low_),
YESNO(this->supports_fan_mode_medium_), YESNO(this->supports_fan_mode_high_),
YESNO(this->supports_fan_mode_middle_), YESNO(this->supports_fan_mode_focus_),
YESNO(this->supports_fan_mode_diffuse_), YESNO(this->supports_fan_mode_quiet_),
YESNO(this->supports_swing_mode_both_), YESNO(this->supports_swing_mode_off_),
YESNO(this->supports_swing_mode_horizontal_), YESNO(this->supports_swing_mode_vertical_),
YESNO(this->supports_two_points_));
ESP_LOGCONFIG(TAG, " Supported PRESETS: ");
for (auto &it : this->preset_config_) {
const auto *preset_name = LOG_STR_ARG(climate::climate_preset_to_string(it.first));
ESP_LOGCONFIG(TAG, " Supports %s: %s", preset_name, YESNO(true));
this->dump_preset_config_(preset_name, it.second, it.first == this->default_preset_);
if (!this->preset_config_.empty()) {
ESP_LOGCONFIG(TAG, " Supported PRESETS:");
for (auto &it : this->preset_config_) {
const auto *preset_name = LOG_STR_ARG(climate::climate_preset_to_string(it.first));
ESP_LOGCONFIG(TAG, " %s:%s", preset_name, it.first == this->default_preset_ ? " (default)" : "");
this->dump_preset_config_(preset_name, it.second);
}
}
ESP_LOGCONFIG(TAG, " Supported CUSTOM PRESETS: ");
for (auto &it : this->custom_preset_config_) {
const auto *preset_name = it.first.c_str();
ESP_LOGCONFIG(TAG, " Supports %s: %s", preset_name, YESNO(true));
this->dump_preset_config_(preset_name, it.second, it.first == this->default_custom_preset_);
if (!this->custom_preset_config_.empty()) {
ESP_LOGCONFIG(TAG, " Supported CUSTOM PRESETS:");
for (auto &it : this->custom_preset_config_) {
const auto *preset_name = it.first.c_str();
ESP_LOGCONFIG(TAG, " %s:%s", preset_name, it.first == this->default_custom_preset_ ? " (default)" : "");
this->dump_preset_config_(preset_name, it.second);
}
}
ESP_LOGCONFIG(TAG, " On boot, restore from: %s",
this->on_boot_restore_from_ == thermostat::DEFAULT_PRESET ? "DEFAULT_PRESET" : "MEMORY");
}
ThermostatClimateTargetTempConfig::ThermostatClimateTargetTempConfig() = default;

View File

@@ -6,24 +6,25 @@
#include "esphome/components/climate/climate.h"
#include "esphome/components/sensor/sensor.h"
#include <array>
#include <cinttypes>
#include <map>
#include <vector>
namespace esphome {
namespace thermostat {
enum ThermostatClimateTimerIndex : uint8_t {
TIMER_COOLING_MAX_RUN_TIME = 0,
TIMER_COOLING_OFF = 1,
TIMER_COOLING_ON = 2,
TIMER_FAN_MODE = 3,
TIMER_FANNING_OFF = 4,
TIMER_FANNING_ON = 5,
TIMER_HEATING_MAX_RUN_TIME = 6,
TIMER_HEATING_OFF = 7,
TIMER_HEATING_ON = 8,
TIMER_IDLE_ON = 9,
THERMOSTAT_TIMER_COOLING_MAX_RUN_TIME = 0,
THERMOSTAT_TIMER_COOLING_OFF = 1,
THERMOSTAT_TIMER_COOLING_ON = 2,
THERMOSTAT_TIMER_FAN_MODE = 3,
THERMOSTAT_TIMER_FANNING_OFF = 4,
THERMOSTAT_TIMER_FANNING_ON = 5,
THERMOSTAT_TIMER_HEATING_MAX_RUN_TIME = 6,
THERMOSTAT_TIMER_HEATING_OFF = 7,
THERMOSTAT_TIMER_HEATING_ON = 8,
THERMOSTAT_TIMER_IDLE_ON = 9,
THERMOSTAT_TIMER_COUNT = 10,
};
enum OnBootRestoreFrom : uint8_t {
@@ -131,6 +132,7 @@ class ThermostatClimate : public climate::Climate, public Component {
Trigger<> *get_dry_mode_trigger() const;
Trigger<> *get_fan_only_mode_trigger() const;
Trigger<> *get_heat_mode_trigger() const;
Trigger<> *get_heat_cool_mode_trigger() const;
Trigger<> *get_off_mode_trigger() const;
Trigger<> *get_fan_mode_on_trigger() const;
Trigger<> *get_fan_mode_off_trigger() const;
@@ -163,9 +165,10 @@ class ThermostatClimate : public climate::Climate, public Component {
/// Returns the fan mode that is locked in (check fan_mode_change_delayed(), first!)
climate::ClimateFanMode locked_fan_mode();
/// Set point and hysteresis validation
bool hysteresis_valid(); // returns true if valid
bool hysteresis_valid(); // returns true if valid
bool limit_setpoints_for_heat_cool(); // returns true if set points should be further limited within visual range
void validate_target_temperature();
void validate_target_temperatures();
void validate_target_temperatures(bool pin_target_temperature_high);
void validate_target_temperature_low();
void validate_target_temperature_high();
@@ -241,12 +244,28 @@ class ThermostatClimate : public climate::Climate, public Component {
bool supplemental_cooling_required_();
bool supplemental_heating_required_();
void dump_preset_config_(const char *preset_name, const ThermostatClimateTargetTempConfig &config,
bool is_default_preset);
void dump_preset_config_(const char *preset_name, const ThermostatClimateTargetTempConfig &config);
/// Minimum allowable duration in seconds for action timers
const uint8_t min_timer_duration_{1};
/// Store previously-known states
///
/// These are used to determine when a trigger/action needs to be called
climate::ClimateFanMode prev_fan_mode_{climate::CLIMATE_FAN_ON};
climate::ClimateMode prev_mode_{climate::CLIMATE_MODE_OFF};
climate::ClimateSwingMode prev_swing_mode_{climate::CLIMATE_SWING_OFF};
/// The current supplemental action
climate::ClimateAction supplemental_action_{climate::CLIMATE_ACTION_OFF};
/// Default standard preset to use on start up
climate::ClimatePreset default_preset_{};
/// If set to DEFAULT_PRESET then the default preset is always used. When MEMORY prior
/// state will attempt to be restored if possible
OnBootRestoreFrom on_boot_restore_from_{OnBootRestoreFrom::MEMORY};
/// Whether the controller supports auto/cooling/drying/fanning/heating.
///
/// A false value for any given attribute means that the controller has no such action
@@ -362,9 +381,15 @@ class ThermostatClimate : public climate::Climate, public Component {
Trigger<> *supplemental_heat_action_trigger_{nullptr};
Trigger<> *heat_mode_trigger_{nullptr};
/// The trigger to call when the controller should switch to heat/cool mode.
///
/// In heat/cool mode, the controller will enable heating/cooling as necessary and switch
/// to idle when the temperature is within the thresholds/set points.
Trigger<> *heat_cool_mode_trigger_{nullptr};
/// The trigger to call when the controller should switch to auto mode.
///
/// In auto mode, the controller will enable heating/cooling as necessary and switch
/// In auto mode, the controller will enable heating/cooling as supported/necessary and switch
/// to idle when the temperature is within the thresholds/set points.
Trigger<> *auto_mode_trigger_{nullptr};
@@ -438,35 +463,21 @@ class ThermostatClimate : public climate::Climate, public Component {
Trigger<> *prev_mode_trigger_{nullptr};
Trigger<> *prev_swing_mode_trigger_{nullptr};
/// If set to DEFAULT_PRESET then the default preset is always used. When MEMORY prior
/// state will attempt to be restored if possible
OnBootRestoreFrom on_boot_restore_from_{OnBootRestoreFrom::MEMORY};
/// Store previously-known states
///
/// These are used to determine when a trigger/action needs to be called
climate::ClimateAction supplemental_action_{climate::CLIMATE_ACTION_OFF};
climate::ClimateFanMode prev_fan_mode_{climate::CLIMATE_FAN_ON};
climate::ClimateMode prev_mode_{climate::CLIMATE_MODE_OFF};
climate::ClimateSwingMode prev_swing_mode_{climate::CLIMATE_SWING_OFF};
/// Default standard preset to use on start up
climate::ClimatePreset default_preset_{};
/// Default custom preset to use on start up
std::string default_custom_preset_{};
/// Climate action timers
std::vector<ThermostatClimateTimer> timer_{
{false, 0, 0, std::bind(&ThermostatClimate::cooling_max_run_time_timer_callback_, this)},
{false, 0, 0, std::bind(&ThermostatClimate::cooling_off_timer_callback_, this)},
{false, 0, 0, std::bind(&ThermostatClimate::cooling_on_timer_callback_, this)},
{false, 0, 0, std::bind(&ThermostatClimate::fan_mode_timer_callback_, this)},
{false, 0, 0, std::bind(&ThermostatClimate::fanning_off_timer_callback_, this)},
{false, 0, 0, std::bind(&ThermostatClimate::fanning_on_timer_callback_, this)},
{false, 0, 0, std::bind(&ThermostatClimate::heating_max_run_time_timer_callback_, this)},
{false, 0, 0, std::bind(&ThermostatClimate::heating_off_timer_callback_, this)},
{false, 0, 0, std::bind(&ThermostatClimate::heating_on_timer_callback_, this)},
{false, 0, 0, std::bind(&ThermostatClimate::idle_on_timer_callback_, this)},
std::array<ThermostatClimateTimer, THERMOSTAT_TIMER_COUNT> timer_{
ThermostatClimateTimer(false, 0, 0, std::bind(&ThermostatClimate::cooling_max_run_time_timer_callback_, this)),
ThermostatClimateTimer(false, 0, 0, std::bind(&ThermostatClimate::cooling_off_timer_callback_, this)),
ThermostatClimateTimer(false, 0, 0, std::bind(&ThermostatClimate::cooling_on_timer_callback_, this)),
ThermostatClimateTimer(false, 0, 0, std::bind(&ThermostatClimate::fan_mode_timer_callback_, this)),
ThermostatClimateTimer(false, 0, 0, std::bind(&ThermostatClimate::fanning_off_timer_callback_, this)),
ThermostatClimateTimer(false, 0, 0, std::bind(&ThermostatClimate::fanning_on_timer_callback_, this)),
ThermostatClimateTimer(false, 0, 0, std::bind(&ThermostatClimate::heating_max_run_time_timer_callback_, this)),
ThermostatClimateTimer(false, 0, 0, std::bind(&ThermostatClimate::heating_off_timer_callback_, this)),
ThermostatClimateTimer(false, 0, 0, std::bind(&ThermostatClimate::heating_on_timer_callback_, this)),
ThermostatClimateTimer(false, 0, 0, std::bind(&ThermostatClimate::idle_on_timer_callback_, this)),
};
/// The set of standard preset configurations this thermostat supports (Eg. AWAY, ECO, etc)

View File

@@ -104,7 +104,7 @@ void UFireECComponent::write_data_(uint8_t reg, float data) {
void UFireECComponent::dump_config() {
ESP_LOGCONFIG(TAG, "uFire-EC");
LOG_I2C_DEVICE(this)
LOG_UPDATE_INTERVAL(this)
LOG_UPDATE_INTERVAL(this);
LOG_SENSOR(" ", "EC Sensor", this->ec_sensor_);
LOG_SENSOR(" ", "Temperature Sensor", this->temperature_sensor_);
LOG_SENSOR(" ", "Temperature Sensor external", this->temperature_sensor_external_);

View File

@@ -141,7 +141,7 @@ void UFireISEComponent::write_data_(uint8_t reg, float data) {
void UFireISEComponent::dump_config() {
ESP_LOGCONFIG(TAG, "uFire-ISE");
LOG_I2C_DEVICE(this)
LOG_UPDATE_INTERVAL(this)
LOG_UPDATE_INTERVAL(this);
LOG_SENSOR(" ", "PH Sensor", this->ph_sensor_);
LOG_SENSOR(" ", "Temperature Sensor", this->temperature_sensor_);
LOG_SENSOR(" ", "Temperature Sensor external", this->temperature_sensor_external_);

View File

@@ -181,7 +181,7 @@ void WaveshareEPaper2P13InV3::dump_config() {
LOG_PIN(" Reset Pin: ", this->reset_pin_)
LOG_PIN(" DC Pin: ", this->dc_pin_)
LOG_PIN(" Busy Pin: ", this->busy_pin_)
LOG_UPDATE_INTERVAL(this)
LOG_UPDATE_INTERVAL(this);
}
void WaveshareEPaper2P13InV3::set_full_update_every(uint32_t full_update_every) {

View File

@@ -494,155 +494,155 @@ const uint8_t INDEX_GZ[] PROGMEM = {
0x1c, 0x40, 0xc8, 0x12, 0x7c, 0xa6, 0xc1, 0x29, 0x21, 0xa4, 0xd5, 0x9f, 0x05, 0x5f, 0xe2, 0x9b, 0x98, 0xa6, 0xc1,
0xbc, 0xe8, 0x96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0x00};
} // namespace web_server
} // namespace esphome

View File

@@ -4,7 +4,7 @@ from enum import Enum
from esphome.enum import StrEnum
__version__ = "2025.9.0-dev"
__version__ = "2025.10.0-dev"
ALLOWED_NAME_CHARS = "abcdefghijklmnopqrstuvwxyz0123456789-_"
VALID_SUBSTITUTIONS_CHARACTERS = (
@@ -424,6 +424,7 @@ CONF_HEAD = "head"
CONF_HEADING = "heading"
CONF_HEARTBEAT = "heartbeat"
CONF_HEAT_ACTION = "heat_action"
CONF_HEAT_COOL_MODE = "heat_cool_mode"
CONF_HEAT_DEADBAND = "heat_deadband"
CONF_HEAT_MODE = "heat_mode"
CONF_HEAT_OVERRUN = "heat_overrun"

View File

@@ -34,37 +34,20 @@ namespace esphome {
static const char *const TAG = "app";
// Helper function for insertion sort of components by setup priority
// Helper function for insertion sort of components by priority
// Using insertion sort instead of std::stable_sort saves ~1.3KB of flash
// by avoiding template instantiations (std::rotate, std::stable_sort, lambdas)
// IMPORTANT: This sort is stable (preserves relative order of equal elements),
// which is necessary to maintain user-defined component order for same priority
template<typename Iterator> static void insertion_sort_by_setup_priority(Iterator first, Iterator last) {
template<typename Iterator, float (Component::*GetPriority)() const>
static void insertion_sort_by_priority(Iterator first, Iterator last) {
for (auto it = first + 1; it != last; ++it) {
auto key = *it;
float key_priority = key->get_actual_setup_priority();
float key_priority = (key->*GetPriority)();
auto j = it - 1;
// Using '<' (not '<=') ensures stability - equal priority components keep their order
while (j >= first && (*j)->get_actual_setup_priority() < key_priority) {
*(j + 1) = *j;
j--;
}
*(j + 1) = key;
}
}
// Helper function for insertion sort of components by loop priority
// IMPORTANT: This sort is stable (preserves relative order of equal elements),
// which is required when components are re-sorted during setup() if they block
template<typename Iterator> static void insertion_sort_by_loop_priority(Iterator first, Iterator last) {
for (auto it = first + 1; it != last; ++it) {
auto key = *it;
float key_priority = key->get_loop_priority();
auto j = it - 1;
// Using '<' (not '<=') ensures stability - equal priority components keep their order
while (j >= first && (*j)->get_loop_priority() < key_priority) {
while (j >= first && ((*j)->*GetPriority)() < key_priority) {
*(j + 1) = *j;
j--;
}
@@ -80,7 +63,7 @@ void Application::register_component_(Component *comp) {
for (auto *c : this->components_) {
if (comp == c) {
ESP_LOGW(TAG, "Component %s already registered! (%p)", c->get_component_source(), c);
ESP_LOGW(TAG, "Component %s already registered! (%p)", LOG_STR_ARG(c->get_component_log_str()), c);
return;
}
}
@@ -91,7 +74,8 @@ void Application::setup() {
ESP_LOGV(TAG, "Sorting components by setup priority");
// Sort by setup priority using our helper function
insertion_sort_by_setup_priority(this->components_.begin(), this->components_.end());
insertion_sort_by_priority<decltype(this->components_.begin()), &Component::get_actual_setup_priority>(
this->components_.begin(), this->components_.end());
// Initialize looping_components_ early so enable_pending_loops_() works during setup
this->calculate_looping_components_();
@@ -108,7 +92,8 @@ void Application::setup() {
continue;
// Sort components 0 through i by loop priority
insertion_sort_by_loop_priority(this->components_.begin(), this->components_.begin() + i + 1);
insertion_sort_by_priority<decltype(this->components_.begin()), &Component::get_loop_priority>(
this->components_.begin(), this->components_.begin() + i + 1);
do {
uint8_t new_app_state = STATUS_LED_WARNING;
@@ -340,8 +325,8 @@ void Application::teardown_components(uint32_t timeout_ms) {
// Note: At this point, connections are either disconnected or in a bad state,
// so this warning will only appear via serial rather than being transmitted to clients
for (size_t i = 0; i < pending_count; ++i) {
ESP_LOGW(TAG, "%s did not complete teardown within %" PRIu32 " ms", pending_components[i]->get_component_source(),
timeout_ms);
ESP_LOGW(TAG, "%s did not complete teardown within %" PRIu32 " ms",
LOG_STR_ARG(pending_components[i]->get_component_log_str()), timeout_ms);
}
}
}
@@ -361,20 +346,19 @@ void Application::calculate_looping_components_() {
// Add all components with loop override that aren't already LOOP_DONE
// Some components (like logger) may call disable_loop() during initialization
// before setup runs, so we need to respect their LOOP_DONE state
for (auto *obj : this->components_) {
if (obj->has_overridden_loop() &&
(obj->get_component_state() & COMPONENT_STATE_MASK) != COMPONENT_STATE_LOOP_DONE) {
this->looping_components_.push_back(obj);
}
}
this->add_looping_components_by_state_(false);
this->looping_components_active_end_ = this->looping_components_.size();
// Then add any components that are already LOOP_DONE to the inactive section
// This handles components that called disable_loop() during initialization
this->add_looping_components_by_state_(true);
}
void Application::add_looping_components_by_state_(bool match_loop_done) {
for (auto *obj : this->components_) {
if (obj->has_overridden_loop() &&
(obj->get_component_state() & COMPONENT_STATE_MASK) == COMPONENT_STATE_LOOP_DONE) {
((obj->get_component_state() & COMPONENT_STATE_MASK) == COMPONENT_STATE_LOOP_DONE) == match_loop_done) {
this->looping_components_.push_back(obj);
}
}
@@ -473,7 +457,7 @@ void Application::enable_pending_loops_() {
// Clear the pending flag and enable the loop
component->pending_enable_loop_ = false;
ESP_LOGVV(TAG, "%s loop enabled from ISR", component->get_component_source());
ESP_LOGVV(TAG, "%s loop enabled from ISR", LOG_STR_ARG(component->get_component_log_str()));
component->component_state_ &= ~COMPONENT_STATE_MASK;
component->component_state_ |= COMPONENT_STATE_LOOP;

View File

@@ -431,6 +431,7 @@ class Application {
void register_component_(Component *comp);
void calculate_looping_components_();
void add_looping_components_by_state_(bool match_loop_done);
// These methods are called by Component::disable_loop() and Component::enable_loop()
// Components should not call these directly - use this->disable_loop() or this->enable_loop()

View File

@@ -141,7 +141,7 @@ void Component::call_dump_config() {
}
}
}
ESP_LOGE(TAG, " %s is marked FAILED: %s", this->get_component_source(),
ESP_LOGE(TAG, " %s is marked FAILED: %s", LOG_STR_ARG(this->get_component_log_str()),
error_msg ? error_msg : LOG_STR_LITERAL("unspecified"));
}
}
@@ -153,14 +153,14 @@ void Component::call() {
case COMPONENT_STATE_CONSTRUCTION: {
// State Construction: Call setup and set state to setup
this->set_component_state_(COMPONENT_STATE_SETUP);
ESP_LOGV(TAG, "Setup %s", this->get_component_source());
ESP_LOGV(TAG, "Setup %s", LOG_STR_ARG(this->get_component_log_str()));
#if ESPHOME_LOG_LEVEL >= ESPHOME_LOG_LEVEL_DEBUG
uint32_t start_time = millis();
#endif
this->call_setup();
#if ESPHOME_LOG_LEVEL >= ESPHOME_LOG_LEVEL_DEBUG
uint32_t setup_time = millis() - start_time;
ESP_LOGCONFIG(TAG, "Setup %s took %ums", this->get_component_source(), (unsigned) setup_time);
ESP_LOGCONFIG(TAG, "Setup %s took %ums", LOG_STR_ARG(this->get_component_log_str()), (unsigned) setup_time);
#endif
break;
}
@@ -181,10 +181,8 @@ void Component::call() {
break;
}
}
const char *Component::get_component_source() const {
if (this->component_source_ == nullptr)
return "<unknown>";
return this->component_source_;
const LogString *Component::get_component_log_str() const {
return this->component_source_ == nullptr ? LOG_STR("<unknown>") : this->component_source_;
}
bool Component::should_warn_of_blocking(uint32_t blocking_time) {
if (blocking_time > this->warn_if_blocking_over_) {
@@ -200,7 +198,7 @@ bool Component::should_warn_of_blocking(uint32_t blocking_time) {
return false;
}
void Component::mark_failed() {
ESP_LOGE(TAG, "%s was marked as failed", this->get_component_source());
ESP_LOGE(TAG, "%s was marked as failed", LOG_STR_ARG(this->get_component_log_str()));
this->set_component_state_(COMPONENT_STATE_FAILED);
this->status_set_error();
// Also remove from loop since failed components shouldn't loop
@@ -212,14 +210,14 @@ void Component::set_component_state_(uint8_t state) {
}
void Component::disable_loop() {
if ((this->component_state_ & COMPONENT_STATE_MASK) != COMPONENT_STATE_LOOP_DONE) {
ESP_LOGVV(TAG, "%s loop disabled", this->get_component_source());
ESP_LOGVV(TAG, "%s loop disabled", LOG_STR_ARG(this->get_component_log_str()));
this->set_component_state_(COMPONENT_STATE_LOOP_DONE);
App.disable_component_loop_(this);
}
}
void Component::enable_loop() {
if ((this->component_state_ & COMPONENT_STATE_MASK) == COMPONENT_STATE_LOOP_DONE) {
ESP_LOGVV(TAG, "%s loop enabled", this->get_component_source());
ESP_LOGVV(TAG, "%s loop enabled", LOG_STR_ARG(this->get_component_log_str()));
this->set_component_state_(COMPONENT_STATE_LOOP);
App.enable_component_loop_(this);
}
@@ -239,7 +237,7 @@ void IRAM_ATTR HOT Component::enable_loop_soon_any_context() {
}
void Component::reset_to_construction_state() {
if ((this->component_state_ & COMPONENT_STATE_MASK) == COMPONENT_STATE_FAILED) {
ESP_LOGI(TAG, "%s is being reset to construction state", this->get_component_source());
ESP_LOGI(TAG, "%s is being reset to construction state", LOG_STR_ARG(this->get_component_log_str()));
this->set_component_state_(COMPONENT_STATE_CONSTRUCTION);
// Clear error status when resetting
this->status_clear_error();
@@ -286,7 +284,7 @@ void Component::status_set_warning(const char *message) {
return;
this->component_state_ |= STATUS_LED_WARNING;
App.app_state_ |= STATUS_LED_WARNING;
ESP_LOGW(TAG, "%s set Warning flag: %s", this->get_component_source(),
ESP_LOGW(TAG, "%s set Warning flag: %s", LOG_STR_ARG(this->get_component_log_str()),
message ? message : LOG_STR_LITERAL("unspecified"));
}
void Component::status_set_warning(const LogString *message) {
@@ -295,7 +293,7 @@ void Component::status_set_warning(const LogString *message) {
return;
this->component_state_ |= STATUS_LED_WARNING;
App.app_state_ |= STATUS_LED_WARNING;
ESP_LOGW(TAG, "%s set Warning flag: %s", this->get_component_source(),
ESP_LOGW(TAG, "%s set Warning flag: %s", LOG_STR_ARG(this->get_component_log_str()),
message ? LOG_STR_ARG(message) : LOG_STR_LITERAL("unspecified"));
}
void Component::status_set_error(const char *message) {
@@ -303,7 +301,7 @@ void Component::status_set_error(const char *message) {
return;
this->component_state_ |= STATUS_LED_ERROR;
App.app_state_ |= STATUS_LED_ERROR;
ESP_LOGE(TAG, "%s set Error flag: %s", this->get_component_source(),
ESP_LOGE(TAG, "%s set Error flag: %s", LOG_STR_ARG(this->get_component_log_str()),
message ? message : LOG_STR_LITERAL("unspecified"));
if (message != nullptr) {
// Lazy allocate the error messages vector if needed
@@ -325,13 +323,13 @@ void Component::status_clear_warning() {
if ((this->component_state_ & STATUS_LED_WARNING) == 0)
return;
this->component_state_ &= ~STATUS_LED_WARNING;
ESP_LOGW(TAG, "%s cleared Warning flag", this->get_component_source());
ESP_LOGW(TAG, "%s cleared Warning flag", LOG_STR_ARG(this->get_component_log_str()));
}
void Component::status_clear_error() {
if ((this->component_state_ & STATUS_LED_ERROR) == 0)
return;
this->component_state_ &= ~STATUS_LED_ERROR;
ESP_LOGE(TAG, "%s cleared Error flag", this->get_component_source());
ESP_LOGE(TAG, "%s cleared Error flag", LOG_STR_ARG(this->get_component_log_str()));
}
void Component::status_momentary_warning(const std::string &name, uint32_t length) {
this->status_set_warning();
@@ -342,6 +340,18 @@ void Component::status_momentary_error(const std::string &name, uint32_t length)
this->set_timeout(name, length, [this]() { this->status_clear_error(); });
}
void Component::dump_config() {}
// Function implementation of LOG_UPDATE_INTERVAL macro to reduce code size
void log_update_interval(const char *tag, PollingComponent *component) {
uint32_t update_interval = component->get_update_interval();
if (update_interval == SCHEDULER_DONT_RUN) {
ESP_LOGCONFIG(tag, " Update Interval: never");
} else if (update_interval < 100) {
ESP_LOGCONFIG(tag, " Update Interval: %.3fs", update_interval / 1000.0f);
} else {
ESP_LOGCONFIG(tag, " Update Interval: %.1fs", update_interval / 1000.0f);
}
}
float Component::get_actual_setup_priority() const {
// Check if there's an override in the global vector
if (setup_priority_overrides) {
@@ -430,8 +440,9 @@ uint32_t WarnIfComponentBlockingGuard::finish() {
should_warn = blocking_time > WARN_IF_BLOCKING_OVER_MS;
}
if (should_warn) {
const char *src = component_ == nullptr ? "<null>" : component_->get_component_source();
ESP_LOGW(TAG, "%s took a long time for an operation (%" PRIu32 " ms)", src, blocking_time);
ESP_LOGW(TAG, "%s took a long time for an operation (%" PRIu32 " ms)",
component_ == nullptr ? LOG_STR_LITERAL("<null>") : LOG_STR_ARG(component_->get_component_log_str()),
blocking_time);
ESP_LOGW(TAG, "Components should block for at most 30 ms");
}

View File

@@ -5,6 +5,7 @@
#include <functional>
#include <string>
#include "esphome/core/log.h"
#include "esphome/core/optional.h"
namespace esphome {
@@ -47,14 +48,13 @@ extern const float LATE;
static const uint32_t SCHEDULER_DONT_RUN = 4294967295UL;
#define LOG_UPDATE_INTERVAL(this) \
if (this->get_update_interval() == SCHEDULER_DONT_RUN) { \
ESP_LOGCONFIG(TAG, " Update Interval: never"); \
} else if (this->get_update_interval() < 100) { \
ESP_LOGCONFIG(TAG, " Update Interval: %.3fs", this->get_update_interval() / 1000.0f); \
} else { \
ESP_LOGCONFIG(TAG, " Update Interval: %.1fs", this->get_update_interval() / 1000.0f); \
}
// Forward declaration
class PollingComponent;
// Function declaration for LOG_UPDATE_INTERVAL
void log_update_interval(const char *tag, PollingComponent *component);
#define LOG_UPDATE_INTERVAL(this) log_update_interval(TAG, this)
extern const uint8_t COMPONENT_STATE_MASK;
extern const uint8_t COMPONENT_STATE_CONSTRUCTION;
@@ -224,12 +224,12 @@ class Component {
*
* This is set by the ESPHome core, and should not be called manually.
*/
void set_component_source(const char *source) { component_source_ = source; }
/** Get the integration where this component was declared as a string.
void set_component_source(const LogString *source) { component_source_ = source; }
/** Get the integration where this component was declared as a LogString for logging.
*
* Returns "<unknown>" if source not set
* Returns LOG_STR("<unknown>") if source not set
*/
const char *get_component_source() const;
const LogString *get_component_log_str() const;
bool should_warn_of_blocking(uint32_t blocking_time);
@@ -409,7 +409,7 @@ class Component {
bool cancel_defer(const std::string &name); // NOLINT
// Ordered for optimal packing on 32-bit systems
const char *component_source_{nullptr};
const LogString *component_source_{nullptr};
uint16_t warn_if_blocking_over_{WARN_IF_BLOCKING_OVER_MS}; ///< Warn if blocked for this many ms (max 65.5s)
/// State of this component - each bit has a purpose:
/// Bits 0-2: Component state (0x00=CONSTRUCTION, 0x01=SETUP, 0x02=LOOP, 0x03=FAILED, 0x04=LOOP_DONE)

View File

@@ -78,9 +78,13 @@ size_t RingBuffer::write(const void *data, size_t len) {
return this->write_without_replacement(data, len, 0);
}
size_t RingBuffer::write_without_replacement(const void *data, size_t len, TickType_t ticks_to_wait) {
size_t RingBuffer::write_without_replacement(const void *data, size_t len, TickType_t ticks_to_wait,
bool write_partial) {
if (!xRingbufferSend(this->handle_, data, len, ticks_to_wait)) {
// Couldn't fit all the data, so only write what will fit
if (!write_partial) {
return 0; // Not enough space available and not allowed to write partial data
}
// Couldn't fit all the data, write what will fit
size_t free = std::min(this->free(), len);
if (xRingbufferSend(this->handle_, data, free, 0)) {
return free;

View File

@@ -50,7 +50,8 @@ class RingBuffer {
* @param ticks_to_wait Maximum number of FreeRTOS ticks to wait (default: 0)
* @return Number of bytes written
*/
size_t write_without_replacement(const void *data, size_t len, TickType_t ticks_to_wait = 0);
size_t write_without_replacement(const void *data, size_t len, TickType_t ticks_to_wait = 0,
bool write_partial = true);
/**
* @brief Returns the number of available bytes in the ring buffer.

View File

@@ -14,7 +14,19 @@ namespace esphome {
static const char *const TAG = "scheduler";
static const uint32_t MAX_LOGICALLY_DELETED_ITEMS = 10;
// Memory pool configuration constants
// Pool size of 5 matches typical usage patterns (2-4 active timers)
// - Minimal memory overhead (~250 bytes on ESP32)
// - Sufficient for most configs with a couple sensors/components
// - Still prevents heap fragmentation and allocation stalls
// - Complex setups with many timers will just allocate beyond the pool
// See https://github.com/esphome/backlog/issues/52
static constexpr size_t MAX_POOL_SIZE = 5;
// Maximum number of logically deleted (cancelled) items before forcing cleanup.
// Set to 5 to match the pool size - when we have as many cancelled items as our
// pool can hold, it's time to clean up and recycle them.
static constexpr uint32_t MAX_LOGICALLY_DELETED_ITEMS = 5;
// Half the 32-bit range - used to detect rollovers vs normal time progression
static constexpr uint32_t HALF_MAX_UINT32 = std::numeric_limits<uint32_t>::max() / 2;
// max delay to start an interval sequence
@@ -79,8 +91,28 @@ void HOT Scheduler::set_timer_common_(Component *component, SchedulerItem::Type
return;
}
// Get fresh timestamp BEFORE taking lock - millis_64_ may need to acquire lock itself
const uint64_t now = this->millis_64_(millis());
// Take lock early to protect scheduler_item_pool_ access
LockGuard guard{this->lock_};
// Create and populate the scheduler item
auto item = make_unique<SchedulerItem>();
std::unique_ptr<SchedulerItem> item;
if (!this->scheduler_item_pool_.empty()) {
// Reuse from pool
item = std::move(this->scheduler_item_pool_.back());
this->scheduler_item_pool_.pop_back();
#ifdef ESPHOME_DEBUG_SCHEDULER
ESP_LOGD(TAG, "Reused item from pool (pool size now: %zu)", this->scheduler_item_pool_.size());
#endif
} else {
// Allocate new if pool is empty
item = make_unique<SchedulerItem>();
#ifdef ESPHOME_DEBUG_SCHEDULER
ESP_LOGD(TAG, "Allocated new item (pool empty)");
#endif
}
item->component = component;
item->set_name(name_cstr, !is_static_string);
item->type = type;
@@ -99,7 +131,6 @@ void HOT Scheduler::set_timer_common_(Component *component, SchedulerItem::Type
// Single-core platforms don't need thread-safe defer handling
if (delay == 0 && type == SchedulerItem::TIMEOUT) {
// Put in defer queue for guaranteed FIFO execution
LockGuard guard{this->lock_};
if (!skip_cancel) {
this->cancel_item_locked_(component, name_cstr, type);
}
@@ -108,21 +139,18 @@ void HOT Scheduler::set_timer_common_(Component *component, SchedulerItem::Type
}
#endif /* not ESPHOME_THREAD_SINGLE */
// Get fresh timestamp for new timer/interval - ensures accurate scheduling
const auto now = this->millis_64_(millis()); // Fresh millis() call
// Type-specific setup
if (type == SchedulerItem::INTERVAL) {
item->interval = delay;
// first execution happens immediately after a random smallish offset
// Calculate random offset (0 to min(interval/2, 5s))
uint32_t offset = (uint32_t) (std::min(delay / 2, MAX_INTERVAL_DELAY) * random_float());
item->next_execution_ = now + offset;
item->set_next_execution(now + offset);
ESP_LOGV(TAG, "Scheduler interval for %s is %" PRIu32 "ms, offset %" PRIu32 "ms", name_cstr ? name_cstr : "", delay,
offset);
} else {
item->interval = 0;
item->next_execution_ = now + delay;
item->set_next_execution(now + delay);
}
#ifdef ESPHOME_DEBUG_SCHEDULER
@@ -134,16 +162,15 @@ void HOT Scheduler::set_timer_common_(Component *component, SchedulerItem::Type
// Debug logging
const char *type_str = (type == SchedulerItem::TIMEOUT) ? "timeout" : "interval";
if (type == SchedulerItem::TIMEOUT) {
ESP_LOGD(TAG, "set_%s(name='%s/%s', %s=%" PRIu32 ")", type_str, item->get_source(),
ESP_LOGD(TAG, "set_%s(name='%s/%s', %s=%" PRIu32 ")", type_str, LOG_STR_ARG(item->get_source()),
name_cstr ? name_cstr : "(null)", type_str, delay);
} else {
ESP_LOGD(TAG, "set_%s(name='%s/%s', %s=%" PRIu32 ", offset=%" PRIu32 ")", type_str, item->get_source(),
name_cstr ? name_cstr : "(null)", type_str, delay, static_cast<uint32_t>(item->next_execution_ - now));
ESP_LOGD(TAG, "set_%s(name='%s/%s', %s=%" PRIu32 ", offset=%" PRIu32 ")", type_str, LOG_STR_ARG(item->get_source()),
name_cstr ? name_cstr : "(null)", type_str, delay,
static_cast<uint32_t>(item->get_next_execution() - now));
}
#endif /* ESPHOME_DEBUG_SCHEDULER */
LockGuard guard{this->lock_};
// For retries, check if there's a cancelled timeout first
if (is_retry && name_cstr != nullptr && type == SchedulerItem::TIMEOUT &&
(has_cancelled_timeout_in_container_(this->items_, component, name_cstr, /* match_retry= */ true) ||
@@ -285,9 +312,10 @@ optional<uint32_t> HOT Scheduler::next_schedule_in(uint32_t now) {
auto &item = this->items_[0];
// Convert the fresh timestamp from caller (usually Application::loop()) to 64-bit
const auto now_64 = this->millis_64_(now); // 'now' from parameter - fresh from caller
if (item->next_execution_ < now_64)
const uint64_t next_exec = item->get_next_execution();
if (next_exec < now_64)
return 0;
return item->next_execution_ - now_64;
return next_exec - now_64;
}
void HOT Scheduler::call(uint32_t now) {
#ifndef ESPHOME_THREAD_SINGLE
@@ -319,6 +347,8 @@ void HOT Scheduler::call(uint32_t now) {
if (!this->should_skip_item_(item.get())) {
this->execute_item_(item.get(), now);
}
// Recycle the defer item after execution
this->recycle_item_(std::move(item));
}
#endif /* not ESPHOME_THREAD_SINGLE */
@@ -326,6 +356,9 @@ void HOT Scheduler::call(uint32_t now) {
const auto now_64 = this->millis_64_(now); // 'now' from parameter - fresh from Application::loop()
this->process_to_add();
// Track if any items were added to to_add_ during this call (intervals or from callbacks)
bool has_added_items = false;
#ifdef ESPHOME_DEBUG_SCHEDULER
static uint64_t last_print = 0;
@@ -335,11 +368,11 @@ void HOT Scheduler::call(uint32_t now) {
#ifdef ESPHOME_THREAD_MULTI_ATOMICS
const auto last_dbg = this->last_millis_.load(std::memory_order_relaxed);
const auto major_dbg = this->millis_major_.load(std::memory_order_relaxed);
ESP_LOGD(TAG, "Items: count=%zu, now=%" PRIu64 " (%" PRIu16 ", %" PRIu32 ")", this->items_.size(), now_64,
major_dbg, last_dbg);
ESP_LOGD(TAG, "Items: count=%zu, pool=%zu, now=%" PRIu64 " (%" PRIu16 ", %" PRIu32 ")", this->items_.size(),
this->scheduler_item_pool_.size(), now_64, major_dbg, last_dbg);
#else /* not ESPHOME_THREAD_MULTI_ATOMICS */
ESP_LOGD(TAG, "Items: count=%zu, now=%" PRIu64 " (%" PRIu16 ", %" PRIu32 ")", this->items_.size(), now_64,
this->millis_major_, this->last_millis_);
ESP_LOGD(TAG, "Items: count=%zu, pool=%zu, now=%" PRIu64 " (%" PRIu16 ", %" PRIu32 ")", this->items_.size(),
this->scheduler_item_pool_.size(), now_64, this->millis_major_, this->last_millis_);
#endif /* else ESPHOME_THREAD_MULTI_ATOMICS */
// Cleanup before debug output
this->cleanup_();
@@ -352,9 +385,10 @@ void HOT Scheduler::call(uint32_t now) {
}
const char *name = item->get_name();
ESP_LOGD(TAG, " %s '%s/%s' interval=%" PRIu32 " next_execution in %" PRIu64 "ms at %" PRIu64,
item->get_type_str(), item->get_source(), name ? name : "(null)", item->interval,
item->next_execution_ - now_64, item->next_execution_);
bool is_cancelled = is_item_removed_(item.get());
ESP_LOGD(TAG, " %s '%s/%s' interval=%" PRIu32 " next_execution in %" PRIu64 "ms at %" PRIu64 "%s",
item->get_type_str(), LOG_STR_ARG(item->get_source()), name ? name : "(null)", item->interval,
item->get_next_execution() - now_64, item->get_next_execution(), is_cancelled ? " [CANCELLED]" : "");
old_items.push_back(std::move(item));
}
@@ -369,8 +403,13 @@ void HOT Scheduler::call(uint32_t now) {
}
#endif /* ESPHOME_DEBUG_SCHEDULER */
// If we have too many items to remove
if (this->to_remove_ > MAX_LOGICALLY_DELETED_ITEMS) {
// Cleanup removed items before processing
// First try to clean items from the top of the heap (fast path)
this->cleanup_();
// If we still have too many cancelled items, do a full cleanup
// This only happens if cancelled items are stuck in the middle/bottom of the heap
if (this->to_remove_ >= MAX_LOGICALLY_DELETED_ITEMS) {
// We hold the lock for the entire cleanup operation because:
// 1. We're rebuilding the entire items_ list, so we need exclusive access throughout
// 2. Other threads must see either the old state or the new state, not intermediate states
@@ -380,10 +419,13 @@ void HOT Scheduler::call(uint32_t now) {
std::vector<std::unique_ptr<SchedulerItem>> valid_items;
// Move all non-removed items to valid_items
// Move all non-removed items to valid_items, recycle removed ones
for (auto &item : this->items_) {
if (!item->remove) {
if (!is_item_removed_(item.get())) {
valid_items.push_back(std::move(item));
} else {
// Recycle removed items
this->recycle_item_(std::move(item));
}
}
@@ -393,92 +435,92 @@ void HOT Scheduler::call(uint32_t now) {
std::make_heap(this->items_.begin(), this->items_.end(), SchedulerItem::cmp);
this->to_remove_ = 0;
}
// Cleanup removed items before processing
this->cleanup_();
while (!this->items_.empty()) {
// use scoping to indicate visibility of `item` variable
{
// Don't copy-by value yet
auto &item = this->items_[0];
if (item->next_execution_ > now_64) {
// Not reached timeout yet, done for this call
break;
}
// Don't run on failed components
if (item->component != nullptr && item->component->is_failed()) {
LockGuard guard{this->lock_};
this->pop_raw_();
continue;
}
// Don't copy-by value yet
auto &item = this->items_[0];
if (item->get_next_execution() > now_64) {
// Not reached timeout yet, done for this call
break;
}
// Don't run on failed components
if (item->component != nullptr && item->component->is_failed()) {
LockGuard guard{this->lock_};
this->pop_raw_();
continue;
}
// Check if item is marked for removal
// This handles two cases:
// 1. Item was marked for removal after cleanup_() but before we got here
// 2. Item is marked for removal but wasn't at the front of the heap during cleanup_()
// Check if item is marked for removal
// This handles two cases:
// 1. Item was marked for removal after cleanup_() but before we got here
// 2. Item is marked for removal but wasn't at the front of the heap during cleanup_()
#ifdef ESPHOME_THREAD_MULTI_NO_ATOMICS
// Multi-threaded platforms without atomics: must take lock to safely read remove flag
{
LockGuard guard{this->lock_};
if (is_item_removed_(item.get())) {
this->pop_raw_();
this->to_remove_--;
continue;
}
}
#else
// Single-threaded or multi-threaded with atomics: can check without lock
// Multi-threaded platforms without atomics: must take lock to safely read remove flag
{
LockGuard guard{this->lock_};
if (is_item_removed_(item.get())) {
LockGuard guard{this->lock_};
this->pop_raw_();
this->to_remove_--;
continue;
}
}
#else
// Single-threaded or multi-threaded with atomics: can check without lock
if (is_item_removed_(item.get())) {
LockGuard guard{this->lock_};
this->pop_raw_();
this->to_remove_--;
continue;
}
#endif
#ifdef ESPHOME_DEBUG_SCHEDULER
const char *item_name = item->get_name();
ESP_LOGV(TAG, "Running %s '%s/%s' with interval=%" PRIu32 " next_execution=%" PRIu64 " (now=%" PRIu64 ")",
item->get_type_str(), item->get_source(), item_name ? item_name : "(null)", item->interval,
item->next_execution_, now_64);
const char *item_name = item->get_name();
ESP_LOGV(TAG, "Running %s '%s/%s' with interval=%" PRIu32 " next_execution=%" PRIu64 " (now=%" PRIu64 ")",
item->get_type_str(), LOG_STR_ARG(item->get_source()), item_name ? item_name : "(null)", item->interval,
item->get_next_execution(), now_64);
#endif /* ESPHOME_DEBUG_SCHEDULER */
// Warning: During callback(), a lot of stuff can happen, including:
// - timeouts/intervals get added, potentially invalidating vector pointers
// - timeouts/intervals get cancelled
this->execute_item_(item.get(), now);
// Warning: During callback(), a lot of stuff can happen, including:
// - timeouts/intervals get added, potentially invalidating vector pointers
// - timeouts/intervals get cancelled
this->execute_item_(item.get(), now);
LockGuard guard{this->lock_};
auto executed_item = std::move(this->items_[0]);
// Only pop after function call, this ensures we were reachable
// during the function call and know if we were cancelled.
this->pop_raw_();
if (executed_item->remove) {
// We were removed/cancelled in the function call, stop
this->to_remove_--;
continue;
}
{
LockGuard guard{this->lock_};
// new scope, item from before might have been moved in the vector
auto item = std::move(this->items_[0]);
// Only pop after function call, this ensures we were reachable
// during the function call and know if we were cancelled.
this->pop_raw_();
if (item->remove) {
// We were removed/cancelled in the function call, stop
this->to_remove_--;
continue;
}
if (item->type == SchedulerItem::INTERVAL) {
item->next_execution_ = now_64 + item->interval;
// Add new item directly to to_add_
// since we have the lock held
this->to_add_.push_back(std::move(item));
}
if (executed_item->type == SchedulerItem::INTERVAL) {
executed_item->set_next_execution(now_64 + executed_item->interval);
// Add new item directly to to_add_
// since we have the lock held
this->to_add_.push_back(std::move(executed_item));
} else {
// Timeout completed - recycle it
this->recycle_item_(std::move(executed_item));
}
has_added_items |= !this->to_add_.empty();
}
this->process_to_add();
if (has_added_items) {
this->process_to_add();
}
}
void HOT Scheduler::process_to_add() {
LockGuard guard{this->lock_};
for (auto &it : this->to_add_) {
if (it->remove) {
if (is_item_removed_(it.get())) {
// Recycle cancelled items
this->recycle_item_(std::move(it));
continue;
}
@@ -518,6 +560,10 @@ size_t HOT Scheduler::cleanup_() {
}
void HOT Scheduler::pop_raw_() {
std::pop_heap(this->items_.begin(), this->items_.end(), SchedulerItem::cmp);
// Instead of destroying, recycle the item
this->recycle_item_(std::move(this->items_.back()));
this->items_.pop_back();
}
@@ -552,7 +598,7 @@ bool HOT Scheduler::cancel_item_locked_(Component *component, const char *name_c
// Check all containers for matching items
#ifndef ESPHOME_THREAD_SINGLE
// Only check defer queue for timeouts (intervals never go there)
// Mark items in defer queue as cancelled (they'll be skipped when processed)
if (type == SchedulerItem::TIMEOUT) {
for (auto &item : this->defer_queue_) {
if (this->matches_item_(item, component, name_cstr, type, match_retry)) {
@@ -564,11 +610,22 @@ bool HOT Scheduler::cancel_item_locked_(Component *component, const char *name_c
#endif /* not ESPHOME_THREAD_SINGLE */
// Cancel items in the main heap
for (auto &item : this->items_) {
if (this->matches_item_(item, component, name_cstr, type, match_retry)) {
this->mark_item_removed_(item.get());
// Special case: if the last item in the heap matches, we can remove it immediately
// (removing the last element doesn't break heap structure)
if (!this->items_.empty()) {
auto &last_item = this->items_.back();
if (this->matches_item_(last_item, component, name_cstr, type, match_retry)) {
this->recycle_item_(std::move(this->items_.back()));
this->items_.pop_back();
total_cancelled++;
this->to_remove_++; // Track removals for heap items
}
// For other items in heap, we can only mark for removal (can't remove from middle of heap)
for (auto &item : this->items_) {
if (this->matches_item_(item, component, name_cstr, type, match_retry)) {
this->mark_item_removed_(item.get());
total_cancelled++;
this->to_remove_++; // Track removals for heap items
}
}
}
@@ -744,7 +801,31 @@ uint64_t Scheduler::millis_64_(uint32_t now) {
bool HOT Scheduler::SchedulerItem::cmp(const std::unique_ptr<SchedulerItem> &a,
const std::unique_ptr<SchedulerItem> &b) {
return a->next_execution_ > b->next_execution_;
// High bits are almost always equal (change only on 32-bit rollover ~49 days)
// Optimize for common case: check low bits first when high bits are equal
return (a->next_execution_high_ == b->next_execution_high_) ? (a->next_execution_low_ > b->next_execution_low_)
: (a->next_execution_high_ > b->next_execution_high_);
}
void Scheduler::recycle_item_(std::unique_ptr<SchedulerItem> item) {
if (!item)
return;
if (this->scheduler_item_pool_.size() < MAX_POOL_SIZE) {
// Clear callback to release captured resources
item->callback = nullptr;
// Clear dynamic name if any
item->clear_dynamic_name();
this->scheduler_item_pool_.push_back(std::move(item));
#ifdef ESPHOME_DEBUG_SCHEDULER
ESP_LOGD(TAG, "Recycled item to pool (pool size now: %zu)", this->scheduler_item_pool_.size());
#endif
} else {
#ifdef ESPHOME_DEBUG_SCHEDULER
ESP_LOGD(TAG, "Pool full (size: %zu), deleting item", this->scheduler_item_pool_.size());
#endif
}
// else: unique_ptr will delete the item when it goes out of scope
}
} // namespace esphome

Some files were not shown because too many files have changed in this diff Show More