added DHW flow rate from OT

This commit is contained in:
Yurii
2023-11-23 04:41:39 +03:00
parent e82d47e1dc
commit 92a2cb9d56
4 changed files with 38 additions and 1 deletions

View File

@@ -57,7 +57,7 @@ protected:
bool heatingCh2Enabled = settings.opentherm.heatingCh2Enabled;
if (settings.opentherm.heatingCh1ToCh2) {
heatingCh2Enabled = heatingEnabled;
} else if (settings.opentherm.dhwToCh2) {
heatingCh2Enabled = settings.opentherm.dhwPresent && settings.dhw.enable;
}
@@ -180,8 +180,10 @@ protected:
if (settings.opentherm.dhwPresent) {
updateDHWTemp();
updateDHWFlowRate();
} else {
vars.temperatures.dhw = 0;
vars.sensors.dhwFlowRate = 0.0f;
}
updateHeatingTemp();
@@ -509,6 +511,16 @@ protected:
return true;
}
bool updateDHWFlowRate() {
unsigned long response = ot->sendRequest(ot->buildRequest(OpenThermMessageType::READ, OpenThermMessageID::DHWFlowRate, 0));
if (!ot->isValidResponse(response)) {
return false;
}
vars.sensors.dhwFlowRate = ot->getFloat(response);
return true;
}
bool updateFaultCode() {
unsigned long response = ot->sendRequest(ot->buildRequest(OpenThermRequestType::READ, OpenThermMessageID::ASFflags, 0));