GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com β€” GitHub - smilebob/ev-battery-experts: ⚑ Universal EV Battery State of Health (SOH) Analyzer, Electrochemical Degradation Forecaster & Certified Inspection Platform (CLI, Native GNOME, Web, MCP & Docker)

BranchesTags
Open more actions menu

Latest commit

 

History

30 Commits
30 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
agents
agents
 
 
data
data
 
 
debian
debian
 
 
docs
docs
 
 
flatpak
flatpak
 
 
scripts
scripts
 
 
skills/ev-battery-soh
skills/ev-battery-soh
 
 
templates
templates
 
 
.gitignore
.gitignore
 
 
Dockerfile
Dockerfile
 
 
HANDOVER.md
HANDOVER.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
analyzer.py
analyzer.py
 
 
certificate.py
certificate.py
 
 
chemistries.py
chemistries.py
 
 
crypto_signer.py
crypto_signer.py
 
 
db.py
db.py
 
 
docker-compose.yml
docker-compose.yml
 
 
gnome_app.py
gnome_app.py
 
 
i18n.py
i18n.py
 
 
main.py
main.py
 
 
mcp_server.py
mcp_server.py
 
 
org.smilebob.EvBatterySoh.desktop
org.smilebob.EvBatterySoh.desktop
 
 
parsers.py
parsers.py
 
 
pdf_certificate.py
pdf_certificate.py
 
 
portainer-stack.yml
portainer-stack.yml
 
 
pyproject.toml
pyproject.toml
 
 
verifier.py
verifier.py
 
 
web_app.py
web_app.py
 
 

Repository files navigation

πŸ”‹ EV Battery SOH Analyzer & AI Agent

License Python

An advanced, portable, telemetric battery capacity and State of Health (SOH) analyzer for electric vehicles. It estimates usable capacity trajectories, applies Gaussian local weighted regression with 95% uncertainty confidence bands, and generates an executive-grade interactive HTML/PDF assessment report.

Works seamlessly:

  • As a standalone CLI utility on Linux, macOS, and Windows.
  • As an installable Python package (pip install . or uv pip install -e .).
  • Within Google Antigravity via its built-in skill and agent persona.
  • Within any AI Agent framework (Claude Code, Cursor, AutoGPT, OpenAI Assistants).

πŸ“ Repository Structure

ev-battery-experts/
β”œβ”€β”€ main.py                  # CLI executable entry point
β”œβ”€β”€ analyzer.py              # Statistical engine, LOWESS regression, Plotly & Jinja2 report generator
β”œβ”€β”€ chemistries.py           # Multi-chemistry battery database & vehicle pack catalog (LFP, NMC, NCA, Na-Ion)
β”œβ”€β”€ parsers.py               # Polymorphic data ingestion (TeslaMate, ScanMyTesla, Tronity, Generic)
β”œβ”€β”€ pdf_certificate.py       # Official signed PDF inspection certificate generator (ReportLab + QR Code)
β”œβ”€β”€ crypto_signer.py         # ECDSA P-256 + SHA-256 cryptographic signing & key management engine
β”œβ”€β”€ verifier.py              # Offline certificate verification & authenticity validator
β”œβ”€β”€ web_app.py               # Standalone FastAPI web application with OpenAPI 3.1 & REST API
β”œβ”€β”€ db.py                    # SQLite database models, bcrypt salted password hashing & JWT auth
β”œβ”€β”€ templates/               # HTML5 & Tailwind CSS responsive UI templates (Public, Admin, Results)
β”œβ”€β”€ mcp_server.py            # Model Context Protocol (MCP) server for AI assistants
β”œβ”€β”€ Dockerfile               # Multi-stage lightweight production container
β”œβ”€β”€ docker-compose.yml       # Local Docker Compose setup with persistent data volumes
β”œβ”€β”€ portainer-stack.yml      # Portainer stack deployment template using GHCR image
β”œβ”€β”€ pyproject.toml           # Standard PEP 517/621 packaging configuration
β”œβ”€β”€ LICENSE                  # BSD 3-Clause License
β”œβ”€β”€ docs/                    # πŸ“š Documentation
β”‚   β”œβ”€β”€ INSTALLATION.md      # Installation guide (Linux, macOS, Windows, Docker, uv, pip)
β”‚   β”œβ”€β”€ USAGE.md             # Practical guide, CLI options, REST API, Portainer & CSV formats
β”‚   └── METHODOLOGY.md       # Physical principles & mathematical modeling
β”œβ”€β”€ skills/
β”‚   └── ev-battery-soh/
β”‚       └── SKILL.md         # Universal Agent Skill definition
β”œβ”€β”€ agents/
β”‚   └── ev-battery-expert.md # AI Agent Persona specification
└── README.md

