26 Commits

Author SHA1 Message Date
Yurii
e4cbc687ae chore: minimizing flash size with NimBLE 2026-02-20 20:48:06 +03:00
Yurii
43fe5765f7 Merge branch 'async' into passive_ble 2026-02-16 10:26:37 +03:00
Yurii
5482e0b70a chore: update version name 2026-02-16 10:19:26 +03:00
Yurii
3fdb48e016 feat: added support DHT11/DHT22 sensors (#223)
* feat: Added support DHT11/DHT22 sensors

* chore: formatting

* fix: typo

* fix: `HaHelper::publishDynamicSensor()` for DHT sensors fixed

* refactor: optimization of wired sensors
2026-02-16 10:17:38 +03:00
Yurii
11747dd8bd feat: added commit hash 2026-02-16 10:06:26 +03:00
Yurii
af1a9b59c4 fix: custom_sdkconfig only for ESP32 C6 2026-02-15 06:30:28 +03:00
Yurii
9c86ad4427 chore: misc 2026-02-15 05:37:09 +03:00
Yurii
67adb3b9cf Merge branch 'async' into passive_ble 2026-01-26 02:23:19 +03:00
Yurii
aae53d605a fix: move OpenThermTask to 0 core 2026-01-25 22:44:58 +03:00
Yurii
de9276d04e refactor: cosmetic changes 2026-01-25 22:42:48 +03:00
Yurii
cb8cd7c26e feat: added support BTHome v2 format for BLE sensors #215 2026-01-25 22:25:58 +03:00
Yurii
74e321cc1e Merge branch 'async' into passive_ble 2026-01-23 00:26:24 +03:00
Yurii
1e83f284cb chore: dependencies fixed 2026-01-19 22:03:04 +03:00
Yurii
27baf675e5 chore: reformat platformio.ini 2026-01-19 21:44:18 +03:00
Yurii
1fdc06fce6 Merge branch 'async' into passive_ble 2026-01-19 21:38:12 +03:00
Yurii
c39eeee9cf Merge branch 'master' into passive_ble 2025-11-17 13:26:51 +03:00
Yurii
f2fe6036c2 chore: fix dependencies 2025-11-17 13:24:43 +03:00
Yurii
40dc863530 refactor: improved OTA upgrade
https://github.com/ESP32Async/ESPAsyncWebServer/pull/329
2025-11-03 03:19:50 +03:00
Yurii
a40413aeac style: formatting 2025-11-02 23:34:46 +03:00
Yurii
9a045bfc40 Merge branch 'async' into passive_ble 2025-11-02 11:45:06 +03:00
Yurii
c78d2d0c0b refactor: reduced tasks stack size 2025-11-01 19:12:03 +03:00
Yurii
b7825111bb refactor: active + passive BLE scanning 2025-10-22 20:37:36 +03:00
Yurii
d5691ef8f7 refactor: decreased interval and window for scanning BLE 2025-10-22 17:22:02 +03:00
Yurii
0213582464 fix: build for nodemcu32, c3, c6 boards; formatting `platformio.ini` 2025-10-21 13:43:41 +03:00
Yurii
396dc7f7e3 refactor: increased disconnected timeout for sensors 2025-10-20 18:37:35 +03:00
Yurii
9d38525251 refactor: passive scan instead of connecting to BLE devices 2025-10-20 17:59:52 +03:00
17 changed files with 412 additions and 626 deletions

View File

@@ -4,7 +4,7 @@ extra_configs = secrets.default.ini
core_dir = .pio core_dir = .pio
[env] [env]
version = 1.6.0-async-dht version = 1.6.0-passiveble
framework = arduino framework = arduino
lib_deps = ESP32Async/AsyncTCP@^3.4.10 lib_deps = ESP32Async/AsyncTCP@^3.4.10
ESP32Async/ESPAsyncWebServer@^3.9.4 ESP32Async/ESPAsyncWebServer@^3.9.4
@@ -98,16 +98,12 @@ custom_component_remove = espressif/esp_hosted
espressif/esp-zboss-lib espressif/esp-zboss-lib
espressif/esp-zigbee-lib espressif/esp-zigbee-lib
chmorgan/esp-libhelix-mp3 chmorgan/esp-libhelix-mp3
custom_sdkconfig = '# CONFIG_OPENTHREAD_ENABLED is not set' extra_scripts = pre:tools/add_build_commit.py
'# CONFIG_ESP_WIFI_ENTERPRISE_SUPPORT is not set' post:tools/esp32.py
'# CONFIG_LWIP_IPV6 is not set'
'# CONFIG_LWIP_IPV6_AUTOCONFIG is not set'
'# CONFIG_LWIP_PPP_SUPPORT is not set'
CONFIG_LIBC_NEWLIB_NANO_FORMAT=y
extra_scripts = post:tools/esp32.py
post:tools/build.py post:tools/build.py
build_type = ${env.build_type} build_type = ${env.build_type}
build_flags = ${env.build_flags} build_flags = ${env.build_flags}
-D MYNEWT_VAL_BLE_ROLE_CENTRAL=0
-D CORE_DEBUG_LEVEL=0 -D CORE_DEBUG_LEVEL=0
-Wl,--wrap=esp_panic_handler -Wl,--wrap=esp_panic_handler
check_tool = ${env.check_tool} check_tool = ${env.check_tool}
@@ -209,6 +205,11 @@ build_flags = ${esp32_defaults.build_flags}
-D DEFAULT_SENSOR_INDOOR_GPIO=0 -D DEFAULT_SENSOR_INDOOR_GPIO=0
-D DEFAULT_STATUS_LED_GPIO=11 -D DEFAULT_STATUS_LED_GPIO=11
-D DEFAULT_OT_RX_LED_GPIO=10 -D DEFAULT_OT_RX_LED_GPIO=10
custom_sdkconfig = '# CONFIG_OPENTHREAD_ENABLED is not set'
'# CONFIG_ESP_WIFI_ENTERPRISE_SUPPORT is not set'
'# CONFIG_LWIP_IPV6 is not set'
'# CONFIG_LWIP_IPV6_AUTOCONFIG is not set'
'# CONFIG_LWIP_PPP_SUPPORT is not set'
[env:otthing] [env:otthing]
extends = esp32_defaults extends = esp32_defaults

View File

@@ -1,33 +0,0 @@
# Source:
# https://github.com/pioarduino/platform-espressif32/tree/main/examples/espidf-arduino-h2zero-BLE_scan
CONFIG_FREERTOS_HZ=1000
CONFIG_MBEDTLS_PSK_MODES=y
CONFIG_MBEDTLS_KEY_EXCHANGE_PSK=y
CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_SIZE=y
CONFIG_COMPILER_OPTIMIZATION_SIZE=y
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
CONFIG_ESPTOOLPY_HEADER_FLASHSIZE_UPDATE=y
#
# BT config
CONFIG_BT_ENABLED=y
CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y
CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=n
CONFIG_BTDM_CTRL_MODE_BTDM=n
CONFIG_BT_BLUEDROID_ENABLED=n
CONFIG_BT_NIMBLE_ENABLED=y
#
# Arduino Configuration
CONFIG_AUTOSTART_ARDUINO=y
CONFIG_ARDUINO_SELECTIVE_COMPILATION=y
CONFIG_ARDUINO_SELECTIVE_Zigbee=n
CONFIG_ARDUINO_SELECTIVE_Matter=n
CONFIG_ARDUINO_SELECTIVE_WiFiProv=n
CONFIG_ARDUINO_SELECTIVE_BLE=n
CONFIG_ARDUINO_SELECTIVE_BluetoothSerial=n
CONFIG_ARDUINO_SELECTIVE_SimpleBLE=n
CONFIG_ARDUINO_SELECTIVE_RainMaker=n
CONFIG_ARDUINO_SELECTIVE_OpenThread=n
CONFIG_ARDUINO_SELECTIVE_Insights=n

View File

@@ -49,6 +49,10 @@ protected:
return "Main"; return "Main";
} }
uint32_t getTaskStackSize() override {
return 6000;
}
/*BaseType_t getTaskCore() override { /*BaseType_t getTaskCore() override {
return 1; return 1;
}*/ }*/

