From 51b0a0ae5b78b3bd51085ccc4088c53d715fed09 Mon Sep 17 00:00:00 2001 From: MichaelDvP Date: Sun, 4 Feb 2024 20:14:21 +0100 Subject: [PATCH] Junkers FB10 telegram-id --- src/devices/thermostat.cpp | 4 ++-- src/roomcontrol.cpp | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/devices/thermostat.cpp b/src/devices/thermostat.cpp index 5d6a7f5c8..564cfc54b 100644 --- a/src/devices/thermostat.cpp +++ b/src/devices/thermostat.cpp @@ -176,7 +176,7 @@ Thermostat::Thermostat(uint8_t device_type, uint8_t device_id, uint8_t product_i // JUNKERS/HT3 } else if (model == EMSdevice::EMS_DEVICE_FLAG_JUNKERS) { if (device_id >= 0x18 && device_id <= 0x1B) { // remote hc1-hc4 - register_telegram_type(0x123, "JunkersRemote", false, MAKE_PF_CB(process_JunkersRemoteMonitor)); + register_telegram_type(0x122 + (device_id - 0x18), "JunkersRemote", false, MAKE_PF_CB(process_JunkersRemoteMonitor)); register_device_values(); // register device values for common values (not heating circuit) return; // no values to add } @@ -775,7 +775,7 @@ void Thermostat::process_JunkersSet2(std::shared_ptr telegram) { has_enumupdate(telegram, hc->mode, 4, 1); // 0 = nofrost, 1 = eco, 2 = heat, 3 = auto } -// type 0x123 - FR10/FR110 Junkers as remote +// type 0x122 ff - FR10/FR110 Junkers as remote void Thermostat::process_JunkersRemoteMonitor(std::shared_ptr telegram) { has_update(telegram, tempsensor1_, 0); // roomTemp from remote } diff --git a/src/roomcontrol.cpp b/src/roomcontrol.cpp index 41d30c91d..ff64a08ef 100644 --- a/src/roomcontrol.cpp +++ b/src/roomcontrol.cpp @@ -154,7 +154,7 @@ void Roomctrl::check(const uint8_t addr, const uint8_t * data, const uint8_t len unknown(addr, data[0], data[3], data[5], data[6]); } else if (data[2] == 0xAF && data[3] == 0) { temperature(addr, data[0], hc); - } else if (length == 8 && data[2] == 0xFF && data[3] == 0 && data[5] == 0 && data[6] == 0x23) { // Junkers + } else if (length == 8 && data[2] == 0xFF && data[3] == 0 && data[5] == 0 && data[6] == 0x22 + hc) { // Junkers temperature(addr, data[0], hc); } else if (length == 8 && data[2] == 0xFF && data[3] == 0 && data[5] == 3 && data[6] == 0x2B + hc) { // EMS+ temperature temperature(addr, data[0], hc); @@ -234,11 +234,11 @@ void Roomctrl::temperature(uint8_t addr, uint8_t dst, uint8_t hc) { data[6] = 0; data[7] = EMSbus::calculate_crc(data, 7); // apppend CRC EMSuart::transmit(data, 8); - } else if (type_ == FB10) { // Junkers FB10, telegram 0x0123 + } else if (type_ == FB10) { // Junkers FB10, telegram 0x0122 data[2] = 0xFF; data[3] = 0; data[4] = 0; - data[5] = 0x23; // is this always 0x23 or count with hc? + data[5] = 0x22 + hc; // count with hc? data[6] = (uint8_t)(remotetemp_[hc] >> 8); data[7] = (uint8_t)(remotetemp_[hc] & 0xFF); data[8] = EMSbus::calculate_crc(data, 8); // apppend CRC