From f112887658b8adac708f183e8048b716dd91d2f6 Mon Sep 17 00:00:00 2001 From: MichaelDvP Date: Thu, 5 Nov 2020 07:55:26 +0100 Subject: [PATCH] fix #595 mixer IPM pumpstatus --- CHANGELOG_LATEST.md | 1 + src/devices/mixer.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG_LATEST.md b/CHANGELOG_LATEST.md index 168f8f142..229cc4451 100644 --- a/CHANGELOG_LATEST.md +++ b/CHANGELOG_LATEST.md @@ -4,6 +4,7 @@ - function keys in editor: cursor, del, pos1, end. F1=help, F2=show, F10=report ### Fixed +- mixer IPM pumpstatus ### Changed - optimized MQTT for HA to reduce mem fragmentation issues diff --git a/src/devices/mixer.cpp b/src/devices/mixer.cpp index 1ff6900cb..43354768d 100644 --- a/src/devices/mixer.cpp +++ b/src/devices/mixer.cpp @@ -224,7 +224,7 @@ bool Mixer::export_values(JsonObject & json) { // returns false if empty bool Mixer::export_values_format(uint8_t mqtt_format, JsonObject & json) { // check if there is data for the mixer unit - if (!Helpers::hasValue(status_)) { + if (this->type() == Type::NONE) { return 0; } @@ -249,7 +249,7 @@ bool Mixer::export_values_format(uint8_t mqtt_format, JsonObject & json) { json_hc["flowSetTemp"] = flowSetTemp_; } if (Helpers::hasValue(pumpStatus_)) { - char s[5]; + char s[7]; json_hc["pumpStatus"] = Helpers::render_value(s, pumpStatus_, EMS_VALUE_BOOL); } if (Helpers::hasValue(status_)) { @@ -274,7 +274,7 @@ bool Mixer::export_values_format(uint8_t mqtt_format, JsonObject & json) { json_hc["wwTemp"] = (float)flowTemp_ / 10; } if (Helpers::hasValue(pumpStatus_)) { - char s[5]; + char s[7]; json_hc["pumpStatus"] = Helpers::render_value(s, pumpStatus_, EMS_VALUE_BOOL); } if (Helpers::hasValue(status_)) { @@ -316,7 +316,7 @@ void Mixer::process_IPMStatusMessage(std::shared_ptr telegram) { // check if circuit is active, 0-off, 1-unmixed, 2-mixed uint8_t ismixed = 0; - changed_ |= telegram->read_value(ismixed, 0); + telegram->read_value(ismixed, 0); if (ismixed == 0) { return; }