Hanergy

Built for Solar Homeowners

Hanergy exists because managing solar surplus should be simple, reliable, and accessible to every Home Assistant user.

The Story

Hanergy started as a side project born from frustration. Solar panels were generating kilowatts of free energy, but most of it was being exported to the grid at a fraction of the retail price. The tools available to fix this were either too complex to configure or too limited to be useful.

EMHASS is a powerful optimization tool, but its reliance on linear programming, cost functions, and day-ahead forecasts creates a steep learning curve. For many Home Assistant users, the setup process alone takes days of trial and error. The idea behind Hanergy was different: what if surplus management was just a priority list?

"If there is surplus, charge the car first. If there is still surplus, heat the water. If surplus drops, stop heating water first." That simple mental model became the foundation for Hanergy's priority-cascade engine.

Mission

Make solar self-consumption optimization accessible to every Home Assistant user. No PhD in operations research required. No weather API keys. No solver configuration. Just a clear list of priorities and a fast evaluation engine that runs every 10 seconds.

Simple

Priority list instead of linear programming. Inspectable, predictable decisions.

Local

All processing on your Home Assistant. No cloud dependency for operation.

Fast

10-second evaluation cycle. Real-time response to changing conditions.

Technology

The backend is written in Go — a single static binary with minimal dependencies. Go was chosen for its reliability, performance, and ease of cross-compilation. The same binary runs on amd64, aarch64, and armv7 (Raspberry Pi).

The frontend is a Preact + TypeScript single-page application, bundled with Vite. Preact was chosen over React for its smaller bundle size, which matters on resource-constrained devices like Raspberry Pi.

Hanergy communicates with Home Assistant through the Supervisor REST API for commands and WebSocket for real-time entity state subscriptions. The dashboard uses Server-Sent Events (SSE) for live updates without polling.

Backend

Go 1.23+ · Single binary · Alpine Linux 3.19

Frontend

Preact + TypeScript · Vite · SSE real-time updates

Container

Multi-arch: amd64, aarch64, armv7

Integration

HA Supervisor API + WebSocket subscriptions

Open Source, Commercially Sustainable

The Hanergy add-on repository is open source. Anyone can inspect the code, report issues, and contribute improvements. Transparency builds trust, especially for software that controls physical devices in your home.

Commercial licensing (Pro and Max tiers) funds ongoing development. This model keeps the project sustainable without relying on subscriptions, ads, or selling user data. Pay once, use forever.

Join the community

Install Hanergy, try it with your first device, and share your experience. Every solar homeowner deserves simple surplus management.