mirror of
https://github.com/Laxilef/OTGateway.git
synced 2025-12-26 10:03:35 +05:00
Compare commits
19 Commits
1.4.4
...
8503ef966f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
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
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
- name: run PlatformIO Dependabot
|
- name: run PlatformIO Dependabot
|
||||||
uses: peterus/platformio_dependabot@v1.1.1
|
uses: peterus/platformio_dependabot@v1.2.0
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
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)
|
* [Quick Start](https://github.com/Laxilef/OTGateway/wiki#quick-start)
|
||||||
* [Build firmware](https://github.com/Laxilef/OTGateway/wiki#build-firmware)
|
* [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)
|
* [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)
|
* [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 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)
|
* [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:
|
dhw_meter:
|
||||||
sensor:
|
sensor:
|
||||||
- platform: integration
|
- 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
|
unsigned int data = enableCentralHeating
|
||||||
| (enableHotWater << 1)
|
| (enableHotWater << 1)
|
||||||
| (enableCooling << 2)
|
| (enableCooling << 2)
|
||||||
@@ -87,7 +87,9 @@ public:
|
|||||||
| (enableCentralHeating2 << 4)
|
| (enableCentralHeating2 << 4)
|
||||||
| (summerWinterMode << 5)
|
| (summerWinterMode << 5)
|
||||||
| (dhwBlocking << 6);
|
| (dhwBlocking << 6);
|
||||||
|
|
||||||
data <<= 8;
|
data <<= 8;
|
||||||
|
data |= lb;
|
||||||
|
|
||||||
return this->sendRequest(buildRequest(
|
return this->sendRequest(buildRequest(
|
||||||
OpenThermMessageType::READ_DATA,
|
OpenThermMessageType::READ_DATA,
|
||||||
|
|||||||
@@ -33,18 +33,16 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if defined(ARDUINO_ARCH_ESP32)
|
#if defined(ARDUINO_ARCH_ESP32)
|
||||||
bool canHandle(HTTPMethod method, const String uri) override {
|
bool canHandle(WebServer &server, HTTPMethod method, const String &uri) override {
|
||||||
#else
|
return this->canHandle(method, uri);
|
||||||
bool canHandle(HTTPMethod method, const String& uri) override {
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
bool canHandle(HTTPMethod method, const String& uri) override {
|
||||||
return uri.equals(this->uri) && (!this->canHandleCallback || this->canHandleCallback(method, uri));
|
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 {
|
bool handle(WebServer& server, HTTPMethod method, const String& uri) override {
|
||||||
#endif
|
|
||||||
if (!this->canHandle(method, uri)) {
|
if (!this->canHandle(method, uri)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,18 +28,16 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if defined(ARDUINO_ARCH_ESP32)
|
#if defined(ARDUINO_ARCH_ESP32)
|
||||||
bool canHandle(HTTPMethod method, const String uri) override {
|
bool canHandle(WebServer &server, HTTPMethod method, const String &uri) override {
|
||||||
#else
|
return this->canHandle(method, uri);
|
||||||
bool canHandle(HTTPMethod method, const String& uri) override {
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
bool canHandle(HTTPMethod method, const String& uri) override {
|
||||||
return method == HTTP_GET && uri.equals(this->uri) && (!this->canHandleCallback || this->canHandleCallback(method, uri));
|
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 {
|
bool handle(WebServer& server, HTTPMethod method, const String& uri) override {
|
||||||
#endif
|
|
||||||
if (!this->canHandle(method, uri)) {
|
if (!this->canHandle(method, uri)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,26 +58,26 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if defined(ARDUINO_ARCH_ESP32)
|
#if defined(ARDUINO_ARCH_ESP32)
|
||||||
bool canHandle(HTTPMethod method, const String uri) override {
|
bool canHandle(WebServer &server, HTTPMethod method, const String &uri) override {
|
||||||
#else
|
return this->canHandle(method, uri);
|
||||||
bool canHandle(HTTPMethod method, const String& uri) override {
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
bool canHandle(HTTPMethod method, const String& uri) override {
|
||||||
return method == HTTP_POST && uri.equals(this->uri) && (!this->canHandleCallback || this->canHandleCallback(method, uri));
|
return method == HTTP_POST && uri.equals(this->uri) && (!this->canHandleCallback || this->canHandleCallback(method, uri));
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(ARDUINO_ARCH_ESP32)
|
#if defined(ARDUINO_ARCH_ESP32)
|
||||||
bool canUpload(const String uri) override {
|
bool canUpload(WebServer &server, const String &uri) override {
|
||||||
#else
|
return this->canUpload(uri);
|
||||||
bool canUpload(const String& uri) override {
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
bool canUpload(const String& uri) override {
|
||||||
return uri.equals(this->uri) && (!this->canUploadCallback || this->canUploadCallback(uri));
|
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 {
|
bool handle(WebServer& server, HTTPMethod method, const String& uri) override {
|
||||||
#endif
|
|
||||||
if (this->afterUpgradeCallback) {
|
if (this->afterUpgradeCallback) {
|
||||||
this->afterUpgradeCallback(this->firmwareResult, this->filesystemResult);
|
this->afterUpgradeCallback(this->firmwareResult, this->filesystemResult);
|
||||||
}
|
}
|
||||||
@@ -91,11 +91,7 @@ public:
|
|||||||
return true;
|
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 {
|
void upload(WebServer& server, const String& uri, HTTPUpload& upload) override {
|
||||||
#endif
|
|
||||||
UpgradeResult* result;
|
UpgradeResult* result;
|
||||||
if (upload.name.equals("firmware")) {
|
if (upload.name.equals("firmware")) {
|
||||||
result = &this->firmwareResult;
|
result = &this->firmwareResult;
|
||||||
|
|||||||
@@ -24,8 +24,7 @@ lib_deps =
|
|||||||
gyverlibs/FileData@^1.0.2
|
gyverlibs/FileData@^1.0.2
|
||||||
gyverlibs/GyverPID@^3.3.2
|
gyverlibs/GyverPID@^3.3.2
|
||||||
gyverlibs/GyverBlinker@^1.1.1
|
gyverlibs/GyverBlinker@^1.1.1
|
||||||
https://github.com/PaulStoffregen/OneWire#master
|
https://github.com/pstolarz/Arduino-Temperature-Control-Library.git#OneWireNg
|
||||||
milesburton/DallasTemperature@^3.11.0
|
|
||||||
laxilef/TinyLogger@^1.1.1
|
laxilef/TinyLogger@^1.1.1
|
||||||
build_flags =
|
build_flags =
|
||||||
-D PIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY
|
-D PIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY
|
||||||
@@ -71,11 +70,12 @@ board_build.ldscript = eagle.flash.4m1m.ld
|
|||||||
|
|
||||||
[esp32_defaults]
|
[esp32_defaults]
|
||||||
;platform = espressif32@^6.7
|
;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 =
|
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
|
board_build.partitions = esp32_partitions.csv
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${env.lib_deps}
|
${env.lib_deps}
|
||||||
@@ -261,3 +261,20 @@ build_flags =
|
|||||||
-D DEFAULT_SENSOR_INDOOR_GPIO=18
|
-D DEFAULT_SENSOR_INDOOR_GPIO=18
|
||||||
-D DEFAULT_STATUS_LED_GPIO=2
|
-D DEFAULT_STATUS_LED_GPIO=2
|
||||||
-D DEFAULT_OT_RX_LED_GPIO=19
|
-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_NAME)] = F("Fault code");
|
||||||
doc[FPSTR(HA_ICON)] = F("mdi:chat-alert-outline");
|
doc[FPSTR(HA_ICON)] = F("mdi:chat-alert-outline");
|
||||||
doc[FPSTR(HA_STATE_TOPIC)] = this->getDeviceTopic(F("state"));
|
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[FPSTR(HA_EXPIRE_AFTER)] = 120;
|
||||||
doc.shrinkToFit();
|
doc.shrinkToFit();
|
||||||
|
|
||||||
return this->publish(this->getTopic(FPSTR(HA_ENTITY_SENSOR), F("fault_code")).c_str(), doc);
|
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) {
|
bool publishSensorRssi(bool enabledByDefault = true) {
|
||||||
JsonDocument doc;
|
JsonDocument doc;
|
||||||
doc[FPSTR(HA_AVAILABILITY)][FPSTR(HA_TOPIC)] = this->getDeviceTopic(F("status"));
|
doc[FPSTR(HA_AVAILABILITY)][FPSTR(HA_TOPIC)] = this->getDeviceTopic(F("status"));
|
||||||
|
|||||||
@@ -358,6 +358,7 @@ protected:
|
|||||||
this->haHelper->publishSensorModulation(false);
|
this->haHelper->publishSensorModulation(false);
|
||||||
this->haHelper->publishSensorPressure(settings.system.unitSystem, false);
|
this->haHelper->publishSensorPressure(settings.system.unitSystem, false);
|
||||||
this->haHelper->publishSensorFaultCode();
|
this->haHelper->publishSensorFaultCode();
|
||||||
|
this->haHelper->publishSensorDiagnosticCode();
|
||||||
this->haHelper->publishSensorRssi(false);
|
this->haHelper->publishSensorRssi(false);
|
||||||
this->haHelper->publishSensorUptime(false);
|
this->haHelper->publishSensorUptime(false);
|
||||||
|
|
||||||
|
|||||||
@@ -165,6 +165,16 @@ protected:
|
|||||||
heatingCh2Enabled = settings.opentherm.dhwPresent && settings.dhw.enable;
|
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(
|
unsigned long response = this->instance->setBoilerStatus(
|
||||||
heatingEnabled,
|
heatingEnabled,
|
||||||
settings.opentherm.dhwPresent && settings.dhw.enable,
|
settings.opentherm.dhwPresent && settings.dhw.enable,
|
||||||
@@ -172,7 +182,8 @@ protected:
|
|||||||
settings.opentherm.nativeHeatingControl,
|
settings.opentherm.nativeHeatingControl,
|
||||||
heatingCh2Enabled,
|
heatingCh2Enabled,
|
||||||
settings.opentherm.summerWinterMode,
|
settings.opentherm.summerWinterMode,
|
||||||
settings.opentherm.dhwBlocking
|
settings.opentherm.dhwBlocking,
|
||||||
|
statusLb
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!CustomOpenTherm::isValidResponse(response)) {
|
if (!CustomOpenTherm::isValidResponse(response)) {
|
||||||
@@ -336,6 +347,14 @@ protected:
|
|||||||
vars.sensors.faultCode = 0;
|
vars.sensors.faultCode = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Get diagnostic code (if necessary)
|
||||||
|
if (vars.states.fault || vars.states.diagnostic) {
|
||||||
|
updateDiagCode();
|
||||||
|
|
||||||
|
} else if (vars.sensors.diagnosticCode != 0) {
|
||||||
|
vars.sensors.diagnosticCode = 0;
|
||||||
|
}
|
||||||
|
|
||||||
updatePressure();
|
updatePressure();
|
||||||
|
|
||||||
this->prevUpdateNonEssentialVars = millis();
|
this->prevUpdateNonEssentialVars = millis();
|
||||||
@@ -922,6 +941,7 @@ protected:
|
|||||||
));
|
));
|
||||||
|
|
||||||
if (!CustomOpenTherm::isValidResponse(response)) {
|
if (!CustomOpenTherm::isValidResponse(response)) {
|
||||||
|
vars.sensors.faultCode = 0;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -929,6 +949,22 @@ protected:
|
|||||||
return true;
|
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() {
|
bool updateModulationLevel() {
|
||||||
unsigned long response = this->instance->sendRequest(CustomOpenTherm::buildRequest(
|
unsigned long response = this->instance->sendRequest(CustomOpenTherm::buildRequest(
|
||||||
OpenThermRequestType::READ_DATA,
|
OpenThermRequestType::READ_DATA,
|
||||||
|
|||||||
@@ -582,6 +582,10 @@ protected:
|
|||||||
void loop() {
|
void loop() {
|
||||||
// web server
|
// web server
|
||||||
if (!this->stateWebServer() && (network->isApEnabled() || network->isConnected()) && millis() - this->webServerChangeState >= this->changeStateInterval) {
|
if (!this->stateWebServer() && (network->isApEnabled() || network->isConnected()) && millis() - this->webServerChangeState >= this->changeStateInterval) {
|
||||||
|
#ifdef ARDUINO_ARCH_ESP32
|
||||||
|
this->delay(250);
|
||||||
|
#endif
|
||||||
|
|
||||||
this->startWebServer();
|
this->startWebServer();
|
||||||
Log.straceln(FPSTR(L_PORTAL_WEBSERVER), F("Started: AP up or STA connected"));
|
Log.straceln(FPSTR(L_PORTAL_WEBSERVER), F("Started: AP up or STA connected"));
|
||||||
|
|
||||||
|
|||||||
@@ -63,6 +63,7 @@ struct Settings {
|
|||||||
bool modulationSyncWithHeating = false;
|
bool modulationSyncWithHeating = false;
|
||||||
bool getMinMaxTemp = true;
|
bool getMinMaxTemp = true;
|
||||||
bool nativeHeatingControl = false;
|
bool nativeHeatingControl = false;
|
||||||
|
bool immergasFix = false;
|
||||||
} opentherm;
|
} opentherm;
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
@@ -167,6 +168,7 @@ struct Variables {
|
|||||||
float pressure = 0.0f;
|
float pressure = 0.0f;
|
||||||
float dhwFlowRate = 0.0f;
|
float dhwFlowRate = 0.0f;
|
||||||
byte faultCode = 0;
|
byte faultCode = 0;
|
||||||
|
unsigned short diagnosticCode = 0;
|
||||||
int8_t rssi = 0;
|
int8_t rssi = 0;
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
|
|||||||
11
src/utils.h
11
src/utils.h
@@ -354,6 +354,7 @@ void settingsToJson(const Settings& src, JsonVariant dst, bool safe = false) {
|
|||||||
dst["opentherm"]["modulationSyncWithHeating"] = src.opentherm.modulationSyncWithHeating;
|
dst["opentherm"]["modulationSyncWithHeating"] = src.opentherm.modulationSyncWithHeating;
|
||||||
dst["opentherm"]["getMinMaxTemp"] = src.opentherm.getMinMaxTemp;
|
dst["opentherm"]["getMinMaxTemp"] = src.opentherm.getMinMaxTemp;
|
||||||
dst["opentherm"]["nativeHeatingControl"] = src.opentherm.nativeHeatingControl;
|
dst["opentherm"]["nativeHeatingControl"] = src.opentherm.nativeHeatingControl;
|
||||||
|
dst["opentherm"]["immergasFix"] = src.opentherm.immergasFix;
|
||||||
|
|
||||||
dst["mqtt"]["enable"] = src.mqtt.enable;
|
dst["mqtt"]["enable"] = src.mqtt.enable;
|
||||||
dst["mqtt"]["server"] = src.mqtt.server;
|
dst["mqtt"]["server"] = src.mqtt.server;
|
||||||
@@ -800,6 +801,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
|
// mqtt
|
||||||
if (src["mqtt"]["enable"].is<bool>()) {
|
if (src["mqtt"]["enable"].is<bool>()) {
|
||||||
@@ -1497,6 +1507,7 @@ void varsToJson(const Variables& src, JsonVariant dst) {
|
|||||||
dst["sensors"]["pressure"] = roundd(src.sensors.pressure, 2);
|
dst["sensors"]["pressure"] = roundd(src.sensors.pressure, 2);
|
||||||
dst["sensors"]["dhwFlowRate"] = roundd(src.sensors.dhwFlowRate, 2);
|
dst["sensors"]["dhwFlowRate"] = roundd(src.sensors.dhwFlowRate, 2);
|
||||||
dst["sensors"]["faultCode"] = src.sensors.faultCode;
|
dst["sensors"]["faultCode"] = src.sensors.faultCode;
|
||||||
|
dst["sensors"]["diagnosticCode"] = src.sensors.diagnosticCode;
|
||||||
dst["sensors"]["rssi"] = src.sensors.rssi;
|
dst["sensors"]["rssi"] = src.sensors.rssi;
|
||||||
dst["sensors"]["uptime"] = millis() / 1000ul;
|
dst["sensors"]["uptime"] = millis() / 1000ul;
|
||||||
dst["sensors"]["outdoor"]["connected"] = src.sensors.outdoor.connected;
|
dst["sensors"]["outdoor"]["connected"] = src.sensors.outdoor.connected;
|
||||||
|
|||||||
@@ -100,6 +100,7 @@
|
|||||||
"pressure": "Pressure",
|
"pressure": "Pressure",
|
||||||
"dhwFlowRate": "DHW flow rate",
|
"dhwFlowRate": "DHW flow rate",
|
||||||
"faultCode": "Fault code",
|
"faultCode": "Fault code",
|
||||||
|
"diagCode": "Diagnostic code",
|
||||||
"indoorTemp": "Indoor temp",
|
"indoorTemp": "Indoor temp",
|
||||||
"outdoorTemp": "Outdoor temp",
|
"outdoorTemp": "Outdoor temp",
|
||||||
"heatingTemp": "Heating temp",
|
"heatingTemp": "Heating temp",
|
||||||
@@ -175,7 +176,8 @@
|
|||||||
"enable": "Enable",
|
"enable": "Enable",
|
||||||
"note": {
|
"note": {
|
||||||
"restart": "After changing these settings, the device must be restarted for the changes to take effect.",
|
"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": {
|
"temp": {
|
||||||
@@ -212,7 +214,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
"heating": {
|
"heating": {
|
||||||
"hyst": "Hysteresis",
|
"hyst": "Hysteresis <small>(in degrees)</small>",
|
||||||
"maxMod": "Max modulation level"
|
"maxMod": "Max modulation level"
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -268,7 +270,8 @@
|
|||||||
"dhwToCh2": "Duplicate DHW to CH2",
|
"dhwToCh2": "Duplicate DHW to CH2",
|
||||||
"dhwBlocking": "DHW blocking",
|
"dhwBlocking": "DHW blocking",
|
||||||
"modulationSyncWithHeating": "Sync modulation with heating",
|
"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": {
|
"faultState": {
|
||||||
@@ -299,14 +302,11 @@
|
|||||||
"boiler": "From boiler via OpenTherm",
|
"boiler": "From boiler via OpenTherm",
|
||||||
"manual": "Manual via MQTT/API",
|
"manual": "Manual via MQTT/API",
|
||||||
"ext": "External (DS18B20)",
|
"ext": "External (DS18B20)",
|
||||||
"ble": "BLE device <i>(ONLY for some ESP32 which support BLE)</i>"
|
"ble": "BLE device"
|
||||||
},
|
},
|
||||||
"gpio": "GPIO",
|
"gpio": "GPIO",
|
||||||
"offset": "Temp offset <small>(calibration)</small>",
|
"offset": "Temp offset <small>(calibration)</small>",
|
||||||
"bleAddress": {
|
"bleAddress": "BLE device MAC address"
|
||||||
"title": "BLE address",
|
|
||||||
"note": "ONLY for some ESP32 which support BLE"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
"extPump": {
|
"extPump": {
|
||||||
|
|||||||
@@ -100,6 +100,7 @@
|
|||||||
"pressure": "Давление",
|
"pressure": "Давление",
|
||||||
"dhwFlowRate": "Расход ГВС",
|
"dhwFlowRate": "Расход ГВС",
|
||||||
"faultCode": "Код ошибки",
|
"faultCode": "Код ошибки",
|
||||||
|
"diagCode": "Диагностический код",
|
||||||
"indoorTemp": "Внутренняя темп.",
|
"indoorTemp": "Внутренняя темп.",
|
||||||
"outdoorTemp": "Наружная темп.",
|
"outdoorTemp": "Наружная темп.",
|
||||||
"heatingTemp": "Темп. отопления",
|
"heatingTemp": "Темп. отопления",
|
||||||
@@ -175,7 +176,8 @@
|
|||||||
"enable": "Вкл",
|
"enable": "Вкл",
|
||||||
"note": {
|
"note": {
|
||||||
"restart": "После изменения этих настроек устройство необходимо перезагрузить, чтобы изменения вступили в силу.",
|
"restart": "После изменения этих настроек устройство необходимо перезагрузить, чтобы изменения вступили в силу.",
|
||||||
"blankNotUse": "пусто - не использовать"
|
"blankNotUse": "пусто - не использовать",
|
||||||
|
"bleDevice": "BLE устройство можно использовать <u>только</u> с некоторыми платами ESP32, которые поддерживают BLE!"
|
||||||
},
|
},
|
||||||
|
|
||||||
"temp": {
|
"temp": {
|
||||||
@@ -212,7 +214,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
"heating": {
|
"heating": {
|
||||||
"hyst": "Гистерезис",
|
"hyst": "Гистерезис <small>(в градусах)</small>",
|
||||||
"maxMod": "Макс. уровень модуляции"
|
"maxMod": "Макс. уровень модуляции"
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -251,7 +253,7 @@
|
|||||||
"p": "Коэффициент P",
|
"p": "Коэффициент P",
|
||||||
"i": "Коэффициент I",
|
"i": "Коэффициент I",
|
||||||
"d": "Коэффициент D",
|
"d": "Коэффициент D",
|
||||||
"dt": "DT <small>в секундах</small>"
|
"dt": "DT <small>(сек)</small>"
|
||||||
},
|
},
|
||||||
|
|
||||||
"ot": {
|
"ot": {
|
||||||
@@ -268,7 +270,8 @@
|
|||||||
"dhwToCh2": "Дублировать параметры ГВС в канал 2",
|
"dhwToCh2": "Дублировать параметры ГВС в канал 2",
|
||||||
"dhwBlocking": "DHW blocking",
|
"dhwBlocking": "DHW blocking",
|
||||||
"modulationSyncWithHeating": "Синхронизировать модуляцию с отоплением",
|
"modulationSyncWithHeating": "Синхронизировать модуляцию с отоплением",
|
||||||
"getMinMaxTemp": "Получать мин. и макс. температуру от котла"
|
"getMinMaxTemp": "Получать мин. и макс. температуру от котла",
|
||||||
|
"immergasFix": "Фикс для котлов Immergas"
|
||||||
},
|
},
|
||||||
|
|
||||||
"faultState": {
|
"faultState": {
|
||||||
@@ -279,7 +282,7 @@
|
|||||||
|
|
||||||
"nativeHeating": {
|
"nativeHeating": {
|
||||||
"title": "Передать управление отоплением котлу",
|
"title": "Передать управление отоплением котлу",
|
||||||
"note": "Работает <u>ТОЛЬКО</u> если котел требует и принимает целевую температуру в помещении и сам регулирует температуру теплоносителя на основе встроенного режима кривых. Несовместимо с ПИД и ПЗА, а также с гистерезисом встроенного ПО."
|
"note": "Работает <u>ТОЛЬКО</u> если котел требует и принимает целевую температуру в помещении и сам регулирует температуру теплоносителя на основе встроенного режима кривых. Несовместимо с ПИД, ПЗА и гистерезисом."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -290,7 +293,7 @@
|
|||||||
"user": "Имя пользователя",
|
"user": "Имя пользователя",
|
||||||
"password": "Пароль",
|
"password": "Пароль",
|
||||||
"prefix": "Префикс",
|
"prefix": "Префикс",
|
||||||
"interval": "Интервал публикации (в секундах)"
|
"interval": "Интервал публикации <small>(сек)</small>"
|
||||||
},
|
},
|
||||||
|
|
||||||
"tempSensor": {
|
"tempSensor": {
|
||||||
@@ -299,14 +302,11 @@
|
|||||||
"boiler": "От котла через OpenTherm",
|
"boiler": "От котла через OpenTherm",
|
||||||
"manual": "Вручную через MQTT/API",
|
"manual": "Вручную через MQTT/API",
|
||||||
"ext": "Внешний датчик (DS18B20)",
|
"ext": "Внешний датчик (DS18B20)",
|
||||||
"ble": "BLE устройство <i>(ТОЛЬКО для некоторых плат ESP32 с поддержкой BLE)</i>"
|
"ble": "BLE устройство"
|
||||||
},
|
},
|
||||||
"gpio": "GPIO",
|
"gpio": "GPIO",
|
||||||
"offset": "Смещение температуры <small>(калибровка)</small>",
|
"offset": "Смещение температуры <small>(калибровка)</small>",
|
||||||
"bleAddress": {
|
"bleAddress": "MAC адрес BLE устройства"
|
||||||
"title": "BLE адрес",
|
|
||||||
"note": "ТОЛЬКО для некоторых плат ESP32 с поддержкой BLE"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
"extPump": {
|
"extPump": {
|
||||||
|
|||||||
@@ -162,6 +162,10 @@
|
|||||||
<th scope="row" data-i18n>dashboard.state.faultCode</th>
|
<th scope="row" data-i18n>dashboard.state.faultCode</th>
|
||||||
<td><b id="ot-fault-code"></b></td>
|
<td><b id="ot-fault-code"></b></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row" data-i18n>dashboard.state.diagCode</th>
|
||||||
|
<td><b id="ot-diag-code"></b></td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row" data-i18n>dashboard.state.indoorTemp</th>
|
<th scope="row" data-i18n>dashboard.state.indoorTemp</th>
|
||||||
<td><b id="indoor-temp"></b> <span class="temp-unit"></span></td>
|
<td><b id="indoor-temp"></b> <span class="temp-unit"></span></td>
|
||||||
@@ -430,7 +434,18 @@
|
|||||||
setValue('#ot-modulation', result.sensors.modulation);
|
setValue('#ot-modulation', result.sensors.modulation);
|
||||||
setValue('#ot-pressure', result.sensors.pressure);
|
setValue('#ot-pressure', result.sensors.pressure);
|
||||||
setValue('#ot-dhw-flow-rate', result.sensors.dhwFlowRate);
|
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('#indoor-temp', result.temperatures.indoor);
|
||||||
setValue('#outdoor-temp', result.temperatures.outdoor);
|
setValue('#outdoor-temp', result.temperatures.outdoor);
|
||||||
|
|||||||
@@ -443,6 +443,11 @@
|
|||||||
<span data-i18n>settings.ot.options.getMinMaxTemp</span>
|
<span data-i18n>settings.ot.options.getMinMaxTemp</span>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
|
<label for="opentherm-immergas-fix"></label>
|
||||||
|
<input type="checkbox" id="opentherm-immergas-fix" name="opentherm[immergasFix]" value="true">
|
||||||
|
<span data-i18n>settings.ot.options.immergasFix</span>
|
||||||
|
</label>
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<label for="opentherm-fault-state-gpio">
|
<label for="opentherm-fault-state-gpio">
|
||||||
@@ -561,24 +566,27 @@
|
|||||||
</label>
|
</label>
|
||||||
</fieldset>
|
</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">
|
<div class="grid">
|
||||||
<label for="outdoor-sensor-offset">
|
<label for="outdoor-sensor-gpio">
|
||||||
<span data-i18n>settings.tempSensor.offset</span>
|
<span data-i18n>settings.tempSensor.gpio</span>
|
||||||
<input type="number" inputmode="numeric" id="outdoor-sensor-offset" name="sensors[outdoor][offset]" min="-10" max="10" step="0.01" required>
|
<input type="number" inputmode="numeric" id="outdoor-sensor-gpio" name="sensors[outdoor][gpio]" min="0" max="254" step="1">
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label for="outdoor-sensor-ble-addresss">
|
<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}">
|
<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>
|
</label>
|
||||||
</div>
|
</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>
|
<button type="submit" data-i18n>button.save</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@@ -610,24 +618,27 @@
|
|||||||
</label>
|
</label>
|
||||||
</fieldset>
|
</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">
|
<div class="grid">
|
||||||
<label for="indoor-sensor-offset">
|
<label for="indoor-sensor-gpio">
|
||||||
<span data-i18n>settings.tempSensor.offset</span>
|
<span data-i18n>settings.tempSensor.gpio</span>
|
||||||
<input type="number" inputmode="numeric" id="indoor-sensor-offset" name="sensors[indoor][offset]" min="-10" max="10" step="0.01" required>
|
<input type="number" inputmode="numeric" id="indoor-sensor-gpio" name="sensors[indoor][gpio]" min="0" max="254" step="1">
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label for="indoor-sensor-ble-addresss">
|
<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}">
|
<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>
|
</label>
|
||||||
</div>
|
</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>
|
<button type="submit" data-i18n>button.save</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@@ -730,6 +741,7 @@
|
|||||||
setCheckboxValue('#opentherm-sync-modulation-with-heating', data.opentherm.modulationSyncWithHeating);
|
setCheckboxValue('#opentherm-sync-modulation-with-heating', data.opentherm.modulationSyncWithHeating);
|
||||||
setCheckboxValue('#opentherm-get-min-max-temp', data.opentherm.getMinMaxTemp);
|
setCheckboxValue('#opentherm-get-min-max-temp', data.opentherm.getMinMaxTemp);
|
||||||
setCheckboxValue('#opentherm-native-heating-control', data.opentherm.nativeHeatingControl);
|
setCheckboxValue('#opentherm-native-heating-control', data.opentherm.nativeHeatingControl);
|
||||||
|
setCheckboxValue('#opentherm-immergas-fix', data.opentherm.immergasFix);
|
||||||
setBusy('#opentherm-settings-busy', '#opentherm-settings', false);
|
setBusy('#opentherm-settings-busy', '#opentherm-settings', false);
|
||||||
|
|
||||||
// MQTT
|
// MQTT
|
||||||
|
|||||||
@@ -609,7 +609,7 @@ function memberIdToVendor(memberId) {
|
|||||||
27: "Baxi",
|
27: "Baxi",
|
||||||
29: "Itho Daalderop",
|
29: "Itho Daalderop",
|
||||||
33: "Viessmann",
|
33: "Viessmann",
|
||||||
41: "Italtherm",
|
41: "Italtherm/Radiant",
|
||||||
56: "Baxi Luna Duo-Tec",
|
56: "Baxi Luna Duo-Tec",
|
||||||
131: "Nefit",
|
131: "Nefit",
|
||||||
148: "Navien",
|
148: "Navien",
|
||||||
@@ -665,4 +665,13 @@ function form2json(data, noCastItems = []) {
|
|||||||
|
|
||||||
let object = Array.from(data).reduce(method, {});
|
let object = Array.from(data).reduce(method, {});
|
||||||
return JSON.stringify(object);
|
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