A native Go charger implementation for evcc that integrates Braiins OS+ Bitcoin miners as PV surplus loads.
Tested with Antminer S19K Pro running Braiins OS+.
- PV surplus mining — evcc controls power target directly via Braiins OS+ API
- Intelligent decrease — waits before reducing power to avoid long DPS recovery cycles
- DPS cooperation — reads hardware DPS constraints and respects min/step values
- Daily session reset — resets evcc energy counter at 23:59
- Token management — automatic re-authentication when token expires
- Braiins OS+ with Power Target mode enabled in tuner settings
- evcc built from source (this integration requires compilation)
- Clone or fork evcc
- Copy
braiins.go→charger/braiins.go - Copy
braiins.yaml→templates/definition/charger/braiins.yaml - Build evcc — see CONTRIBUTING.md for build instructions
After building, configure the miner through the evcc UI under Devices → Chargers → Braiins Bitcoin Miner.
| Parameter | Type | Default | Description |
|---|---|---|---|
uri |
string | — | Miner IP or hostname |
user |
string | root |
Username |
password |
string | — | Password |
maxPower |
int | 0 |
Max power in W (0 = miner default) |
dailyReset |
bool | true |
Reset energy counter daily at 23:59 |
intelligentDecrease |
bool | true |
Gradual power decrease |
minDecreaseDuration |
duration | 5m |
Wait before decreasing power |
decreaseStepInterval |
duration | 3m |
Wait between decrease steps |
powerTargetStep |
int | 300 |
Step size in watts |
evcc treats the miner as a charger. In PV mode, evcc calculates available surplus and calls MaxCurrentMillis — the integration converts amps to watts (A × 230V) and sets the Braiins OS+ power target via the local API.
The intelligent decrease logic prevents the miner from immediately throttling on short cloud cover: it waits minDecreaseDuration before starting to decrease, then reduces in powerTargetStep increments with decreaseStepInterval between steps.
Tested against Braiins OS+ API v1.5.0.
MIT License — Copyright (c) 2025 Tobias Huber (https://github.com/TobiasHuber1980)
See LICENSE for details.