Sign inSign up

fgc92/ev-charging-report

By fgc92

•Updated about 2 months ago

Self-hosted web dashboard for UniFi EV Station charging history. Upload your CSV export to visualize

Image
0

778

fgc92/ev-charging-report repository overview

⁠⚡ UniFi Connect EV Charge Report

Docker Hub License: MIT GitHub Actions

A self-hosted web app that turns a UniFi EV Station charging history CSV into an interactive cost dashboard — with charts, month navigation, live kWh price editing, and Excel / PDF export.

Built with Django. Runs entirely in Docker. No cloud account required.

Dashboard screenshot


⁠Quick start

docker run -d -p 8000:8000 \
  -e DJANGO_SECRET_KEY=changeme \
  --name ev-report \
  fgc92/ev-charging-report:latest

Open http://localhost:8000⁠, upload your CSV, done.

git clone https://github.com/fgadot/unifi-connect-ev-charging-report.git
cd unifi-connect-ev-charging-report
cp .env.example .env          # edit DJANGO_SECRET_KEY
docker compose up -d

⁠Features

📅 Month navigationOnly months present in your data appear
💲 Live kWh priceChange the rate — all costs update instantly
📊 4 chartsDaily cost, daily kWh, avg cost by day of week, cost by month
📋 Day tableSessions, kWh, charge time, cost, cumulative per day
⬇ Excel exportFull workbook with editable price cell
⬇ PDF exportPrint-ready multi-page report
🔔 Update notificationsBanner appears when a new Docker image is available
🔄 Auto-update (optional)Run with Watchtower to upgrade automatically

⁠Auto-updates with Watchtower

To have the container update itself when a new image is pushed to Docker Hub, add Watchtower to your compose file:

services:
  web:
    image: fgc92/ev-charging-report:latest
    ports:
      - "8000:8000"
    environment:
      - DJANGO_SECRET_KEY=changeme
    restart: unless-stopped
    labels:
      - "com.centurylinklabs.watchtower.enable=true"

  watchtower:
    image: containrrr/watchtower
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    command: --interval 300 --cleanup --label-enable
    restart: unless-stopped

Watchtower checks every 5 minutes and only updates containers with the watchtower.enable=true label — your other containers are not affected.


⁠Manual upgrade

If you see the update banner in the app:

docker pull fgc92/ev-charging-report:latest
docker stop ev-report && docker rm ev-report
docker run -d -p 8000:8000 \
  -e DJANGO_SECRET_KEY=changeme \
  --name ev-report \
  fgc92/ev-charging-report:latest

Or with compose: docker compose pull && docker compose up -d


⁠Expected CSV format

Export from your UniFi console. The file must contain:

ColumnDescription
Date (console local time)Session timestamp (local preferred)
Date (UTC time)Fallback if local time column is absent
Power Usage (kWh)Energy used per session
Charge Time (s)Active charging seconds
Total Time (s)Total session seconds

⁠Environment variables

VariableDefaultDescription
DJANGO_SECRET_KEY(required in prod)Django secret key — set to any long random string
DEBUGfalseSet to true for development error pages

⁠CI/CD

Every push to main triggers a GitHub Actions workflow that builds a multi-arch image (linux/amd64 + linux/arm64) and pushes it to Docker Hub as fgc92/ev-charging-report:latest.

Required GitHub secrets: DOCKERHUB_USERNAME and DOCKERHUB_TOKEN.


⁠Contributing

See CONTRIBUTING.md⁠. Issues and PRs are welcome.

⁠License

MIT⁠ © 2026 Frank Gadot

Tag summary

Content type

Image

Digest

sha256:6174e61ed…

Size

126.1 MB

Last updated

about 2 months ago

docker pull fgc92/ev-charging-report