mirror of
https://github.com/Laxilef/OTGateway.git
synced 2025-12-27 02:23:36 +05:00
Compare commits
8 Commits
43fd095714
...
1.5.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7efcbaa57e | ||
|
|
43c065b97a | ||
|
|
5c1e967fdc | ||
|
|
105a79f72c | ||
|
|
50280f6db3 | ||
|
|
c97e50669c | ||
|
|
1eb10563ed | ||
|
|
f4af237472 |
@@ -82,3 +82,6 @@ All available information and instructions can be found in the wiki:
|
||||
## Debug
|
||||
To display DEBUG messages you must enable debug in settings (switch is disabled by default).
|
||||
You can connect via Telnet to read messages. IP: ESP8266 ip, port: 23
|
||||
|
||||
___
|
||||
This project is tested with BrowserStack.
|
||||
|
||||
@@ -14,7 +14,7 @@ extra_configs = secrets.default.ini
|
||||
core_dir = .pio
|
||||
|
||||
[env]
|
||||
version = 1.5.0-alpha
|
||||
version = 1.5.0
|
||||
framework = arduino
|
||||
lib_deps =
|
||||
bblanchon/ArduinoJson@^7.1.0
|
||||
|
||||
@@ -218,13 +218,13 @@ protected:
|
||||
|
||||
// set outdoor sensor flag
|
||||
if (settings.equitherm.enabled) {
|
||||
if (!Sensors::existsConnectedSensorsByPurpose(Sensors::Purpose::INDOOR_TEMP)) {
|
||||
if (!Sensors::existsConnectedSensorsByPurpose(Sensors::Purpose::OUTDOOR_TEMP)) {
|
||||
emergencyFlags |= 0b00000001;
|
||||
}
|
||||
}
|
||||
|
||||
// set indoor sensor flags
|
||||
if (!Sensors::existsConnectedSensorsByPurpose(Sensors::Purpose::OUTDOOR_TEMP)) {
|
||||
if (!Sensors::existsConnectedSensorsByPurpose(Sensors::Purpose::INDOOR_TEMP)) {
|
||||
if (!settings.equitherm.enabled && settings.pid.enabled) {
|
||||
emergencyFlags |= 0b00000010;
|
||||
}
|
||||
|
||||
@@ -1038,25 +1038,27 @@ protected:
|
||||
}
|
||||
|
||||
// Set CH2 temp
|
||||
if (vars.master.ch2.enabled && !settings.opentherm.nativeHeatingControl) {
|
||||
// Converted target CH2 temp
|
||||
float convertedTemp = convertTemp(
|
||||
vars.master.ch2.targetTemp,
|
||||
settings.system.unitSystem,
|
||||
settings.opentherm.unitSystem
|
||||
);
|
||||
if (!settings.opentherm.nativeHeatingControl && vars.master.ch2.enabled) {
|
||||
if (settings.opentherm.heatingCh1ToCh2 || settings.opentherm.dhwToCh2) {
|
||||
// Converted target CH2 temp
|
||||
float convertedTemp = convertTemp(
|
||||
vars.master.ch2.targetTemp,
|
||||
settings.system.unitSystem,
|
||||
settings.opentherm.unitSystem
|
||||
);
|
||||
|
||||
if (this->needSetCh2Temp(convertedTemp)) {
|
||||
if (this->setCh2Temp(convertedTemp)) {
|
||||
this->ch2SetTempTime = millis();
|
||||
if (this->needSetCh2Temp(convertedTemp)) {
|
||||
if (this->setCh2Temp(convertedTemp)) {
|
||||
this->ch2SetTempTime = millis();
|
||||
|
||||
Log.sinfoln(
|
||||
FPSTR(L_OT_CH2), F("Set temp: %.2f (converted: %.2f, response: %.2f)"),
|
||||
vars.master.ch2.targetTemp, convertedTemp, vars.slave.ch2.targetTemp
|
||||
);
|
||||
Log.sinfoln(
|
||||
FPSTR(L_OT_CH2), F("Set temp: %.2f (converted: %.2f, response: %.2f)"),
|
||||
vars.master.ch2.targetTemp, convertedTemp, vars.slave.ch2.targetTemp
|
||||
);
|
||||
|
||||
} else {
|
||||
Log.swarningln(FPSTR(L_OT_CH2), F("Failed set temp"));
|
||||
} else {
|
||||
Log.swarningln(FPSTR(L_OT_CH2), F("Failed set temp"));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -509,6 +509,7 @@ protected:
|
||||
for (uint8_t sensorId = 0; sensorId <= Sensors::getMaxSensorId(); sensorId++) {
|
||||
if (detailed) {
|
||||
auto& sSensor = Sensors::settings[sensorId];
|
||||
doc[sensorId][FPSTR(S_ENABLED)] = sSensor.enabled;
|
||||
doc[sensorId][FPSTR(S_NAME)] = sSensor.name;
|
||||
doc[sensorId][FPSTR(S_PURPOSE)] = static_cast<uint8_t>(sSensor.purpose);
|
||||
sensorResultToJson(sensorId, doc[sensorId]);
|
||||
|
||||
@@ -561,7 +561,7 @@ protected:
|
||||
return;
|
||||
}
|
||||
|
||||
float rawTemp = ((pData[0] | (pData[1] << 8)) * 0.01f);
|
||||
float rawTemp = (pChar->getValue<int16_t>() * 0.01f);
|
||||
Log.straceln(
|
||||
FPSTR(L_SENSORS_BLE),
|
||||
F("Sensor #%hhu '%s': received temp: %.2f"),
|
||||
@@ -634,7 +634,7 @@ protected:
|
||||
return;
|
||||
}
|
||||
|
||||
float rawTemp = ((pData[0] | (pData[1] << 8)) * 0.1f);
|
||||
float rawTemp = (pChar->getValue<int16_t>() * 0.1f);
|
||||
Log.straceln(
|
||||
FPSTR(L_SENSORS_BLE),
|
||||
F("Sensor #%hhu '%s': received temp: %.2f"),
|
||||
@@ -719,7 +719,7 @@ protected:
|
||||
return;
|
||||
}
|
||||
|
||||
float rawHumidity = ((pData[0] | (pData[1] << 8)) * 0.01f);
|
||||
float rawHumidity = (pChar->getValue<uint16_t>() * 0.01f);
|
||||
Log.straceln(
|
||||
FPSTR(L_SENSORS_BLE),
|
||||
F("Sensor #%hhu '%s': received humidity: %.2f"),
|
||||
@@ -818,7 +818,7 @@ protected:
|
||||
return;
|
||||
}
|
||||
|
||||
uint8_t rawBattery = pData[0];
|
||||
auto rawBattery = pChar->getValue<uint8_t>();
|
||||
Log.straceln(
|
||||
FPSTR(L_SENSORS_BLE),
|
||||
F("Sensor #%hhu '%s': received battery: %.2f"),
|
||||
|
||||
@@ -581,12 +581,12 @@
|
||||
}
|
||||
|
||||
const sData = result[sensorId];
|
||||
if (sData.purpose == 255) {
|
||||
sensorNode.classList.add("hidden");
|
||||
if (!sData.enabled || sData.purpose == 255) {
|
||||
sensorNode.classList.toggle("hidden", true);
|
||||
continue;
|
||||
}
|
||||
|
||||
sensorNode.classList.remove("hidden");
|
||||
sensorNode.classList.toggle("hidden", false);
|
||||
|
||||
setStatus(
|
||||
".sStatus",
|
||||
|
||||
Reference in New Issue
Block a user