mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2026-10-28 19:24:59 +00:00
add FR100/FR120 adaptation and gain factors
This commit is contained in:
@@ -14,6 +14,7 @@ aceotrope
|
||||
activehigh
|
||||
activelow
|
||||
adafruit
|
||||
adaptfactor
|
||||
adde
|
||||
adress
|
||||
ahsx
|
||||
@@ -446,6 +447,7 @@ fullscreen
|
||||
fulltopic
|
||||
funktion
|
||||
furtheron
|
||||
gainfactor
|
||||
gasmeter
|
||||
gasmeterheat
|
||||
genuino
|
||||
|
||||
@@ -790,6 +790,8 @@ MAKE_TRANSLATION(minflowtemp, "minflowtemp", "min flow temperature", "min. Vorla
|
||||
MAKE_TRANSLATION(maxflowtemp, "maxflowtemp", "max flow temperature", "max. Vorlauftemperatur", "Maximale aanvoertemperatuur", "Max. Flödestemperatur", "maksymalna temperatura zasilania", "maks turtemperatur", "température max flux", "maksimum akış sıcaklığı", "temperatura massima di mandata", "maximálna teplota prívodu", "vytápění maximální teplota")
|
||||
MAKE_TRANSLATION(roominfluence, "roominfluence", "room influence", "Raumeinfluss", "Ruimteinvloed", "Rumspåverkan", "wpływ pomieszczenia", "rominnflytelse", "influence pièce", "oda etkisi", "influenza della camera", "vplyv miestnosti", "vliv prostoru")
|
||||
MAKE_TRANSLATION(roominfl_factor, "roominflfactor", "room influence factor", "Raumeinflussfaktor", "Factor ruimteinvloed", "Rumspåverkansfaktor", "współczynnik wpływu pomieszczenia", "rominnflytelsesfaktor", "facteur d'influence pièce", "oda etkisi faktörü", "fattore influenza camera", "faktor vplyvu miestnosti", "ofset teploty prostoru")
|
||||
MAKE_TRANSLATION(adaptfactor, "adaptfactor", "adaptation factor", "Anpassungsfaktor", "aanpassingsfactor", "anpassningsfaktor", "współczynnik adaptacji", "tilpasningsfaktor", "facteur d'adaptation", "adaptasyon faktörü", "fattore di adattamento", "faktor prispôsobenia", "adaptační faktor")
|
||||
MAKE_TRANSLATION(gainfactor, "gainfactor", "gain factor", "Verstärkungsfaktor", "versterkingsfactor", "förstärkningsfaktor", "współczynnik wzmocnienia", "forsterkningsfaktor", "facteur de gain", "kazanç faktörü", "fattore di guadagno", "faktor zosilnenia", "zesilovací faktor")
|
||||
MAKE_TRANSLATION(curroominfl, "curroominfl", "current room influence", "aktueller Raumeinfluss", "Huidige ruimteinvloed", "Aktuell Rumspåverkan", "aktualny wpływ pomieszczenia", "gjeldende rominnflytelse", "influence actuelle pièce", "güncel oda etkisi", "fattore corrente influenza camera", "aktuálny vplyv miestnosti", "aktuální vliv místnosti")
|
||||
MAKE_TRANSLATION(nofrosttemp, "nofrosttemp", "nofrost temperature", "Frostschutztemperatur", "Temperatuur vorstbeveiliging", "Temperatur Frostskydd", "temperatura ochrony przed zamarzaniem", "frostbeskyttelsestemperatur", "température protection gel", "donma koruması sıcaklığı", "temperatura protezione antigelo", "nofrost teplota", "teplota proti zamrznutí")
|
||||
MAKE_TRANSLATION(targetflowtemp, "targetflowtemp", "target flow temperature", "berechnete Vorlauftemperatur", "Berekende aanvoertemperatuur", "Målvärde Flödestemperatur", "zadana temperatura zasilania", "målverdi turtemperatur", "température cible flux", "hedef akış sıcaklığı", "temperatura di mandata calcolata", "cieľová teplota prívodu", "cílová teplota přívodu")
|
||||
|
||||
+107
-30
@@ -908,9 +908,9 @@ void Thermostat::process_JunkersSet2(const std::shared_ptr<const Telegram> & tel
|
||||
return;
|
||||
}
|
||||
|
||||
has_update(telegram, hc->controlmode, 0); // 0-off, 1-unmixed-no-IPM, 2-unmixed-IPM, 3-mixed
|
||||
// 1 curve factor roomtemp
|
||||
// 2 curve factor heating
|
||||
has_update(telegram, hc->controlmode, 0); // 0-off, 1-unmixed-no-IPM, 2-unmixed-IPM, 3-mixed
|
||||
has_update(telegram, hc->adaptfactor, 1); // Anpassungsfaktor I, byte * 5 = %
|
||||
has_update(telegram, hc->gainfactor, 2); // Verstärkungsfaktor V, byte * 5 = %
|
||||
has_update(telegram, hc->maxflowtemp, 3); // degrees
|
||||
has_enumupdate(telegram, hc->mode, 4, 1); // 0 = nofrost, 1 = eco, 2 = heat, 3 = auto
|
||||
has_update(telegram, hc->nofrosttemp, 5); // is * 2
|
||||
@@ -3385,6 +3385,11 @@ bool Thermostat::set_roominfl_factor(const char * value, const int8_t id) {
|
||||
}
|
||||
|
||||
if (model() == EMSdevice::EMS_DEVICE_FLAG_JUNKERS) {
|
||||
// offset 6 is nighttemp on FR100/FR120
|
||||
if (has_flags(EMSdevice::EMS_DEVICE_FLAG_JUNKERS_OLD)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
write_command(set_typeids[hc->hc()], 6, (uint8_t)((val + 5) / 10));
|
||||
|
||||
} else {
|
||||
@@ -3401,6 +3406,11 @@ bool Thermostat::set_roominfl_mode(const char * value, const int8_t id) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// offset 7 is daytemp on FR100/FR120
|
||||
if (model() == EMSdevice::EMS_DEVICE_FLAG_JUNKERS && has_flags(EMSdevice::EMS_DEVICE_FLAG_JUNKERS_OLD)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
uint8_t val;
|
||||
if (!Helpers::value2enum(value, val, FL_(enum_roominfluence))) {
|
||||
return false;
|
||||
@@ -3411,6 +3421,32 @@ bool Thermostat::set_roominfl_mode(const char * value, const int8_t id) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// FR100/FR120 Anpassungsfaktor I (offset 1, 0..100%) and Verstärkungsfaktor V (offset 2, 40..100%).
|
||||
// The telegram byte is the percentage divided by 5.
|
||||
bool Thermostat::set_junkers_factor(const char * value, const int8_t id, const uint8_t offset, const int min_percent) {
|
||||
if (!has_flags(EMSdevice::EMS_DEVICE_FLAG_JUNKERS_OLD)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
auto hc = heating_circuit(id);
|
||||
if (hc == nullptr) {
|
||||
return false;
|
||||
}
|
||||
|
||||
float val;
|
||||
if (!Helpers::value2float(value, val)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
int percent = (int)((val + 2.0f) / 5.0f) * 5; // nearest 5%
|
||||
if (percent < min_percent || percent > 100) {
|
||||
return false;
|
||||
}
|
||||
|
||||
write_command(set_typeids[hc->hc()], offset, (uint8_t)(percent / 5), set_typeids[hc->hc()]);
|
||||
return true;
|
||||
}
|
||||
|
||||
// sets the thermostat working mode
|
||||
bool Thermostat::set_mode(const char * value, const int8_t id) {
|
||||
if ((value == nullptr) || (strlen(value) >= 20)) {
|
||||
@@ -3754,7 +3790,7 @@ bool Thermostat::set_heatup(const char * value, const int8_t id) {
|
||||
|
||||
uint8_t v;
|
||||
|
||||
if (!Helpers::value2enum(value, v, FL_(enum_heatup))) {
|
||||
if (has_flags(EMSdevice::EMS_DEVICE_FLAG_JUNKERS_OLD) || !Helpers::value2enum(value, v, FL_(enum_heatup))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -3947,7 +3983,7 @@ bool Thermostat::set_heatingtype(const char * value, const int8_t id) {
|
||||
|
||||
uint8_t set;
|
||||
if (model() == EMSdevice::EMS_DEVICE_FLAG_JUNKERS) {
|
||||
if (Helpers::value2enum(value, set, FL_(enum_heatingtype1))) {
|
||||
if (!has_flags(EMSdevice::EMS_DEVICE_FLAG_JUNKERS_OLD) && Helpers::value2enum(value, set, FL_(enum_heatingtype1))) {
|
||||
write_command(set_typeids[hc->hc()], 0, set, set_typeids[hc->hc()]);
|
||||
return true;
|
||||
}
|
||||
@@ -5790,7 +5826,8 @@ void Thermostat::register_device_values_hc(std::shared_ptr<Thermostat::HeatingCi
|
||||
FL_(nofrosttemp),
|
||||
DeviceValueUOM::DEGREES,
|
||||
MAKE_CF_CB(set_nofrosttemp));
|
||||
if (device_id() == 0x10) { // only master thermostats have control by remote
|
||||
// FR100/FR120 use 0x0179. Offset 1 is Anpassungsfaktor, not the remote-control byte.
|
||||
if (!has_flags(EMSdevice::EMS_DEVICE_FLAG_JUNKERS_OLD) && device_id() == 0x10) {
|
||||
register_device_value(tag, &hc->control, DeviceValueType::ENUM, FL_(enum_j_control), FL_(control), DeviceValueUOM::NONE, MAKE_CF_CB(set_control));
|
||||
}
|
||||
|
||||
@@ -5806,39 +5843,79 @@ void Thermostat::register_device_values_hc(std::shared_ptr<Thermostat::HeatingCi
|
||||
101);
|
||||
register_device_value(tag, &hc->targetflowtemp, DeviceValueType::UINT8, FL_(targetflowtemp), DeviceValueUOM::DEGREES);
|
||||
register_device_value(tag,
|
||||
&hc->summertemp,
|
||||
DeviceValueType::UINT8,
|
||||
DeviceValueNumOp::DV_NUMOP_DIV2,
|
||||
FL_(summertemp),
|
||||
DeviceValueUOM::DEGREES,
|
||||
MAKE_CF_CB(set_summertemp),
|
||||
9,
|
||||
25);
|
||||
register_device_value(tag, &hc->roomsensor, DeviceValueType::ENUM, FL_(enum_roomsensor), FL_(roomsensor), DeviceValueUOM::NONE, MAKE_CF_CB(set_roomsensor));
|
||||
register_device_value(tag, &hc->holidaymode, DeviceValueType::ENUM, FL_(enum_mode4), FL_(holidaymode), DeviceValueUOM::NONE, MAKE_CF_CB(set_holidaymode));
|
||||
&hc->holidaymode,
|
||||
DeviceValueType::ENUM,
|
||||
FL_(enum_mode4),
|
||||
FL_(holidaymode),
|
||||
DeviceValueUOM::NONE,
|
||||
MAKE_CF_CB(set_holidaymode));
|
||||
register_device_value(tag,
|
||||
&hc->switchonoptimization,
|
||||
DeviceValueType::BOOL,
|
||||
FL_(switchonoptimization),
|
||||
DeviceValueUOM::NONE,
|
||||
MAKE_CF_CB(set_switchonoptimization));
|
||||
register_device_value(tag, &hc->fastHeatup, DeviceValueType::ENUM, FL_(enum_heatup), FL_(heatup), DeviceValueUOM::NONE, MAKE_CF_CB(set_heatup));
|
||||
register_device_value(tag, &hc->minflowtemp, DeviceValueType::UINT8, FL_(minflowtemp), DeviceValueUOM::DEGREES, MAKE_CF_CB(set_minflowtemp), 5, 70);
|
||||
register_device_value(tag, &hc->maxflowtemp, DeviceValueType::UINT8, FL_(maxflowtemp), DeviceValueUOM::DEGREES, MAKE_CF_CB(set_maxflowtemp), 30, 90);
|
||||
register_device_value(tag, &hc->designtemp, DeviceValueType::UINT8, FL_(designtemp), DeviceValueUOM::DEGREES, MAKE_CF_CB(set_designtemp), 30, 90);
|
||||
register_device_value(
|
||||
tag, &hc->roominfluence, DeviceValueType::ENUM, FL_(enum_roominfluence), FL_(roominfluence), DeviceValueUOM::NONE, MAKE_CF_CB(set_roominfl_mode));
|
||||
register_device_value(tag,
|
||||
&hc->roominfl_factor,
|
||||
DeviceValueType::UINT8,
|
||||
DeviceValueNumOp::DV_NUMOP_MUL10,
|
||||
FL_(roominfl_factor),
|
||||
DeviceValueUOM::PERCENT,
|
||||
MAKE_CF_CB(set_roominfl_factor));
|
||||
register_device_value(
|
||||
tag, &hc->heatingtype, DeviceValueType::ENUM, FL_(enum_heatingtype1), FL_(heatingtype), DeviceValueUOM::NONE, MAKE_CF_CB(set_heatingtype));
|
||||
register_device_value(
|
||||
tag, &hc->controlmode, DeviceValueType::ENUM, FL_(enum_controlmode3), FL_(controlmode), DeviceValueUOM::NONE, MAKE_CF_CB(set_controlmode));
|
||||
if (has_flags(EMSdevice::EMS_DEVICE_FLAG_JUNKERS_OLD)) {
|
||||
// Fachmann menu: Anpassungsfaktor I 0..100%, Verstärkungsfaktor V 40..100%, both in steps of 5
|
||||
register_device_value(tag,
|
||||
&hc->adaptfactor,
|
||||
DeviceValueType::UINT8,
|
||||
DeviceValueNumOp::DV_NUMOP_MUL5,
|
||||
FL_(adaptfactor),
|
||||
DeviceValueUOM::PERCENT,
|
||||
MAKE_CF_CB(set_adaptfactor),
|
||||
0,
|
||||
100);
|
||||
register_device_value(tag,
|
||||
&hc->gainfactor,
|
||||
DeviceValueType::UINT8,
|
||||
DeviceValueNumOp::DV_NUMOP_MUL5,
|
||||
FL_(gainfactor),
|
||||
DeviceValueUOM::PERCENT,
|
||||
MAKE_CF_CB(set_gainfactor),
|
||||
40,
|
||||
100);
|
||||
} else {
|
||||
register_device_value(tag,
|
||||
&hc->summertemp,
|
||||
DeviceValueType::UINT8,
|
||||
DeviceValueNumOp::DV_NUMOP_DIV2,
|
||||
FL_(summertemp),
|
||||
DeviceValueUOM::DEGREES,
|
||||
MAKE_CF_CB(set_summertemp),
|
||||
9,
|
||||
25);
|
||||
register_device_value(tag,
|
||||
&hc->roomsensor,
|
||||
DeviceValueType::ENUM,
|
||||
FL_(enum_roomsensor),
|
||||
FL_(roomsensor),
|
||||
DeviceValueUOM::NONE,
|
||||
MAKE_CF_CB(set_roomsensor));
|
||||
register_device_value(tag, &hc->fastHeatup, DeviceValueType::ENUM, FL_(enum_heatup), FL_(heatup), DeviceValueUOM::NONE, MAKE_CF_CB(set_heatup));
|
||||
register_device_value(tag, &hc->minflowtemp, DeviceValueType::UINT8, FL_(minflowtemp), DeviceValueUOM::DEGREES, MAKE_CF_CB(set_minflowtemp), 5, 70);
|
||||
register_device_value(tag, &hc->designtemp, DeviceValueType::UINT8, FL_(designtemp), DeviceValueUOM::DEGREES, MAKE_CF_CB(set_designtemp), 30, 90);
|
||||
register_device_value(tag,
|
||||
&hc->roominfluence,
|
||||
DeviceValueType::ENUM,
|
||||
FL_(enum_roominfluence),
|
||||
FL_(roominfluence),
|
||||
DeviceValueUOM::NONE,
|
||||
MAKE_CF_CB(set_roominfl_mode));
|
||||
register_device_value(tag,
|
||||
&hc->roominfl_factor,
|
||||
DeviceValueType::UINT8,
|
||||
DeviceValueNumOp::DV_NUMOP_MUL10,
|
||||
FL_(roominfl_factor),
|
||||
DeviceValueUOM::PERCENT,
|
||||
MAKE_CF_CB(set_roominfl_factor));
|
||||
register_device_value(
|
||||
tag, &hc->heatingtype, DeviceValueType::ENUM, FL_(enum_heatingtype1), FL_(heatingtype), DeviceValueUOM::NONE, MAKE_CF_CB(set_heatingtype));
|
||||
}
|
||||
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
@@ -63,6 +63,8 @@ class Thermostat : public EMSdevice {
|
||||
uint8_t hpoperatingstate;
|
||||
uint8_t roominfluence;
|
||||
uint8_t roominfl_factor;
|
||||
uint8_t adaptfactor; // FR100/FR120 Anpassungsfaktor I, byte * 5 = %
|
||||
uint8_t gainfactor; // FR100/FR120 Verstärkungsfaktor V, byte * 5 = %
|
||||
int16_t curroominfl;
|
||||
uint8_t flowtempoffset;
|
||||
uint8_t minflowtemp;
|
||||
@@ -521,6 +523,13 @@ class Thermostat : public EMSdevice {
|
||||
bool set_remotehum(const char * value, const int8_t id);
|
||||
bool set_roominfl_factor(const char * value, const int8_t id);
|
||||
bool set_roominfl_mode(const char * value, const int8_t id);
|
||||
bool set_junkers_factor(const char * value, const int8_t id, const uint8_t offset, const int min_percent);
|
||||
inline bool set_adaptfactor(const char * value, const int8_t id) {
|
||||
return set_junkers_factor(value, id, 1, 0); // Anpassungsfaktor I, 0..100%
|
||||
}
|
||||
inline bool set_gainfactor(const char * value, const int8_t id) {
|
||||
return set_junkers_factor(value, id, 2, 40); // Verstärkungsfaktor V, 40..100%
|
||||
}
|
||||
bool set_reducemode(const char * value, const int8_t id);
|
||||
bool set_switchtime1(const char * value, const int8_t id);
|
||||
bool set_switchtime2(const char * value, const int8_t id);
|
||||
|
||||
@@ -1 +1 @@
|
||||
#define EMSESP_APP_VERSION "3.9.0-dev.21"
|
||||
#define EMSESP_APP_VERSION "3.9.0-dev.22"
|
||||
|
||||
Reference in New Issue
Block a user