MCPSERV.CLUB
evcc

evcc

Self-Hosted

Open‑source EV charge controller and home energy manager

Active(100)
5.6kstars
0views
Updated 22 hours ago
evcc screenshot 1
1 / 5

Overview

Discover what makes evcc powerful

evcc is a **self‑hosted, open‑source energy management platform** focused on electric vehicle (EV) charging and home energy orchestration. At its core, it acts as a local controller that integrates with a wide spectrum of hardware: EV chargers (OCPP, proprietary APIs), smart switches, solar inverters, battery storage, and heating systems. By exposing a unified REST/GraphQL API and WebSocket feeds, evcc allows developers to build custom dashboards, automate charging schedules, or embed the logic into larger home‑automation stacks such as Home Assistant or OpenHAB.

Language & Runtime

Frameworks & Libraries

Data Persistence

Communication Protocols

Overview

evcc is a self‑hosted, open‑source energy management platform focused on electric vehicle (EV) charging and home energy orchestration. At its core, it acts as a local controller that integrates with a wide spectrum of hardware: EV chargers (OCPP, proprietary APIs), smart switches, solar inverters, battery storage, and heating systems. By exposing a unified REST/GraphQL API and WebSocket feeds, evcc allows developers to build custom dashboards, automate charging schedules, or embed the logic into larger home‑automation stacks such as Home Assistant or OpenHAB.

Technical Stack

  • Language & Runtime: The application is written in Go (Golang), compiled to a single static binary for maximum portability. Go’s strong type system and concurrency primitives make it ideal for handling the real‑time I/O required by charging stations and metering devices.
  • Frameworks & Libraries: It uses the standard net/http package for its web server, augmented by a lightweight router (e.g., chi) and middleware for authentication/authorization. For configuration, it relies on the viper library to merge YAML/TOML files, environment variables, and command‑line flags.
  • Data Persistence: evcc stores state in a SQLite database bundled with the binary, ensuring zero‑dependency deployment. The schema is simple (device registry, schedules, logs) but extensible via migration scripts written in Go.
  • Communication Protocols: The platform speaks a variety of protocols out‑of‑the‑box—OCPP 1.6/2.0 for commercial chargers, HTTP/REST for many smart plugs, Modbus/TCP for inverters, and MQTT for IoT hubs. Protocol adapters are modular, making it trivial to add new drivers.

Core Capabilities

  • Device Discovery & Registration: Automatic detection of networked devices (via mDNS, UPnP, or manual IP) and dynamic registration in the device registry.
  • Scheduling & Rule Engine: A rule‑based engine that allows developers to write declarative charging schedules (e.g., “charge when PV surplus > 3 kW” or “use tariff X during peak hours”). Rules are expressed in a JSON‑like DSL and evaluated every minute.
  • API Surface: A RESTful API exposes endpoints for device status, schedule manipulation, and telemetry. WebSocket streams provide low‑latency updates to UI clients.
  • Plugin Architecture: New device drivers can be added as Go plugins or compiled into the binary. The plugin interface is defined in a shared package, ensuring backward compatibility.
  • Webhooks & Callbacks: External services can subscribe to events (e.g., “charge started”, “over‑current detected”) via HTTP callbacks, enabling integration with billing systems or notification services.

Deployment & Infrastructure

evcc is deliberately lightweight: a single static binary (~30 MB) runs on ARM (Raspberry Pi), x86, or cloud VMs. It ships with Docker images (evcc/evcc:latest) and a Docker Compose example that includes SQLite persistence, MQTT broker, and reverse‑proxy. For production, developers can deploy it behind Traefik or Nginx with TLS termination, and use systemd for process supervision. The application is stateless beyond the local database, making horizontal scaling straightforward—multiple instances can share a networked SQLite or switch to PostgreSQL if needed.

Integration & Extensibility

  • Home‑Automation Hooks: evcc exposes a Home Assistant integration that automatically creates sensors and switches, allowing users to trigger charging from automations.
  • Custom UI: The built‑in React/Vite front‑end is modular; developers can fork the repository and replace components or add custom dashboards without touching the Go code.
  • SDK & Documentation: The API is documented with OpenAPI/Swagger, and a Go client library (evcc/sdk) simplifies embedding evcc calls into other services.
  • Community Plugins: The ecosystem hosts community‑written adapters for niche devices (e.g., specific heat pump models), which can be pulled from the GitHub repository and built into the binary.

Developer Experience

evcc’s configuration is declarative: a single config.yaml file describes all devices, schedules, and integrations. The documentation is comprehensive, with device‑specific guides, a troubleshooting section, and an active community forum on Discord. The project follows semantic versioning, with nightly builds available via GitHub Actions. Licensing under MIT ensures no restrictions on commercial deployment.

Use Cases

  1. Solar‑Powered EV Charging – Automatically start charging when PV surplus exceeds a threshold, maximizing self‑consumption.
  2. Dynamic Tariff Optimization – Integrate with time‑of‑use tariffs to shift charging to low‑price periods, reducing electricity bills.
  3. Fleet Management – Deploy multiple evcc instances across a fleet of electric trucks, each with its own schedule and monitoring dashboard.
  4. Smart Home Energy Hub – Combine heating control, battery storage, and EV charging into a single orchestrated system, exposing all metrics to a central home‑automation platform.

Advantages

  • Performance & Low Footprint: Go’s compiled binaries run with minimal overhead, ideal for edge devices.
  • Full Local Control: No cloud dependency; all data stays on‑premise, satisfying privacy and regulatory constraints.
  • Extensibility: Plugin architecture and open API allow rapid integration of new hardware or business logic.
  • Community‑Driven: A large, active contributor base ensures quick bug fixes and

Open SourceReady to get started?

Join the community and start self-hosting evcc today

Weekly Views

Loading...
Support Us

Featured Project

$30/month

Get maximum visibility with featured placement and special badges

Repository Health

Loading health data...

Information

Category
cloud-platforms
License
MIT
Stars
5.6k
Technical Specs
Pricing
Open Source
Docker
Official
Min RAM
512MB
Min Storage
1GB
Supported OS
LinuxDocker
Author
evcc-io
evcc-io
Last Updated
22 hours ago