View File

@@ -37,9 +37,13 @@ protected:
const char* getTaskName() override { const char* getTaskName() override {
return "OpenTherm"; return "OpenTherm";
} }
uint32_t getTaskStackSize() override {
return 7500;
}
BaseType_t getTaskCore() override { BaseType_t getTaskCore() override {
return 1; return 0;
} }
int getTaskPriority() override { int getTaskPriority() override {

View File

@@ -552,6 +552,7 @@ protected:
auto docBuild = doc[FPSTR(S_BUILD)].to<JsonObject>(); auto docBuild = doc[FPSTR(S_BUILD)].to<JsonObject>();
docBuild[FPSTR(S_VERSION)] = BUILD_VERSION; docBuild[FPSTR(S_VERSION)] = BUILD_VERSION;
docBuild[FPSTR(S_COMMIT)] = BUILD_COMMIT;
docBuild[FPSTR(S_DATE)] = __DATE__ " " __TIME__; docBuild[FPSTR(S_DATE)] = __DATE__ " " __TIME__;
docBuild[FPSTR(S_ENV)] = BUILD_ENV; docBuild[FPSTR(S_ENV)] = BUILD_ENV;
docBuild[FPSTR(S_CORE)] = ESP.getCoreVersion(); docBuild[FPSTR(S_CORE)] = ESP.getCoreVersion();
@@ -592,6 +593,7 @@ protected:
auto docBuild = doc[FPSTR(S_BUILD)].to<JsonObject>(); auto docBuild = doc[FPSTR(S_BUILD)].to<JsonObject>();
docBuild[FPSTR(S_VERSION)] = BUILD_VERSION; docBuild[FPSTR(S_VERSION)] = BUILD_VERSION;
docBuild[FPSTR(S_COMMIT)] = BUILD_COMMIT;
docBuild[FPSTR(S_DATE)] = __DATE__ " " __TIME__; docBuild[FPSTR(S_DATE)] = __DATE__ " " __TIME__;
docBuild[FPSTR(S_ENV)] = BUILD_ENV; docBuild[FPSTR(S_ENV)] = BUILD_ENV;
docBuild[FPSTR(S_CORE)] = ESP.getCoreVersion(); docBuild[FPSTR(S_CORE)] = ESP.getCoreVersion();

View File

@@ -20,6 +20,10 @@ protected:
return "Regulator"; return "Regulator";
} }
uint32_t getTaskStackSize() override {
return 5000;
}
/*BaseType_t getTaskCore() override { /*BaseType_t getTaskCore() override {
return 1; return 1;
}*/ }*/

