mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 08:19:52 +03:00
Namings like v2.2.1
This commit is contained in:
@@ -60,6 +60,8 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const
|
||||
device_id); // read last errorcode on start (only published on errors)
|
||||
EMSESP::send_read_request(0x15,
|
||||
device_id); // read maintenace data on start (only published on change)
|
||||
EMSESP::send_read_request(0x1C,
|
||||
device_id); // read maintenace status on start (only published on change)
|
||||
|
||||
// MQTT commands for boiler topic
|
||||
register_mqtt_cmd(F("comfort"), [&](const char * value, const int8_t id) { return set_warmwater_mode(value, id); });
|
||||
@@ -70,7 +72,7 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const
|
||||
register_mqtt_cmd(F("wwcirculation"), [&](const char * value, const int8_t id) { return set_warmwater_circulation(value, id); });
|
||||
register_mqtt_cmd(F("wwcircmode"), [&](const char * value, const int8_t id) { return set_warmwater_circulation_mode(value, id); });
|
||||
register_mqtt_cmd(F("flowtemp"), [&](const char * value, const int8_t id) { return set_flow_temp(value, id); });
|
||||
register_mqtt_cmd(F("wwtemp"), [&](const char * value, const int8_t id) { return set_warmwater_temp(value, id); });
|
||||
register_mqtt_cmd(F("wwsettemp"), [&](const char * value, const int8_t id) { return set_warmwater_temp(value, id); });
|
||||
register_mqtt_cmd(F("heatingactivated"), [&](const char * value, const int8_t id) { return set_heating_activated(value, id); });
|
||||
register_mqtt_cmd(F("heatingtemp"), [&](const char * value, const int8_t id) { return set_heating_temp(value, id); });
|
||||
register_mqtt_cmd(F("burnmaxpower"), [&](const char * value, const int8_t id) { return set_max_power(value, id); });
|
||||
@@ -96,8 +98,8 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const
|
||||
|
||||
register_device_value(TAG_BOILER_DATA, &selFlowTemp_, DeviceValueType::UINT, nullptr, F("selFlowTemp"), F("Selected flow temperature"), DeviceValueUOM::DEGREES);
|
||||
register_device_value(TAG_BOILER_DATA, &selBurnPow_, DeviceValueType::UINT, nullptr, F("selBurnPow"), F("Burner selected max power"), DeviceValueUOM::PERCENT);
|
||||
register_device_value(TAG_BOILER_DATA, &pumpMod_, DeviceValueType::UINT, nullptr, F("pumpMod"), F("Pump modulation"), DeviceValueUOM::PERCENT);
|
||||
register_device_value(TAG_BOILER_DATA, &pumpMod2_, DeviceValueType::UINT, nullptr, F("pumpMod2"), F("Heat pump modulation"), DeviceValueUOM::PERCENT);
|
||||
register_device_value(TAG_BOILER_DATA, &heatingPumpMod_, DeviceValueType::UINT, nullptr, F("heatingPumpMod"), F("Heating pump modulation"), DeviceValueUOM::PERCENT);
|
||||
register_device_value(TAG_BOILER_DATA, &heatingPump2Mod_, DeviceValueType::UINT, nullptr, F("heatingPump2Mod"), F("Heating pump 2 modulation"), DeviceValueUOM::PERCENT);
|
||||
|
||||
register_device_value(TAG_BOILER_DATA, &outdoorTemp_, DeviceValueType::SHORT, FL_(div10), F("outdoorTemp"), F("Outside temperature"), DeviceValueUOM::DEGREES);
|
||||
register_device_value(TAG_BOILER_DATA, &curFlowTemp_, DeviceValueType::USHORT, FL_(div10), F("curFlowTemp"), F("Current flow temperature"), DeviceValueUOM::DEGREES);
|
||||
@@ -109,7 +111,7 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const
|
||||
|
||||
register_device_value(TAG_BOILER_DATA, &burnGas_, DeviceValueType::BOOL, nullptr, F("burnGas"), F("Gas"));
|
||||
register_device_value(TAG_BOILER_DATA, &flameCurr_, DeviceValueType::USHORT, FL_(div10), F("flameCurr"), F("Flame current"), DeviceValueUOM::UA);
|
||||
register_device_value(TAG_BOILER_DATA, &heatPump_, DeviceValueType::BOOL, nullptr, F("heatPump"), F("Heat pump"));
|
||||
register_device_value(TAG_BOILER_DATA, &heatingPump_, DeviceValueType::BOOL, nullptr, F("heatingPump"), F("Heating pump"), DeviceValueUOM::PUMP);
|
||||
register_device_value(TAG_BOILER_DATA, &fanWork_, DeviceValueType::BOOL, nullptr, F("fanWork"), F("Fan"));
|
||||
register_device_value(TAG_BOILER_DATA, &ignWork_, DeviceValueType::BOOL, nullptr, F("ignWork"), F("Ignition"));
|
||||
register_device_value(TAG_BOILER_DATA, &heatingActivated_, DeviceValueType::BOOL, nullptr, F("heatingActivated"), F("Heating activated"));
|
||||
@@ -289,7 +291,7 @@ void Boiler::process_UBAMonitorFast(std::shared_ptr<const Telegram> telegram) {
|
||||
has_update(telegram->read_bitvalue(burnGas_, 7, 0));
|
||||
has_update(telegram->read_bitvalue(fanWork_, 7, 2));
|
||||
has_update(telegram->read_bitvalue(ignWork_, 7, 3));
|
||||
has_update(telegram->read_bitvalue(heatPump_, 7, 5));
|
||||
has_update(telegram->read_bitvalue(heatingPump_, 7, 5));
|
||||
has_update(telegram->read_bitvalue(wWHeat_, 7, 6));
|
||||
has_update(telegram->read_bitvalue(wWCirc_, 7, 7));
|
||||
|
||||
@@ -376,7 +378,7 @@ void Boiler::process_UBAMonitorWW(std::shared_ptr<const Telegram> telegram) {
|
||||
void Boiler::process_UBAMonitorFastPlus(std::shared_ptr<const Telegram> telegram) {
|
||||
has_update(telegram->read_value(selFlowTemp_, 6));
|
||||
has_update(telegram->read_bitvalue(burnGas_, 11, 0));
|
||||
// has_update(telegram->read_bitvalue(heatPump_, 11, 1)); // heating active? see SlowPlus
|
||||
// has_update(telegram->read_bitvalue(heatingPump_, 11, 1)); // heating active? see SlowPlus
|
||||
has_update(telegram->read_bitvalue(wWHeat_, 11, 2));
|
||||
has_update(telegram->read_value(curBurnPow_, 10));
|
||||
has_update(telegram->read_value(selBurnPow_, 9));
|
||||
@@ -424,7 +426,7 @@ void Boiler::process_UBAMonitorSlow(std::shared_ptr<const Telegram> telegram) {
|
||||
has_update(telegram->read_value(exhaustTemp_, 4));
|
||||
has_update(telegram->read_value(switchTemp_,
|
||||
25)); // only if there is a mixer module present
|
||||
has_update(telegram->read_value(pumpMod_, 9));
|
||||
has_update(telegram->read_value(heatingPumpMod_, 9));
|
||||
has_update(telegram->read_value(burnStarts_, 10, 3)); // force to 3 bytes
|
||||
has_update(telegram->read_value(burnWorkMin_, 13, 3)); // force to 3 bytes
|
||||
has_update(telegram->read_value(heatWorkMin_, 19, 3)); // force to 3 bytes
|
||||
@@ -435,7 +437,7 @@ void Boiler::process_UBAMonitorSlow(std::shared_ptr<const Telegram> telegram) {
|
||||
* 88 00 E3 00 04 00 00 00 00 01 00 00 00 00 00 02 22 2B 64 46 01 00 00 61
|
||||
*/
|
||||
void Boiler::process_UBAMonitorSlowPlus2(std::shared_ptr<const Telegram> telegram) {
|
||||
has_update(telegram->read_value(pumpMod2_, 13)); // Heat Pump Modulation
|
||||
has_update(telegram->read_value(heatingPump2Mod_, 13)); // Heat Pump Modulation
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -446,13 +448,13 @@ void Boiler::process_UBAMonitorSlowPlus2(std::shared_ptr<const Telegram> telegra
|
||||
void Boiler::process_UBAMonitorSlowPlus(std::shared_ptr<const Telegram> telegram) {
|
||||
has_update(telegram->read_bitvalue(fanWork_, 2, 2));
|
||||
has_update(telegram->read_bitvalue(ignWork_, 2, 3));
|
||||
has_update(telegram->read_bitvalue(heatPump_, 2, 5));
|
||||
has_update(telegram->read_bitvalue(heatingPump_, 2, 5));
|
||||
has_update(telegram->read_bitvalue(wWCirc_, 2, 7));
|
||||
has_update(telegram->read_value(exhaustTemp_, 6));
|
||||
has_update(telegram->read_value(burnStarts_, 10, 3)); // force to 3 bytes
|
||||
has_update(telegram->read_value(burnWorkMin_, 13, 3)); // force to 3 bytes
|
||||
has_update(telegram->read_value(heatWorkMin_, 19, 3)); // force to 3 bytes
|
||||
has_update(telegram->read_value(pumpMod_, 25));
|
||||
has_update(telegram->read_value(heatingPumpMod_, 25));
|
||||
// temperature measurements at 4, see #620
|
||||
}
|
||||
|
||||
@@ -474,10 +476,9 @@ void Boiler::process_UBAParametersPlus(std::shared_ptr<const Telegram> telegram)
|
||||
|
||||
// 0xEA
|
||||
void Boiler::process_UBAParameterWWPlus(std::shared_ptr<const Telegram> telegram) {
|
||||
has_update(telegram->read_value(wWActivated_, 5)); // 0x01 means on
|
||||
has_update(telegram->read_value(wWCircPump_, 10)); // 0x01 means yes
|
||||
has_update(telegram->read_value(wWCircPumpMode_,
|
||||
11)); // 1=1x3min... 6=6x3min, 7=continuous
|
||||
has_update(telegram->read_value(wWActivated_, 5)); // 0x01 means on
|
||||
has_update(telegram->read_value(wWCircPump_, 10)); // 0x01 means yes
|
||||
has_update(telegram->read_value(wWCircPumpMode_, 11)); // 1=1x3min... 6=6x3min, 7=continuous
|
||||
// has_update(telegram->read_value(wWDisinfectTemp_, 12)); // settings, status in E9
|
||||
// has_update(telegram->read_value(wWSelTemp_, 6)); // settings, status in E9
|
||||
}
|
||||
@@ -631,18 +632,18 @@ void Boiler::process_UBAMaintenanceData(std::shared_ptr<const Telegram> telegram
|
||||
|
||||
has_update(telegram->read_value(maintenanceType_, 0));
|
||||
|
||||
if (maintenanceType_ == 1) {
|
||||
// time only, single byte * 100
|
||||
telegram->read_value(maintenanceTime_, 1, 1);
|
||||
maintenanceTime_ = maintenanceTime_ * 100;
|
||||
} else if (maintenanceType_ == 2) {
|
||||
// date only
|
||||
uint8_t day = telegram->message_data[2];
|
||||
uint8_t month = telegram->message_data[3];
|
||||
uint8_t year = telegram->message_data[4];
|
||||
if (day > 0 && month > 0) {
|
||||
snprintf_P(maintenanceDate_, sizeof(maintenanceDate_), PSTR("%02d.%02d.%04d"), day, month, year + 2000);
|
||||
}
|
||||
uint8_t time = (maintenanceTime_ == EMS_VALUE_USHORT_NOTSET) ? EMS_VALUE_UINT_NOTSET : maintenanceTime_ / 100;
|
||||
has_update(telegram->read_value(time, 1));
|
||||
maintenanceTime_ = (time == EMS_VALUE_UINT_NOTSET) ? EMS_VALUE_USHORT_NOTSET : time * 100;
|
||||
// telegram->read_value(maintenanceTime_, 1, 1);
|
||||
// maintenanceTime_ = maintenanceTime * 100;
|
||||
|
||||
// date only
|
||||
uint8_t day = telegram->message_data[2];
|
||||
uint8_t month = telegram->message_data[3];
|
||||
uint8_t year = telegram->message_data[4];
|
||||
if (day > 0 && month > 0) {
|
||||
snprintf_P(maintenanceDate_, sizeof(maintenanceDate_), PSTR("%02d.%02d.%04d"), day, month, year + 2000);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -658,9 +659,9 @@ bool Boiler::set_warmwater_temp(const char * value, const int8_t id) {
|
||||
if (get_toggle_fetch(EMS_TYPE_UBAParametersPlus)) {
|
||||
write_command(EMS_TYPE_UBAParameterWWPlus, 6, v, EMS_TYPE_UBAParameterWWPlus);
|
||||
} else {
|
||||
write_command(EMS_TYPE_UBAFlags, 3, v, 0x34); // for i9000, see #397
|
||||
write_command(EMS_TYPE_UBAParameterWW, 2, v,
|
||||
EMS_TYPE_UBAParameterWW); // read seltemp back
|
||||
write_command(EMS_TYPE_UBAFlags, 3, v, 0x34); // for i9000, see #397, read setTemp
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user