mirror of
https://github.com/Laxilef/OTGateway.git
synced 2025-12-11 18:54:28 +05:00
Compare commits
26 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
05ff426b28 | ||
|
|
45af7a30d8 | ||
|
|
8aab541afa | ||
|
|
7672c4b927 | ||
|
|
b0a9460257 | ||
|
|
3c69f1295e | ||
|
|
282a02ecdb | ||
|
|
8503ef966f | ||
|
|
a4ee4c5224 | ||
|
|
4478e8f204 | ||
|
|
a50c13fd8a | ||
|
|
ee1e7f92b2 | ||
|
|
5704075682 | ||
|
|
52e4933923 | ||
|
|
00a82ca3e5 | ||
|
|
7658aeaa8c | ||
|
|
790ff5a011 | ||
|
|
935cf27139 | ||
|
|
503068f6e7 | ||
|
|
5c868d589d | ||
|
|
1cca8ffd5d | ||
|
|
f291eb33ac | ||
|
|
f0c505c332 | ||
|
|
7eafe4a90b | ||
|
|
d23527a48b | ||
|
|
c341f86e5c |
2
.github/workflows/pio-dependabot.yaml
vendored
2
.github/workflows/pio-dependabot.yaml
vendored
@@ -17,6 +17,6 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: run PlatformIO Dependabot
|
||||
uses: peterus/platformio_dependabot@v1.1.1
|
||||
uses: peterus/platformio_dependabot@v1.2.0
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
@@ -42,7 +42,7 @@ All available information and instructions can be found in the wiki:
|
||||
* [Quick Start](https://github.com/Laxilef/OTGateway/wiki#quick-start)
|
||||
* [Build firmware](https://github.com/Laxilef/OTGateway/wiki#build-firmware)
|
||||
* [Flash firmware via ESP Flash Download Tool](https://github.com/Laxilef/OTGateway/wiki#flash-firmware-via-esp-flash-download-tool)
|
||||
* [HomeAsssistant settings](https://github.com/Laxilef/OTGateway/wiki#homeasssistant-settings)
|
||||
* [Settings](https://github.com/Laxilef/OTGateway/wiki#settings)
|
||||
* [External temperature sensors](https://github.com/Laxilef/OTGateway/wiki#external-temperature-sensors)
|
||||
* [Reporting indoor/outdoor temperature from any Home Assistant sensor](https://github.com/Laxilef/OTGateway/wiki#reporting-indooroutdoor-temperature-from-any-home-assistant-sensor)
|
||||
* [Reporting outdoor temperature from Home Assistant weather integration](https://github.com/Laxilef/OTGateway/wiki#reporting-outdoor-temperature-from-home-assistant-weather-integration)
|
||||
|
||||
BIN
assets/2D_PCB_bottom.png
Normal file
BIN
assets/2D_PCB_bottom.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 261 KiB |
BIN
assets/2D_PCB_top.png
Normal file
BIN
assets/2D_PCB_top.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 326 KiB |
BIN
assets/3D_PCB.png
Normal file
BIN
assets/3D_PCB.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 684 KiB |
BIN
assets/BOM.xlsx
BIN
assets/BOM.xlsx
Binary file not shown.
BIN
assets/CPL.csv
BIN
assets/CPL.csv
Binary file not shown.
15692
assets/Schematic.pdf
15692
assets/Schematic.pdf
File diff suppressed because it is too large
Load Diff
12
assets/blueprint_import.svg
Normal file
12
assets/blueprint_import.svg
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="40" aria-label="Import blueprint to My Home Assistant" style="border-radius:24px;width:auto" viewBox="0 0 592 96">
|
||||
<rect width="592" height="96" fill="#18BCF2" rx="48"/>
|
||||
<path fill="#fff" d="M42.55 60.2h4.59V36.75h-4.59Zm10.35 0h4.59V43.99l7.23 10.58 7.24-10.62V60.2h4.56V36.75h-4.56v.03l-.4-.03-6.84 10.12-6.83-10.12-.4.03v-.03H52.9Zm29.38 0h4.59v-7.77h4.49c4.72 0 8.07-3.29 8.07-7.87 0-4.59-3.48-7.88-8.44-7.84l-4.66.03h-4.05Zm8.61-19.26c2.27-.04 3.88 1.47 3.88 3.62 0 2.14-1.47 3.65-3.51 3.65h-4.39v-7.27Zm22.98 19.66c6.97 0 11.92-5.02 11.92-12.09 0-7.1-4.95-12.13-12.02-12.13-7.04 0-12 4.99-12 12.13 0 7.07 5 12.09 12.1 12.09m0-4.19c-4.36 0-7.41-3.28-7.41-7.9 0-4.66 3.02-7.94 7.31-7.94 4.32 0 7.33 3.28 7.33 7.94 0 4.62-2.98 7.9-7.23 7.9m16.31 3.79h4.59v-8.31h3.52l4.79 8.31h5.19l-5.42-9.11c2.71-1.21 4.48-3.69 4.48-6.77 0-4.45-3.48-7.64-8.44-7.6l-4.65.03h-4.06Zm8.51-19.26c2.28 0 3.89 1.37 3.89 3.38 0 1.98-1.61 3.38-3.65 3.38h-4.16v-6.76Zm18.33 19.26h4.59V40.94h7v-4.19h-18.63v4.19h7.04Zm23.91 0h9.02c4.69 0 7.77-2.41 7.77-6.7 0-2.65-1.24-4.42-3.42-5.53 1.64-1.17 2.61-2.78 2.61-4.55 0-4.43-3.21-6.7-8.04-6.7l-3.45.03h-4.49Zm7.68-19.8c2.21-.03 3.61 1.07 3.61 2.95s-1.27 2.95-3.25 2.95h-3.55v-5.9Zm.53 9.65c2.41-.03 3.89 1.17 3.89 3.08 0 1.81-1.34 3.02-3.52 3.02h-4.09v-6.1h.24Zm12.97 10.15h14.9v-4.19H206.7V36.75h-4.59Zm18.32-8.74c0 5.62 3.69 9.21 9.51 9.21 5.9 0 9.65-3.59 9.65-9.21V36.75H235v14.71c0 3.01-1.97 4.95-4.99 4.95-3.01 0-4.99-1.94-4.99-4.95V36.75h-4.59Zm24.59 8.74h14.97v-4.19h-10.38v-5.66h8.84v-4.09h-8.84v-5.32h10.25v-4.19h-14.84Zm20.4 0h4.59v-7.77h4.49c4.72 0 8.07-3.29 8.07-7.87 0-4.59-3.48-7.88-8.44-7.84l-4.66.03h-4.05Zm8.61-19.26c2.28-.04 3.89 1.47 3.89 3.62 0 2.14-1.48 3.65-3.52 3.65h-4.39v-7.27Zm12.26 19.26h4.59v-8.31h3.52l4.79 8.31h5.19l-5.43-9.11c2.72-1.21 4.49-3.69 4.49-6.77 0-4.45-3.48-7.64-8.44-7.6l-4.65.03h-4.06Zm8.51-19.26c2.28 0 3.89 1.37 3.89 3.38 0 1.98-1.61 3.38-3.65 3.38h-4.16v-6.76Zm13.77 19.26h4.59V36.75h-4.59Zm10.35 0 4.59.03V44.12l11.66 16.08h4.55V36.75h-4.55v15.81l-11.46-15.81h-4.79Zm31.52 0h4.59V40.94h7.01v-4.19h-18.63v4.19h7.03Zm28.88 0h4.59V40.94h7v-4.19h-18.62v4.19h7.03Zm26 .4c6.97 0 11.92-5.02 11.92-12.09 0-7.1-4.95-12.13-12.02-12.13-7.04 0-12 4.99-12 12.13 0 7.07 5 12.09 12.1 12.09m0-4.19c-4.36 0-7.41-3.28-7.41-7.9 0-4.66 3.02-7.94 7.31-7.94 4.32 0 7.33 3.28 7.33 7.94 0 4.62-2.98 7.9-7.23 7.9"/>
|
||||
<g style="transform:translate(95px,0)">
|
||||
<rect width="137" height="64" x="344" y="16" fill="#F2F4F9" rx="32"/>
|
||||
<path fill="#18BCF2" d="M394.419 37.047V60.5h-4.297V46.797L384.716 60.5h-4.157l-5.343-13.594V60.5h-4.188V37.047h4.188l7.422 18.36 7.484-18.36zm9.365 0 5.344 9.89 5.344-9.89h4.766l-7.969 14.14V60.5h-4.391v-9.312l-8.031-14.141zM457 60c0 1.65-1.35 3-3 3h-24c-1.65 0-3-1.35-3-3v-9c0-1.65.95-3.95 2.12-5.12l10.76-10.76a3 3 0 0 1 4.24 0l10.76 10.76c1.17 1.17 2.12 3.47 2.12 5.12z"/>
|
||||
<path fill="#F2F4F9" stroke="#F2F4F9" d="M442 45.5a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z"/>
|
||||
<path fill="#F2F4F9" stroke="#F2F4F9" stroke-miterlimit="10" d="M449.5 53.5a2 2 0 1 0 0-4 2 2 0 0 0 0 4ZM434.5 57.5a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z"/>
|
||||
<path fill="none" stroke="#F2F4F9" stroke-miterlimit="10" stroke-width="2.25" d="M442 43.48V63l-7.5-7.5M449.5 51.46l-7.41 7.41"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.2 KiB |
Binary file not shown.
@@ -1,3 +1,6 @@
|
||||
# Package for Home Assistant Packages
|
||||
# More info: https://www.home-assistant.io/docs/configuration/packages/
|
||||
|
||||
dhw_meter:
|
||||
sensor:
|
||||
- platform: integration
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
# Script for reporting outdoor temperature to the controller from home assistant weather integration
|
||||
# Updated: 07.12.2023
|
||||
|
||||
alias: Report outdoor temp to controller from weather
|
||||
description: ""
|
||||
variables:
|
||||
# The source weather from which we take the temperature
|
||||
source_entity: "weather.home"
|
||||
|
||||
# Target entity number where we set the temperature
|
||||
# If the prefix has not changed, then you do not need to change it
|
||||
target_entity: "number.opentherm_outdoor_temp"
|
||||
trigger:
|
||||
- platform: time_pattern
|
||||
seconds: /30
|
||||
condition:
|
||||
- condition: template
|
||||
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 }}"
|
||||
then:
|
||||
- service: number.set_value
|
||||
data:
|
||||
value: "{{ state_attr(source_entity, 'temperature')|float(0)|round(2) }}"
|
||||
target:
|
||||
entity_id: "{{ target_entity }}"
|
||||
mode: single
|
||||
@@ -1,30 +0,0 @@
|
||||
# Script for reporting indoor/outdoor temperature to the controller from any home assistant sensor
|
||||
# Updated: 07.12.2023
|
||||
|
||||
alias: Report temp to controller
|
||||
description: ""
|
||||
variables:
|
||||
# The source sensor from which we take the temperature
|
||||
source_entity: "sensor.livingroom_temperature"
|
||||
|
||||
# Target entity number where we set the temperature
|
||||
# To report indoor temperature: number.opentherm_indoor_temp
|
||||
# To report outdoor temperature: number.opentherm_outdoor_temp
|
||||
target_entity: "number.opentherm_indoor_temp"
|
||||
trigger:
|
||||
- platform: time_pattern
|
||||
seconds: /30
|
||||
condition:
|
||||
- condition: template
|
||||
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 }}"
|
||||
then:
|
||||
- service: number.set_value
|
||||
data:
|
||||
value: "{{ states(source_entity)|float(0)|round(2) }}"
|
||||
target:
|
||||
entity_id: "{{ target_entity }}"
|
||||
mode: single
|
||||
48
assets/ha/report_temp_to_otgateway.yaml
Normal file
48
assets/ha/report_temp_to_otgateway.yaml
Normal file
@@ -0,0 +1,48 @@
|
||||
# Blueprint for reporting indoor/outdoor temperature to OpenTherm Gateway from any home assistant sensor
|
||||
# Updated: 03.09.2024
|
||||
|
||||
blueprint:
|
||||
name: Report temp to OpenTherm Gateway
|
||||
domain: automation
|
||||
author: "Laxilef"
|
||||
|
||||
input:
|
||||
source_entity:
|
||||
name: Source entity
|
||||
description: "Temperature data source"
|
||||
selector:
|
||||
entity:
|
||||
multiple: false
|
||||
filter:
|
||||
- domain: sensor
|
||||
device_class: temperature
|
||||
target_entity:
|
||||
name: Target entity
|
||||
description: "Usually ``number.opentherm_indoor_temp`` or ``number.opentherm_outdoor_temp``"
|
||||
default: "number.opentherm_indoor_temp"
|
||||
selector:
|
||||
entity:
|
||||
multiple: false
|
||||
filter:
|
||||
- domain: number
|
||||
|
||||
mode: single
|
||||
variables:
|
||||
source_entity: !input source_entity
|
||||
target_entity: !input target_entity
|
||||
trigger:
|
||||
- platform: time_pattern
|
||||
seconds: /30
|
||||
condition:
|
||||
- condition: template
|
||||
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 }}"
|
||||
then:
|
||||
- service: number.set_value
|
||||
data:
|
||||
value: "{{ states(source_entity)|float(0)|round(2) }}"
|
||||
target:
|
||||
entity_id: "{{ target_entity }}"
|
||||
47
assets/ha/report_temp_to_otgateway_from_weather.yaml
Normal file
47
assets/ha/report_temp_to_otgateway_from_weather.yaml
Normal file
@@ -0,0 +1,47 @@
|
||||
# Blueprint for reporting temperature to OpenTherm Gateway from home assistant weather integration
|
||||
# Updated: 03.09.2024
|
||||
|
||||
blueprint:
|
||||
name: Report temp to OpenTherm Gateway from Weather
|
||||
domain: automation
|
||||
author: "Laxilef"
|
||||
|
||||
input:
|
||||
source_entity:
|
||||
name: Source entity
|
||||
description: "Temperature data source"
|
||||
selector:
|
||||
entity:
|
||||
multiple: false
|
||||
filter:
|
||||
- domain: weather
|
||||
target_entity:
|
||||
name: Target entity
|
||||
description: "Usually ``number.opentherm_outdoor_temp``"
|
||||
default: "number.opentherm_outdoor_temp"
|
||||
selector:
|
||||
entity:
|
||||
multiple: false
|
||||
filter:
|
||||
- domain: number
|
||||
|
||||
mode: single
|
||||
variables:
|
||||
source_entity: !input source_entity
|
||||
target_entity: !input target_entity
|
||||
trigger:
|
||||
- platform: time_pattern
|
||||
seconds: /30
|
||||
condition:
|
||||
- condition: template
|
||||
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 }}"
|
||||
then:
|
||||
- service: number.set_value
|
||||
data:
|
||||
value: "{{ state_attr(source_entity, 'temperature')|float(0)|round(2) }}"
|
||||
target:
|
||||
entity_id: "{{ target_entity }}"
|
||||
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 675 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 154 KiB |
@@ -79,7 +79,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
unsigned long setBoilerStatus(bool enableCentralHeating, bool enableHotWater, bool enableCooling, bool enableOutsideTemperatureCompensation, bool enableCentralHeating2, bool summerWinterMode, bool dhwBlocking) {
|
||||
unsigned long setBoilerStatus(bool enableCentralHeating, bool enableHotWater, bool enableCooling, bool enableOutsideTemperatureCompensation, bool enableCentralHeating2, bool summerWinterMode, bool dhwBlocking, uint8_t lb = 0) {
|
||||
unsigned int data = enableCentralHeating
|
||||
| (enableHotWater << 1)
|
||||
| (enableCooling << 2)
|
||||
@@ -87,7 +87,9 @@ public:
|
||||
| (enableCentralHeating2 << 4)
|
||||
| (summerWinterMode << 5)
|
||||
| (dhwBlocking << 6);
|
||||
|
||||
data <<= 8;
|
||||
data |= lb;
|
||||
|
||||
return this->sendRequest(buildRequest(
|
||||
OpenThermMessageType::READ_DATA,
|
||||
|
||||
@@ -33,18 +33,16 @@ public:
|
||||
}
|
||||
|
||||
#if defined(ARDUINO_ARCH_ESP32)
|
||||
bool canHandle(HTTPMethod method, const String uri) override {
|
||||
#else
|
||||
bool canHandle(HTTPMethod method, const String& uri) override {
|
||||
bool canHandle(WebServer &server, HTTPMethod method, const String &uri) override {
|
||||
return this->canHandle(method, uri);
|
||||
}
|
||||
#endif
|
||||
|
||||
bool canHandle(HTTPMethod method, const String& uri) override {
|
||||
return uri.equals(this->uri) && (!this->canHandleCallback || this->canHandleCallback(method, uri));
|
||||
}
|
||||
|
||||
#if defined(ARDUINO_ARCH_ESP32)
|
||||
bool handle(WebServer& server, HTTPMethod method, const String uri) override {
|
||||
#else
|
||||
bool handle(WebServer& server, HTTPMethod method, const String& uri) override {
|
||||
#endif
|
||||
if (!this->canHandle(method, uri)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -28,18 +28,16 @@ public:
|
||||
}
|
||||
|
||||
#if defined(ARDUINO_ARCH_ESP32)
|
||||
bool canHandle(HTTPMethod method, const String uri) override {
|
||||
#else
|
||||
bool canHandle(HTTPMethod method, const String& uri) override {
|
||||
bool canHandle(WebServer &server, HTTPMethod method, const String &uri) override {
|
||||
return this->canHandle(method, uri);
|
||||
}
|
||||
#endif
|
||||
|
||||
bool canHandle(HTTPMethod method, const String& uri) override {
|
||||
return method == HTTP_GET && uri.equals(this->uri) && (!this->canHandleCallback || this->canHandleCallback(method, uri));
|
||||
}
|
||||
|
||||
#if defined(ARDUINO_ARCH_ESP32)
|
||||
bool handle(WebServer& server, HTTPMethod method, const String uri) override {
|
||||
#else
|
||||
bool handle(WebServer& server, HTTPMethod method, const String& uri) override {
|
||||
#endif
|
||||
if (!this->canHandle(method, uri)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -58,26 +58,26 @@ public:
|
||||
}
|
||||
|
||||
#if defined(ARDUINO_ARCH_ESP32)
|
||||
bool canHandle(HTTPMethod method, const String uri) override {
|
||||
#else
|
||||
bool canHandle(HTTPMethod method, const String& uri) override {
|
||||
bool canHandle(WebServer &server, HTTPMethod method, const String &uri) override {
|
||||
return this->canHandle(method, uri);
|
||||
}
|
||||
#endif
|
||||
|
||||
bool canHandle(HTTPMethod method, const String& uri) override {
|
||||
return method == HTTP_POST && uri.equals(this->uri) && (!this->canHandleCallback || this->canHandleCallback(method, uri));
|
||||
}
|
||||
|
||||
#if defined(ARDUINO_ARCH_ESP32)
|
||||
bool canUpload(const String uri) override {
|
||||
#else
|
||||
bool canUpload(const String& uri) override {
|
||||
bool canUpload(WebServer &server, const String &uri) override {
|
||||
return this->canUpload(uri);
|
||||
}
|
||||
#endif
|
||||
|
||||
bool canUpload(const String& uri) override {
|
||||
return uri.equals(this->uri) && (!this->canUploadCallback || this->canUploadCallback(uri));
|
||||
}
|
||||
|
||||
#if defined(ARDUINO_ARCH_ESP32)
|
||||
bool handle(WebServer& server, HTTPMethod method, const String uri) override {
|
||||
#else
|
||||
bool handle(WebServer& server, HTTPMethod method, const String& uri) override {
|
||||
#endif
|
||||
if (this->afterUpgradeCallback) {
|
||||
this->afterUpgradeCallback(this->firmwareResult, this->filesystemResult);
|
||||
}
|
||||
@@ -91,11 +91,7 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
#if defined(ARDUINO_ARCH_ESP32)
|
||||
void upload(WebServer& server, const String uri, HTTPUpload& upload) override {
|
||||
#else
|
||||
void upload(WebServer& server, const String& uri, HTTPUpload& upload) override {
|
||||
#endif
|
||||
UpgradeResult* result;
|
||||
if (upload.name.equals("firmware")) {
|
||||
result = &this->firmwareResult;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
extra_configs = secrets.default.ini
|
||||
|
||||
[env]
|
||||
version = 1.4.4
|
||||
version = 1.4.5
|
||||
framework = arduino
|
||||
lib_deps =
|
||||
bblanchon/ArduinoJson@^7.1.0
|
||||
@@ -24,8 +24,7 @@ lib_deps =
|
||||
gyverlibs/FileData@^1.0.2
|
||||
gyverlibs/GyverPID@^3.3.2
|
||||
gyverlibs/GyverBlinker@^1.1.1
|
||||
https://github.com/PaulStoffregen/OneWire#master
|
||||
milesburton/DallasTemperature@^3.11.0
|
||||
https://github.com/pstolarz/Arduino-Temperature-Control-Library.git#OneWireNg
|
||||
laxilef/TinyLogger@^1.1.1
|
||||
build_flags =
|
||||
-D PIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY
|
||||
@@ -71,11 +70,12 @@ board_build.ldscript = eagle.flash.4m1m.ld
|
||||
|
||||
[esp32_defaults]
|
||||
;platform = espressif32@^6.7
|
||||
platform = https://github.com/platformio/platform-espressif32.git
|
||||
;platform = https://github.com/platformio/platform-espressif32.git
|
||||
;platform_packages =
|
||||
; framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#3.0.5
|
||||
; framework-arduinoespressif32-libs @ https://github.com/espressif/esp32-arduino-lib-builder/releases/download/idf-release_v5.1/esp32-arduino-libs-idf-release_v5.1-33fbade6.zip
|
||||
platform = https://github.com/pioarduino/platform-espressif32/releases/download/51.03.05/platform-espressif32.zip
|
||||
platform_packages =
|
||||
;platformio/framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32/archive/refs/tags/2.0.17.zip
|
||||
framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#3.0.1
|
||||
framework-arduinoespressif32-libs @ https://github.com/espressif/arduino-esp32/releases/download/3.0.1/esp32-arduino-libs-3.0.1.zip
|
||||
board_build.partitions = esp32_partitions.csv
|
||||
lib_deps =
|
||||
${env.lib_deps}
|
||||
@@ -261,3 +261,20 @@ build_flags =
|
||||
-D DEFAULT_SENSOR_INDOOR_GPIO=18
|
||||
-D DEFAULT_STATUS_LED_GPIO=2
|
||||
-D DEFAULT_OT_RX_LED_GPIO=19
|
||||
|
||||
[env:esp32_c6]
|
||||
platform = ${esp32_defaults.platform}
|
||||
platform_packages = ${esp32_defaults.platform_packages}
|
||||
board = esp32-c6-devkitm-1
|
||||
board_build.partitions = ${esp32_defaults.board_build.partitions}
|
||||
lib_deps =
|
||||
${esp32_defaults.lib_deps}
|
||||
;${esp32_defaults.nimble_lib}
|
||||
lib_ignore = ${esp32_defaults.lib_ignore}
|
||||
extra_scripts = ${esp32_defaults.extra_scripts}
|
||||
build_unflags =
|
||||
-mtext-section-literals
|
||||
build_flags =
|
||||
${esp32_defaults.build_flags}
|
||||
; Currently the NimBLE library is incompatible with ESP32 C6
|
||||
;-D USE_BLE=1
|
||||
@@ -885,13 +885,33 @@ public:
|
||||
doc[FPSTR(HA_NAME)] = F("Fault code");
|
||||
doc[FPSTR(HA_ICON)] = F("mdi:chat-alert-outline");
|
||||
doc[FPSTR(HA_STATE_TOPIC)] = this->getDeviceTopic(F("state"));
|
||||
doc[FPSTR(HA_VALUE_TEMPLATE)] = F("{{ \"E%02d\"|format(value_json.sensors.faultCode) }}");
|
||||
doc[FPSTR(HA_VALUE_TEMPLATE)] = F("{{ \"%02d (0x%02X)\"|format(value_json.sensors.faultCode, value_json.sensors.faultCode) }}");
|
||||
doc[FPSTR(HA_EXPIRE_AFTER)] = 120;
|
||||
doc.shrinkToFit();
|
||||
|
||||
return this->publish(this->getTopic(FPSTR(HA_ENTITY_SENSOR), F("fault_code")).c_str(), doc);
|
||||
}
|
||||
|
||||
bool publishSensorDiagnosticCode(bool enabledByDefault = true) {
|
||||
JsonDocument doc;
|
||||
doc[FPSTR(HA_AVAILABILITY)][0][FPSTR(HA_TOPIC)] = this->getDeviceTopic(F("status"));
|
||||
doc[FPSTR(HA_AVAILABILITY)][1][FPSTR(HA_TOPIC)] = this->getDeviceTopic(F("state"));
|
||||
doc[FPSTR(HA_AVAILABILITY)][1][FPSTR(HA_VALUE_TEMPLATE)] = F("{{ iif(value_json.states.otStatus and value_json.states.fault or value_json.states.diagnostic, 'online', 'offline') }}");
|
||||
doc[FPSTR(HA_AVAILABILITY_MODE)] = F("all");
|
||||
doc[FPSTR(HA_ENABLED_BY_DEFAULT)] = enabledByDefault;
|
||||
doc[FPSTR(HA_UNIQUE_ID)] = this->getObjectId(F("diagnostic_code"));
|
||||
doc[FPSTR(HA_OBJECT_ID)] = this->getObjectId(F("diagnostic_code"));
|
||||
doc[FPSTR(HA_ENTITY_CATEGORY)] = F("diagnostic");
|
||||
doc[FPSTR(HA_NAME)] = F("Diagnostic code");
|
||||
doc[FPSTR(HA_ICON)] = F("mdi:chat-alert-outline");
|
||||
doc[FPSTR(HA_STATE_TOPIC)] = this->getDeviceTopic(F("state"));
|
||||
doc[FPSTR(HA_VALUE_TEMPLATE)] = F("{{ \"%02d (0x%02X)\"|format(value_json.sensors.diagnosticCode, value_json.sensors.diagnosticCode) }}");
|
||||
doc[FPSTR(HA_EXPIRE_AFTER)] = 120;
|
||||
doc.shrinkToFit();
|
||||
|
||||
return this->publish(this->getTopic(FPSTR(HA_ENTITY_SENSOR), F("diagnostic_code")).c_str(), doc);
|
||||
}
|
||||
|
||||
bool publishSensorRssi(bool enabledByDefault = true) {
|
||||
JsonDocument doc;
|
||||
doc[FPSTR(HA_AVAILABILITY)][FPSTR(HA_TOPIC)] = this->getDeviceTopic(F("status"));
|
||||
|
||||
@@ -358,6 +358,7 @@ protected:
|
||||
this->haHelper->publishSensorModulation(false);
|
||||
this->haHelper->publishSensorPressure(settings.system.unitSystem, false);
|
||||
this->haHelper->publishSensorFaultCode();
|
||||
this->haHelper->publishSensorDiagnosticCode();
|
||||
this->haHelper->publishSensorRssi(false);
|
||||
this->haHelper->publishSensorUptime(false);
|
||||
|
||||
|
||||
@@ -22,8 +22,6 @@ protected:
|
||||
bool isInitialized = false;
|
||||
unsigned long initializedTime = 0;
|
||||
unsigned int initializedMemberIdCode = 0;
|
||||
byte dhwFlowRateMultiplier = 1;
|
||||
byte pressureMultiplier = 1;
|
||||
bool pump = true;
|
||||
unsigned long lastSuccessResponse = 0;
|
||||
unsigned long prevUpdateNonEssentialVars = 0;
|
||||
@@ -165,6 +163,16 @@ protected:
|
||||
heatingCh2Enabled = settings.opentherm.dhwPresent && settings.dhw.enable;
|
||||
}
|
||||
|
||||
// Set boiler status LB
|
||||
// Some boilers require this, although this is against protocol
|
||||
uint8_t statusLb = 0;
|
||||
|
||||
// Immergas fix
|
||||
// https://arduino.ru/forum/programmirovanie/termostat-opentherm-na-esp8266?page=15#comment-649392
|
||||
if (settings.opentherm.immergasFix) {
|
||||
statusLb = 0xCA;
|
||||
}
|
||||
|
||||
unsigned long response = this->instance->setBoilerStatus(
|
||||
heatingEnabled,
|
||||
settings.opentherm.dhwPresent && settings.dhw.enable,
|
||||
@@ -172,7 +180,8 @@ protected:
|
||||
settings.opentherm.nativeHeatingControl,
|
||||
heatingCh2Enabled,
|
||||
settings.opentherm.summerWinterMode,
|
||||
settings.opentherm.dhwBlocking
|
||||
settings.opentherm.dhwBlocking,
|
||||
statusLb
|
||||
);
|
||||
|
||||
if (!CustomOpenTherm::isValidResponse(response)) {
|
||||
@@ -217,8 +226,6 @@ protected:
|
||||
this->isInitialized = true;
|
||||
this->initializedTime = millis();
|
||||
this->initializedMemberIdCode = settings.opentherm.memberIdCode;
|
||||
this->dhwFlowRateMultiplier = 1;
|
||||
this->pressureMultiplier = 1;
|
||||
this->initialize();
|
||||
}
|
||||
|
||||
@@ -247,7 +254,7 @@ protected:
|
||||
// These parameters will be updated every minute
|
||||
if (millis() - this->prevUpdateNonEssentialVars > 60000) {
|
||||
if (!heatingEnabled && settings.opentherm.modulationSyncWithHeating) {
|
||||
if (setMaxModulationLevel(0)) {
|
||||
if (this->setMaxModulationLevel(0)) {
|
||||
Log.snoticeln(FPSTR(L_OT_HEATING), F("Set max modulation 0% (off)"));
|
||||
|
||||
} else {
|
||||
@@ -255,7 +262,7 @@ protected:
|
||||
}
|
||||
|
||||
} else {
|
||||
if (setMaxModulationLevel(settings.heating.maxModulation)) {
|
||||
if (this->setMaxModulationLevel(settings.heating.maxModulation)) {
|
||||
Log.snoticeln(FPSTR(L_OT_HEATING), F("Set max modulation %hhu%%"), settings.heating.maxModulation);
|
||||
|
||||
} else {
|
||||
@@ -266,7 +273,7 @@ protected:
|
||||
|
||||
// Get DHW min/max temp (if necessary)
|
||||
if (settings.opentherm.dhwPresent && settings.opentherm.getMinMaxTemp) {
|
||||
if (updateMinMaxDhwTemp()) {
|
||||
if (this->updateMinMaxDhwTemp()) {
|
||||
if (settings.dhw.minTemp < vars.parameters.dhwMinTemp) {
|
||||
settings.dhw.minTemp = vars.parameters.dhwMinTemp;
|
||||
fsSettings.update();
|
||||
@@ -296,7 +303,7 @@ protected:
|
||||
|
||||
// Get heating min/max temp
|
||||
if (settings.opentherm.getMinMaxTemp) {
|
||||
if (updateMinMaxHeatingTemp()) {
|
||||
if (this->updateMinMaxHeatingTemp()) {
|
||||
if (settings.heating.minTemp < vars.parameters.heatingMinTemp) {
|
||||
settings.heating.minTemp = vars.parameters.heatingMinTemp;
|
||||
fsSettings.update();
|
||||
@@ -323,20 +330,33 @@ protected:
|
||||
fsSettings.update();
|
||||
}
|
||||
|
||||
// Get outdoor temp (if necessary)
|
||||
if (settings.sensors.outdoor.type == SensorType::BOILER) {
|
||||
updateOutsideTemp();
|
||||
}
|
||||
|
||||
// Get fault code (if necessary)
|
||||
if (vars.states.fault) {
|
||||
updateFaultCode();
|
||||
this->updateFaultCode();
|
||||
|
||||
} else if (vars.sensors.faultCode != 0) {
|
||||
vars.sensors.faultCode = 0;
|
||||
}
|
||||
|
||||
updatePressure();
|
||||
// Get diagnostic code (if necessary)
|
||||
if (vars.states.fault || vars.states.diagnostic) {
|
||||
this->updateDiagCode();
|
||||
|
||||
} else if (vars.sensors.diagnosticCode != 0) {
|
||||
vars.sensors.diagnosticCode = 0;
|
||||
}
|
||||
|
||||
// If filtering is disabled, then it is enough to
|
||||
// update these parameters once a minute
|
||||
if (!settings.opentherm.filterNumValues.enable) {
|
||||
// Get outdoor temp (if necessary)
|
||||
if (settings.sensors.outdoor.type == SensorType::BOILER) {
|
||||
this->updateOutdoorTemp();
|
||||
}
|
||||
|
||||
// Get pressure
|
||||
this->updatePressure();
|
||||
}
|
||||
|
||||
this->prevUpdateNonEssentialVars = millis();
|
||||
}
|
||||
@@ -344,7 +364,7 @@ protected:
|
||||
|
||||
// Get current modulation level (if necessary)
|
||||
if (vars.states.flame) {
|
||||
updateModulationLevel();
|
||||
this->updateModulationLevel();
|
||||
|
||||
} else {
|
||||
vars.sensors.modulation = 0;
|
||||
@@ -352,8 +372,8 @@ protected:
|
||||
|
||||
// Update DHW sensors (if necessary)
|
||||
if (settings.opentherm.dhwPresent) {
|
||||
updateDhwTemp();
|
||||
updateDhwFlowRate();
|
||||
this->updateDhwTemp();
|
||||
this->updateDhwFlowRate();
|
||||
|
||||
} else {
|
||||
vars.temperatures.dhw = 0.0f;
|
||||
@@ -361,13 +381,25 @@ protected:
|
||||
}
|
||||
|
||||
// Get current heating temp
|
||||
updateHeatingTemp();
|
||||
this->updateHeatingTemp();
|
||||
|
||||
// Get heating return temp
|
||||
updateHeatingReturnTemp();
|
||||
this->updateHeatingReturnTemp();
|
||||
|
||||
// Get exhaust temp
|
||||
updateExhaustTemp();
|
||||
this->updateExhaustTemp();
|
||||
|
||||
// If filtering is enabled, these parameters
|
||||
// must be updated every time.
|
||||
if (settings.opentherm.filterNumValues.enable) {
|
||||
// Get outdoor temp (if necessary)
|
||||
if (settings.sensors.outdoor.type == SensorType::BOILER) {
|
||||
this->updateOutdoorTemp();
|
||||
}
|
||||
|
||||
// Get pressure
|
||||
this->updatePressure();
|
||||
}
|
||||
|
||||
|
||||
// Fault reset action
|
||||
@@ -538,6 +570,13 @@ protected:
|
||||
Log.swarningln(FPSTR(L_OT), F("Get slave OT version failed"));
|
||||
}
|
||||
|
||||
if (this->setMasterOtVersion(2.2f)) {
|
||||
Log.straceln(FPSTR(L_OT), F("Master OT version: %f"), vars.parameters.masterOtVersion);
|
||||
|
||||
} else {
|
||||
Log.swarningln(FPSTR(L_OT), F("Set master OT version failed"));
|
||||
}
|
||||
|
||||
if (this->updateSlaveConfig()) {
|
||||
Log.straceln(FPSTR(L_OT), F("Slave member id: %u, flags: %u"), vars.parameters.slaveMemberId, vars.parameters.slaveFlags);
|
||||
|
||||
@@ -773,7 +812,7 @@ protected:
|
||||
return CustomOpenTherm::isValidResponse(response);
|
||||
}
|
||||
|
||||
bool updateOutsideTemp() {
|
||||
bool updateOutdoorTemp() {
|
||||
unsigned long response = this->instance->sendRequest(CustomOpenTherm::buildRequest(
|
||||
OpenThermRequestType::READ_DATA,
|
||||
OpenThermMessageID::Toutside,
|
||||
@@ -784,12 +823,19 @@ protected:
|
||||
return false;
|
||||
}
|
||||
|
||||
vars.temperatures.outdoor = settings.sensors.outdoor.offset + convertTemp(
|
||||
float value = settings.sensors.outdoor.offset + convertTemp(
|
||||
CustomOpenTherm::getFloat(response),
|
||||
settings.opentherm.unitSystem,
|
||||
settings.system.unitSystem
|
||||
);
|
||||
|
||||
if (settings.opentherm.filterNumValues.enable && fabs(vars.temperatures.outdoor) >= 0.1f) {
|
||||
vars.temperatures.outdoor += (value - vars.temperatures.outdoor) * settings.opentherm.filterNumValues.factor;
|
||||
|
||||
} else {
|
||||
vars.temperatures.outdoor = value;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -809,12 +855,19 @@ protected:
|
||||
return false;
|
||||
}
|
||||
|
||||
vars.temperatures.exhaust = convertTemp(
|
||||
value = convertTemp(
|
||||
value,
|
||||
settings.opentherm.unitSystem,
|
||||
settings.system.unitSystem
|
||||
);
|
||||
|
||||
if (settings.opentherm.filterNumValues.enable && fabs(vars.temperatures.exhaust) >= 0.1f) {
|
||||
vars.temperatures.exhaust += (value - vars.temperatures.exhaust) * settings.opentherm.filterNumValues.factor;
|
||||
|
||||
} else {
|
||||
vars.temperatures.exhaust = value;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -834,12 +887,19 @@ protected:
|
||||
return false;
|
||||
}
|
||||
|
||||
vars.temperatures.heating = convertTemp(
|
||||
value = convertTemp(
|
||||
value,
|
||||
settings.opentherm.unitSystem,
|
||||
settings.system.unitSystem
|
||||
);
|
||||
|
||||
if (settings.opentherm.filterNumValues.enable && fabs(vars.temperatures.heating) >= 0.1f) {
|
||||
vars.temperatures.heating += (value - vars.temperatures.heating) * settings.opentherm.filterNumValues.factor;
|
||||
|
||||
} else {
|
||||
vars.temperatures.heating = value;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -854,12 +914,20 @@ protected:
|
||||
return false;
|
||||
}
|
||||
|
||||
vars.temperatures.heatingReturn = convertTemp(
|
||||
float value = convertTemp(
|
||||
CustomOpenTherm::getFloat(response),
|
||||
settings.opentherm.unitSystem,
|
||||
settings.system.unitSystem
|
||||
);
|
||||
|
||||
if (settings.opentherm.filterNumValues.enable && fabs(vars.temperatures.heatingReturn) >= 0.1f) {
|
||||
vars.temperatures.heatingReturn += (value - vars.temperatures.heatingReturn) * settings.opentherm.filterNumValues.factor;
|
||||
|
||||
} else {
|
||||
vars.temperatures.heatingReturn = value;
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -880,12 +948,19 @@ protected:
|
||||
return false;
|
||||
}
|
||||
|
||||
vars.temperatures.dhw = convertTemp(
|
||||
value = convertTemp(
|
||||
value,
|
||||
settings.opentherm.unitSystem,
|
||||
settings.system.unitSystem
|
||||
);
|
||||
|
||||
if (settings.opentherm.filterNumValues.enable && fabs(vars.temperatures.dhw) >= 0.1f) {
|
||||
vars.temperatures.dhw += (value - vars.temperatures.dhw) * settings.opentherm.filterNumValues.factor;
|
||||
|
||||
} else {
|
||||
vars.temperatures.dhw = value;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -901,15 +976,17 @@ protected:
|
||||
}
|
||||
|
||||
float value = CustomOpenTherm::getFloat(response);
|
||||
if (this->dhwFlowRateMultiplier != 10 && value > convertVolume(16, UnitSystem::METRIC, settings.opentherm.unitSystem)) {
|
||||
this->dhwFlowRateMultiplier = 10;
|
||||
if (value < 0 || value > convertVolume(16, UnitSystem::METRIC, settings.opentherm.unitSystem)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
vars.sensors.dhwFlowRate = convertVolume(
|
||||
value / this->dhwFlowRateMultiplier,
|
||||
value = convertVolume(
|
||||
value * settings.opentherm.dhwFlowRateFactor,
|
||||
settings.opentherm.unitSystem,
|
||||
settings.system.unitSystem
|
||||
);
|
||||
|
||||
vars.sensors.dhwFlowRate = value > 0.09f ? value : 0.0f;
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -922,6 +999,7 @@ protected:
|
||||
));
|
||||
|
||||
if (!CustomOpenTherm::isValidResponse(response)) {
|
||||
vars.sensors.faultCode = 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -929,6 +1007,22 @@ protected:
|
||||
return true;
|
||||
}
|
||||
|
||||
bool updateDiagCode() {
|
||||
unsigned long response = this->instance->sendRequest(CustomOpenTherm::buildRequest(
|
||||
OpenThermRequestType::READ_DATA,
|
||||
OpenThermMessageID::OEMDiagnosticCode,
|
||||
0
|
||||
));
|
||||
|
||||
if (!CustomOpenTherm::isValidResponse(response)) {
|
||||
vars.sensors.diagnosticCode = 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
vars.sensors.diagnosticCode = CustomOpenTherm::getUInt(response);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool updateModulationLevel() {
|
||||
unsigned long response = this->instance->sendRequest(CustomOpenTherm::buildRequest(
|
||||
OpenThermRequestType::READ_DATA,
|
||||
@@ -940,7 +1034,13 @@ protected:
|
||||
return false;
|
||||
}
|
||||
|
||||
vars.sensors.modulation = CustomOpenTherm::getFloat(response);
|
||||
float value = CustomOpenTherm::getFloat(response);
|
||||
if (settings.opentherm.filterNumValues.enable && fabs(vars.sensors.modulation) >= 0.1f) {
|
||||
vars.sensors.modulation += (value - vars.sensors.modulation) * settings.opentherm.filterNumValues.factor;
|
||||
|
||||
} else {
|
||||
vars.sensors.modulation = value;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -957,16 +1057,23 @@ protected:
|
||||
}
|
||||
|
||||
float value = CustomOpenTherm::getFloat(response);
|
||||
if (this->pressureMultiplier != 10 && value > convertPressure(5, UnitSystem::METRIC, settings.opentherm.unitSystem)) {
|
||||
this->pressureMultiplier = 10;
|
||||
if (value < 0 || value > convertPressure(5, UnitSystem::METRIC, settings.opentherm.unitSystem)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
vars.sensors.pressure = convertPressure(
|
||||
value / this->pressureMultiplier,
|
||||
value = convertPressure(
|
||||
value * settings.opentherm.pressureFactor,
|
||||
settings.opentherm.unitSystem,
|
||||
settings.system.unitSystem
|
||||
);
|
||||
|
||||
if (settings.opentherm.filterNumValues.enable && fabs(vars.sensors.pressure) >= 0.1f) {
|
||||
vars.sensors.pressure += (value - vars.sensors.pressure) * settings.opentherm.filterNumValues.factor;
|
||||
|
||||
} else {
|
||||
vars.sensors.pressure = value;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -582,6 +582,10 @@ protected:
|
||||
void loop() {
|
||||
// web server
|
||||
if (!this->stateWebServer() && (network->isApEnabled() || network->isConnected()) && millis() - this->webServerChangeState >= this->changeStateInterval) {
|
||||
#ifdef ARDUINO_ARCH_ESP32
|
||||
this->delay(250);
|
||||
#endif
|
||||
|
||||
this->startWebServer();
|
||||
Log.straceln(FPSTR(L_PORTAL_WEBSERVER), F("Started: AP up or STA connected"));
|
||||
|
||||
|
||||
@@ -139,7 +139,8 @@ protected:
|
||||
|
||||
// if use pid
|
||||
if (settings.pid.enable) {
|
||||
if (vars.parameters.heatingEnabled) {
|
||||
//if (vars.parameters.heatingEnabled) {
|
||||
if (settings.heating.enable) {
|
||||
float pidResult = getPidTemp(
|
||||
settings.equitherm.enable ? (settings.pid.maxTemp * -1) : settings.pid.minTemp,
|
||||
settings.pid.maxTemp
|
||||
@@ -160,8 +161,8 @@ protected:
|
||||
}
|
||||
|
||||
} else if (fabs(pidRegulator.integral) > 0.0001f) {
|
||||
pidRegulator.integral = 0;
|
||||
Log.sinfoln(FPSTR(L_REGULATOR_PID), F("Integral sum has been reset"));
|
||||
pidRegulator.integral = 0;
|
||||
Log.sinfoln(FPSTR(L_REGULATOR_PID), F("Integral sum has been reset"));
|
||||
}
|
||||
|
||||
// default temp, manual mode
|
||||
@@ -259,7 +260,7 @@ protected:
|
||||
pidRegulator.setLimits(minTemp, maxTemp);
|
||||
pidRegulator.setDt(settings.pid.dt * 1000u);
|
||||
pidRegulator.input = vars.temperatures.indoor;
|
||||
pidRegulator.setpoint = settings.heating.target;
|
||||
pidRegulator.setpoint = vars.states.emergency ? settings.emergency.target : settings.heating.target;
|
||||
|
||||
return pidRegulator.getResultTimer();
|
||||
}
|
||||
|
||||
@@ -54,6 +54,8 @@ struct Settings {
|
||||
byte faultStateGpio = DEFAULT_OT_FAULT_STATE_GPIO;
|
||||
byte invertFaultState = false;
|
||||
unsigned int memberIdCode = 0;
|
||||
float pressureFactor = 1.0f;
|
||||
float dhwFlowRateFactor = 1.0f;
|
||||
bool dhwPresent = true;
|
||||
bool summerWinterMode = false;
|
||||
bool heatingCh2Enabled = true;
|
||||
@@ -63,6 +65,12 @@ struct Settings {
|
||||
bool modulationSyncWithHeating = false;
|
||||
bool getMinMaxTemp = true;
|
||||
bool nativeHeatingControl = false;
|
||||
bool immergasFix = false;
|
||||
|
||||
struct {
|
||||
bool enable = false;
|
||||
float factor = 0.1f;
|
||||
} filterNumValues;
|
||||
} opentherm;
|
||||
|
||||
struct {
|
||||
@@ -167,6 +175,7 @@ struct Variables {
|
||||
float pressure = 0.0f;
|
||||
float dhwFlowRate = 0.0f;
|
||||
byte faultCode = 0;
|
||||
unsigned short diagnosticCode = 0;
|
||||
int8_t rssi = 0;
|
||||
|
||||
struct {
|
||||
|
||||
51
src/utils.h
51
src/utils.h
@@ -345,6 +345,8 @@ void settingsToJson(const Settings& src, JsonVariant dst, bool safe = false) {
|
||||
dst["opentherm"]["faultStateGpio"] = src.opentherm.faultStateGpio;
|
||||
dst["opentherm"]["invertFaultState"] = src.opentherm.invertFaultState;
|
||||
dst["opentherm"]["memberIdCode"] = src.opentherm.memberIdCode;
|
||||
dst["opentherm"]["pressureFactor"] = roundd(src.opentherm.pressureFactor, 2);
|
||||
dst["opentherm"]["dhwFlowRateFactor"] = roundd(src.opentherm.dhwFlowRateFactor, 2);
|
||||
dst["opentherm"]["dhwPresent"] = src.opentherm.dhwPresent;
|
||||
dst["opentherm"]["summerWinterMode"] = src.opentherm.summerWinterMode;
|
||||
dst["opentherm"]["heatingCh2Enabled"] = src.opentherm.heatingCh2Enabled;
|
||||
@@ -354,6 +356,9 @@ void settingsToJson(const Settings& src, JsonVariant dst, bool safe = false) {
|
||||
dst["opentherm"]["modulationSyncWithHeating"] = src.opentherm.modulationSyncWithHeating;
|
||||
dst["opentherm"]["getMinMaxTemp"] = src.opentherm.getMinMaxTemp;
|
||||
dst["opentherm"]["nativeHeatingControl"] = src.opentherm.nativeHeatingControl;
|
||||
dst["opentherm"]["immergasFix"] = src.opentherm.immergasFix;
|
||||
dst["opentherm"]["filterNumValues"]["enable"] = src.opentherm.filterNumValues.enable;
|
||||
dst["opentherm"]["filterNumValues"]["factor"] = roundd(src.opentherm.filterNumValues.factor, 2);
|
||||
|
||||
dst["mqtt"]["enable"] = src.mqtt.enable;
|
||||
dst["mqtt"]["server"] = src.mqtt.server;
|
||||
@@ -693,6 +698,42 @@ bool jsonToSettings(const JsonVariantConst src, Settings& dst, bool safe = false
|
||||
}
|
||||
}
|
||||
|
||||
if (!src["opentherm"]["pressureFactor"].isNull()) {
|
||||
float value = src["opentherm"]["pressureFactor"].as<float>();
|
||||
|
||||
if (value > 0 && value <= 100 && fabs(value - dst.opentherm.pressureFactor) > 0.0001f) {
|
||||
dst.opentherm.pressureFactor = roundd(value, 2);
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!src["opentherm"]["dhwFlowRateFactor"].isNull()) {
|
||||
float value = src["opentherm"]["dhwFlowRateFactor"].as<float>();
|
||||
|
||||
if (value > 0 && value <= 100 && fabs(value - dst.opentherm.dhwFlowRateFactor) > 0.0001f) {
|
||||
dst.opentherm.dhwFlowRateFactor = roundd(value, 2);
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (src["opentherm"]["filterNumValues"]["enable"].is<bool>()) {
|
||||
bool value = src["opentherm"]["filterNumValues"]["enable"].as<bool>();
|
||||
|
||||
if (value != dst.opentherm.filterNumValues.enable) {
|
||||
dst.opentherm.filterNumValues.enable = value;
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!src["opentherm"]["filterNumValues"]["factor"].isNull()) {
|
||||
float value = src["opentherm"]["filterNumValues"]["factor"].as<float>();
|
||||
|
||||
if (value > 0 && value <= 1 && fabs(value - dst.opentherm.filterNumValues.factor) > 0.0001f) {
|
||||
dst.opentherm.filterNumValues.factor = roundd(value, 2);
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (src["opentherm"]["dhwPresent"].is<bool>()) {
|
||||
bool value = src["opentherm"]["dhwPresent"].as<bool>();
|
||||
|
||||
@@ -800,6 +841,15 @@ bool jsonToSettings(const JsonVariantConst src, Settings& dst, bool safe = false
|
||||
}
|
||||
}
|
||||
|
||||
if (src["opentherm"]["immergasFix"].is<bool>()) {
|
||||
bool value = src["opentherm"]["immergasFix"].as<bool>();
|
||||
|
||||
if (value != dst.opentherm.immergasFix) {
|
||||
dst.opentherm.immergasFix = value;
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// mqtt
|
||||
if (src["mqtt"]["enable"].is<bool>()) {
|
||||
@@ -1497,6 +1547,7 @@ void varsToJson(const Variables& src, JsonVariant dst) {
|
||||
dst["sensors"]["pressure"] = roundd(src.sensors.pressure, 2);
|
||||
dst["sensors"]["dhwFlowRate"] = roundd(src.sensors.dhwFlowRate, 2);
|
||||
dst["sensors"]["faultCode"] = src.sensors.faultCode;
|
||||
dst["sensors"]["diagnosticCode"] = src.sensors.diagnosticCode;
|
||||
dst["sensors"]["rssi"] = src.sensors.rssi;
|
||||
dst["sensors"]["uptime"] = millis() / 1000ul;
|
||||
dst["sensors"]["outdoor"]["connected"] = src.sensors.outdoor.connected;
|
||||
|
||||
@@ -100,6 +100,7 @@
|
||||
"pressure": "Pressure",
|
||||
"dhwFlowRate": "DHW flow rate",
|
||||
"faultCode": "Fault code",
|
||||
"diagCode": "Diagnostic code",
|
||||
"indoorTemp": "Indoor temp",
|
||||
"outdoorTemp": "Outdoor temp",
|
||||
"heatingTemp": "Heating temp",
|
||||
@@ -175,7 +176,8 @@
|
||||
"enable": "Enable",
|
||||
"note": {
|
||||
"restart": "After changing these settings, the device must be restarted for the changes to take effect.",
|
||||
"blankNotUse": "blank - not use"
|
||||
"blankNotUse": "blank - not use",
|
||||
"bleDevice": "BLE device can be used <u>only</u> with some ESP32 boards with BLE support!"
|
||||
},
|
||||
|
||||
"temp": {
|
||||
@@ -212,7 +214,7 @@
|
||||
},
|
||||
|
||||
"heating": {
|
||||
"hyst": "Hysteresis",
|
||||
"hyst": "Hysteresis <small>(in degrees)</small>",
|
||||
"maxMod": "Max modulation level"
|
||||
},
|
||||
|
||||
@@ -259,6 +261,25 @@
|
||||
"outGpio": "Out GPIO",
|
||||
"ledGpio": "RX LED GPIO",
|
||||
"memberIdCode": "Master MemberID code",
|
||||
"pressureFactor": {
|
||||
"title": "Coeff. pressure correction",
|
||||
"note": "If the pressure displayed is <b>X10</b> from the real one, set the <b>0.1</b>."
|
||||
},
|
||||
"dhwFlowRateFactor": {
|
||||
"title": "Coeff. DHW flow rate correction",
|
||||
"note": "If the DHW flow rate displayed is <b>X10</b> from the real one, set the <b>0.1</b>."
|
||||
},
|
||||
"fnv": {
|
||||
"title": "Filtering numeric values",
|
||||
"enable": {
|
||||
"title": "Enable filtering",
|
||||
"note": "It can be useful if there is a lot of sharp noise on the charts. The filter used is \"Running Average\"."
|
||||
},
|
||||
"factor": {
|
||||
"title": "Filtration coeff.",
|
||||
"note": "The lower the value, the smoother and <u>longer</u> the change in numeric values."
|
||||
}
|
||||
},
|
||||
|
||||
"options": {
|
||||
"dhwPresent": "DHW present",
|
||||
@@ -268,7 +289,8 @@
|
||||
"dhwToCh2": "Duplicate DHW to CH2",
|
||||
"dhwBlocking": "DHW blocking",
|
||||
"modulationSyncWithHeating": "Sync modulation with heating",
|
||||
"getMinMaxTemp": "Get min/max temp from boiler"
|
||||
"getMinMaxTemp": "Get min/max temp from boiler",
|
||||
"immergasFix": "Fix for Immergas boilers"
|
||||
},
|
||||
|
||||
"faultState": {
|
||||
@@ -299,14 +321,11 @@
|
||||
"boiler": "From boiler via OpenTherm",
|
||||
"manual": "Manual via MQTT/API",
|
||||
"ext": "External (DS18B20)",
|
||||
"ble": "BLE device <i>(ONLY for some ESP32 which support BLE)</i>"
|
||||
"ble": "BLE device"
|
||||
},
|
||||
"gpio": "GPIO",
|
||||
"offset": "Temp offset <small>(calibration)</small>",
|
||||
"bleAddress": {
|
||||
"title": "BLE address",
|
||||
"note": "ONLY for some ESP32 which support BLE"
|
||||
}
|
||||
"bleAddress": "BLE device MAC address"
|
||||
},
|
||||
|
||||
"extPump": {
|
||||
|
||||
@@ -100,6 +100,7 @@
|
||||
"pressure": "Давление",
|
||||
"dhwFlowRate": "Расход ГВС",
|
||||
"faultCode": "Код ошибки",
|
||||
"diagCode": "Диагностический код",
|
||||
"indoorTemp": "Внутренняя темп.",
|
||||
"outdoorTemp": "Наружная темп.",
|
||||
"heatingTemp": "Темп. отопления",
|
||||
@@ -175,7 +176,8 @@
|
||||
"enable": "Вкл",
|
||||
"note": {
|
||||
"restart": "После изменения этих настроек устройство необходимо перезагрузить, чтобы изменения вступили в силу.",
|
||||
"blankNotUse": "пусто - не использовать"
|
||||
"blankNotUse": "пусто - не использовать",
|
||||
"bleDevice": "BLE устройство можно использовать <u>только</u> с некоторыми платами ESP32, которые поддерживают BLE!"
|
||||
},
|
||||
|
||||
"temp": {
|
||||
@@ -212,7 +214,7 @@
|
||||
},
|
||||
|
||||
"heating": {
|
||||
"hyst": "Гистерезис",
|
||||
"hyst": "Гистерезис <small>(в градусах)</small>",
|
||||
"maxMod": "Макс. уровень модуляции"
|
||||
},
|
||||
|
||||
@@ -251,7 +253,7 @@
|
||||
"p": "Коэффициент P",
|
||||
"i": "Коэффициент I",
|
||||
"d": "Коэффициент D",
|
||||
"dt": "DT <small>в секундах</small>"
|
||||
"dt": "DT <small>(сек)</small>"
|
||||
},
|
||||
|
||||
"ot": {
|
||||
@@ -259,6 +261,25 @@
|
||||
"outGpio": "Выход GPIO",
|
||||
"ledGpio": "RX LED GPIO",
|
||||
"memberIdCode": "Master MemberID код",
|
||||
"pressureFactor": {
|
||||
"title": "Коэфф. коррекции давления",
|
||||
"note": "Если давление отображается <b>Х10</b> от реального, установите значение <b>0.1</b>."
|
||||
},
|
||||
"dhwFlowRateFactor": {
|
||||
"title": "Коэфф. коррекции потока ГВС",
|
||||
"note": "Если поток ГВС отображается <b>Х10</b> от реального, установите значение <b>0.1</b>."
|
||||
},
|
||||
"fnv": {
|
||||
"title": "Фильтрация числовых значений",
|
||||
"enable": {
|
||||
"title": "Включить фильтрацию",
|
||||
"note": "Может быть полезно, если на графиках много резкого шума. В качестве фильтра используется \"бегущее среднее\"."
|
||||
},
|
||||
"factor": {
|
||||
"title": "Коэфф. фильтрации",
|
||||
"note": "Чем меньше коэф., тем плавнее и <u>дольше</u> изменение числовых значений."
|
||||
}
|
||||
},
|
||||
|
||||
"options": {
|
||||
"dhwPresent": "Контур ГВС",
|
||||
@@ -268,7 +289,8 @@
|
||||
"dhwToCh2": "Дублировать параметры ГВС в канал 2",
|
||||
"dhwBlocking": "DHW blocking",
|
||||
"modulationSyncWithHeating": "Синхронизировать модуляцию с отоплением",
|
||||
"getMinMaxTemp": "Получать мин. и макс. температуру от котла"
|
||||
"getMinMaxTemp": "Получать мин. и макс. температуру от котла",
|
||||
"immergasFix": "Фикс для котлов Immergas"
|
||||
},
|
||||
|
||||
"faultState": {
|
||||
@@ -279,7 +301,7 @@
|
||||
|
||||
"nativeHeating": {
|
||||
"title": "Передать управление отоплением котлу",
|
||||
"note": "Работает <u>ТОЛЬКО</u> если котел требует и принимает целевую температуру в помещении и сам регулирует температуру теплоносителя на основе встроенного режима кривых. Несовместимо с ПИД и ПЗА, а также с гистерезисом встроенного ПО."
|
||||
"note": "Работает <u>ТОЛЬКО</u> если котел требует и принимает целевую температуру в помещении и сам регулирует температуру теплоносителя на основе встроенного режима кривых. Несовместимо с ПИД, ПЗА и гистерезисом."
|
||||
}
|
||||
},
|
||||
|
||||
@@ -290,7 +312,7 @@
|
||||
"user": "Имя пользователя",
|
||||
"password": "Пароль",
|
||||
"prefix": "Префикс",
|
||||
"interval": "Интервал публикации (в секундах)"
|
||||
"interval": "Интервал публикации <small>(сек)</small>"
|
||||
},
|
||||
|
||||
"tempSensor": {
|
||||
@@ -299,14 +321,11 @@
|
||||
"boiler": "От котла через OpenTherm",
|
||||
"manual": "Вручную через MQTT/API",
|
||||
"ext": "Внешний датчик (DS18B20)",
|
||||
"ble": "BLE устройство <i>(ТОЛЬКО для некоторых плат ESP32 с поддержкой BLE)</i>"
|
||||
"ble": "BLE устройство"
|
||||
},
|
||||
"gpio": "GPIO",
|
||||
"offset": "Смещение температуры <small>(калибровка)</small>",
|
||||
"bleAddress": {
|
||||
"title": "BLE адрес",
|
||||
"note": "ТОЛЬКО для некоторых плат ESP32 с поддержкой BLE"
|
||||
}
|
||||
"bleAddress": "MAC адрес BLE устройства"
|
||||
},
|
||||
|
||||
"extPump": {
|
||||
|
||||
@@ -162,6 +162,10 @@
|
||||
<th scope="row" data-i18n>dashboard.state.faultCode</th>
|
||||
<td><b id="ot-fault-code"></b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row" data-i18n>dashboard.state.diagCode</th>
|
||||
<td><b id="ot-diag-code"></b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row" data-i18n>dashboard.state.indoorTemp</th>
|
||||
<td><b id="indoor-temp"></b> <span class="temp-unit"></span></td>
|
||||
@@ -430,7 +434,18 @@
|
||||
setValue('#ot-modulation', result.sensors.modulation);
|
||||
setValue('#ot-pressure', result.sensors.pressure);
|
||||
setValue('#ot-dhw-flow-rate', result.sensors.dhwFlowRate);
|
||||
setValue('#ot-fault-code', result.sensors.faultCode ? ("E" + result.sensors.faultCode) : "-");
|
||||
setValue(
|
||||
'#ot-fault-code',
|
||||
result.sensors.faultCode
|
||||
? (result.sensors.faultCode + " (0x" + dec2hex(result.sensors.faultCode) + ")")
|
||||
: "-"
|
||||
);
|
||||
setValue(
|
||||
'#ot-diag-code',
|
||||
result.sensors.diagnosticCode
|
||||
? (result.sensors.diagnosticCode + " (0x" + dec2hex(result.sensors.diagnosticCode) + ")")
|
||||
: "-"
|
||||
);
|
||||
|
||||
setValue('#indoor-temp', result.temperatures.indoor);
|
||||
setValue('#outdoor-temp', result.temperatures.outdoor);
|
||||
|
||||
@@ -401,6 +401,20 @@
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="grid">
|
||||
<label for="opentherm-pressure-factor">
|
||||
<span data-i18n>settings.ot.pressureFactor.title</span>
|
||||
<input type="number" inputmode="numeric" id="opentherm-pressure-factor" name="opentherm[pressureFactor]" min="0.1" max="100" step="0.01">
|
||||
<small data-i18n>settings.ot.pressureFactor.note</small>
|
||||
</label>
|
||||
|
||||
<label for="opentherm-dhw-fr-factor">
|
||||
<span data-i18n>settings.ot.dhwFlowRateFactor.title</span>
|
||||
<input type="number" inputmode="numeric" id="opentherm-dhw-fr-factor" name="opentherm[dhwFlowRateFactor]" min="0.1" max="100" step="0.01">
|
||||
<small data-i18n>settings.ot.dhwFlowRateFactor.note</small>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<fieldset>
|
||||
<legend data-i18n>settings.section.ot.options</legend>
|
||||
<label for="opentherm-dhw-present">
|
||||
@@ -443,6 +457,31 @@
|
||||
<span data-i18n>settings.ot.options.getMinMaxTemp</span>
|
||||
</label>
|
||||
|
||||
<label for="opentherm-immergas-fix">
|
||||
<input type="checkbox" id="opentherm-immergas-fix" name="opentherm[immergasFix]" value="true">
|
||||
<span data-i18n>settings.ot.options.immergasFix</span>
|
||||
</label>
|
||||
|
||||
<hr />
|
||||
<fieldset>
|
||||
<legend>
|
||||
<span data-i18n>settings.ot.fnv.title</span>
|
||||
</legend>
|
||||
|
||||
<label for="opentherm-fnv-enable">
|
||||
<input type="checkbox" id="opentherm-fnv-enable" name="opentherm[filterNumValues][enable]" value="true">
|
||||
<span data-i18n>settings.ot.fnv.enable.title</span>
|
||||
<br>
|
||||
<small data-i18n>settings.ot.fnv.enable.note</small>
|
||||
</label>
|
||||
|
||||
<label for="opentherm-fnv-factor">
|
||||
<span data-i18n>settings.ot.fnv.factor.title</span>
|
||||
<input type="number" inputmode="numeric" id="opentherm-fnv-factor" name="opentherm[filterNumValues][factor]" min="0.01" max="1" step="0.01">
|
||||
<small data-i18n>settings.ot.fnv.factor.note</small>
|
||||
</label>
|
||||
</fieldset>
|
||||
|
||||
<hr />
|
||||
<fieldset>
|
||||
<label for="opentherm-fault-state-gpio">
|
||||
@@ -561,24 +600,27 @@
|
||||
</label>
|
||||
</fieldset>
|
||||
|
||||
<label for="outdoor-sensor-gpio">
|
||||
<span data-i18n>settings.tempSensor.gpio</span>
|
||||
<input type="number" inputmode="numeric" id="outdoor-sensor-gpio" name="sensors[outdoor][gpio]" min="0" max="254" step="1">
|
||||
</label>
|
||||
|
||||
<div class="grid">
|
||||
<label for="outdoor-sensor-offset">
|
||||
<span data-i18n>settings.tempSensor.offset</span>
|
||||
<input type="number" inputmode="numeric" id="outdoor-sensor-offset" name="sensors[outdoor][offset]" min="-10" max="10" step="0.01" required>
|
||||
<label for="outdoor-sensor-gpio">
|
||||
<span data-i18n>settings.tempSensor.gpio</span>
|
||||
<input type="number" inputmode="numeric" id="outdoor-sensor-gpio" name="sensors[outdoor][gpio]" min="0" max="254" step="1">
|
||||
</label>
|
||||
|
||||
|
||||
<label for="outdoor-sensor-ble-addresss">
|
||||
<span data-i18n>settings.tempSensor.bleAddress.title</span>
|
||||
<span data-i18n>settings.tempSensor.bleAddress</span>
|
||||
<input type="text" id="outdoor-sensor-ble-addresss" name="sensors[outdoor][bleAddress]" pattern="([A-Fa-f0-9]{2}:){5}[A-Fa-f0-9]{2}">
|
||||
<small data-i18n>settings.tempSensor.bleAddress.note</small>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<label for="outdoor-sensor-offset">
|
||||
<span data-i18n>settings.tempSensor.offset</span>
|
||||
<input type="number" inputmode="numeric" id="outdoor-sensor-offset" name="sensors[outdoor][offset]" min="-10" max="10" step="0.01" required>
|
||||
</label>
|
||||
|
||||
<fieldset>
|
||||
<mark data-i18n>settings.note.bleDevice</mark>
|
||||
</fieldset>
|
||||
|
||||
<button type="submit" data-i18n>button.save</button>
|
||||
</form>
|
||||
</div>
|
||||
@@ -610,24 +652,27 @@
|
||||
</label>
|
||||
</fieldset>
|
||||
|
||||
<label for="indoor-sensor-gpio">
|
||||
<span data-i18n>settings.tempSensor.gpio</span>
|
||||
<input type="number" inputmode="numeric" id="indoor-sensor-gpio" name="sensors[indoor][gpio]" min="0" max="254" step="1">
|
||||
</label>
|
||||
|
||||
<div class="grid">
|
||||
<label for="indoor-sensor-offset">
|
||||
<span data-i18n>settings.tempSensor.offset</span>
|
||||
<input type="number" inputmode="numeric" id="indoor-sensor-offset" name="sensors[indoor][offset]" min="-10" max="10" step="0.01" required>
|
||||
<label for="indoor-sensor-gpio">
|
||||
<span data-i18n>settings.tempSensor.gpio</span>
|
||||
<input type="number" inputmode="numeric" id="indoor-sensor-gpio" name="sensors[indoor][gpio]" min="0" max="254" step="1">
|
||||
</label>
|
||||
|
||||
<label for="indoor-sensor-ble-addresss">
|
||||
<span data-i18n>settings.tempSensor.bleAddress.title</span>
|
||||
<span data-i18n>settings.tempSensor.bleAddress</span>
|
||||
<input type="text" id="indoor-sensor-ble-addresss" name="sensors[indoor][bleAddress]" pattern="([A-Fa-f0-9]{2}:){5}[A-Fa-f0-9]{2}">
|
||||
<small data-i18n>settings.tempSensor.bleAddress.note</small>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<label for="indoor-sensor-offset">
|
||||
<span data-i18n>settings.tempSensor.offset</span>
|
||||
<input type="number" inputmode="numeric" id="indoor-sensor-offset" name="sensors[indoor][offset]" min="-10" max="10" step="0.01" required>
|
||||
</label>
|
||||
|
||||
<fieldset>
|
||||
<mark data-i18n>settings.note.bleDevice</mark>
|
||||
</fieldset>
|
||||
|
||||
<button type="submit" data-i18n>button.save</button>
|
||||
</form>
|
||||
</div>
|
||||
@@ -721,6 +766,8 @@
|
||||
setInputValue('#opentherm-fault-state-gpio', data.opentherm.faultStateGpio < 255 ? data.opentherm.faultStateGpio : '');
|
||||
setCheckboxValue('#opentherm-invert-fault-state', data.opentherm.invertFaultState);
|
||||
setInputValue('#opentherm-member-id-code', data.opentherm.memberIdCode);
|
||||
setInputValue('#opentherm-pressure-factor', data.opentherm.pressureFactor);
|
||||
setInputValue('#opentherm-dhw-fr-factor', data.opentherm.dhwFlowRateFactor);
|
||||
setCheckboxValue('#opentherm-dhw-present', data.opentherm.dhwPresent);
|
||||
setCheckboxValue('#opentherm-sw-mode', data.opentherm.summerWinterMode);
|
||||
setCheckboxValue('#opentherm-heating-ch2-enabled', data.opentherm.heatingCh2Enabled);
|
||||
@@ -730,6 +777,9 @@
|
||||
setCheckboxValue('#opentherm-sync-modulation-with-heating', data.opentherm.modulationSyncWithHeating);
|
||||
setCheckboxValue('#opentherm-get-min-max-temp', data.opentherm.getMinMaxTemp);
|
||||
setCheckboxValue('#opentherm-native-heating-control', data.opentherm.nativeHeatingControl);
|
||||
setCheckboxValue('#opentherm-immergas-fix', data.opentherm.immergasFix);
|
||||
setCheckboxValue('#opentherm-fnv-enable', data.opentherm.filterNumValues.enable);
|
||||
setInputValue('#opentherm-fnv-factor', data.opentherm.filterNumValues.factor);
|
||||
setBusy('#opentherm-settings-busy', '#opentherm-settings', false);
|
||||
|
||||
// MQTT
|
||||
|
||||
@@ -609,7 +609,7 @@ function memberIdToVendor(memberId) {
|
||||
27: "Baxi",
|
||||
29: "Itho Daalderop",
|
||||
33: "Viessmann",
|
||||
41: "Italtherm",
|
||||
41: "Italtherm/Radiant",
|
||||
56: "Baxi Luna Duo-Tec",
|
||||
131: "Nefit",
|
||||
148: "Navien",
|
||||
@@ -665,4 +665,13 @@ function form2json(data, noCastItems = []) {
|
||||
|
||||
let object = Array.from(data).reduce(method, {});
|
||||
return JSON.stringify(object);
|
||||
}
|
||||
|
||||
function dec2hex(i) {
|
||||
let hex = parseInt(i).toString(16);
|
||||
if (hex.length % 2 != 0) {
|
||||
hex = "0" + hex;
|
||||
}
|
||||
|
||||
return hex.toUpperCase();
|
||||
}
|
||||
Reference in New Issue
Block a user