Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into idf4_no_master

This commit is contained in:
MichaelDvP
2022-05-23 19:32:08 +02:00
16 changed files with 274 additions and 216 deletions

View File

@@ -205,6 +205,22 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const
FL_(maintenanceDate),
DeviceValueUOM::NONE,
MAKE_CF_CB(set_maintenancedate));
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
&emergencyOps_,
DeviceValueType::BOOL,
nullptr,
FL_(emergencyOps),
DeviceValueUOM::NONE,
MAKE_CF_CB(set_emergency_ops));
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
&emergencyTemp_,
DeviceValueType::UINT,
nullptr,
FL_(emergencyTemp),
DeviceValueUOM::DEGREES,
MAKE_CF_CB(set_emergency_temp),
40,
70);
/*
* Hybrid heatpump with telegram 0xBB is readable and writeable in boiler and thermostat
@@ -783,6 +799,9 @@ void Boiler::process_UBAParametersPlus(std::shared_ptr<const Telegram> telegram)
has_update(telegram, boilHystOff_, 8);
has_update(telegram, boilHystOn_, 9);
has_update(telegram, burnMinPeriod_, 10);
has_update(telegram, emergencyOps_, 18);
has_update(telegram, emergencyTemp_, 19);
// has_update(telegram, pumpType_, 11); // guess, RC300 manual: power controlled, pressure controlled 1-4?
// has_update(telegram, pumpDelay_, 12); // guess
// has_update(telegram, pumpModMax_, 13); // guess
@@ -1853,4 +1872,24 @@ bool Boiler::set_pool_temp(const char * value, const int8_t id) {
return true;
}
bool Boiler::set_emergency_temp(const char * value, const int8_t id) {
int v = 0;
if (!Helpers::value2temperature(value, v)) {
return false;
}
write_command(EMS_TYPE_UBAParametersPlus, 19, v, EMS_TYPE_UBAParametersPlus);
return true;
}
bool Boiler::set_emergency_ops(const char * value, const int8_t id) {
bool v = false;
if (!Helpers::value2bool(value, v)) {
return false;
}
write_command(EMS_TYPE_UBAParametersPlus, 18, v ? 0x01 : 0x00, EMS_TYPE_UBAParametersPlus);
return true;
}
} // namespace emsesp