File diff suppressed because it is too large Load Diff

View File

@@ -30,6 +30,10 @@
#define BUILD_VERSION "0.0.0" #define BUILD_VERSION "0.0.0"
#endif #endif
#ifndef BUILD_COMMIT
#define BUILD_COMMIT "undefined"
#endif
#ifndef BUILD_ENV #ifndef BUILD_ENV
#define BUILD_ENV "undefined" #define BUILD_ENV "undefined"
#endif #endif

View File

@@ -1,3 +0,0 @@
dependencies:
idf: ">=5.3.2"
h2zero/esp-nimble-cpp: ">=2.2.1"

View File

@@ -57,6 +57,7 @@ const char S_CHANNEL[] PROGMEM = "channel";
const char S_CH2_ALWAYS_ENABLED[] PROGMEM = "ch2AlwaysEnabled"; const char S_CH2_ALWAYS_ENABLED[] PROGMEM = "ch2AlwaysEnabled";
const char S_CHIP[] PROGMEM = "chip"; const char S_CHIP[] PROGMEM = "chip";
const char S_CODE[] PROGMEM = "code"; const char S_CODE[] PROGMEM = "code";
const char S_COMMIT[] PROGMEM = "commit";
const char S_CONNECTED[] PROGMEM = "connected"; const char S_CONNECTED[] PROGMEM = "connected";
const char S_CONTINUES[] PROGMEM = "continues"; const char S_CONTINUES[] PROGMEM = "continues";
const char S_COOLING[] PROGMEM = "cooling"; const char S_COOLING[] PROGMEM = "cooling";

