From 645ce4a1ee0a68eb98b1a6e715da922760e770bc Mon Sep 17 00:00:00 2001 From: s-hadinger <49731213+s-hadinger@users.noreply.github.com> Date: Sat, 24 Aug 2024 23:53:42 +0200 Subject: [PATCH] Zigbee reduce serial logging (#22012) --- tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_9_serial.ino | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_9_serial.ino b/tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_9_serial.ino index 0f5249258..5decd1e39 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_9_serial.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_9_serial.ino @@ -103,14 +103,14 @@ void ZigbeeInputLoop(void) { // in this case the first bit (lsb) is missed and Tasmota receives 0xFF instead of 0xFE // We forgive this mistake, and next bytes are automatically resynchronized if (ZIGBEE_SOF_ALT == zigbee_in_byte) { - AddLog(LOG_LEVEL_INFO, PSTR("ZbInput forgiven first byte %02X (only for statistics)"), zigbee_in_byte); + AddLog(LOG_LEVEL_DEBUG, PSTR(D_LOG_ZIGBEE "ZbInput forgiven first byte %02X (only for statistics)"), zigbee_in_byte); zigbee_in_byte = ZIGBEE_SOF; } } if ((0 == zigbee_buffer->len()) && (ZIGBEE_SOF != zigbee_in_byte)) { // waiting for SOF (Start Of Frame) byte, discard anything else - AddLog(LOG_LEVEL_INFO, PSTR("ZbInput discarding byte %02X"), zigbee_in_byte); + AddLog(LOG_LEVEL_DEBUG, PSTR(D_LOG_ZIGBEE "ZbInput discarding byte %02X"), zigbee_in_byte); continue; // discard } @@ -140,10 +140,10 @@ void ZigbeeInputLoop(void) { // buffer received, now check integrity if (zigbee_buffer->len() != zigbee_frame_len) { // Len is not correct, log and reject frame - AddLog(LOG_LEVEL_INFO, PSTR(D_JSON_ZIGBEEZNPRECEIVED ": received frame of wrong size %_B, len %d, expected %d"), zigbee_buffer, zigbee_buffer->len(), zigbee_frame_len); + AddLog(LOG_LEVEL_INFO, PSTR(D_LOG_ZIGBEE D_JSON_ZIGBEEZNPRECEIVED ": received frame of wrong size %_B, len %d, expected %d"), zigbee_buffer, zigbee_buffer->len(), zigbee_frame_len); } else if (0x00 != fcs) { // FCS is wrong, packet is corrupt, log and reject frame - AddLog(LOG_LEVEL_INFO, PSTR(D_JSON_ZIGBEEZNPRECEIVED ": received bad FCS frame %_B, %d"), zigbee_buffer, fcs); + AddLog(LOG_LEVEL_INFO, PSTR(D_LOG_ZIGBEE D_JSON_ZIGBEEZNPRECEIVED ": received bad FCS frame %_B, %d"), zigbee_buffer, fcs); } else { // frame is correct //AddLog(LOG_LEVEL_DEBUG_MORE, PSTR(D_JSON_ZIGBEEZNPRECEIVED ": received correct frame %s"), hex_char);