diff --git a/tasmota/support_command.ino b/tasmota/support_command.ino index bba801784..52e4f58da 100644 --- a/tasmota/support_command.ino +++ b/tasmota/support_command.ino @@ -590,14 +590,14 @@ void CmndStatus(void) ",\"" D_JSON_BOOTVERSION "\":%d" #endif ",\"" D_JSON_COREVERSION "\":\"" ARDUINO_CORE_RELEASE "\",\"" D_JSON_SDKVERSION "\":\"%s\"," - "\"CpuFrequency\":%d,\"Hardware\":\"%s\"" + "\"CpuFrequency\":%d,\"Hardware\":\"%s%s\"" "%s}}"), TasmotaGlobal.version, TasmotaGlobal.image_name, GetBuildDateAndTime().c_str() #ifdef ESP8266 , ESP.getBootVersion() #endif , ESP.getSdkVersion(), - ESP.getCpuFreqMHz(), GetDeviceHardware().c_str(), + ESP.getCpuFreqMHz(), GetDeviceHardware().c_str(), GetDeviceHardwareRevision().c_str(), GetStatistics().c_str()); CmndStatusResponse(2); } diff --git a/tasmota/support_esp.ino b/tasmota/support_esp.ino index 9797d1859..f8d08d3be 100644 --- a/tasmota/support_esp.ino +++ b/tasmota/support_esp.ino @@ -95,6 +95,10 @@ String GetDeviceHardware(void) { return F("ESP8266EX"); } +String GetDeviceHardwareRevision(void) { + return ""; +} + #endif /*********************************************************************************************\ @@ -659,6 +663,7 @@ typedef struct { if (rev3) { return F("ESP32-PICO-V3"); } // Max 240MHz, Dual core, LGA 7*7, ESP32-PICO-V3-ZERO, ESP32-PICO-V3-ZERO-DevKit else { return F("ESP32-PICO-D4"); } // Max 240MHz, Dual core, LGA 7*7, 4MB embedded flash, ESP32-PICO-KIT case 6: return F("ESP32-PICO-V3-02"); // Max 240MHz, Dual core, LGA 7*7, 8MB embedded flash, 2MB embedded PSRAM, ESP32-PICO-MINI-02, ESP32-PICO-DevKitM-2 + case 7: return F("ESP32-D0WDR2-V3"); // Max 240MHz, Dual core, QFN 5*5, ESP32-WROOM-32E, ESP32_WROVER-E, ESP32-DevKitC? } #endif // CONFIG_IDF_TARGET_ESP32 return F("ESP32"); @@ -767,6 +772,24 @@ typedef struct { return F("ESP32"); } +String GetDeviceHardwareRevision(void) { +/* +// The structure represents information about the chip +typedef struct { + esp_chip_model_t model; //!< chip model, one of esp_chip_model_t + uint32_t features; //!< bit mask of CHIP_FEATURE_x feature flags + uint8_t cores; //!< number of CPU cores + uint8_t revision; //!< chip revision number +} esp_chip_info_t; +*/ + esp_chip_info_t chip_info; + esp_chip_info(&chip_info); + + char revision[12]; + snprintf_P(revision, sizeof(revision), PSTR(" (rev. %d)"), chip_info.revision); + return revision; +} + /* * ESP32 v1 and v2 needs some special patches to use PSRAM. * Standard Tasmota 32 do not include those patches. diff --git a/tasmota/xdrv_01_webserver.ino b/tasmota/xdrv_01_webserver.ino index bb8d0dccb..ae049761a 100644 --- a/tasmota/xdrv_01_webserver.ino +++ b/tasmota/xdrv_01_webserver.ino @@ -2420,7 +2420,7 @@ void HandleInformation(void) #endif // USE_DISCOVERY WSContentSend_P(PSTR("}1}2 ")); // Empty line - WSContentSend_P(PSTR("}1" D_ESP_CHIP_ID "}2%d (%s)"), ESP_getChipId(), GetDeviceHardware().c_str()); + WSContentSend_P(PSTR("}1" D_ESP_CHIP_ID "}2%d (%s%s)"), ESP_getChipId(), GetDeviceHardware().c_str(), GetDeviceHardwareRevision().c_str()); #ifdef ESP8266 WSContentSend_P(PSTR("}1" D_FLASH_CHIP_ID "}20x%06X"), ESP.getFlashChipId()); #endif