23 Commits

Author SHA1 Message Date
Yurii
67adb3b9cf Merge branch 'async' into passive_ble 2026-01-26 02:23:19 +03:00
Yurii
ced0385d5b Merge branch 'master' into async 2026-01-26 02:19:54 +03:00
Yurii
7fcca3c4aa chore: fix ha blueprints to support all source sensors 2026-01-26 02:09:57 +03:00
Yurii
2f6bd237c7 chore: updated ha blueprints for new releases 2026-01-26 01:59:03 +03:00
Yurii
e4d1ba7d7b refactor: added different timeouts for wired and wireless sensors 2026-01-26 01:03:26 +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
8 changed files with 395 additions and 592 deletions

View File

@@ -1,5 +1,5 @@
# Blueprint for reporting indoor/outdoor temperature to OpenTherm Gateway from any home assistant sensor
# Updated: 03.09.2024
# Updated: 26.01.2026
blueprint:
name: Report temp to OpenTherm Gateway
@@ -15,7 +15,6 @@ blueprint:
multiple: false
filter:
- domain: sensor
device_class: temperature
target_entity:
name: Target entity
description: "Usually ``number.opentherm_indoor_temp`` or ``number.opentherm_outdoor_temp``"
@@ -38,8 +37,12 @@ condition:
value_template: "{{ states(source_entity) != 'unavailable' and states(target_entity) != 'unavailable' }}"
action:
- if:
- condition: template
value_template: "{{ (states(source_entity)|float(0) - states(target_entity)|float(0)) | abs | round(2) >= 0.01 }}"
- condition: or
conditions:
- condition: template
value_template: "{{ (states(source_entity)|float(0) - states(target_entity)|float(0)) | abs | round(2) >= 0.01 }}"
- condition: template
value_template: "{{ (as_timestamp(now()) - as_timestamp(states[target_entity].last_updated)) | int(0) > 300 }}"
then:
- service: number.set_value
data:

View File

@@ -1,5 +1,5 @@
# Blueprint for reporting temperature to OpenTherm Gateway from home assistant weather integration
# Updated: 03.09.2024
# Updated: 26.01.2026
blueprint:
name: Report temp to OpenTherm Gateway from Weather
@@ -37,8 +37,12 @@ condition:
value_template: "{{ states(source_entity) != 'unavailable' and states(target_entity) != 'unavailable' }}"
action:
- if:
- condition: template
value_template: "{{ (state_attr(source_entity, 'temperature')|float(0) - states(target_entity)|float(0)) | abs | round(2) >= 0.1 }}"
- condition: or
conditions:
- condition: template
value_template: "{{ (state_attr(source_entity, 'temperature')|float(0) - states(target_entity)|float(0)) | abs | round(2) >= 0.1 }}"
- condition: template
value_template: "{{ (as_timestamp(now()) - as_timestamp(states[target_entity].last_updated)) | int(0) > 300 }}"
then:
- service: number.set_value
data:

View File

@@ -4,7 +4,7 @@ extra_configs = secrets.default.ini
core_dir = .pio
[env]
version = 1.6.0-async
version = 1.6.0-passiveble
framework = arduino
lib_deps = ESP32Async/AsyncTCP@^3.4.10
ESP32Async/ESPAsyncWebServer@^3.9.4

View File

@@ -49,6 +49,10 @@ protected:
return "Main";
}
uint32_t getTaskStackSize() override {
return 6000;
}
/*BaseType_t getTaskCore() override {
return 1;
}*/
@@ -128,8 +132,6 @@ protected:
tMqtt->disable();
}
Sensors::setConnectionStatusByType(Sensors::Type::MANUAL, !settings.mqtt.enabled || vars.mqtt.connected, false);
} else {
if (this->ntpStarted) {
this->ntpStarted = false;

View File

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

View File

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

File diff suppressed because it is too large Load Diff

View File

@@ -2099,21 +2099,18 @@ bool jsonToSensorResult(const uint8_t sensorId, const JsonVariantConst src) {
return false;
}
auto& dst = Sensors::results[sensorId];
bool changed = false;
// value
if (!src[FPSTR(S_VALUE)].isNull()) {
float value = src[FPSTR(S_VALUE)].as<float>();
uint8_t vType = static_cast<uint8_t>(Sensors::ValueType::PRIMARY);
if (fabsf(value - dst.values[vType]) > 0.0001f) {
dst.values[vType] = roundf(value, 2);
changed = true;
}
return Sensors::setValueById(
sensorId,
src[FPSTR(S_VALUE)].as<float>(),
Sensors::ValueType::PRIMARY,
true,
true
);
}
return changed;
return false;
}
void varsToJson(const Variables& src, JsonVariant dst) {