Skip to content

📦 AI-on-the-Edge Device [SLFork] - Smart AI-on-edge meter digitization based on ESP32 / ESP32-S3, upstream prinicple with custom enhancements

License

Notifications You must be signed in to change notification settings

Slider0007/AI-on-the-edge-device

 
 

Repository files navigation

AI-on-the-Edge Device [SLFork]

Artificial intelligence is everywhere — from speech recognition to image analysis. While traditional AI often relies on powerful cloud servers, AI-on-edge runs directly on compact, affordable devices. This project brings edge computing to your home by using a low-cost, AI-enabled device to digitize your analog meters — whether it's water, gas or electricity. With budget-friendly hardware and an easy setup, you can turn any standard meter into a smart, connected device.

Key Features

  • Compact & Cost-Effective – Designed for small, affordable, AI-capable hardware
  • Local Image Processing – Fully processes and evaluates images on-device without external dependencies
  • On-Device AI – TensorFlow enables efficient edge intelligence without external dependencies
  • Web-Based Interface – Browser UI for monitoring, configuration and control
  • OTA Update – Seamless over-the-air firmware updates via the web interface

✨ Fork-Specific Enhancements

  • Hardware – Compatible with ESP32 and ESP32-S3 devices
  • Connectivity – Operates in WiFi Client or Access Point (Standalone) mode
  • Flashlight – Customizable setup using multiple PWM-driven or smart LEDs or trigger an actuator
  • Durability – Minimizes SD card wear by keeping process data (ROIs, models, markers) in RAM
  • Performance - Reduced I/O cycles (data kept in RAM) and hardware-optimized routines
  • User Experience – Consistent UI, dynamic config reloads without reboot, improved error handling/logging
  • Configuration – Firmware-managed JSON-based config for better maintainability and resilience
  • Codebase – Streamlined, mostly consistently styled, easier to maintain
  • API Design – Relevant APIs use JSON notation for seamless integration
  • TLS Support – Secure connections supported for MQTT, InfluxDB and Webhook

Further refinements are documented in the changelog (v16.0.0-SLFork and newer).

APIs & Integrations

  • Home Assistant Integration – Automatic device discovery via MQTT
  • REST API – Retrieve live data, check device status, and issue control commands over HTTP
  • MQTT v3 – Publish data to your MQTT broker (TLS supported)
  • InfluxDB v1 / v2 – Log data directly into time-series databases (TLS supported)
  • Webhook Publishing – Push content to external services via HTTP hook (TLS supported)
  • Prometheus/OpenMetrics Exporter – Export metrics for device monitoring purposes

Explore API docs via links above or device web interface: System > Documentation
ℹ️ Note: APIs aren’t fully compatible with jomjol’s firmware.

Workflow

The device captures an image of your meter at scheduled intervals and aligns it using predefined markers for accuracy. It then extracts the Regions of Interest (ROIs) from the image and processes these sections using AI. The extracted data is analyzed and converted into a digital reading, ready to be sent or accessed through various services and APIs (see above).

Impressions

Hardware

Web Interface

Supported Hardware

Board Compatibility

Board Type SOC / Module Network Interfaces Flashlight Firmware Support Remarks
ESP32-CAM ESP32 1. WiFi Client
2. WiFi AP
✅ Onboard LED All ⚠️ Only boards with ≥ 4MB RAM are supported
⚠️ Beware of inferior quality Chinese clones
XIAO ESP32 Sense ESP32S3 1. WiFi Client
2. WiFi AP
❌ External LED required (PWM, SmartLED) ≥ v17.0.0 ⚠️ Runs hot, small heatsink recommended
Freenove ESP32S3-WROOM ESP32S3-WROOM-1-N16R8

ESP32S3-WROOM-1-N8R8
1. WiFi Client
2. WiFi AP
✅ Onboard LED
Low intensity: Additional external LED recommended (PWM, SmartLED)
≥ v17.0.0

≥ v17.1.0
ℹ️ SOC and pin-compatible boards with 8/16MB flash and 8MB RAM supported

