Skip to content

Commit

Permalink
fixes, nl translation #803
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDvP committed Dec 18, 2022
1 parent 44e6bb7 commit eb30c1e
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 31 deletions.
58 changes: 38 additions & 20 deletions src/devices/boiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -569,30 +569,48 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const
DeviceValueUOM::NONE,
MAKE_CF_CB(set_additionalHeaterOnly));
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
&auxHeater_,
&auxHeaterOff_,
DeviceValueType::BOOL,
FL_(auxHeater),
FL_(auxHeaterOff),
DeviceValueUOM::NONE,
MAKE_CF_CB(set_additionalHeater));
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
&auxHeaterStatus_,
DeviceValueType::BOOL,
FL_(auxHeaterStatus),
DeviceValueUOM::NONE);
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &auxHeaterStatus_, DeviceValueType::BOOL, FL_(auxHeaterStatus), DeviceValueUOM::NONE);
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
&auxHeaterDelay_,
DeviceValueType::USHORT,
DeviceValueNumOp::DV_NUMOP_MUL10,
FL_(auxHeaterDelay),
DeviceValueUOM::KMIN,
MAKE_CF_CB(set_additionalHeaterDelay));
MAKE_CF_CB(set_additionalHeaterDelay),
10,
1000);
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
&hpHystHeat_,
DeviceValueType::USHORT,
DeviceValueNumOp::DV_NUMOP_MUL5,
FL_(hpHystHeat),
DeviceValueUOM::KMIN,
MAKE_CF_CB(set_hpHystHeat),
50,
1500);
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
&auxHeaterHyst_,
&hpHystCool_,
DeviceValueType::USHORT,
DeviceValueNumOp::DV_NUMOP_MUL5,
FL_(auxHeaterHyst),
FL_(hpHystCool),
DeviceValueUOM::KMIN,
MAKE_CF_CB(set_additionalHeaterHyst));
MAKE_CF_CB(set_hpHystCool),
50,
1500);
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
&hpHystPool_,
DeviceValueType::USHORT,
DeviceValueNumOp::DV_NUMOP_MUL5,
FL_(hpHystPool),
DeviceValueUOM::KMIN,
MAKE_CF_CB(set_hpHystPool),
50,
1500);
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
&minTempSilent_,
DeviceValueType::INT,
Expand All @@ -605,11 +623,7 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const
FL_(tempParMode),
DeviceValueUOM::DEGREES,
MAKE_CF_CB(set_tempParMode));
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
&auxHeatMixValve_,
DeviceValueType::INT,
FL_(auxHeatMixValve),
DeviceValueUOM::PERCENT);
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &auxHeatMixValve_, DeviceValueType::INT, FL_(auxHeatMixValve), DeviceValueUOM::PERCENT);
}

