diff --git a/src/emsesp.cpp b/src/emsesp.cpp index ceaed6dd0..e6b4423db 100644 --- a/src/emsesp.cpp +++ b/src/emsesp.cpp @@ -131,12 +131,7 @@ uint8_t EMSESP::actual_master_thermostat() { // to watch both type IDs and device IDs void EMSESP::watch_id(uint16_t watch_id) { - // if it's a device ID, which is a single byte, remove the MSB so to support both Buderus and HT3 protocols - if (watch_id <= 0xFF) { - watch_id_ = (watch_id & 0x7F); - } else { - watch_id_ = watch_id; - } + watch_id_ = watch_id; } // change the tx_mode @@ -491,7 +486,8 @@ bool EMSESP::process_telegram(std::shared_ptr telegram) { LOG_NOTICE(pretty_telegram(telegram).c_str()); read_id_ = WATCH_ID_NONE; } else if (watch() == WATCH_ON) { - if ((watch_id_ == WATCH_ID_NONE) || (telegram->src == watch_id_) || (telegram->dest == watch_id_) || (telegram->type_id == watch_id_)) { + if ((watch_id_ == WATCH_ID_NONE) || (telegram->type_id == watch_id_) || + ((watch_id_ < 0x80) && ((telegram->src == watch_id_) || (telegram->dest == watch_id_)))) { LOG_NOTICE(pretty_telegram(telegram).c_str()); } } diff --git a/src/telegram.cpp b/src/telegram.cpp index 84abe5dca..1ef80c54f 100644 --- a/src/telegram.cpp +++ b/src/telegram.cpp @@ -195,7 +195,7 @@ void RxService::add(uint8_t * data, uint8_t length) { // if we're watching and "raw" print out actual telegram as bytes to the console if (EMSESP::watch() == EMSESP::Watch::WATCH_RAW) { uint16_t trace_watch_id = EMSESP::watch_id(); - if ((trace_watch_id == WATCH_ID_NONE) || (src == trace_watch_id) || (dest == trace_watch_id) || (type_id == trace_watch_id)) { + if ((trace_watch_id == WATCH_ID_NONE) || (type_id == trace_watch_id) || ((trace_watch_id < 0x80) && ((src == trace_watch_id) || (dest == trace_watch_id)))) { LOG_NOTICE(F("Rx: %s"), Helpers::data_to_hex(data, length).c_str()); } }