Merge pull request #515 from tp1de/dev

emergencyops and emergencytemp for RC310
This commit is contained in:
Proddy
2022-05-23 09:22:19 +02:00
committed by GitHub
3 changed files with 44 additions and 0 deletions

View File

@@ -206,6 +206,21 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const
FL_(maintenanceDate), FL_(maintenanceDate),
DeviceValueUOM::NONE, DeviceValueUOM::NONE,
MAKE_CF_CB(set_maintenancedate)); MAKE_CF_CB(set_maintenancedate));
register_device_value(DeviceValueTAG::TAG_BOILER_DATA,
&emergencyOps_,
DeviceValueType::BOOL,
nullptr, FL_(emergencyOps),
DeviceValueUOM::NONE,
MAKE_CF_CB(set_emergency_ops));
register_device_value(DeviceValueTAG::TAG_BOILER_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 * Hybrid heatpump with telegram 0xBB is readable and writeable in boiler and thermostat
@@ -784,6 +799,9 @@ void Boiler::process_UBAParametersPlus(std::shared_ptr<const Telegram> telegram)
has_update(telegram, boilHystOff_, 8); has_update(telegram, boilHystOff_, 8);
has_update(telegram, boilHystOn_, 9); has_update(telegram, boilHystOn_, 9);
has_update(telegram, burnMinPeriod_, 10); 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, pumpType_, 11); // guess, RC300 manual: power controlled, pressure controlled 1-4?
// has_update(telegram, pumpDelay_, 12); // guess // has_update(telegram, pumpDelay_, 12); // guess
// has_update(telegram, pumpModMax_, 13); // guess // has_update(telegram, pumpModMax_, 13); // guess
@@ -1854,4 +1872,24 @@ bool Boiler::set_pool_temp(const char * value, const int8_t id) {
return true; 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 } // namespace emsesp

View File

@@ -134,6 +134,8 @@ class Boiler : public EMSdevice {
char lastCode_[50]; // last error code char lastCode_[50]; // last error code
char serviceCode_[4]; // 3 character status/service code char serviceCode_[4]; // 3 character status/service code
uint16_t serviceCodeNumber_; // error/service code uint16_t serviceCodeNumber_; // error/service code
uint8_t emergencyOps_;
uint8_t emergencyTemp_;
// info // info
uint32_t upTimeControl_; // Operating time control uint32_t upTimeControl_; // Operating time control
@@ -278,6 +280,8 @@ class Boiler : public EMSdevice {
bool set_ww_hyst_on(const char * value, const int8_t id); bool set_ww_hyst_on(const char * value, const int8_t id);
bool set_ww_hyst_off(const char * value, const int8_t id); bool set_ww_hyst_off(const char * value, const int8_t id);
bool set_pool_temp(const char * value, const int8_t id); bool set_pool_temp(const char * value, const int8_t id);
bool set_emergency_temp(const char * value, const int8_t id);
bool set_emergency_ops(const char * value, const int8_t id);
/* /*
bool set_hybridStrategy(const char * value, const int8_t id); bool set_hybridStrategy(const char * value, const int8_t id);
bool set_switchOverTemp(const char * value, const int8_t id); bool set_switchOverTemp(const char * value, const int8_t id);

View File

@@ -465,6 +465,8 @@ MAKE_PSTR_LIST(maintenanceMessage, F("maintenancemessage"), F("maintenance messa
MAKE_PSTR_LIST(maintenanceDate, F("maintenancedate"), F("next maintenance date")) MAKE_PSTR_LIST(maintenanceDate, F("maintenancedate"), F("next maintenance date"))
MAKE_PSTR_LIST(maintenanceType, F_(maintenance), F("maintenance scheduled")) MAKE_PSTR_LIST(maintenanceType, F_(maintenance), F("maintenance scheduled"))
MAKE_PSTR_LIST(maintenanceTime, F("maintenancetime"), F("time to next maintenance")) MAKE_PSTR_LIST(maintenanceTime, F("maintenancetime"), F("time to next maintenance"))
MAKE_PSTR_LIST(emergencyOps, F("emergencyops"), F("emergency operation"))
MAKE_PSTR_LIST(emergencyTemp, F("emergencytemp"), F("emergency temperature"))
// heatpump/compress specific // heatpump/compress specific
MAKE_PSTR_LIST(upTimeControl, F("uptimecontrol"), F("total operating time heat")) MAKE_PSTR_LIST(upTimeControl, F("uptimecontrol"), F("total operating time heat"))