[Custom Component] AI Meter Reader and general tflite esphome implementation + Call for Contributors!

Hi everyone! :wave:

I’m excited to share a major update to the ESPHome AI Component. This project lets you turn an ESP32 camera into a fully offline, privacy-first meter reader (water, gas, electricity, or analog dials) that integrates natively with Home Assistant.

What makes this different? Unlike standalone firmwares (which are great!), this is a native ESPHome component.

  • Config in YAML: You configure it just like any other ESPHome sensor.
  • Native API: No MQTT required (unless you want it!).
  • OTA Updates: Manage it directly from your ESPHome dashboard, along with all your other ESPHome components.

:rocket: Performance & modularity

  • Optimized for ESP32: Leveraging esp-nn hardware instructions, inference time for digit recognition is now under 270ms (down from ~2.7s on older chips, but still works great on legacy ESP32 boards!).
  • Reuse the Core: The tflite_micro_helper is now a standalone component you can use to run any TFLite model in your own ESPHome projects.
  • Memory Safety: The core has been rewritten in modern C++ (C++20 compliant) with std::span and zero-copy buffers to be robust and leak-free.

:sparkles: Key Features

  • Digital & Analog (Dev State): Reads 7-segment displays AND analog dial needles (currently in development, not production ready).
  • Active Learning: Optional “Data Collector” to upload low-confidence images to help train the global model.
  • Visual Config: A web-based tool to easily draw your crop regions.

:sos: Call for Contributors (We need you!) This project has grown to over 20k lines of C++.

  • Note on Development: While the legacy code was manual, v2.0 leverages AI assistance to achieve complex dual-core optimizations and memory management. It works great, but it adds complexity!
  • We need: C++ developers to review code, power users to test edge cases, and documentation helpers.
  • Promoters: I don’t use social media (personal choice to keep my life quiet), so I rely on you to talk about this project!

If you love the idea of On-Device AI without the cloud, please check it out and consider contributing!

:link: GitHub: GitHub - nliaudat/esphome_ai_component: A component to run AI model on esphome
:open_book: Wiki: Home · nliaudat/esphome_ai_component Wiki · GitHub

3 Likes

Hi, my power meter is s34u28, which iterates display over different obis codes and readouts. It shows readout of one parameter for some time, then another etc. Current obis code is also displayed, so it is clear which value is currently shown. Can this component be used to read these values? I know this meter supports different protocols, that would be easier to read but my energy provider won’t give me access/keys for that. Lower left is obis code (i want 1.8.0, and 2.8.0) bigger number is current readout for that code.