{"id":46233375,"url":"https://github.com/cryptotomte/ev-charging-manager","last_synced_at":"2026-04-25T09:09:21.205Z","repository":{"id":339606265,"uuid":"1161602027","full_name":"cryptotomte/ev-charging-manager","owner":"cryptotomte","description":"Home Assistant integration (HACS) for EV charging managing. Identifies drivers via RFID, calculates energy cost with static or spot pricing, and provides per-user statistics — locally, no cloud required. Built for multi-driver households with a shared charger.","archived":false,"fork":false,"pushed_at":"2026-03-23T18:34:52.000Z","size":929,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-24T16:45:30.124Z","etag":null,"topics":["custom-component","energy-management","ev","ev-charging","hacs","home-assistant"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cryptotomte.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-19T09:54:23.000Z","updated_at":"2026-03-23T18:34:12.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/cryptotomte/ev-charging-manager","commit_stats":null,"previous_names":["cryptotomte/ev-charging-manager"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/cryptotomte/ev-charging-manager","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cryptotomte%2Fev-charging-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cryptotomte%2Fev-charging-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cryptotomte%2Fev-charging-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cryptotomte%2Fev-charging-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cryptotomte","download_url":"https://codeload.github.com/cryptotomte/ev-charging-manager/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cryptotomte%2Fev-charging-manager/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32256281,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-25T04:23:17.126Z","status":"ssl_error","status_checked_at":"2026-04-25T04:21:53.360Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["custom-component","energy-management","ev","ev-charging","hacs","home-assistant"],"created_at":"2026-03-03T18:13:01.268Z","updated_at":"2026-04-25T09:09:21.197Z","avatar_url":"https://github.com/cryptotomte.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# EV Charging Manager\n\nTrack, identify, and analyze EV charging sessions in Home Assistant.\n\nA custom integration for Home Assistant (installable via [HACS](https://hacs.xyz)) that turns your charger's raw sensor data into meaningful per-user charging records. Designed for multi-driver households sharing a single charger.\n\n**Key features:**\n\n- RFID-based user identification\n- Per-user energy and cost tracking\n- Static and spot pricing support\n- Guest charging with billing\n- Session events for automations\n- InfluxDB export for Grafana analysis\n- Automatic RFID card discovery (go-e chargers)\n- Session recovery after HA restart\n\nEverything runs locally inside Home Assistant -- no cloud services required.\n\n---\n\n## Screenshots\n\n### Options Flow — Session Engine Settings\n![Session engine options](docs/images/config_flow_step_1.png)\n\n### Options Flow — Pricing Configuration\n![Pricing configuration](docs/images/config_flow_step_2.png)\n\n### Device Page — Sensors Overview\n![Integration device page](docs/images/integration_page.png)\n\n---\n\n## Prerequisites\n\nBefore installing, make sure you have:\n\n- [ ] An EV charger installed and connected to your local network\n- [ ] Home Assistant **2025.3** or newer\n- [ ] [HACS](https://hacs.xyz) installed\n- [ ] A Home Assistant integration for your charger already set up (e.g. [ha-goecharger-api2](https://github.com/marq24/ha-goecharger-api2) for go-e chargers)\n\n---\n\n## Charger Setup\n\n### go-e Chargers\n\nSee [docs/charger-profiles/goe-api2.md](docs/charger-profiles/goe-api2.md) for detailed setup instructions, including recommended WebSocket mode configuration and entity mapping.\n\n### Other Chargers\n\nAny charger that exposes the following through a Home Assistant integration can be used:\n\n- [ ] **Car status sensor** -- a sensor entity that reports when the vehicle is charging (e.g. \"Charging\", \"Connected\", etc.)\n- [ ] **Energy sensor** -- session energy in Wh or kWh\n- [ ] **Power sensor** -- current charging power in W\n- [ ] **RFID sensor** (optional) -- reports the RFID card index or UID used to authorize a session\n\nIf your charger brand is not yet documented, see [Charger Profiles (Community)](#charger-profiles-community) for how to contribute a profile.\n\n---\n\n## Installation\n\n1. Open Home Assistant and navigate to **HACS** \u003e **Integrations**.\n2. Click the three-dot menu in the top right and select **Custom repositories**.\n3. Enter `cryptotomte/ev-charging-manager` as the repository URL and select **Integration** as the category.\n4. Click **Add**, then find **EV Charging Manager** in the HACS store and click **Install**.\n5. Restart Home Assistant.\n\n---\n\n## Configuration\n\n### Config Flow (Initial Setup)\n\n1. Go to **Settings** \u003e **Devices \u0026 Services** \u003e **Add Integration**.\n2. Search for **EV Charging Manager**.\n3. Follow the setup wizard:\n\n| Step | What you configure |\n|---|---|\n| **Charger profile** | Select your charger brand (e.g. go-e) or \"Generic\" |\n| **Charger serial** | A unique name/serial for this charger instance |\n| **Entity mapping** | Map the charger's HA entities (car status, energy, power, RFID) |\n| **Pricing** | Choose static or spot pricing and enter rates |\n\nAfter completing the wizard, the integration creates a device and begins monitoring for charging sessions.\n\n### Managing Users\n\nUsers represent the people who charge at your location. Each user can have RFID cards mapped to them for automatic identification.\n\n1. Go to **Settings** \u003e **Devices \u0026 Services** \u003e **Integrations**.\n2. Find **EV Charging Manager** and click on your charger entry.\n3. Click **Add User** (subentry).\n4. Enter the user's name and type (resident or guest).\n\nGuest users have additional billing options (custom price per kWh or markup factor).\n\n### Managing Vehicles\n\nVehicles store battery specifications used for SoC estimation.\n\n1. Go to **Settings** \u003e **Devices \u0026 Services** \u003e **Integrations**.\n2. Find **EV Charging Manager** and click on your charger entry.\n3. Click **Add Vehicle** (subentry).\n4. Enter the vehicle name, battery capacity, usable capacity, and charging parameters.\n\n### Managing RFID Mappings\n\nRFID mappings connect a physical RFID card to a user (and optionally a vehicle).\n\n**Automatic discovery (go-e chargers):** The integration reads the charger's card registry directly. When adding an RFID mapping, you select from discovered cards and assign them to a user and vehicle.\n\n**Manual fallback (other chargers):** Enter the card index or UID manually based on your charger's documentation.\n\n1. Go to **Settings** \u003e **Devices \u0026 Services** \u003e **Integrations**.\n2. Find **EV Charging Manager** and click on your charger entry.\n3. Click **Add RFID Mapping** (subentry).\n4. Select or enter the card, then assign a user and optionally a vehicle.\n\n---\n\n## Who Does What? (Responsibility Matrix)\n\n| What | Who |\n|---|---|\n| Session detection and tracking | Integration (automatic) |\n| RFID user identification | Integration (automatic) |\n| Energy and cost calculation | Integration (automatic) |\n| Session events for automations | Integration (automatic) |\n| Per-user statistics | Integration (automatic) |\n| Session recovery after restart | Integration (automatic) |\n| Charger hardware installation | User |\n| Charger network connectivity | User |\n| HA integration for charger | User |\n| User / vehicle / RFID setup in config | User |\n| Pricing configuration | User |\n| InfluxDB setup and maintenance | User |\n| Grafana dashboards | User |\n\nIn short: you set up the hardware and tell the integration who your users are. The integration handles everything else.\n\n---\n\n## Sensors\n\nThe integration creates the following sensor entities per charger:\n\n### Session Sensors\n\n| Sensor | Description |\n|---|---|\n| **Status** | Current engine state: `idle`, `tracking`, or `completing` |\n| **Current User** | Name of the identified user (or \"Unknown\") |\n| **Current Vehicle** | Name of the identified vehicle |\n| **Session Energy** | Energy delivered in the current session (kWh) |\n| **Session Power** | Current charging power (W) |\n| **Session Duration** | Elapsed time of the current session (HH:MM:SS) |\n| **Session Cost** | Accumulated cost of the current session |\n| **Estimated SoC Added** | Estimated state-of-charge added to the battery (%) |\n\nSession sensors become available when a charging session is active and return to unavailable when idle.\n\n### Per-User Statistics Sensors\n\nFor each configured user (and a combined \"Guest\" set), the integration creates:\n\n| Sensor | Description |\n|---|---|\n| **Total Energy** | Cumulative energy charged (kWh) |\n| **Total Cost** | Cumulative charging cost |\n| **Session Count** | Number of completed sessions |\n| **Last Session** | Timestamp of the most recent session |\n| **Average Energy** | Average energy per session (kWh) |\n\nStatistics sensors include a `monthly_breakdown` attribute with per-month totals.\n\n### Binary Sensor\n\n| Sensor | Description |\n|---|---|\n| **Charging** | On when a session is actively tracking |\n\n---\n\n## Optional: InfluxDB + Grafana\n\nThere are two complementary approaches for long-term analysis. You can use either or both.\n\n### Flow A: Real-time Sensor Logging\n\nConfigure Home Assistant's built-in [InfluxDB integration](https://www.home-assistant.io/integrations/influxdb/) to log the EV Charging Manager sensor entities. This gives you continuous time-series data (power curves, cost accumulation, etc.) directly in InfluxDB.\n\nThis is entirely managed through HA's InfluxDB integration configuration -- no special setup in EV Charging Manager is needed.\n\n### Flow B: Session Export via Automation\n\nFor per-session summary records (one data point per completed charge), use the provided automation template:\n\n1. Copy `automations/ev_charging_manager_influxdb_export.yaml` into your Home Assistant automations.\n2. The automation triggers on `ev_charging_manager_session_completed` events and writes a summary record to the InfluxDB measurement `ev_charging_sessions`.\n\nEach record includes: user, vehicle, energy (kWh), cost, duration, cost method, and timestamp.\n\nSee `docs/grafana-queries.md` for example Flux/InfluxQL queries to build dashboards.\n\n---\n\n## Troubleshooting\n\n### Sessions Logged as \"Unknown\"\n\nWhen a session completes without a recognized user, it is attributed to \"Unknown\". Common causes:\n\n1. **No RFID mapping** -- the card used is not mapped to a user. Add an RFID Mapping subentry.\n2. **trx sensor not updating** -- the charger's RFID/transaction sensor is not reporting values. Verify the entity in Developer Tools \u003e States.\n3. **Card not active on charger** -- some chargers require cards to be explicitly enabled. Check your charger's app or configuration.\n\nThe integration logs a diagnostic reason code for each unknown session. Check the Home Assistant logs for entries containing `unknown_reason` to pinpoint the cause.\n\n### Cross-Validation Warnings\n\nThe integration compares session-tracked energy against the charger's total energy counter (if configured). A warning indicates a deviation that usually means sensor updates were missed during the session (e.g. due to network issues or charger disconnects).\n\n- Verify the charger's network connection is stable.\n- If using polling mode, consider switching to WebSocket mode for more reliable updates.\n\n### HA Restart Recovery\n\nThe integration automatically recovers active sessions after a Home Assistant restart:\n\n- The active session snapshot is persisted periodically (default: every 5 minutes).\n- On startup, the engine restores the session if the same RFID card is still active.\n- Very short sessions (\u003c 60s) or sessions with negligible energy (\u003c 50 Wh) may be discarded as micro-sessions.\n\nCheck the logs for \"Recovered session\" entries to confirm recovery occurred. If a session was lost, look for \"Discarded micro-session\" or \"Session continuity mismatch\" messages.\n\n---\n\n## Charger Profiles (Community)\n\nCharger profiles define how the integration maps a specific charger brand's entities to the internal data model. Profiles for supported chargers are documented in [docs/charger-profiles/](docs/charger-profiles/).\n\nTo contribute a profile for a new charger brand:\n\n1. Identify the HA integration and its entity naming conventions.\n2. Document the entity mappings (car status, energy, power, RFID) in a markdown file.\n3. Submit a pull request adding the profile to `docs/charger-profiles/`.\n\nSee [docs/charger-profiles/README.md](docs/charger-profiles/README.md) for the template and guidelines.\n\n---\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcryptotomte%2Fev-charging-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcryptotomte%2Fev-charging-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcryptotomte%2Fev-charging-manager/lists"}