Camera Compatibility

Camera Type Sensor Resolution Digital Zoom Firmware Support Remarks
OV2640 2MP 1.0x - 2.5x All ℹ️ EOL since 2009, still widely used
ℹ️ Pin/function-compatible Chinese clones supported
OV5640 5MP 1.0x - 4.0x $\ge$ v17.0.0 ℹ️ EOL since 2019, still widely used
ℹ️ Autofocus not supported
ℹ️ Power consumption higher than OV2640
⚠️ Tends to get hotter than OV2640 – use a heat sink or reduce camera frequency (default: 10MHz or lower)
⚠️ ESP32-CAM: Functional, but core / I/O voltage mismatch (board: 1.2V / 3.3V; camera: 1.5V / 2.8V (abs. max. 4.5V)).
⚠️ XIAO ESP32S3 Sense: Functional, minor core voltage deviation (board: 1.3V; camera: 1.5V)
⚠️ Freenove-ESP32S3-WROOM: Functional, but core / I/O voltage mismatch (board: 1.2V / 3.3V; camera: 1.5V / 2.8V).

⚠️ Important Note

The camera clock frequency — configurable via the WebUI or config file — may negatively impact wireless network performance. This can result in slower WebUI loading times or increased latency, particularly when using low-quality boards or those with onboard antennas. To optimize performance, experiment with different camera clock frequencies while evaluating both network responsiveness and resulting image quality. The ideal setting may vary depending on your specific hardware setup and the Wi-Fi channel in use.

Inform Yourself

There is growing documentation which provides you with a lot of information. Head there to get a start, how to set it up and configure it.
ℹ️ Not every description is 100% suitable for this fork. Therefore please check docs folder of this repository for any fork specific documentation.

Firmware Installation

There are several convenient options to install the firmware and prepare the SD card content.

Download Firmware

  • Releases - Official firmware releases are available on the GitHub Releases Page
  • Development Builds - You can also test the latest development build / upcoming release via pull request labeled autorelease: pending. Follow the instructions at the bottom of the pull request to download the corresponding precompiled development build.

⚠️ Important: Do not use source files directly from the repository — this includes SD card preparation. Always use the official precompiled release packages or GitHub CI precompiled development builds. Using any of the source files may result in incomplete or non-functional firmware.


Over The Air (OTA) Update

Once the initial installation is complete, it is strongly recommended to perform all future firmware updates via the device’s web interface: System > OTA Update. This method ensures seamless upgrades with minimal risk.


Option 1: Web Installer (Only For Releases)

For the easiest and most user-friendly setup, use the Web Installer.
Follow the step-by-step instructions on the Web Installer page. For more details, see the Web Installer Provisioning Guide.


Option 2: Manual Installation (MCU + SD Card)

Follow the steps in the Manual Provisioning Guide to flash the MCU and prepare the SD card manually.

Build Yourself

Developers and advanced users can build the firmware from source. Follow the Build / Debug Instructions for environment setup and compilation. If you don’t need to customize the firmware, it’s easier to use the precompiled releases provided on the Releases page.

Support / Community

ℹ️ This is a fork of jomjol’s original project, customized for personal use.

  • This fork is actively developed and maintained independently
  • It is no longer compatible with the upstream project
  • It remains public to give something back to the community and help others with similar use cases
  • This project builds on jomjol’s original repository — make sure to respect the upstream license
  • Customized code can be used for non-commercial purposes only - be fair and credit the original source
  • Community discussions, feedback, and bug reports are always welcome and appreciated

Although no longer working on the upstream project, this version aims to provide a flexible and robust alternative.
Thanks for your interest and support!

About

📦 AI-on-the-Edge Device [SLFork] - Smart AI-on-edge meter digitization based on ESP32 / ESP32-S3, upstream prinicple with custom enhancements

Topics

Resources

License

Stars

Watchers

Forks

Languages

  • C++ 52.7%
  • C 22.4%
  • HTML 16.7%
  • CSS 5.5%
  • JavaScript 1.1%
  • Python 1.0%
  • Other 0.6%