{"id":23174,"library":"tasmota-metrics","title":"tasmota-metrics","description":"Firmware size analysis tool for ESP-IDF based projects (e.g., Tasmota). Analyzes ELF/map files from ESP32/ESP8266 builds to report component-level flash and RAM usage. Current version 0.4.3, actively maintained on GitHub, infrequent releases.","status":"active","version":"0.4.3","language":"python","source_language":"en","source_url":"https://github.com/jason2866/tasmota-metrics","tags":["esp-idf","firmware","size-analysis","tasmota"],"install":[{"cmd":"pip install tasmota-metrics","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"note":"Common mistake: importing the module directly without the class. Use 'from tasmota_metrics import TasmotaMetrics'.","wrong":"import tasmota_metrics","symbol":"TasmotaMetrics","correct":"from tasmota_metrics import TasmotaMetrics"}],"quickstart":{"code":"from tasmota_metrics import TasmotaMetrics\n\nmetrics = TasmotaMetrics(\n    firmware_path='build/firmware.map',\n    chip='esp32'\n)\nreport = metrics.analyze()\nprint(report)","lang":"python","description":"Analyze a firmware map file for component memory usage."},"warnings":[{"fix":"Use only recognized chip identifiers: esp32, esp8266, esp32s2, esp32c3, esp32s3.","message":"The 'chip' parameter must match the target exactly ('esp32', 'esp8266', 'esp32s2', etc.). Unknown chip types cause runtime errors.","severity":"gotcha","affected_versions":">=0.3.0"},{"fix":"Update your ESP-IDF toolchain or downgrade to v0.3.3 if you encounter parsing errors on older builds.","message":"In v0.3.4, Xtensa target detection pattern changed. Map files generated with older ESP-IDF versions may fail to parse correctly.","severity":"breaking","affected_versions":"0.3.4 to current"},{"fix":"Upgrade Python to 3.7 or later.","message":"Requires Python >=3.7; no longer installable on Python 3.6 or earlier.","severity":"gotcha","affected_versions":">=0.3.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Install with 'pip install tasmota-metrics' and import as 'from tasmota_metrics import TasmotaMetrics'.","cause":"The package is installed as 'tasmota-metrics' (with hyphen) but imported as 'tasmota_metrics' (with underscore). Users often try to import using the hyphenated name.","error":"ModuleNotFoundError: No module named 'tasmota_metrics'"},{"fix":"Use valid chip names: esp32, esp8266, esp32s2, esp32c3, esp32s3.","cause":"The chip parameter was misspelled or an unsupported variant was used.","error":"ValueError: Unsupported chip type: esp32xx"},{"fix":"Ensure the map file exists. Typically found in the build directory of your ESP-IDF project.","cause":"The firmware_path points to a missing file or incorrect path.","error":"FileNotFoundError: [Errno 2] No such file or directory: 'build/firmware.map'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}