diff --git a/tasmota/tasmota_xnrg_energy/xnrg_05_pzem_ac.ino b/tasmota/tasmota_xnrg_energy/xnrg_05_pzem_ac.ino index 94f6ff14d..3cb4be78d 100644 --- a/tasmota/tasmota_xnrg_energy/xnrg_05_pzem_ac.ino +++ b/tasmota/tasmota_xnrg_energy/xnrg_05_pzem_ac.ino @@ -122,6 +122,9 @@ void PzemAcSnsInit(void) uint8_t result = PzemAcModbus->Begin(9600); if (result) { if (2 == result) { ClaimSerial(); } +#ifdef ESP32 + AddLog(LOG_LEVEL_DEBUG, PSTR("PAC: Serial UART%d"), PzemAcModbus->getUart()); +#endif Energy->phase_count = ENERGY_MAX_PHASES; // Start off with three phases PzemAc.phase = 0; } else { diff --git a/tasmota/tasmota_xnrg_energy/xnrg_06_pzem_dc.ino b/tasmota/tasmota_xnrg_energy/xnrg_06_pzem_dc.ino index 7fe4d3b95..a30098c07 100644 --- a/tasmota/tasmota_xnrg_energy/xnrg_06_pzem_dc.ino +++ b/tasmota/tasmota_xnrg_energy/xnrg_06_pzem_dc.ino @@ -130,6 +130,9 @@ void PzemDcSnsInit(void) uint8_t result = PzemDc->modbus->Begin(9600, SERIAL_8N2); if (result) { if (2 == result) { ClaimSerial(); } +#ifdef ESP32 + AddLog(LOG_LEVEL_DEBUG, PSTR("PDC: Serial UART%d"), PzemDc->modbus->getUart()); +#endif Energy->type_dc = true; Energy->phase_count = ENERGY_MAX_PHASES; // Start off with three channels PzemDc->channel = 0; diff --git a/tasmota/tasmota_xnrg_energy/xnrg_08_sdm120.ino b/tasmota/tasmota_xnrg_energy/xnrg_08_sdm120.ino index 21c436a77..ab1e7a0b0 100644 --- a/tasmota/tasmota_xnrg_energy/xnrg_08_sdm120.ino +++ b/tasmota/tasmota_xnrg_energy/xnrg_08_sdm120.ino @@ -181,6 +181,9 @@ void Sdm120SnsInit(void) uint8_t result = Sdm120Modbus->Begin(SDM120_SPEED); if (result) { if (2 == result) { ClaimSerial(); } +#ifdef ESP32 + AddLog(LOG_LEVEL_DEBUG, PSTR("SDM: Serial UART%d"), Sdm120Modbus->getUart()); +#endif } else { TasmotaGlobal.energy_driver = ENERGY_NONE; } diff --git a/tasmota/tasmota_xnrg_energy/xnrg_09_dds2382.ino b/tasmota/tasmota_xnrg_energy/xnrg_09_dds2382.ino index c8d258dd2..be4d9c75a 100644 --- a/tasmota/tasmota_xnrg_energy/xnrg_09_dds2382.ino +++ b/tasmota/tasmota_xnrg_energy/xnrg_09_dds2382.ino @@ -94,6 +94,9 @@ void Dds2382SnsInit(void) uint8_t result = Dds2382Modbus->Begin(DDS2382_SPEED); if (result) { if (2 == result) { ClaimSerial(); } +#ifdef ESP32 + AddLog(LOG_LEVEL_DEBUG, PSTR("DDS: Serial UART%d"), Dds2382Modbus->getUart()); +#endif } else { TasmotaGlobal.energy_driver = ENERGY_NONE; } diff --git a/tasmota/tasmota_xnrg_energy/xnrg_10_sdm630.ino b/tasmota/tasmota_xnrg_energy/xnrg_10_sdm630.ino index 38d708ebc..37f0166d7 100644 --- a/tasmota/tasmota_xnrg_energy/xnrg_10_sdm630.ino +++ b/tasmota/tasmota_xnrg_energy/xnrg_10_sdm630.ino @@ -322,6 +322,9 @@ void Sdm630SnsInit(void) uint8_t result = Sdm630Modbus->Begin(SDM630_SPEED); if (result) { if (2 == result) { ClaimSerial(); } +#ifdef ESP32 + AddLog(LOG_LEVEL_DEBUG, PSTR("SDM: Serial UART%d"), Sdm630Modbus->getUart()); +#endif Energy->phase_count = 3; Energy->frequency_common = true; // Use common frequency } else { diff --git a/tasmota/tasmota_xnrg_energy/xnrg_11_ddsu666.ino b/tasmota/tasmota_xnrg_energy/xnrg_11_ddsu666.ino index 67e8cbbb2..3849908ec 100644 --- a/tasmota/tasmota_xnrg_energy/xnrg_11_ddsu666.ino +++ b/tasmota/tasmota_xnrg_energy/xnrg_11_ddsu666.ino @@ -66,7 +66,7 @@ void DDSU666Every250ms(void) AddLogBuffer(LOG_LEVEL_DEBUG_MORE, buffer, Ddsu666Modbus->ReceiveCount()); if (error) { - AddLog(LOG_LEVEL_DEBUG, PSTR("SDM: Ddsu666 error %d"), error); + AddLog(LOG_LEVEL_DEBUG, PSTR("DDS: Ddsu666 error %d"), error); } else { Energy->data_valid[0] = 0; @@ -136,6 +136,9 @@ void Ddsu666SnsInit(void) uint8_t result = Ddsu666Modbus->Begin(DDSU666_SPEED); if (result) { if (2 == result) { ClaimSerial(); } +#ifdef ESP32 + AddLog(LOG_LEVEL_DEBUG, PSTR("DDS: Serial UART%d"), Ddsu666Modbus->getUart()); +#endif } else { TasmotaGlobal.energy_driver = ENERGY_NONE; } diff --git a/tasmota/tasmota_xnrg_energy/xnrg_13_fif_le01mr.ino b/tasmota/tasmota_xnrg_energy/xnrg_13_fif_le01mr.ino index 7d8a08144..9a71328f6 100644 --- a/tasmota/tasmota_xnrg_energy/xnrg_13_fif_le01mr.ino +++ b/tasmota/tasmota_xnrg_energy/xnrg_13_fif_le01mr.ino @@ -123,7 +123,7 @@ void FifLEEvery250ms(void) AddLogBuffer(LOG_LEVEL_DEBUG_MORE, buffer, FifLEModbus->ReceiveCount()); if (error) { - AddLog(LOG_LEVEL_DEBUG, PSTR("FiF-LE: LE01MR Modbus error %d"), error); + AddLog(LOG_LEVEL_DEBUG, PSTR("FIF: LE01MR Modbus error %d"), error); } else { Energy->data_valid[0] = 0; @@ -218,6 +218,9 @@ void FifLESnsInit(void) uint8_t result = FifLEModbus->Begin(LE01MR_SPEED); if (result) { if (2 == result) { ClaimSerial(); } +#ifdef ESP32 + AddLog(LOG_LEVEL_DEBUG, PSTR("FIF: Serial UART%d"), FifLEModbus->getUart()); +#endif } else { TasmotaGlobal.energy_driver = ENERGY_NONE; } diff --git a/tasmota/tasmota_xnrg_energy/xnrg_16_iem3000.ino b/tasmota/tasmota_xnrg_energy/xnrg_16_iem3000.ino index 5fbb007fb..a6235cbfb 100644 --- a/tasmota/tasmota_xnrg_energy/xnrg_16_iem3000.ino +++ b/tasmota/tasmota_xnrg_energy/xnrg_16_iem3000.ino @@ -81,7 +81,7 @@ void IEM3000Every250ms(void) AddLogBuffer(LOG_LEVEL_DEBUG_MORE, buffer, Iem3000Modbus->ReceiveCount()); if (error) { - AddLog(LOG_LEVEL_DEBUG, PSTR("SDM: Iem3000 error %d"), error); + AddLog(LOG_LEVEL_DEBUG, PSTR("IEM: Iem3000 error %d"), error); } else { Energy->data_valid[0] = 0; @@ -185,6 +185,9 @@ void Iem3000SnsInit(void) uint8_t result = Iem3000Modbus->Begin(IEM3000_SPEED); if (result) { if (2 == result) { ClaimSerial(); } +#ifdef ESP32 + AddLog(LOG_LEVEL_DEBUG, PSTR("IEM: Serial UART%d"), Iem3000Modbus->getUart()); +#endif Energy->phase_count = 3; Energy->frequency_common = true; // Use common frequency } else { diff --git a/tasmota/tasmota_xnrg_energy/xnrg_17_ornowe517.ino b/tasmota/tasmota_xnrg_energy/xnrg_17_ornowe517.ino index 3dbb082da..60eb2c77c 100644 --- a/tasmota/tasmota_xnrg_energy/xnrg_17_ornowe517.ino +++ b/tasmota/tasmota_xnrg_energy/xnrg_17_ornowe517.ino @@ -82,7 +82,7 @@ void WE517Every250ms(void) AddLogBuffer(LOG_LEVEL_DEBUG_MORE, buffer, We517Modbus->ReceiveCount()); if (error) { - AddLog(LOG_LEVEL_DEBUG, PSTR("ORNO: WE517 error %d"), error); + AddLog(LOG_LEVEL_DEBUG, PSTR("ORN: WE517 error %d"), error); } else { Energy->data_valid[0] = 0; Energy->data_valid[1] = 0; @@ -192,6 +192,9 @@ void We517SnsInit(void) { Serial.begin(WE517_SPEED, SERIAL_8E1); ClaimSerial(); } +#ifdef ESP32 + AddLog(LOG_LEVEL_DEBUG, PSTR("ORN: Serial UART%d"), We517Modbus->getUart()); +#endif Energy->phase_count = 3; Energy->frequency_common = true; // Use common frequency } else { diff --git a/tasmota/tasmota_xnrg_energy/xnrg_18_sdm72.ino b/tasmota/tasmota_xnrg_energy/xnrg_18_sdm72.ino index b5f3c0379..96bc8d9ab 100644 --- a/tasmota/tasmota_xnrg_energy/xnrg_18_sdm72.ino +++ b/tasmota/tasmota_xnrg_energy/xnrg_18_sdm72.ino @@ -136,6 +136,9 @@ void Sdm72SnsInit(void) if (2 == result) { ClaimSerial(); } +#ifdef ESP32 + AddLog(LOG_LEVEL_DEBUG, PSTR("SDM: Serial UART%d"), Sdm72Modbus->getUart()); +#endif } else { TasmotaGlobal.energy_driver = ENERGY_NONE; } diff --git a/tasmota/tasmota_xnrg_energy/xnrg_21_sdm230.ino b/tasmota/tasmota_xnrg_energy/xnrg_21_sdm230.ino index 18054e175..e5b4c876d 100644 --- a/tasmota/tasmota_xnrg_energy/xnrg_21_sdm230.ino +++ b/tasmota/tasmota_xnrg_energy/xnrg_21_sdm230.ino @@ -192,8 +192,11 @@ void Sdm230SnsInit(void) uint8_t result = Sdm230Modbus->Begin(SDM230_SPEED); if (result) { if (2 == result) { ClaimSerial(); } - Energy->phase_count = 1; - Energy->frequency_common = true; // Use common frequency +#ifdef ESP32 + AddLog(LOG_LEVEL_DEBUG, PSTR("SDM: Serial UART%d"), Sdm230Modbus->getUart()); +#endif + Energy->phase_count = 1; + Energy->frequency_common = true; // Use common frequency } else { TasmotaGlobal.energy_driver = ENERGY_NONE; } diff --git a/tasmota/tasmota_xnrg_energy/xnrg_24_esp32_biopdu.ino b/tasmota/tasmota_xnrg_energy/xnrg_24_esp32_biopdu.ino index 33ddf67b4..8b2beb4b6 100644 --- a/tasmota/tasmota_xnrg_energy/xnrg_24_esp32_biopdu.ino +++ b/tasmota/tasmota_xnrg_energy/xnrg_24_esp32_biopdu.ino @@ -236,6 +236,9 @@ void BioPduSnsInit(void) { ClaimSerial(); } +#ifdef ESP32 + AddLog(LOG_LEVEL_DEBUG, PSTR("PDU: Serial UART%d"), BioPduModbus->getUart()); +#endif BioPdu.phase = Energy->phase_count - 1; } else diff --git a/tasmota/tasmota_xnrg_energy/xnrg_29_modbus.ino b/tasmota/tasmota_xnrg_energy/xnrg_29_modbus.ino index a97da8f83..68d939b31 100644 --- a/tasmota/tasmota_xnrg_energy/xnrg_29_modbus.ino +++ b/tasmota/tasmota_xnrg_energy/xnrg_29_modbus.ino @@ -741,6 +741,9 @@ void EnergyModbusSnsInit(void) { uint8_t result = EnergyModbus->Begin(NrgMbsParam.serial_bps, NrgMbsParam.serial_config); if (result) { if (2 == result) { ClaimSerial(); } +#ifdef ESP32 + AddLog(LOG_LEVEL_DEBUG, PSTR("NRG: Serial UART%d"), EnergyModbus->getUart()); +#endif #ifdef ENERGY_MODBUS_TICKER ticker_energy_modbus.attach_ms(NrgMbsParam.ticker_poll, EnergyModbusLoop); diff --git a/tasmota/tasmota_xsns_sensor/xsns_17_senseair.ino b/tasmota/tasmota_xsns_sensor/xsns_17_senseair.ino index 804c4d929..0983b8c86 100644 --- a/tasmota/tasmota_xsns_sensor/xsns_17_senseair.ino +++ b/tasmota/tasmota_xsns_sensor/xsns_17_senseair.ino @@ -216,6 +216,9 @@ void SenseairInit(void) // We have hardware serial, so claim it ClaimSerial(); } +#ifdef ESP32 + AddLog(LOG_LEVEL_DEBUG, PSTR(D_LOG_SENSEAIR "Serial UART%d"), SenseairModbus->getUart()); +#endif senseair_type = SENSOR_TYPE_UNKNOWN; } } diff --git a/tasmota/tasmota_xsns_sensor/xsns_83_neopool.ino b/tasmota/tasmota_xsns_sensor/xsns_83_neopool.ino index 60cf0f6d1..e13ec9835 100644 --- a/tasmota/tasmota_xsns_sensor/xsns_83_neopool.ino +++ b/tasmota/tasmota_xsns_sensor/xsns_83_neopool.ino @@ -1450,6 +1450,9 @@ void NeoPoolInit(void) { if (2 == result) { ClaimSerial(); } +#ifdef ESP32 + AddLog(LOG_LEVEL_DEBUG, PSTR("NEO: Serial UART%d"), NeoPoolModbus->getUart()); +#endif if (NeoPoolInitData()) { // Claims heap space neopool_active = true; }