show wwtapactivated as value

This commit is contained in:
MichaelDvP
2021-07-11 14:42:12 +02:00
parent 3519696bae
commit 82978a25c5
2 changed files with 10 additions and 2 deletions

View File

@@ -86,7 +86,7 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const
}
// MQTT commands for boiler topic
register_device_value(
TAG_BOILER_DATA, &dummybool_, DeviceValueType::BOOL, nullptr, FL_(wwtapactivated), DeviceValueUOM::BOOLEAN, MAKE_CF_CB(set_tapwarmwater_activated));
TAG_BOILER_DATA, &wWTapActivated_, DeviceValueType::BOOL, nullptr, FL_(wwtapactivated), DeviceValueUOM::BOOLEAN, MAKE_CF_CB(set_tapwarmwater_activated));
register_device_value(TAG_BOILER_DATA, &dummy8u_, DeviceValueType::ENUM, FL_(enum_reset), FL_(reset), DeviceValueUOM::NONE, MAKE_CF_CB(set_reset));
// add values
@@ -303,6 +303,11 @@ void Boiler::check_active(const bool force) {
Mqtt::publish(F_(heating_active), Helpers::render_boolean(s, b));
}
// check if we can use tapactivated in flow systems
if ((wWType_ == 1) && !Helpers::hasValue(wWTapActivated_, EMS_VALUE_BOOL)) {
wWTapActivated_= 1;
}
// check if tap water is active, bits 1 and 4 must be set
// also check if there is a flowsensor and flow-type
static bool flowsensor = false;
@@ -1150,14 +1155,16 @@ bool Boiler::set_tapwarmwater_activated(const char * value, const int8_t id) {
// a setting of 0x00 puts it back into normal operating mode
// when in test mode we're able to mess around with the 3-way valve settings
if (!v) {
// on
// DHW off
message_data[0] = 0x5A; // test mode on
message_data[1] = 0x00; // burner output 0%
message_data[3] = 0x64; // boiler pump capacity 100%
message_data[4] = 0xFF; // 3-way valve hot water only
wWTapActivated_= 0;
} else {
// get out of test mode. Send all zeros.
// telegram: 0B 08 1D 00 00
wWTapActivated_ = 1;
}
write_command(EMS_TYPE_UBAFunctionTest, 0, message_data, sizeof(message_data), 0);

View File

@@ -85,6 +85,7 @@ class Boiler : public EMSdevice {
uint32_t wWWorkM_; // Warm Water # minutes
int8_t wWHystOn_;
int8_t wWHystOff_;
uint8_t wWTapActivated_; // maintenance-mode to switch DHW off
uint16_t mixerTemp_; // mixing temperature
uint16_t tankMiddleTemp_; // Tank middle temperature (TS3)