diff --git a/interface/src/i18n/de/index.ts b/interface/src/i18n/de/index.ts
index c1eb13bc5..801dd320d 100644
--- a/interface/src/i18n/de/index.ts
+++ b/interface/src/i18n/de/index.ts
@@ -127,6 +127,7 @@ const de: Translation = {
BYPASS_TOKEN: 'Zugriffstoken-Autorisierung bei API-Aufrufen umgehen',
READONLY: 'Nur-Lese-Modus aktivieren (blockiert alle ausgehenden EMS Tx Write-Befehle)',
UNDERCLOCK_CPU: 'CPU-Geschwindigkeit untertakten',
+ HEATINGOFF: 'Boiler Start mit Heizung ausgeschaltet',
ENABLE_SHOWER_TIMER: 'Duschtimer aktivieren',
ENABLE_SHOWER_ALERT: 'Duschalarm aktivieren',
TRIGGER_TIME: 'Auslösezeit',
diff --git a/interface/src/i18n/en/index.ts b/interface/src/i18n/en/index.ts
index 629fbdef3..f3fab604b 100644
--- a/interface/src/i18n/en/index.ts
+++ b/interface/src/i18n/en/index.ts
@@ -127,6 +127,7 @@ const en: Translation = {
BYPASS_TOKEN: 'Bypass Access Token authorization on API calls',
READONLY: 'Enable read-only mode (blocks all outgoing EMS Tx Write commands)',
UNDERCLOCK_CPU: 'Underclock CPU speed',
+ HEATINGOFF: 'Start boiler with forced heating off',
ENABLE_SHOWER_TIMER: 'Enable Shower Timer',
ENABLE_SHOWER_ALERT: 'Enable Shower Alert',
TRIGGER_TIME: 'Trigger Time',
diff --git a/interface/src/i18n/fr/index.ts b/interface/src/i18n/fr/index.ts
index bf1335247..d6a38dd17 100644
--- a/interface/src/i18n/fr/index.ts
+++ b/interface/src/i18n/fr/index.ts
@@ -127,6 +127,7 @@ const fr: Translation = {
BYPASS_TOKEN: 'Contourner l\'autorisation du jeton d\'accès sur les appels API',
READONLY: 'Activer le mode lecture uniquement (bloque toutes les commandes EMS sortantes en écriture Tx)',
UNDERCLOCK_CPU: 'Underclock du CPU',
+ HEATINGOFF: 'Start boiler with forced heating off',
ENABLE_SHOWER_TIMER: 'Activer la minuterie de la douche',
ENABLE_SHOWER_ALERT: 'Activer les alertes de durée de douche',
TRIGGER_TIME: 'Durée avant déclenchement',
diff --git a/interface/src/i18n/nl/index.ts b/interface/src/i18n/nl/index.ts
index 9eb69397a..0d7b7820b 100644
--- a/interface/src/i18n/nl/index.ts
+++ b/interface/src/i18n/nl/index.ts
@@ -127,6 +127,7 @@ const nl: Translation = {
BYPASS_TOKEN: 'API Access Token authenticatie uitschakelen',
READONLY: 'Activeer read-only modus (blokkeert alle outgaande EMS Tx schrijf commandos)',
UNDERCLOCK_CPU: 'Underclock CPU snelheid',
+ HEATINGOFF: 'Start boiler with forced heating off',
ENABLE_SHOWER_TIMER: 'Activeer Douche Timer (tijdmeting)',
ENABLE_SHOWER_ALERT: 'Activeer Douchemelding',
TRIGGER_TIME: 'Trigger tijd',
diff --git a/interface/src/i18n/no/index.ts b/interface/src/i18n/no/index.ts
index 65d843130..81f10aee8 100644
--- a/interface/src/i18n/no/index.ts
+++ b/interface/src/i18n/no/index.ts
@@ -127,6 +127,7 @@ const no: Translation = {
BYPASS_TOKEN: 'Utelat Aksess Token authorisering av API kall',
READONLY: 'Aktiver read-only modus (blokker all EMS Tx Skriving)',
UNDERCLOCK_CPU: 'Underklokking av prosessorhastighet',
+ HEATINGOFF: 'Start boiler with forced heating off',
ENABLE_SHOWER_TIMER: 'Aktiver Dusjtimer',
ENABLE_SHOWER_ALERT: 'Aktiver Dusj-varsling',
TRIGGER_TIME: 'Aktiveringstid',
diff --git a/interface/src/i18n/pl/index.ts b/interface/src/i18n/pl/index.ts
index 2689e77bb..f402bd94c 100644
--- a/interface/src/i18n/pl/index.ts
+++ b/interface/src/i18n/pl/index.ts
@@ -127,6 +127,7 @@ const pl: BaseTranslation = {
BYPASS_TOKEN: 'Pomiń autoryzację tokenem w wywołaniach API',
READONLY: 'Tryb pracy "tylko do odczytu" (blokuje wszystkie komendy zapisu na magistralę EMS)',
UNDERCLOCK_CPU: 'Obniż taktowanie CPU',
+ HEATINGOFF: 'Start boiler with forced heating off',
ENABLE_SHOWER_TIMER: 'Aktywuj minutnik prysznica',
ENABLE_SHOWER_ALERT: 'Aktywuj alarm prysznica',
TRIGGER_TIME: 'Wyzwalaj po czasie',
diff --git a/interface/src/i18n/sv/index.ts b/interface/src/i18n/sv/index.ts
index 65a4a4a05..66ea52818 100644
--- a/interface/src/i18n/sv/index.ts
+++ b/interface/src/i18n/sv/index.ts
@@ -127,6 +127,7 @@ const sv: Translation = {
BYPASS_TOKEN: 'Inaktivera Token-autensiering för API-anrop',
READONLY: 'Aktivera read-only (blockerar alla utgående skrivkommandon mot EMS-bussen)',
UNDERCLOCK_CPU: 'Nedklocka Processorhastighet',
+ HEATINGOFF: 'Start boiler with forced heating off',
ENABLE_SHOWER_TIMER: 'Aktivera Dusch-timer',
ENABLE_SHOWER_ALERT: 'Aktivera Dusch-varning',
TRIGGER_TIME: 'Aktiveringstid',
diff --git a/interface/src/project/SettingsApplication.tsx b/interface/src/project/SettingsApplication.tsx
index b72f511cf..d9f525775 100644
--- a/interface/src/project/SettingsApplication.tsx
+++ b/interface/src/project/SettingsApplication.tsx
@@ -408,6 +408,11 @@ const SettingsApplication: FC = () => {
label={LL.UNDERCLOCK_CPU()}
disabled={saving}
/>
+ }
+ label={LL.HEATINGOFF()}
+ disabled={saving}
+ />
}
diff --git a/interface/src/project/types.ts b/interface/src/project/types.ts
index 9480a2f4a..9ad09fbe6 100644
--- a/interface/src/project/types.ts
+++ b/interface/src/project/types.ts
@@ -7,6 +7,7 @@ export interface Settings {
syslog_mark_interval: number;
syslog_host: string;
syslog_port: number;
+ boiler_heatingoff: boolean;
shower_timer: boolean;
shower_alert: boolean;
shower_alert_coldshot: number;
diff --git a/src/default_settings.h b/src/default_settings.h
index 83e426435..8c8f78559 100644
--- a/src/default_settings.h
+++ b/src/default_settings.h
@@ -61,6 +61,10 @@
#define EMSESP_DEFAULT_TRACELOG_RAW false
#endif
+#ifndef EMSESP_DEFAULT_BOILER_HEATINGOFF
+#define EMSESP_DEFAULT_BOILER_HEATINGOFF false
+#endif
+
#ifndef EMSESP_DEFAULT_SHOWER_TIMER
#define EMSESP_DEFAULT_SHOWER_TIMER false
#endif
diff --git a/src/devices/boiler.cpp b/src/devices/boiler.cpp
index e32c47a54..4d7b8d1e6 100644
--- a/src/devices/boiler.cpp
+++ b/src/devices/boiler.cpp
@@ -881,8 +881,9 @@ void Boiler::check_active(const bool force) {
EMSESP::tap_water_active(b); // let EMS-ESP know, used in the Shower class
}
- if (forceHeatingOff_ == EMS_VALUE_BOOL_NOTSET) {
- forceHeatingOff_ = selFlowTemp_ == 0 ? EMS_VALUE_BOOL_ON : EMS_VALUE_BOOL_OFF;
+ if (!Helpers::hasValue(forceHeatingOff_, true)) {
+ EMSESP::webSettingsService.read([&](WebSettings & settings) { forceHeatingOff_ = (settings.boiler_heatingoff || selFlowTemp_ == 0) ? 1 : 0; });
+ has_update(&forceHeatingOff_);
}
}
@@ -1085,9 +1086,9 @@ void Boiler::process_UBAMonitorSlow(std::shared_ptr telegram) {
has_update(telegram, heatWorkMin_, 19, 3); // force to 3 bytes
has_update(telegram, heatStarts_, 22, 3); // force to 3 bytes
- if (forceHeatingOff_ == EMS_VALUE_BOOL_ON) {
- uint8_t data[4] = {0, 0, 0, 0};
- write_command(0x1A, 0, data, 4, 0);
+ if (forceHeatingOff_ == EMS_VALUE_BOOL_ON && telegram->dest == 0) {
+ uint8_t data[] = {0, 0, 0, 0};
+ write_command(EMS_TYPE_UBASetPoints, 0, data, sizeof(data), 0);
}
}
@@ -1120,9 +1121,9 @@ void Boiler::process_UBAMonitorSlowPlus(std::shared_ptr telegram
has_update(telegram, heatingPumpMod_, 25);
// temperature measurements at 4, see #620
- if (forceHeatingOff_ == EMS_VALUE_BOOL_ON) {
- uint8_t data[4] = {0, 0, 0, 0};
- write_command(0x1A, 0, data, 4, 0);
+ if (forceHeatingOff_ == EMS_VALUE_BOOL_ON && telegram->dest == 0) {
+ uint8_t data[] = {0, 0, 0, 0};
+ write_command(EMS_TYPE_UBASetPoints, 0, data, sizeof(data), 0);
}
}
@@ -2599,6 +2600,10 @@ bool Boiler::set_forceHeatingOff(const char * value, const int8_t id) {
bool v;
if (Helpers::value2bool(value, v)) {
forceHeatingOff_ = v;
+ if (!v) {
+ uint8_t data[] = {heatingTemp_, 0x64};
+ write_command(EMS_TYPE_UBASetPoints, 0, data, sizeof(data), 0);
+ }
return true;
}
return false;
diff --git a/src/web/WebSettingsService.cpp b/src/web/WebSettingsService.cpp
index 717468e20..7fa82880f 100644
--- a/src/web/WebSettingsService.cpp
+++ b/src/web/WebSettingsService.cpp
@@ -47,6 +47,7 @@ void WebSettings::read(WebSettings & settings, JsonObject & root) {
root["syslog_mark_interval"] = settings.syslog_mark_interval;
root["syslog_host"] = settings.syslog_host;
root["syslog_port"] = settings.syslog_port;
+ root["boiler_heatingoff"] = settings.boiler_heatingoff;
root["shower_timer"] = settings.shower_timer;
root["shower_alert"] = settings.shower_alert;
root["shower_alert_coldshot"] = settings.shower_alert_coldshot;
@@ -258,14 +259,15 @@ StateUpdateResult WebSettings::update(JsonObject & root, WebSettings & settings)
//
// without checks or necessary restarts...
//
- settings.locale = root["locale"] | EMSESP_DEFAULT_LOCALE;
+ settings.locale = root["locale"] | EMSESP_DEFAULT_LOCALE;
EMSESP::system_.locale(settings.locale);
settings.trace_raw = root["trace_raw"] | EMSESP_DEFAULT_TRACELOG_RAW;
EMSESP::trace_raw(settings.trace_raw);
- settings.notoken_api = root["notoken_api"] | EMSESP_DEFAULT_NOTOKEN_API;
- settings.solar_maxflow = root["solar_maxflow"] | EMSESP_DEFAULT_SOLAR_MAXFLOW;
+ settings.notoken_api = root["notoken_api"] | EMSESP_DEFAULT_NOTOKEN_API;
+ settings.solar_maxflow = root["solar_maxflow"] | EMSESP_DEFAULT_SOLAR_MAXFLOW;
+ settings.boiler_heatingoff = root["boiler_heatingoff"] | EMSESP_DEFAULT_BOILER_HEATINGOFF;
settings.fahrenheit = root["fahrenheit"] | false;
EMSESP::system_.fahrenheit(settings.fahrenheit);
diff --git a/src/web/WebSettingsService.h b/src/web/WebSettingsService.h
index 5a08207bc..942037ded 100644
--- a/src/web/WebSettingsService.h
+++ b/src/web/WebSettingsService.h
@@ -33,6 +33,7 @@ class WebSettings {
String locale;
uint8_t tx_mode;
uint8_t ems_bus_id;
+ bool boiler_heatingoff;
bool shower_timer;
bool shower_alert;
uint8_t shower_alert_trigger;