View File

@@ -44,6 +44,7 @@
"build": { "build": {
"title": "Build", "title": "Build",
"version": "固件版本", "version": "固件版本",
"commit": "Commit",
"date": "日期", "date": "日期",
"core": "内核版本", "core": "内核版本",
"sdk": "SDK" "sdk": "SDK"

View File

@@ -44,6 +44,7 @@
"build": { "build": {
"title": "Build", "title": "Build",
"version": "Version", "version": "Version",
"commit": "Commit",
"date": "Date", "date": "Date",
"core": "Core", "core": "Core",
"sdk": "SDK" "sdk": "SDK"

View File

@@ -44,6 +44,7 @@
"build": { "build": {
"title": "Build", "title": "Build",
"version": "Versione", "version": "Versione",
"commit": "Commit",
"date": "Data", "date": "Data",
"core": "Core", "core": "Core",
"sdk": "SDK" "sdk": "SDK"

View File

@@ -40,6 +40,7 @@
"build": { "build": {
"title": "Build", "title": "Build",
"version": "Versie", "version": "Versie",
"commit": "Commit",
"date": "Datum", "date": "Datum",
"core": "Core", "core": "Core",
"sdk": "SDK" "sdk": "SDK"

View File

@@ -44,6 +44,7 @@
"build": { "build": {
"title": "Билд", "title": "Билд",
"version": "Версия", "version": "Версия",
"commit": "Коммит",
"date": "Дата", "date": "Дата",
"core": "Ядро", "core": "Ядро",
"sdk": "SDK" "sdk": "SDK"

View File

@@ -104,6 +104,7 @@
<th scope="row" data-i18n>index.system.build.title</th> <th scope="row" data-i18n>index.system.build.title</th>
<td> <td>
Env: <b id="build-env"></b><br /> Env: <b id="build-env"></b><br />
<span data-i18n>index.system.build.commit</span>: <b id="build-commit"></b><br />
<span data-i18n>index.system.build.date</span>: <b id="build-date"></b><br /> <span data-i18n>index.system.build.date</span>: <b id="build-date"></b><br />
<span data-i18n>index.system.build.core</span>: <b id="build-core"></b><br /> <span data-i18n>index.system.build.core</span>: <b id="build-core"></b><br />
<span data-i18n>index.system.build.sdk</span>: <b id="build-sdk"></b> <span data-i18n>index.system.build.sdk</span>: <b id="build-sdk"></b>
@@ -206,6 +207,7 @@
setBusy('#main-busy', '#main-table', false); setBusy('#main-busy', '#main-table', false);
setValue('#build-version', result.build.version); setValue('#build-version', result.build.version);
setValue('#build-commit', result.build.commit);
setValue('#build-date', result.build.date); setValue('#build-date', result.build.date);
setValue('#build-env', result.build.env); setValue('#build-env', result.build.env);
setValue('#build-core', result.build.core); setValue('#build-core', result.build.core);

16
tools/add_build_commit.py Normal file
View File

@@ -0,0 +1,16 @@
import subprocess
Import("env")
try:
commit_hash = "undefined"
result = subprocess.check_output(
["git", "rev-parse", "--short", "HEAD"]
)
commit_hash = result.decode("utf-8").strip()
env.Append(
CPPDEFINES=[
("BUILD_COMMIT", '\\"{}\\"'.format(commit_hash))
]
)
except Exception as error:
print("Failed to get commit hash: {}".format(error))