Hi all,
I would like to share a flow I have been running at home for a few weeks: Home EV Solar Control (HESC). It makes sure your EV has the charge you want at the time you want, charged the cheapest way, with sun and grid. It runs as a Node-RED flow next to a Home Assistant package (helpers and a dashboard), and is free and open source (GPL-3.0): github.com/satscan1/home-ev-solar-control
Why
At home two batteries are controlled by Home Battery Control (HBC) and the panels by Home PV Control (HPVC), both Node-RED projects as well. HPVC turns the panels down when exporting costs money, and that meant the wallbox in solar mode never saw a surplus. HESC started as the fix for that and has grown into a standalone flow that also works without HPVC, and even without solar panels.
How the flow is built
The flow has four tabs:
- Inputs: a 30-second trigger and a startup safety check.
- Engine: the decisions: the solar release (with HPVC), the charge plan in the cheapest quarters, a price forecast for the hours without known prices, and, new in v1.4.0, a kickstart that lets the home battery and the car share the morning sun.
- Outputs: the only place that writes to Home Assistant, plus the history file.
- Reports: an HTML report and plain-language advice, built on demand, outside the evaluation cycle.
A few choices that may interest people here:
- HESC reads a fixed set of entities from the Home Assistant state cache in Node-RED. No API calls, and no copy of the full state table.
- It writes only when a value really changes, so the battery control running next to it is not disturbed.
- The history is kept as JSON lines in a file. No InfluxDB needed.
- Shadow mode: a new install evaluates and logs every decision, but writes nothing. You can see what it would do before you let it act.
What you need
Node-RED with node-red-contrib-home-assistant-websocket (the Node-RED add-on already has it), Home Assistant with packages enabled, and an EV charger in Home Assistant with a solar or eco mode. For charging on sun: solar panels and a forecast in watts. For the charge plan: day-ahead prices.
Chargers
HESC does not control the charger itself: it uses the solar mode the charger already has. Mappings are ready for Wallbox, Alfen, Peblar, Zappi, go-e, Wattpilot, SMA, Ohme and Easee, but only the Wallbox Pulsar Plus has been tested in practice. If you try another brand, please start in shadow mode and let me know how it goes.
Feedback on the flow itself is very welcome too. This is my first public Node-RED project, so I am sure there are things that could be done more neatly.
Also shared on the Home Assistant Community.