// dhw - DEVICE_DATA_ww topic
Expand Down Expand Up @@ -1510,7 +1524,9 @@ void Boiler::process_amExtraMessage(std::shared_ptr<const Telegram> telegram) {
// Boiler(0x08) -> All(0x00), ?(0x0484), data: 01 90 00 F6 28 14 64 00 00 E1 00 1E 00 1E 01 64 01 64 54 20 00 00 (offset 25)
void Boiler::process_HpSilentMode(std::shared_ptr<const Telegram> telegram) {
has_update(telegram, minTempSilent_, 11);
has_update(telegram, auxHeaterHyst_, 37);
has_update(telegram, hpHystHeat_, 37); // is / 5
has_update(telegram, hpHystCool_, 35); // is / 5, maybe offset swapped with pool
has_update(telegram, hpHystPool_, 33); // is / 5
}

// Boiler(0x08) -B-> All(0x00), ?(0x0488), data: 8E 00 00 00 00 00 01 03
Expand All @@ -1523,7 +1539,7 @@ void Boiler::process_HpValve(std::shared_ptr<const Telegram> telegram) {
// Boiler(0x08) -> All(0x00), ?(0x0491), data: 03 01 00 00 00 02 64 00 00 14 01 2C 00 0A 00 1E 00 1E 00 00 1E 0A 1E 05 05
void Boiler::process_HpAdditionalHeater(std::shared_ptr<const Telegram> telegram) {
has_update(telegram, auxHeaterOnly_, 1);
has_update(telegram, auxHeater_, 2);
has_update(telegram, auxHeaterOff_, 2);
has_update(telegram, tempParMode_, 5);
has_update(telegram, auxHeaterDelay_, 16); // is / 10
}
Expand Down Expand Up @@ -2508,18 +2524,20 @@ bool Boiler::set_tempParMode(const char * value, const int8_t id) {
bool Boiler::set_additionalHeaterDelay(const char * value, const int8_t id) {
int v;
if (Helpers::value2number(value, v)) {
v /= 5;
uint8_t data[2] = {(uint8_t)(v >> 8), (uint8_t)v};
write_command(0x491, 16, data, 2, 0x491);
return true;
}
return false;
}

bool Boiler::set_additionalHeaterHyst(const char * value, const int8_t id) {
bool Boiler::set_hpHyst(const char * value, const int8_t id) {
int v;
if (Helpers::value2number(value, v)) {
v /= 10;
uint8_t data[2] = {(uint8_t)(v >> 8), (uint8_t)v};
write_command(0x484, 37, data, 2, 0x484);
write_command(0x484, id, data, 2, 0x484);
return true;
}
return false;
Expand Down
18 changes: 15 additions & 3 deletions src/devices/boiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -243,13 +243,15 @@ class Boiler : public EMSdevice {
uint8_t releaseWait_; // pos 15: Boiler release wait time (min)

uint8_t auxHeaterOnly_;
uint8_t auxHeater_;
uint8_t auxHeaterOff_;
uint8_t auxHeaterStatus_;
uint16_t auxHeaterDelay_;
uint16_t auxHeaterHyst_;
int8_t minTempSilent_;
int8_t tempParMode_;
int8_t auxHeatMixValve_;
uint16_t hpHystHeat_;
uint16_t hpHystCool_;
uint16_t hpHystPool_;

/*
// Hybrid heatpump with telegram 0xBB is readable and writeable in boiler and thermostat
Expand Down Expand Up @@ -394,9 +396,19 @@ class Boiler : public EMSdevice {
bool set_additionalHeaterOnly(const char * value, const int8_t id);
bool set_additionalHeater(const char * value, const int8_t id);
bool set_additionalHeaterDelay(const char * value, const int8_t id);
bool set_additionalHeaterHyst(const char * value, const int8_t id);
bool set_tempParMode(const char * value, const int8_t id);

bool set_hpHyst(const char * value, const int8_t id);
inline bool set_hpHystHeat(const char * value, const int8_t id) {
return set_hpHyst(value, 37);
}
inline bool set_hpHystCool(const char * value, const int8_t id) {
return set_hpHyst(value, 35);
}
inline bool set_hpHystPool(const char * value, const int8_t id) {
return set_hpHyst(value, 33);
}

/*
bool set_hybridStrategy(const char * value, const int8_t id);
bool set_switchOverTemp(const char * value, const int8_t id);
Expand Down
18 changes: 10 additions & 8 deletions src/locale_translations.h
Original file line number Diff line number Diff line change
Expand Up @@ -368,15 +368,17 @@ MAKE_PSTR_LIST(maxHeatComp, "maxheatcomp", "heat limit compressor", "Heizgrenze
MAKE_PSTR_LIST(maxHeatHeat, "maxheatheat", "heat limit heating", "Heizgrenze Heizen", "heat limit heating", "heat limit heating", "limit ciepła dla ogrzewania", "maks varmegrense oppvarming", "limite chaleur chauffage")
MAKE_PSTR_LIST(maxHeatDhw, "maxheatdhw", "heat limit dhw", "Heizgrenze Warmwasser", "heat limit dhw", "heat limit dhw", "limit ciepła dla c.w.u.", "varmegrense varmtvann", "limite chaleur ecs")

// translations are in order en, de, nl, se, pl, no, fr, .... some missing
MAKE_PSTR_LIST(auxHeater, "auxheater", "enable auxilliary heater", "Erlaube Zusatzheizer")
MAKE_PSTR_LIST(auxHeaterStatus, "auxheaterstatus", "auxilliary heater status", "Status Zusatzheizer")
MAKE_PSTR_LIST(auxHeaterOnly, "auxheateronly", "auxilliary heater only", "nur Zusatzheizer")
// translations missing, remember order en, de, nl, se, pl, no, fr
MAKE_PSTR_LIST(auxHeaterOff, "auxheateroff", "disable auxilliary heater", "Verbiete Zusatzheizer", "Bijverwarming uitsc", "", "", "", "")
MAKE_PSTR_LIST(auxHeaterStatus, "auxheaterstatus", "auxilliary heater status", "Status Zusatzheizer", "Bijverwarming", "", "", "", "")
MAKE_PSTR_LIST(auxHeaterOnly, "auxheateronly", "auxilliary heater only", "nur Zusatzheizer","Alleen bijverwarming", "", "", "", "")
MAKE_PSTR_LIST(auxHeaterDelay, "auxheaterdelay", "auxilliary heater on delay", "Zusatzheizer verzögert ein", "Bijverw. vertraagd aan", "Tillskottfördröjning på", "Opóźn. włączenie dogrz.", "Tilleggsvarmer forsinket på", "Chauff app tempo marche")
MAKE_PSTR_LIST(auxHeaterHyst, "auxheaterhyst", "auxilliary heater on/off hyst", "Zusatzheizer Schalthysterese", "Aan/uit-hysteresis in verw. bedrijf instellen", "På/av-hystereses Husv.", "Histerez wł/wył Ogrzew.", "På/av-hysterese Oppvar.", "Hystérésis Marche en mode chauffage")
MAKE_PSTR_LIST(minTempSilent, "mintempsilent", "min. outside temp. for silent mode", "Minimale Aussentemperatur Silentmodus")
MAKE_PSTR_LIST(tempParMode, "tempparmode", "outside temp. parallel mode", "Aussentemperatur Parallelmodus")
MAKE_PSTR_LIST(auxHeatMixValve, "auxheatmix", "aux. heater mixing valve", "Mischer Zusatzheizer")
MAKE_PSTR_LIST(minTempSilent, "mintempsilent", "min. outside temp. for silent mode", "Minimale Aussentemperatur Silentmodus", " Stiller gebruik min. buitentemp", "", "", "", "")
MAKE_PSTR_LIST(tempParMode, "tempparmode", "outside temp. parallel mode", "Aussentemperatur Parallelmodus", "Buitentemp. parallelbedr", "", "", "", "")
MAKE_PSTR_LIST(auxHeatMixValve, "auxheatmix", "aux. heater mixing valve", "Mischer Zusatzheizer", "Bijverwarming menger", "", "", "", "")
MAKE_PSTR_LIST(hpHystHeat, "hphystheat", "HP on/off hyst heat", "Schalthysterese Heizen", "Aan/uit-hysteresis in verw. bedrijf", "På/av-hystereses Husv.", "Histerez wł/wył Ogrzew.", "På/av-hysterese Oppvar.", "Hystérésis Marche en mode chauffage")
MAKE_PSTR_LIST(hpHystCool, "hphystcool", "on/off hyst cool", "Schalthysterese Kühlen", "Aan/uit-hysteresis in koelbedrijf ", "", "", "", "")
MAKE_PSTR_LIST(hpHystPool, "hphystpool", "on/off hyst pool", "Schalthysterese Pool", "an/uit-hysteresis in zwembadbedri", "", "", "", "")

// hybrid heatpump
MAKE_PSTR_LIST(hybridStrategy, "hybridstrategy", "hybrid control strategy", "Hybrid Strategie", "Hybride strategie", "Hybrid kontrollstrategi", "strategia sterowania hybrydowego", "hybrid kontrollstrategi", "stratégie contrôle hybride")
Expand Down

0 comments on commit eb30c1e

Please sign in to comment.