Skip to content

Commit 137e047

Browse files
committed
auxheaterdelay and hyst #803
1 parent 4bd6db3 commit 137e047

File tree

7 files changed

+40
-15
lines changed

7 files changed

+40
-15
lines changed

interface/src/project/types.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,8 @@ export enum DeviceValueUOM {
180180
SQM,
181181
M3,
182182
L,
183-
K_MIN
183+
KxMIN,
184+
KpMIN
184185
}
185186

186187
export const DeviceValueUOM_s = [
@@ -205,7 +206,8 @@ export const DeviceValueUOM_s = [
205206
'm²',
206207
'm³',
207208
'l',
208-
'K*min'
209+
'K*min',
210+
'K/min'
209211
];
210212

211213
export enum AnalogType {

src/devices/boiler.cpp

+24-6
Original file line numberDiff line numberDiff line change
@@ -575,11 +575,19 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const
575575
DeviceValueUOM::NONE,
576576
MAKE_CF_CB(set_additionalHeater));
577577
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
578-
&addHeaterDelay_,
578+
&auxHeaterDelay_,
579579
DeviceValueType::USHORT,
580-
FL_(addHeaterDelay),
581-
DeviceValueUOM::K_MIN,
580+
DeviceValueNumOp::DV_NUMOP_MUL10,
581+
FL_(auxHeaterDelay),
582+
DeviceValueUOM::KxMIN,
582583
MAKE_CF_CB(set_additionalHeaterDelay));
584+
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
585+
&auxHeaterHyst_,
586+
DeviceValueType::USHORT,
587+
DeviceValueNumOp::DV_NUMOP_MUL5,
588+
FL_(auxHeaterHyst),
589+
DeviceValueUOM::KpMIN,
590+
MAKE_CF_CB(set_additionalHeaterHyst));
583591
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
584592
&minTempSilent_,
585593
DeviceValueType::INT,
@@ -1497,6 +1505,7 @@ void Boiler::process_amExtraMessage(std::shared_ptr<const Telegram> telegram) {
14971505
// 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)
14981506
void Boiler::process_HpSilentMode(std::shared_ptr<const Telegram> telegram) {
14991507
has_update(telegram, minTempSilent_, 11);
1508+
has_update(telegram, auxHeaterHyst_, 37);
15001509
}
15011510

15021511
// Boiler(0x08) -B-> All(0x00), ?(0x0488), data: 8E 00 00 00 00 00 01 03
@@ -1510,7 +1519,7 @@ void Boiler::process_HpAdditionalHeater(std::shared_ptr<const Telegram> telegram
15101519
has_update(telegram, auxHeaterOnly_, 1);
15111520
has_update(telegram, auxHeater_, 2);
15121521
has_update(telegram, tempParMode_, 5);
1513-
// has_update(telegram, addHeaterDelay_, ?); // unknown position
1522+
has_update(telegram, auxHeaterDelay_, 16); // is / 10
15141523
}
15151524

15161525
// Settings AM200
@@ -2493,11 +2502,20 @@ bool Boiler::set_tempParMode(const char * value, const int8_t id) {
24932502
bool Boiler::set_additionalHeaterDelay(const char * value, const int8_t id) {
24942503
int v;
24952504
if (Helpers::value2number(value, v)) {
2496-
uint8_t data[2] = {(uint8_t)(v >> 8), (uint8_t)(v & 0xFF)};
2497-
write_command(0x491, 10, data, 2, 0x491);
2505+
uint8_t data[2] = {(uint8_t)(v >> 8), (uint8_t)v};
2506+
write_command(0x491, 16, data, 2, 0x491);
24982507
return true;
24992508
}
25002509
return false;
25012510
}
25022511

2512+
bool Boiler::set_additionalHeaterHyst(const char * value, const int8_t id) {
2513+
int v;
2514+
if (Helpers::value2number(value, v)) {
2515+
uint8_t data[2] = {(uint8_t)(v >> 8), (uint8_t)v};
2516+
write_command(0x484, 37, data, 2, 0x484);
2517+
return true;
2518+
}
2519+
return false;
2520+
}
25032521
} // namespace emsesp

src/devices/boiler.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,8 @@ class Boiler : public EMSdevice {
244244

245245
uint8_t auxHeaterOnly_;
246246
uint8_t auxHeater_;
247-
uint16_t addHeaterDelay_;
247+
uint16_t auxHeaterDelay_;
248+
uint16_t auxHeaterHyst_;
248249
int8_t minTempSilent_;
249250
int8_t tempParMode_;
250251
int8_t auxHeatMixValve_;
@@ -392,6 +393,7 @@ class Boiler : public EMSdevice {
392393
bool set_additionalHeaterOnly(const char * value, const int8_t id);
393394
bool set_additionalHeater(const char * value, const int8_t id);
394395
bool set_additionalHeaterDelay(const char * value, const int8_t id);
396+
bool set_additionalHeaterHyst(const char * value, const int8_t id);
395397
bool set_tempParMode(const char * value, const int8_t id);
396398

397399
/*

src/emsdevicevalue.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,9 @@ DeviceValue::DeviceValue(uint8_t device_type,
105105
// must be an int of 4 bytes, 32bit aligned
106106
const char * DeviceValue::DeviceValueUOM_s[] = {
107107

108-
F_(uom_blank), F_(uom_degrees), F_(uom_degrees), F_(uom_percent), F_(uom_lmin), F_(uom_kwh), F_(uom_wh), FL_(hours)[0],
109-
FL_(minutes)[0], F_(uom_ua), F_(uom_bar), F_(uom_kw), F_(uom_w), F_(uom_kb), FL_(seconds)[0], F_(uom_dbm),
110-
F_(uom_fahrenheit), F_(uom_mv), F_(uom_sqm), F_(uom_m3), F_(uom_l), F_(uom_kmin), F_(uom_blank) // connectivity
108+
F_(uom_blank), F_(uom_degrees), F_(uom_degrees), F_(uom_percent), F_(uom_lmin), F_(uom_kwh), F_(uom_wh), FL_(hours)[0],
109+
FL_(minutes)[0], F_(uom_ua), F_(uom_bar), F_(uom_kw), F_(uom_w), F_(uom_kb), FL_(seconds)[0], F_(uom_dbm),
110+
F_(uom_fahrenheit), F_(uom_mv), F_(uom_sqm), F_(uom_m3), F_(uom_l), F_(uom_kxmin), F_(uom_kpmin), F_(uom_blank) // connectivity
111111

112112
};
113113

src/emsdevicevalue.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ class DeviceValue {
6868
SQM, // 18 square meter
6969
M3, // 19 cubic meter
7070
L, // 20
71-
K_MIN, // 21 - Kelvin * minutes
71+
KxMIN, // 21 - Kelvin * minutes
72+
KpMIN, // 22 - Kelvin / minutes
7273
CONNECTIVITY // 22 - used in HA
7374
};
7475

src/locale_common.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,8 @@ MAKE_PSTR(uom_mv, "mV")
215215
MAKE_PSTR(uom_sqm, "m²")
216216
MAKE_PSTR(uom_m3, "m³")
217217
MAKE_PSTR(uom_l, "l")
218-
MAKE_PSTR(uom_kmin, "K*min")
218+
MAKE_PSTR(uom_kxmin, "K*min")
219+
MAKE_PSTR(uom_kpmin, "K/min")
219220

220221
// MQTT topics and prefixes
221222
MAKE_PSTR(heating_active, "heating_active")

src/locale_translations.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,8 @@ MAKE_PSTR_LIST(maxHeatDhw, "maxheatdhw", "heat limit dhw", "Heizgrenze Warmwasse
370370

371371
MAKE_PSTR_LIST(auxHeater, "auxheater", "enable auxilliary heater", "Erlaube Zusatzheizer")
372372
MAKE_PSTR_LIST(auxHeaterOnly, "auxheateronly", "auxilliary heater only", "nur Zusatzheizer")
373-
MAKE_PSTR_LIST(addHeaterDelay, "addheaterdelay", "additional heater on delay", "Zusatzheizer Einschaltverzögerung")
373+
MAKE_PSTR_LIST(auxHeaterDelay, "auxheaterdelay", "auxilliary heater on delay", "Zusatzheizer Einschaltverzögerung")
374+
MAKE_PSTR_LIST(auxHeaterHyst, "auxheaterhyst", "auxilliary heater on/off hyst", "Zusatzheizer Schalthysterese")
374375
MAKE_PSTR_LIST(minTempSilent, "mintempsilent", "min. outside temp. for silent mode", "Minimale Aussentemperatur Silentmodus")
375376
MAKE_PSTR_LIST(tempParMode, "tempparmode", "outside temp. parallel mode", "Aussentemperatur Parallelmodus")
376377
MAKE_PSTR_LIST(auxHeatMixValve, "auxheatmix", "aux. heater mixing valve", "Mischer Zusatzheizer")

0 commit comments

Comments
 (0)