jomjol/AI-on-the-edge-device
Easy to use device for connecting "old" measuring units (water, power, gas, ...) to the digital world
AI‑on‑the‑Edge‑Device – Digitizing Analog Meters with an ESP32‑CAM
What it is – A small, low‑cost hardware‑software kit that runs TensorFlow Lite inference on an ESP32‑CAM to read analog utility meters (water, gas, electricity). The device captures a picture of the dial, extracts the region of interest, runs a tiny neural network to recognise the digits, and then makes the reading available via MQTT, InfluxDB, a REST API or a Home Assistant integration.
Key components
- ESP32‑CAM (≈ 3 × 4.5 × 2 cm, < 10 €) with built‑in camera and LED illumination.
- TensorFlow Lite wrapper for on‑device inference.
- Image‑pre‑processing (feature detection, alignment, ROI extraction) performed on the ESP32.
- Web UI for configuration, OTA firmware updates and live preview.
- Connectivity: Wi‑Fi, MQTT, InfluxDB 1/2, REST API, Home Assistant auto‑discovery.
How it works
- The firmware flashes the ESP32‑CAM.
- At configurable intervals the camera snaps a photo of the meter.
- The image is cropped to the dial area, normalised and fed to a TFLite model that outputs the numeric reading.
- The result is pushed to the chosen back‑ends (MQTT broker, InfluxDB, etc.) or served via the built‑in REST endpoint.
Typical use‑cases
- Home‑automation: automatically log water, gas or electricity consumption.
- Retro‑fit legacy meters without digital output.
- Low‑power, offline‑first monitoring where cloud processing is undesirable.
Getting started
- Hardware – Any ESP32 board with a supported camera module (see the hardware‑compatibility page). Optionally 3‑D‑print a case from the provided Thingiverse links.
- Download – Grab the latest release from the GitHub Releases page.
- Flashing – Use the browser‑based Web Installer (or Espressif’s Flash Tool / ESPTool) to flash the firmware via USB.
- SD‑card setup – After the firmware boots, the device creates a Wi‑Fi access point; connect to it and let the built‑in script format and populate the SD card, or manually copy the config files.
- Configuration – Access the web interface to set Wi‑Fi credentials, MQTT/InfluxDB endpoints, capture interval, and OTA update settings.
- Integration – Enable Home Assistant discovery or point your MQTT client / InfluxDB to the device’s topics.
Documentation & support
- Full docs (installation, hardware compatibility, build instructions) are hosted at https://jomjol.github.io/AI-on-the-edge-device-docs/.
- Community help via the GitHub Discussions page; bugs and feature requests go to Issues.
- A collection of YouTube tutorials demonstrates the build and deployment steps.
Why it matters It showcases practical edge‑AI: a microcontroller runs a neural network locally, eliminating the need for constant cloud connectivity while keeping costs low. This makes AI‑enabled sensing accessible for hobbyists and small‑scale IoT deployments.
Quick links
- Source code:
code/(C++ firmware) - Web installer: https://jomjol.github.io/AI-on-the-edge-device/
- 3‑D printable cases: Water, Power, Gas meters on Thingiverse/Printables
- Donate: PayPal link for supporting the developer
Related
- Project
- Project
- Project
- Project