From 16010b2223817fce5b73d5a6131cab2281f38409 Mon Sep 17 00:00:00 2001 From: MichaelDvP Date: Fri, 12 Jan 2024 09:50:21 +0100 Subject: [PATCH] remote use RC200 for hc3/4 --- src/roomcontrol.cpp | 6 +----- src/roomcontrol.h | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/roomcontrol.cpp b/src/roomcontrol.cpp index 5b7d6723f..e2857524c 100644 --- a/src/roomcontrol.cpp +++ b/src/roomcontrol.cpp @@ -98,7 +98,7 @@ void Roomctrl::send(const uint8_t addr) { humidity(addr, 0x10, hc); sendcnt[hc] = 0; } else { // temperature telegram - if (remotehum_[hc] != EMS_VALUE_UINT_NOTSET) { + if (remotehum_[hc] != EMS_VALUE_UINT_NOTSET && hc < 2) { sendcnt[hc] = 1; } else { rc_time_[hc] = uuid::get_uptime(); @@ -175,7 +175,6 @@ void Roomctrl::version(uint8_t addr, uint8_t dst) { data[4] = type_; // set RC20 id 113, Ver 02.01 or Junkers FB10 id 109, Ver 16.05, RC100H id 200 ver 40.04 data[5] = type_ == RC20 ? 2 : type_ == FB10 ? 16 : 40; data[6] = type_ == RC20 ? 1 : type_ == FB10 ? 5 : 4; - /* if (type_ == RC100H && addr > 0x39) { // use RC200 id=157,ver 41.08 data[4] = 157; data[5] = 41; @@ -185,7 +184,6 @@ void Roomctrl::version(uint8_t addr, uint8_t dst) { data[5] = type_ == RC20 ? 2 : type_ == FB10 ? 16 : 40; data[6] = type_ == RC20 ? 1 : type_ == FB10 ? 5 : 4; } - */ data[7] = EMSbus::calculate_crc(data, 7); // apppend CRC EMSuart::transmit(data, 8); } @@ -239,7 +237,6 @@ void Roomctrl::temperature(uint8_t addr, uint8_t dst, uint8_t hc) { data[7] = (uint8_t)(remotetemp_[hc] & 0xFF); data[8] = EMSbus::calculate_crc(data, 8); // apppend CRC EMSuart::transmit(data, 9); - /* } else if (type_ == RC100H && hc >= 2) { // RC200, telegram 42B, ff data[2] = 0xFF; data[3] = 0; @@ -253,7 +250,6 @@ void Roomctrl::temperature(uint8_t addr, uint8_t dst, uint8_t hc) { data[10] = 1; // not sure what this is and if we need it, maybe mode? data[11] = EMSbus::calculate_crc(data, 11); // apppend CRC EMSuart::transmit(data, 12); - */ } else if (type_ == RC100H) { // RC100H, telegram 42B, ff data[2] = 0xFF; data[3] = 0; diff --git a/src/roomcontrol.h b/src/roomcontrol.h index bd4e0ef42..11e134a67 100644 --- a/src/roomcontrol.h +++ b/src/roomcontrol.h @@ -28,7 +28,7 @@ class Roomctrl { static void check(const uint8_t addr, const uint8_t * data, const uint8_t length); static void set_remotetemp(const uint8_t type, const uint8_t hc, const int16_t temp); static void set_remotehum(const uint8_t type, const uint8_t hc, const int8_t hum); - enum : uint8_t { RC20 = 113, FB10 = 109, RC100H = 200, SENSOR = 0x40 }; + enum : uint8_t { RC20 = 113, FB10 = 109, RC100H = 200, SENSOR = 0x40, RC200 = 157 }; private: static constexpr uint8_t ADDR = 0x18; // address for hc1