diff --git a/tasmota/_changelog.ino b/tasmota/_changelog.ino index f7c53a1f9..cbc56312c 100644 --- a/tasmota/_changelog.ino +++ b/tasmota/_changelog.ino @@ -9,6 +9,7 @@ * Change Kept only NEC/RC5/RC6/HASH IR protocols in standard Tasmota, all other protocols require Tasmota-IR, saving 4K * Add command SetOption76 0/1 to enable incrementing bootcount when deepsleep is enabled (#6930) * Change Reset erase end address from as seen by SDK (getFlashChipSize) to full flash size (getFlashChipRealSize) + * Change Zigbee log verbosity reduction * * 7.0.0.3 20191103 * Add command I2cDriver for I2C driver runtime control using document I2CDEVICES.md diff --git a/tasmota/language/bg-BG.h b/tasmota/language/bg-BG.h index c1daf8b21..cfc7998b2 100644 --- a/tasmota/language/bg-BG.h +++ b/tasmota/language/bg-BG.h @@ -691,6 +691,7 @@ #define D_LOG_UPLOAD "UPL: " // Upload #define D_LOG_UPNP "UPP: " // UPnP #define D_LOG_WIFI "WIF: " // Wifi +#define D_LOG_ZIGBEE "ZIG: " // Zigbee //SDM220 #define D_PHASE_ANGLE "Фазов ъгъл" diff --git a/tasmota/language/cs-CZ.h b/tasmota/language/cs-CZ.h index c40cdb2b0..e3d18ab41 100644 --- a/tasmota/language/cs-CZ.h +++ b/tasmota/language/cs-CZ.h @@ -691,6 +691,7 @@ #define D_LOG_UPLOAD "UPL: " // Upload #define D_LOG_UPNP "UPP: " // UPnP #define D_LOG_WIFI "WIF: " // Wifi +#define D_LOG_ZIGBEE "ZIG: " // Zigbee //SDM220 #define D_PHASE_ANGLE "Phase Angle" diff --git a/tasmota/language/de-DE.h b/tasmota/language/de-DE.h index 55c2eb8d0..82b8f7020 100644 --- a/tasmota/language/de-DE.h +++ b/tasmota/language/de-DE.h @@ -691,6 +691,7 @@ #define D_LOG_UPLOAD "UPL: " // Upload #define D_LOG_UPNP "UPP: " // UPnP #define D_LOG_WIFI "WIF: " // Wifi +#define D_LOG_ZIGBEE "ZIG: " // Zigbee //SDM220 #define D_PHASE_ANGLE "Phasenwinkel" diff --git a/tasmota/language/el-GR.h b/tasmota/language/el-GR.h index c9a57c635..161b838eb 100644 --- a/tasmota/language/el-GR.h +++ b/tasmota/language/el-GR.h @@ -691,6 +691,7 @@ #define D_LOG_UPLOAD "UPL: " // Upload #define D_LOG_UPNP "UPP: " // UPnP #define D_LOG_WIFI "WIF: " // Wifi +#define D_LOG_ZIGBEE "ZIG: " // Zigbee //SDM220 #define D_PHASE_ANGLE "Phase Angle" diff --git a/tasmota/language/en-GB.h b/tasmota/language/en-GB.h index 6ff230746..ed9bbba27 100644 --- a/tasmota/language/en-GB.h +++ b/tasmota/language/en-GB.h @@ -691,6 +691,7 @@ #define D_LOG_UPLOAD "UPL: " // Upload #define D_LOG_UPNP "UPP: " // UPnP #define D_LOG_WIFI "WIF: " // Wifi +#define D_LOG_ZIGBEE "ZIG: " // Zigbee //SDM220 #define D_PHASE_ANGLE "Phase Angle" diff --git a/tasmota/language/es-ES.h b/tasmota/language/es-ES.h index a403369b7..ebd637f22 100644 --- a/tasmota/language/es-ES.h +++ b/tasmota/language/es-ES.h @@ -691,6 +691,7 @@ #define D_LOG_UPLOAD "UPL: " // Upload #define D_LOG_UPNP "UPP: " // UPnP #define D_LOG_WIFI "WIF: " // Wifi +#define D_LOG_ZIGBEE "ZIG: " // Zigbee //SDM220 #define D_PHASE_ANGLE "Ángulo de Fase" diff --git a/tasmota/language/fr-FR.h b/tasmota/language/fr-FR.h index 302dc41c1..9297ed78d 100644 --- a/tasmota/language/fr-FR.h +++ b/tasmota/language/fr-FR.h @@ -691,6 +691,7 @@ #define D_LOG_UPLOAD "UPL: " // Upload #define D_LOG_UPNP "UPP: " // UPnP #define D_LOG_WIFI "WIF: " // Wifi +#define D_LOG_ZIGBEE "ZIG: " // Zigbee //SDM220 #define D_PHASE_ANGLE "Angle de phase" diff --git a/tasmota/language/he-HE.h b/tasmota/language/he-HE.h index f50128447..01364aa3d 100644 --- a/tasmota/language/he-HE.h +++ b/tasmota/language/he-HE.h @@ -691,6 +691,7 @@ #define D_LOG_UPLOAD "UPL: " // Upload #define D_LOG_UPNP "UPP: " // UPnP #define D_LOG_WIFI "WIF: " // Wifi +#define D_LOG_ZIGBEE "ZIG: " // Zigbee //SDM220 #define D_PHASE_ANGLE "Phase Angle" diff --git a/tasmota/language/hu-HU.h b/tasmota/language/hu-HU.h index d33b465d8..5587add24 100644 --- a/tasmota/language/hu-HU.h +++ b/tasmota/language/hu-HU.h @@ -691,6 +691,7 @@ #define D_LOG_UPLOAD "UPL: " // Upload #define D_LOG_UPNP "UPP: " // UPnP #define D_LOG_WIFI "WIF: " // Wifi +#define D_LOG_ZIGBEE "ZIG: " // Zigbee //SDM220 #define D_PHASE_ANGLE "Fázisszög" diff --git a/tasmota/language/it-IT.h b/tasmota/language/it-IT.h index 5d2d3e10f..b6ed56de4 100644 --- a/tasmota/language/it-IT.h +++ b/tasmota/language/it-IT.h @@ -691,6 +691,7 @@ #define D_LOG_UPLOAD "UPL: " // Upload #define D_LOG_UPNP "UPP: " // UPnP #define D_LOG_WIFI "WIF: " // Wifi +#define D_LOG_ZIGBEE "ZIG: " // Zigbee //SDM220 #define D_PHASE_ANGLE "Angolo Fase" diff --git a/tasmota/language/ko-KO.h b/tasmota/language/ko-KO.h index 28bb44b6d..41c2edb32 100644 --- a/tasmota/language/ko-KO.h +++ b/tasmota/language/ko-KO.h @@ -691,6 +691,7 @@ #define D_LOG_UPLOAD "UPL: " // Upload #define D_LOG_UPNP "UPP: " // UPnP #define D_LOG_WIFI "WIF: " // Wifi +#define D_LOG_ZIGBEE "ZIG: " // Zigbee //SDM220 #define D_PHASE_ANGLE "Phase Angle" diff --git a/tasmota/language/nl-NL.h b/tasmota/language/nl-NL.h index 75a990387..b17f17a71 100644 --- a/tasmota/language/nl-NL.h +++ b/tasmota/language/nl-NL.h @@ -691,6 +691,7 @@ #define D_LOG_UPLOAD "UPL: " // Upload #define D_LOG_UPNP "UPP: " // UPnP #define D_LOG_WIFI "WIF: " // Wifi +#define D_LOG_ZIGBEE "ZIG: " // Zigbee //SDM220 #define D_PHASE_ANGLE "Fase hoek" diff --git a/tasmota/language/pl-PL.h b/tasmota/language/pl-PL.h index 76415e599..3bda5ec01 100644 --- a/tasmota/language/pl-PL.h +++ b/tasmota/language/pl-PL.h @@ -691,6 +691,7 @@ #define D_LOG_UPLOAD "UPL: " // Upload #define D_LOG_UPNP "UPP: " // UPnP #define D_LOG_WIFI "WIF: " // Wifi +#define D_LOG_ZIGBEE "ZIG: " // Zigbee //SDM220 #define D_PHASE_ANGLE "Phase Angle" diff --git a/tasmota/language/pt-BR.h b/tasmota/language/pt-BR.h index 111ce5359..e997a1e81 100644 --- a/tasmota/language/pt-BR.h +++ b/tasmota/language/pt-BR.h @@ -691,6 +691,7 @@ #define D_LOG_UPLOAD "UPL: " // Upload #define D_LOG_UPNP "UPP: " // UPnP #define D_LOG_WIFI "WIF: " // Wifi +#define D_LOG_ZIGBEE "ZIG: " // Zigbee //SDM220 #define D_PHASE_ANGLE "Ângulo de Fase" diff --git a/tasmota/language/pt-PT.h b/tasmota/language/pt-PT.h index af85629dc..ab95be031 100644 --- a/tasmota/language/pt-PT.h +++ b/tasmota/language/pt-PT.h @@ -691,6 +691,7 @@ #define D_LOG_UPLOAD "UPL: " // Upload #define D_LOG_UPNP "UPP: " // UPnP #define D_LOG_WIFI "WIF: " // Wifi +#define D_LOG_ZIGBEE "ZIG: " // Zigbee //SDM220 #define D_PHASE_ANGLE "Ângulo de fase" diff --git a/tasmota/language/ru-RU.h b/tasmota/language/ru-RU.h index 72a68753d..0476cc584 100644 --- a/tasmota/language/ru-RU.h +++ b/tasmota/language/ru-RU.h @@ -691,6 +691,7 @@ #define D_LOG_UPLOAD "UPL: " // Upload #define D_LOG_UPNP "UPP: " // UPnP #define D_LOG_WIFI "WIF: " // Wifi +#define D_LOG_ZIGBEE "ZIG: " // Zigbee //SDM220 #define D_PHASE_ANGLE "Угол фазы" diff --git a/tasmota/language/sk-SK.h b/tasmota/language/sk-SK.h index 9042cf59e..b9565f9df 100644 --- a/tasmota/language/sk-SK.h +++ b/tasmota/language/sk-SK.h @@ -691,6 +691,7 @@ #define D_LOG_UPLOAD "UPL: " // Upload #define D_LOG_UPNP "UPP: " // UPnP #define D_LOG_WIFI "WIF: " // Wifi +#define D_LOG_ZIGBEE "ZIG: " // Zigbee //SDM220 #define D_PHASE_ANGLE "Phase Angle" diff --git a/tasmota/language/sv-SE.h b/tasmota/language/sv-SE.h index 83078f9d0..d8f2c2931 100644 --- a/tasmota/language/sv-SE.h +++ b/tasmota/language/sv-SE.h @@ -691,6 +691,7 @@ #define D_LOG_UPLOAD "UPL: " // Upload #define D_LOG_UPNP "UPP: " // UPnP #define D_LOG_WIFI "WIF: " // Wifi +#define D_LOG_ZIGBEE "ZIG: " // Zigbee //SDM220 #define D_PHASE_ANGLE "Fasvinkel" diff --git a/tasmota/language/tr-TR.h b/tasmota/language/tr-TR.h index 3999d9093..20aec50dc 100644 --- a/tasmota/language/tr-TR.h +++ b/tasmota/language/tr-TR.h @@ -691,6 +691,7 @@ #define D_LOG_UPLOAD "UPL: " // Upload #define D_LOG_UPNP "UPP: " // UPnP #define D_LOG_WIFI "WIF: " // Wifi +#define D_LOG_ZIGBEE "ZIG: " // Zigbee //SDM220 #define D_PHASE_ANGLE "Phase Angle" diff --git a/tasmota/language/uk-UK.h b/tasmota/language/uk-UK.h index 64c806dfb..e71b499b8 100644 --- a/tasmota/language/uk-UK.h +++ b/tasmota/language/uk-UK.h @@ -691,6 +691,7 @@ #define D_LOG_UPLOAD "UPL: " // Upload #define D_LOG_UPNP "UPP: " // UPnP #define D_LOG_WIFI "WIF: " // Wifi +#define D_LOG_ZIGBEE "ZIG: " // Zigbee //SDM220 #define D_PHASE_ANGLE "Кут фази" diff --git a/tasmota/language/zh-CN.h b/tasmota/language/zh-CN.h index 5c5c37379..93832fc07 100644 --- a/tasmota/language/zh-CN.h +++ b/tasmota/language/zh-CN.h @@ -691,6 +691,7 @@ #define D_LOG_UPLOAD "UPL: " // Upload #define D_LOG_UPNP "UPP: " // UPnP #define D_LOG_WIFI "WIF: " // Wifi +#define D_LOG_ZIGBEE "ZIG: " // Zigbee //SDM220 #define D_PHASE_ANGLE "相位角" diff --git a/tasmota/language/zh-TW.h b/tasmota/language/zh-TW.h index 9a40f2470..f16077925 100644 --- a/tasmota/language/zh-TW.h +++ b/tasmota/language/zh-TW.h @@ -691,6 +691,7 @@ #define D_LOG_UPLOAD "UPL: " // Upload #define D_LOG_UPNP "UPP: " // UPnP #define D_LOG_WIFI "WIF: " // Wifi +#define D_LOG_ZIGBEE "ZIG: " // Zigbee //SDM220 #define D_PHASE_ANGLE "Phase Angle" diff --git a/tasmota/xdrv_23_zigbee_5_converters.ino b/tasmota/xdrv_23_zigbee_5_converters.ino index 57d4e3624..bf58a80b9 100644 --- a/tasmota/xdrv_23_zigbee_5_converters.ino +++ b/tasmota/xdrv_23_zigbee_5_converters.ino @@ -388,7 +388,7 @@ uint32_t parseSingleAttribute(JsonObject& json, char *attrid_str, class SBuffer // String pp; // pretty print // json[attrid_str].prettyPrintTo(pp); // // now store the attribute - // AddLog_P2(LOG_LEVEL_INFO, PSTR("ZIG: ZCL attribute decoded, id %s, type 0x%02X, val=%s"), + // AddLog_P2(LOG_LEVEL_INFO, PSTR(D_LOG_ZIGBEE "ZCL attribute decoded, id %s, type 0x%02X, val=%s"), // attrid_str, attrtype, pp.c_str()); return i - offset; // how much have we increased the index } diff --git a/tasmota/xdrv_23_zigbee_7_statemachine.ino b/tasmota/xdrv_23_zigbee_7_statemachine.ino index 26d30d032..d4f3e459f 100644 --- a/tasmota/xdrv_23_zigbee_7_statemachine.ino +++ b/tasmota/xdrv_23_zigbee_7_statemachine.ino @@ -323,11 +323,11 @@ static const Zigbee_Instruction zb_prog[] PROGMEM = { ZI_ON_ERROR_GOTO(50) //ZI_MQTT_STATE(ZIGBEE_STATUS_BOOT, "Booting") - //ZI_LOG(LOG_LEVEL_INFO, "ZIG: rebooting device") + //ZI_LOG(LOG_LEVEL_INFO, D_LOG_ZIGBEE "rebooting device") ZI_SEND(ZBS_RESET) // reboot cc2530 just in case we rebooted ESP8266 but not cc2530 ZI_WAIT_RECV_FUNC(5000, ZBR_RESET, &Z_Reboot) // timeout 5s ZI_WAIT(100) - ZI_LOG(LOG_LEVEL_INFO, "ZIG: checking device configuration") + ZI_LOG(LOG_LEVEL_DEBUG, D_LOG_ZIGBEE "checking device configuration") ZI_SEND(ZBS_ZNPHC) // check value of ZNP Has Configured ZI_WAIT_RECV(2000, ZBR_ZNPHC) ZI_SEND(ZBS_VERSION) // check ZNP software version @@ -342,7 +342,7 @@ static const Zigbee_Instruction zb_prog[] PROGMEM = { ZI_WAIT_RECV(1000, ZBR_PFGK) ZI_SEND(ZBS_PFGKEN) // check PFGKEN ZI_WAIT_RECV(1000, ZBR_PFGKEN) - //ZI_LOG(LOG_LEVEL_INFO, "ZIG: zigbee configuration ok") + //ZI_LOG(LOG_LEVEL_INFO, D_LOG_ZIGBEE "zigbee configuration ok") // all is good, we can start ZI_LABEL(ZIGBEE_LABEL_START) // START ZNP App @@ -350,7 +350,7 @@ static const Zigbee_Instruction zb_prog[] PROGMEM = { //ZI_CALL(&Z_State_Ready, 1) // Now accept incoming messages ZI_ON_ERROR_GOTO(ZIGBEE_LABEL_ABORT) // Z_ZDO:startupFromApp - //ZI_LOG(LOG_LEVEL_INFO, "ZIG: starting zigbee coordinator") + //ZI_LOG(LOG_LEVEL_INFO, D_LOG_ZIGBEE "starting zigbee coordinator") ZI_SEND(ZBS_STARTUPFROMAPP) // start coordinator ZI_WAIT_RECV(2000, ZBR_STARTUPFROMAPP) // wait for sync ack of command ZI_WAIT_UNTIL(5000, AREQ_STARTUPFROMAPP) // wait for async message that coordinator started @@ -383,7 +383,7 @@ ZI_SEND(ZBS_STARTUPFROMAPP) // start coordinator ZI_LABEL(ZIGBEE_LABEL_READY) ZI_MQTT_STATE(ZIGBEE_STATUS_OK, "Started") - ZI_LOG(LOG_LEVEL_INFO, "ZIG: zigbee device ready, listening...") + ZI_LOG(LOG_LEVEL_INFO, D_LOG_ZIGBEE "Zigbee started") ZI_CALL(&Z_State_Ready, 1) // Now accept incoming messages ZI_LABEL(ZIGBEE_LABEL_MAIN_LOOP) ZI_WAIT_FOREVER() @@ -415,7 +415,7 @@ ZI_SEND(ZBS_STARTUPFROMAPP) // start coordinator ZI_LABEL(50) // reformat device ZI_MQTT_STATE(ZIGBEE_STATUS_RESET_CONF, "Reseting configuration") - //ZI_LOG(LOG_LEVEL_INFO, "ZIG: zigbee bad configuration of device, doing a factory reset") + //ZI_LOG(LOG_LEVEL_INFO, D_LOG_ZIGBEE "zigbee bad configuration of device, doing a factory reset") ZI_ON_ERROR_GOTO(ZIGBEE_LABEL_ABORT) ZI_SEND(ZBS_FACTRES) // factory reset ZI_WAIT_RECV(1000, ZBR_W_OK) @@ -443,7 +443,7 @@ ZI_SEND(ZBS_STARTUPFROMAPP) // start coordinator ZI_SEND(ZBS_WNV_ZNPHC) // Write NV ZNP Has Configured ZI_WAIT_RECV(1000, ZBR_WNV_OK) - //ZI_LOG(LOG_LEVEL_INFO, "ZIG: zigbee device reconfigured") + //ZI_LOG(LOG_LEVEL_INFO, D_LOG_ZIGBEE "zigbee device reconfigured") ZI_GOTO(ZIGBEE_LABEL_START) ZI_LABEL(ZIGBEE_LABEL_UNSUPPORTED_VERSION) @@ -452,7 +452,7 @@ ZI_SEND(ZBS_STARTUPFROMAPP) // start coordinator ZI_LABEL(ZIGBEE_LABEL_ABORT) // Label 99: abort ZI_MQTT_STATE(ZIGBEE_STATUS_ABORT, "Abort") - ZI_LOG(LOG_LEVEL_ERROR, "ZIG: Abort") + ZI_LOG(LOG_LEVEL_ERROR, D_LOG_ZIGBEE "Abort") ZI_STOP(ZIGBEE_LABEL_ABORT) }; @@ -480,7 +480,7 @@ void ZigbeeGotoLabel(uint8_t label) { //AddLog_P2(LOG_LEVEL_DEBUG_MORE, PSTR("ZGB GOTO: pc %d instr %d"), i, cur_instr); if (ZGB_INSTR_LABEL == cur_instr) { - //AddLog_P2(LOG_LEVEL_DEBUG_MORE, PSTR("ZIG: found label %d at pc %d"), cur_d8, i); + //AddLog_P2(LOG_LEVEL_DEBUG_MORE, PSTR(D_LOG_ZIGBEE "found label %d at pc %d"), cur_d8, i); if (label == cur_d8) { // label found, goto to this pc zigbee.pc = i; @@ -494,12 +494,12 @@ void ZigbeeGotoLabel(uint8_t label) { } // no label found, abort - AddLog_P2(LOG_LEVEL_ERROR, PSTR("ZIG: Goto label not found, label=%d pc=%d"), label, zigbee.pc); + AddLog_P2(LOG_LEVEL_ERROR, PSTR(D_LOG_ZIGBEE "Goto label not found, label=%d pc=%d"), label, zigbee.pc); if (ZIGBEE_LABEL_ABORT != label) { // if not already looking for ZIGBEE_LABEL_ABORT, goto ZIGBEE_LABEL_ABORT ZigbeeGotoLabel(ZIGBEE_LABEL_ABORT); } else { - AddLog_P2(LOG_LEVEL_ERROR, PSTR("ZIG: Label Abort (%d) not present, aborting Zigbee"), ZIGBEE_LABEL_ABORT); + AddLog_P2(LOG_LEVEL_ERROR, PSTR(D_LOG_ZIGBEE "Label Abort (%d) not present, aborting Zigbee"), ZIGBEE_LABEL_ABORT); zigbee.state_machine = false; zigbee.active = false; } @@ -516,9 +516,9 @@ void ZigbeeStateMachine_Run(void) { if (zigbee.state_waiting) { // state machine is waiting for external event or timeout // checking if timeout expired if ((zigbee.next_timeout) && (now > zigbee.next_timeout)) { // if next_timeout == 0 then wait forever - //AddLog_P2(LOG_LEVEL_INFO, PSTR("ZIG: timeout occured pc=%d"), zigbee.pc); + //AddLog_P2(LOG_LEVEL_INFO, PSTR(D_LOG_ZIGBEE "timeout occured pc=%d"), zigbee.pc); if (!zigbee.state_no_timeout) { - AddLog_P2(LOG_LEVEL_INFO, PSTR("ZIG: timeout, goto label %d"), zigbee.on_timeout_goto); + AddLog_P2(LOG_LEVEL_INFO, PSTR(D_LOG_ZIGBEE "timeout, goto label %d"), zigbee.on_timeout_goto); ZigbeeGotoLabel(zigbee.on_timeout_goto); } else { zigbee.state_waiting = false; // simply stop waiting @@ -534,7 +534,7 @@ void ZigbeeStateMachine_Run(void) { zigbee.state_no_timeout = false; // reset the no_timeout for next instruction if (zigbee.pc > (sizeof(zb_prog)/sizeof(zb_prog[0]))) { - AddLog_P2(LOG_LEVEL_ERROR, PSTR("ZIG: Invalid pc: %d, aborting"), zigbee.pc); + AddLog_P2(LOG_LEVEL_ERROR, PSTR(D_LOG_ZIGBEE "Invalid pc: %d, aborting"), zigbee.pc); zigbee.pc = -1; } if (zigbee.pc < 0) { @@ -543,7 +543,7 @@ void ZigbeeStateMachine_Run(void) { } // load current instruction details - AddLog_P2(LOG_LEVEL_DEBUG_MORE, PSTR("ZIG: Executing instruction pc=%d"), zigbee.pc); + AddLog_P2(LOG_LEVEL_DEBUG_MORE, PSTR(D_LOG_ZIGBEE "Executing instruction pc=%d"), zigbee.pc); const Zigbee_Instruction *cur_instr_line = &zb_prog[zigbee.pc]; cur_instr = pgm_read_byte(&cur_instr_line->i.i); cur_d8 = pgm_read_byte(&cur_instr_line->i.d8); @@ -585,7 +585,7 @@ void ZigbeeStateMachine_Run(void) { case ZGB_INSTR_STOP: zigbee.state_machine = false; if (cur_d8) { - AddLog_P2(LOG_LEVEL_ERROR, PSTR("ZIG: Stopping (%d)"), cur_d8); + AddLog_P2(LOG_LEVEL_ERROR, PSTR(D_LOG_ZIGBEE "Stopping (%d)"), cur_d8); } break; case ZGB_INSTR_CALL: diff --git a/tasmota/xdrv_23_zigbee_8_parsers.ino b/tasmota/xdrv_23_zigbee_8_parsers.ino index 22cebd21c..a610bb882 100644 --- a/tasmota/xdrv_23_zigbee_8_parsers.ino +++ b/tasmota/xdrv_23_zigbee_8_parsers.ino @@ -435,7 +435,6 @@ const Z_Dispatcher Z_DispatchTable[] PROGMEM = { int32_t Z_Recv_Default(int32_t res, const class SBuffer &buf) { // Default message handler for new messages - AddLog_P2(LOG_LEVEL_DEBUG, PSTR("ZIG: Z_Recv_Default")); if (zigbee.init_phase) { // if still during initialization phase, ignore any unexpected message return -1; // ignore message diff --git a/tasmota/xdrv_23_zigbee_9_impl.ino b/tasmota/xdrv_23_zigbee_9_impl.ino index a8736003c..41a73b415 100644 --- a/tasmota/xdrv_23_zigbee_9_impl.ino +++ b/tasmota/xdrv_23_zigbee_9_impl.ino @@ -66,7 +66,7 @@ int32_t ZigbeeProcessInput(class SBuffer &buf) { } } - AddLog_P2(LOG_LEVEL_DEBUG, PSTR("ZIG: ZigbeeProcessInput: recv_prefix_match = %d, recv_filter_match = %d"), recv_prefix_match, recv_filter_match); + AddLog_P2(LOG_LEVEL_DEBUG_MORE, PSTR(D_LOG_ZIGBEE "ZigbeeProcessInput: recv_prefix_match = %d, recv_filter_match = %d"), recv_prefix_match, recv_filter_match); } // if there is a recv_callback, call it now @@ -105,7 +105,7 @@ int32_t ZigbeeProcessInput(class SBuffer &buf) { res = (*zigbee.recv_unexpected)(res, buf); } } - AddLog_P2(LOG_LEVEL_DEBUG, PSTR("ZIG: ZigbeeProcessInput: res = %d"), res); + AddLog_P2(LOG_LEVEL_DEBUG_MORE, PSTR(D_LOG_ZIGBEE "ZigbeeProcessInput: res = %d"), res); // change state accordingly if (0 == res) { @@ -184,7 +184,7 @@ void ZigbeeInput(void) ToHex_P((unsigned char*)zigbee_buffer->getBuffer(), zigbee_buffer->len(), hex_char, sizeof(hex_char)); #ifndef Z_USE_SOFTWARE_SERIAL - AddLog_P2(LOG_LEVEL_DEBUG, PSTR("ZIG: Bytes follor_read_metric = %0d"), ZigbeeSerial->getLoopReadMetric()); + AddLog_P2(LOG_LEVEL_DEBUG_MORE, PSTR(D_LOG_ZIGBEE "Bytes follow_read_metric = %0d"), ZigbeeSerial->getLoopReadMetric()); #endif // buffer received, now check integrity if (zigbee_buffer->len() != zigbee_frame_len) { @@ -195,15 +195,17 @@ void ZigbeeInput(void) AddLog_P2(LOG_LEVEL_INFO, PSTR(D_JSON_ZIGBEEZNPRECEIVED ": received bad FCS frame %s, %d"), hex_char, fcs); } else { // frame is correct - AddLog_P2(LOG_LEVEL_DEBUG, PSTR(D_JSON_ZIGBEEZNPRECEIVED ": received correct frame %s"), hex_char); + //AddLog_P2(LOG_LEVEL_DEBUG_MORE, PSTR(D_JSON_ZIGBEEZNPRECEIVED ": received correct frame %s"), hex_char); SBuffer znp_buffer = zigbee_buffer->subBuffer(2, zigbee_frame_len - 3); // remove SOF, LEN and FCS #ifdef ZIGBEE_VERBOSE ToHex_P((unsigned char*)znp_buffer.getBuffer(), znp_buffer.len(), hex_char, sizeof(hex_char)); - Response_P(PSTR("{\"" D_JSON_ZIGBEEZNPRECEIVED "\":\"%s\"}"), hex_char); - MqttPublishPrefixTopic_P(RESULT_OR_TELE, PSTR(D_JSON_ZIGBEEZNPRECEIVED)); - XdrvRulesProcess(); + AddLog_P2(LOG_LEVEL_DEBUG, PSTR(D_LOG_ZIGBEE D_JSON_ZIGBEEZNPRECEIVED " %s"), + hex_char); + // Response_P(PSTR("{\"" D_JSON_ZIGBEEZNPRECEIVED "\":\"%s\"}"), hex_char); + // MqttPublishPrefixTopic_P(RESULT_OR_TELE, PSTR(D_JSON_ZIGBEEZNPRECEIVED)); + // XdrvRulesProcess(); #endif // now process the message @@ -333,10 +335,8 @@ void ZigbeeZNPSend(const uint8_t *msg, size_t len) { #ifdef ZIGBEE_VERBOSE // Now send a MQTT message to report the sent message char hex_char[(len * 2) + 2]; - Response_P(PSTR("{\"" D_JSON_ZIGBEEZNPSENT "\":\"%s\"}"), - ToHex_P(msg, len, hex_char, sizeof(hex_char))); - MqttPublishPrefixTopic_P(RESULT_OR_TELE, PSTR(D_JSON_ZIGBEEZNPSENT)); - XdrvRulesProcess(); + AddLog_P2(LOG_LEVEL_DEBUG, PSTR(D_LOG_ZIGBEE D_JSON_ZIGBEEZNPSENT " %s"), + ToHex_P(msg, len, hex_char, sizeof(hex_char))); #endif }