7 Commits

Author SHA1 Message Date
Yurii
43c065b97a Merge branch 'master' into 1.5.0-dev 2024-12-04 07:56:19 +03:00
Yurii
5c1e967fdc refactor: improved display of sensors on Dashboard 2024-12-04 06:09:20 +03:00
Yurii
105a79f72c refactor: optimization of OT requests for CH2 2024-12-04 05:55:01 +03:00
Yurii
50280f6db3 fix: negative temperature values from BLE devices 2024-12-04 05:36:04 +03:00
Yurii
c97e50669c fix: typo in purpose of sensors for emergency mode 2024-12-04 05:35:19 +03:00
Yurii
1eb10563ed chore: update readme 2024-11-30 23:58:54 +03:00
Yurii
f4af237472 chore: bump version to 1.4.6 2024-11-16 14:19:40 +03:00
7 changed files with 32 additions and 26 deletions

View File

@@ -82,3 +82,6 @@ All available information and instructions can be found in the wiki:
## Debug ## Debug
To display DEBUG messages you must enable debug in settings (switch is disabled by default). 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 You can connect via Telnet to read messages. IP: ESP8266 ip, port: 23
___
This project is tested with BrowserStack.

View File

@@ -14,7 +14,7 @@ extra_configs = secrets.default.ini
core_dir = .pio core_dir = .pio
[env] [env]
version = 1.5.0-alpha version = 1.5.0
framework = arduino framework = arduino
lib_deps = lib_deps =
bblanchon/ArduinoJson@^7.1.0 bblanchon/ArduinoJson@^7.1.0

View File

@@ -218,13 +218,13 @@ protected:
// set outdoor sensor flag // set outdoor sensor flag
if (settings.equitherm.enabled) { if (settings.equitherm.enabled) {
if (!Sensors::existsConnectedSensorsByPurpose(Sensors::Purpose::INDOOR_TEMP)) { if (!Sensors::existsConnectedSensorsByPurpose(Sensors::Purpose::OUTDOOR_TEMP)) {
emergencyFlags |= 0b00000001; emergencyFlags |= 0b00000001;
} }
} }
// set indoor sensor flags // 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) { if (!settings.equitherm.enabled && settings.pid.enabled) {
emergencyFlags |= 0b00000010; emergencyFlags |= 0b00000010;
} }

View File

@@ -1038,7 +1038,8 @@ protected:
} }
// Set CH2 temp // Set CH2 temp
if (vars.master.ch2.enabled && !settings.opentherm.nativeHeatingControl) { if (!settings.opentherm.nativeHeatingControl && vars.master.ch2.enabled) {
if (settings.opentherm.heatingCh1ToCh2 || settings.opentherm.dhwToCh2) {
// Converted target CH2 temp // Converted target CH2 temp
float convertedTemp = convertTemp( float convertedTemp = convertTemp(
vars.master.ch2.targetTemp, vars.master.ch2.targetTemp,
@@ -1061,6 +1062,7 @@ protected:
} }
} }
} }
}
void initialize() { void initialize() {
// Not all boilers support these, only try once when the boiler becomes connected // Not all boilers support these, only try once when the boiler becomes connected

View File

@@ -509,6 +509,7 @@ protected:
for (uint8_t sensorId = 0; sensorId <= Sensors::getMaxSensorId(); sensorId++) { for (uint8_t sensorId = 0; sensorId <= Sensors::getMaxSensorId(); sensorId++) {
if (detailed) { if (detailed) {
auto& sSensor = Sensors::settings[sensorId]; auto& sSensor = Sensors::settings[sensorId];
doc[sensorId][FPSTR(S_ENABLED)] = sSensor.enabled;
doc[sensorId][FPSTR(S_NAME)] = sSensor.name; doc[sensorId][FPSTR(S_NAME)] = sSensor.name;
doc[sensorId][FPSTR(S_PURPOSE)] = static_cast<uint8_t>(sSensor.purpose); doc[sensorId][FPSTR(S_PURPOSE)] = static_cast<uint8_t>(sSensor.purpose);
sensorResultToJson(sensorId, doc[sensorId]); sensorResultToJson(sensorId, doc[sensorId]);

View File

@@ -561,7 +561,7 @@ protected:
return; return;
} }
float rawTemp = ((pData[0] | (pData[1] << 8)) * 0.01f); float rawTemp = (pChar->getValue<int16_t>() * 0.01f);
Log.straceln( Log.straceln(
FPSTR(L_SENSORS_BLE), FPSTR(L_SENSORS_BLE),
F("Sensor #%hhu '%s': received temp: %.2f"), F("Sensor #%hhu '%s': received temp: %.2f"),
@@ -634,7 +634,7 @@ protected:
return; return;
} }
float rawTemp = ((pData[0] | (pData[1] << 8)) * 0.1f); float rawTemp = (pChar->getValue<int16_t>() * 0.1f);
Log.straceln( Log.straceln(
FPSTR(L_SENSORS_BLE), FPSTR(L_SENSORS_BLE),
F("Sensor #%hhu '%s': received temp: %.2f"), F("Sensor #%hhu '%s': received temp: %.2f"),
@@ -719,7 +719,7 @@ protected:
return; return;
} }
float rawHumidity = ((pData[0] | (pData[1] << 8)) * 0.01f); float rawHumidity = (pChar->getValue<uint16_t>() * 0.01f);
Log.straceln( Log.straceln(
FPSTR(L_SENSORS_BLE), FPSTR(L_SENSORS_BLE),
F("Sensor #%hhu '%s': received humidity: %.2f"), F("Sensor #%hhu '%s': received humidity: %.2f"),
@@ -818,7 +818,7 @@ protected:
return; return;
} }
uint8_t rawBattery = pData[0]; auto rawBattery = pChar->getValue<uint8_t>();
Log.straceln( Log.straceln(
FPSTR(L_SENSORS_BLE), FPSTR(L_SENSORS_BLE),
F("Sensor #%hhu '%s': received battery: %.2f"), F("Sensor #%hhu '%s': received battery: %.2f"),

View File

@@ -581,12 +581,12 @@
} }
const sData = result[sensorId]; const sData = result[sensorId];
if (sData.purpose == 255) { if (!sData.enabled || sData.purpose == 255) {
sensorNode.classList.add("hidden"); sensorNode.classList.toggle("hidden", true);
continue; continue;
} }
sensorNode.classList.remove("hidden"); sensorNode.classList.toggle("hidden", false);
setStatus( setStatus(
".sStatus", ".sStatus",