πŸ“š Documentation

  • Installation Guide: Detailed step-by-step setup on Linux, macOS, and Windows.
  • User Manual: CLI syntax, column mapping options, supported CSV formats, and PDF export.
  • Scientific Methodology: Physical telemetry principles, discretization noise handling, and statistical confidence intervals.

πŸ“¦ Quick Installation

Requires Python 3.9 or higher.

git clone https://github.com/smilebob/ev-battery-experts.git
cd ev-battery-experts

# Using standard pip:
pip install -e .

# Or using uv:
uv pip install -e .

πŸš€ Quick Usage

1. Automatic Column Detection (TeslaMate, Tronity, ABRP, etc.)

# English report (default)
ev-battery-soh /path/to/charging_logs.csv -o battery_report.html

# French report (FranΓ§ais)
ev-battery-soh /path/to/charging_logs.csv --lang fr -o rapport_fr.html

# Spanish report (EspaΓ±ol)
ev-battery-soh /path/to/charging_logs.csv --lang es -o informe_es.html

2. Custom Column Mapping

For CSV files with non-standard column headers:

ev-battery-soh custom_export.csv \
  --mapping date=Timestamp energy_added=NetKwh soc_start=InitialSoC soc_end=FinalSoC odometer=MileageKm \
  -o battery_report.html

3. Adjusting Qualification Threshold

ev-battery-soh charges.csv --min-delta 30 -o battery_report.html

4. Signed Official PDF Certificate & VIN

Generate a sealed inspection certificate for vehicle resale signed with ECDSA P-256 and verified via QR-Code:

ev-battery-soh charges.csv --vin XP7YGCEK7PB123456 --pdf-certificate inspection_certificate.pdf

5. Standalone Web Portal & Portainer Deployment

Launch the interactive web UI and Admin panel:

# Locally:
uvicorn web_app:app --host 0.0.0.0 --port 8000

# Or via Docker:
docker compose up -d

Then visit http://localhost:8000 (or http://localhost:8000/docs for the interactive Swagger OpenAPI documentation).


πŸ“Š Report Contents

The generated interactive HTML report provides:

  1. Executive Scorecard: Current SOH with 95% margin of error ($\pm X%$), current usable capacity ($\pm X\text{ kWh}$), baseline capacity $C_0$, and cumulative loss.
  2. Chart 1: Usable Capacity Trajectory & Projections (kWh) with 95% confidence interval band and future predictive cone.
  3. Chart 2: State of Health (SOH %) & Multi-Year Forecast over time.
  4. Chart 3: Degradation vs Odometer Mileage.
  5. Section 4: Electrochemical Degradation Forecast Table: Explicit breakdown (+1 yr, +2 yr, +3 yr) with projected dates, mileage, capacity, and SOH.
  6. Section 5: Certified Quarterly Breakdown Table: Median, standard deviation, and reliability star ratings (β˜…).
  7. Native Print-to-PDF: Pre-styled for direct executive PDF exports via your browser (Ctrl+P / Cmd+P).

πŸ€– AI Agent Integration

  • Google Antigravity: The skill is registered under skills/ev-battery-soh/SKILL.md and can be invoked directly by Antigravity agents.
  • Claude Code / Cursor / OpenAI: Point the agent to skills/ev-battery-soh/SKILL.md to grant autonomous battery telemetry assessment capabilities.

πŸ“„ License

This project is licensed under the BSD 3-Clause License - see the LICENSE file for details.

About

⚑ Universal EV Battery State of Health (SOH) Analyzer, Electrochemical Degradation Forecaster & Certified Inspection Platform (CLI, Native GNOME, Web, MCP & Docker)

github.com/smilebob/ev-battery-experts

Topics

batterydebiandockerecdsaelectric-vehicleselectrochemical-modelingfastapiflatpakgnomegtk4inspection-certificatelibadwaitamodel-context-protocolsohstate-of-healthtelemetryteslateslamate

Resources

Readme
BSD-3-Clause license
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 β€” GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800Γ—600. No cookies required.